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.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2af6010e727806918dc4ee2e48b79dd6ef7aba5f2cc751a020a299f4638c576 |
|
MD5 | b8b2c85656e7a35cc69fbec3857203c8 |
|
BLAKE2b-256 | f902f364d29f3920d63ee865816cb5014c915c7ecec3b88927a854bb953d28b4 |
Close
Hashes for thoth_report_processing-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dac0a049236e9a80a0c5adcb379dbdff98223ac0e5834b54047825a7869a3025 |
|
MD5 | e64de3469988ea4886e1506e82b3cce9 |
|
BLAKE2b-256 | 5964dc232dd35a6c157633ac74da55a71b8603ca5125c1aaf3f40491974166f9 |