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, is_local=True
)[0]
si_cloc_report = SecurityIndicatorsCloc.aggregate_security_indicator_cloc_results(
security_indicator_cloc_repo_path=_SI_CLOC_FOLDER_PATH, is_local=True
)[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
thoth-report-processing-0.8.0.tar.gz
(102.5 kB
view hashes)
Built Distribution
Close
Hashes for thoth-report-processing-0.8.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed6482788bae80137af75419719b5ba7de27e522245ff4fc78b101d1b0236d9d |
|
MD5 | fe34ab9e09999276ec9515c869625617 |
|
BLAKE2b-256 | 5a0e619775a45cbf0a79399d774c47d4794c48322c9bb4c35d6e276124815edb |
Close
Hashes for thoth_report_processing-0.8.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9681cc01b35ad65f0eb083daa1e702660c23082aca90a90adec8ed5537d5cbf4 |
|
MD5 | 11eebe9d0e252e6be8405c968e0e9d0f |
|
BLAKE2b-256 | b5b28c5b5b643c365378e2f7757a7a4ce0a61c36c6a119ffea53bda57c37d15b |