用于处理Thoth组件报告的代码。
项目描述
这个名为 thoth-report-processing 的库用于项目 Thoth,用于处理由 Thoth 组件提供的所有输出,并使用 thoth-storages 库 存储这些输出。
安装和使用
可以通过 pip 或 Pipenv 从 PyPI 安装此库
pipenv install thoth-report-processing
此库不提供任何 CLI,而是一个支持 Thoth 其他部分的底层库。
报告处理
要处理的报告可以通过两种方式检索
本地,提供路径。
使用 Ceph S3 提供以下环境变量
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>
查看 thoth-storages 当前可用的适配器,请点击此处 这里。
安全指标
使用本地路径聚合安全指标
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
)
项目详情
下载文件
下载适合您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。
源分布
thoth-report-processing-0.8.1.tar.gz (103.7 kB 查看哈希值)
构建分布
关闭
thoth-report-processing-0.8.1.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 74d605aba5d4b8cc9f91ebcd96cac124580f52cb977db58d1ebddb1b1fe587d0 |
|
MD5 | 49db80f4689481ae88a1c824edaedf20 |
|
BLAKE2b-256 | 971ea7a67e977307fd561782477828cb30cc81daa794548d226b5344223c7368 |
关闭
thoth_report_processing-0.8.1-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 723d6463c16af0672b5b69dc3e9bea0eb98d140603b18bd860dc60b38ac20011 |
|
MD5 | a29fc09b5b19e5c0a48539a677813afa |
|
BLAKE2b-256 | 4a3aabbae4d2e1fb37d626f71c75aafc4fd42367488ff023f623d6428918ef4a |