Code for processing report from Thoth components.
Project description
This library called thoth-report-processing is used in project Thoth to process all outputs provided by Thoth Components and stored using thoth-storages library.
Installation and Usage
The library can be installed via pip or Pipenv from PyPI:
pipenv install thoth-report-processing
The library does not provide any CLI, it is rather a low level library supporting other parts of Thoth.
Reports Processing
The reports to be processed can be retrieved in two ways:
locally, providing a path.
Using Ceph S3 providing the following environment variables:
THOTH_CEPH_KEY_ID=<ceph_key_id> THOTH_CEPH_SECRET_KEY=<ceph_key_id> THOTH_S3_ENDPOINT_URL=<s3_endpoint_url> THOTH_CEPH_HOST=<ceph_host> THOTH_CEPH_BUCKET=<ceph_bucket> THOTH_CEPH_BUCKET_PREFIX=<ceph_bucket_prefix> THOTH_DEPLOYMENT_NAMR=<deployment_name>
see currently available adapters from thoth-storages here.
Security Indicators
Aggregating Security Indicators using local path:
from thoth.report_processing.components.security import SecurityIndicatorsBandit, SecurityIndicatorsCloc
from thoth.report_processing.components.security import SecurityIndicatorsAggregator
_SI_BANDIT_FOLDER_PATH =<>
_SI_CLOC_FOLDER_PATH =<>
security_aggregator = SecurityIndicatorsAggregator()
si_bandit_report = SecurityIndicatorsBandit.aggregate_security_indicator_bandit_results(
security_indicator_bandit_repo_path=_SI_BANDIT_FOLDER_PATH
)[0]
si_cloc_report = SecurityIndicatorsCloc.aggregate_security_indicator_cloc_results(
security_indicator_cloc_repo_path=_SI_CLOC_FOLDER_PATH
)[0]
aggregated_json = security_aggregator.create_si_aggregated_json(
si_bandit_report=si_bandit_report, si_cloc_report=si_cloc_report
)
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
Close
Hashes for thoth-report-processing-0.2.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5675c7d14c68fdde89515f7ad3f3e750a88b681c25002b335c2f613d0277ab82 |
|
MD5 | a4ae4fb9fbc979e093f4aa1538ec3e12 |
|
BLAKE2b-256 | 93adcd81814b54d3a9e7c2b73b8343a3963e158caaf9bc6fc00333af74e9b19f |
Close
Hashes for thoth_report_processing-0.2.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ce36bdbcd05e2660e86e7f846c075ccd6648e59469a45a24e1a2599d5b93d36 |
|
MD5 | 36e0c953e6631ef31371d3cb53a01653 |
|
BLAKE2b-256 | d6f3f1c1b3732b8901f806c0fd5becfbedf4311fe171a0ae4ebb06dc9bd05a12 |