Python agent for Metaport SBOM generation and reporting
Project description
What is this?
A client library which connects any Python app to a Metaport server using the CycloneDX SBOM standard for data interchange.
How to use
Introduction
The library will automatically generate an SBOM for your app, submit it to Metaport and subsequently delete it. Data can be sent using the HTTP or Email transports. See the docs site for example requests.
When installed in a Python project, the library provides a single executable metaport. It's designed to be invoked on a schedule via cron from within an application's production environment or as part of a CI/CD pipeline.
This library supports traditional Pip, Poetry, and Pipfile based projects.
Vulnerabilities will be reported by this agent to your Metaport sserver by invoking the following commands (and in this order):
poetry auditpip-audit
If neither command is available, no vulnerability data will be sent when using --classic=1. If however vulnerability data is required, consider running a side-by-side instance of DependencyTrack, and configuring Metaport with it for dependencies and vulnerabilties (without --classic=1).
Requirements
This package requires Python 3.10+. If used as part of a CI/CD setup, it can be installed as a throwaway dependency via Poetry's --dev switch ala poetry add --dev, or as a permanent dependency of your application.
Install
- Poetry
As part of production apps:
poetry add metaport-agent-python
- Pip
pip install metaport-agent-python
- Environment Variables
There are some environment variables which need to be set before the lib will operate correctly. Please see the docs site for more detailed installation and configuration instructions and examples.
Supported Frameworks and CMS's
Yours not listed? Contributions are very welcome. Please file an issue and issue a Merge Request, it's a one-line file change!
- Django
- Flask
- Quart
- Pyramid
- Bottle
- Wagtail
- Django CMS
- Pylons
- FastAPI
- Tornado
- CherryPy
- web2py
- Falcon
- Sanic
- Starlette
- Molten
- Klein
- wheezy
- turbogears
Development Setup
Virtual Environment
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# On Linux/macOS:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
# Install development dependencies
pip install -r requirements-dev.txt
Using Poetry
# Install Poetry if not already installed
pip install poetry
# Install dependencies
poetry install
# Activate virtual environment
poetry shell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metaport_agent_python-1.0.16.tar.gz.
File metadata
- Download URL: metaport_agent_python-1.0.16.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f28d88fe9a1c8e264ecd5131f1916bf007d3ec2cb7f897e502486e12033387d
|
|
| MD5 |
c0dbbd0c61901b45842870c590958b22
|
|
| BLAKE2b-256 |
8038dfce08d3b3210f452782c4c307de7a355a0e9496b93eed460d6d736e668d
|
File details
Details for the file metaport_agent_python-1.0.16-py3-none-any.whl.
File metadata
- Download URL: metaport_agent_python-1.0.16-py3-none-any.whl
- Upload date:
- Size: 54.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
434d73cdeda8381f307b0aeaa4cb57d69febf0e4fae3094c24d579700b7e4335
|
|
| MD5 |
ecab07c10e99e89b97d8b56cc905c410
|
|
| BLAKE2b-256 |
a3c2d476998d2994515c131406e45d262f0b0561f22c172af7ccd112e124d8a5
|