在gitlab中,我试图启用秘密检测,我用它来检测漏洞,但它不会失败。
这是我的“..gitlab ci.yml”文件:
include:
- template: Security/Secret-Detection.gitlab-ci.yml
stages:
- test
secret_detection:
tags:
- secret
artifacts:
reports:
secret_detection: gl-secret-detection-report.json
variables:
SECRET_DETECTION_HISTORIC_SCAN: "true"
日志的一部分(gl-秘密检测-report.json):
"category": "secret_detection",
"name": "Stripe",
"message": "Stripe detected; please remove and revoke it if this is a leak.",
"severity": "Critical",
"confidence": "Unknown",
"raw_source_code_extract": "pk_test_TYooMQauvdEDq54NiTphI7jx",
"scanner": {
"id": "gitleaks",
"name": "Gitleaks"
但是:
运行于GitLab企业版14.0.0-ee,启动计划
如果在扫描中发现了什么,我如何使这个作业在合并请求中失败?
发布于 2022-05-10 17:12:06
我也在寻找这个问题的答案,这显然是设计上的(对我来说是疯狂的),至少在免费/高级层上是这样。我不明白为什么这份工作发现了一个秘密,却成功了。
以下是一些解决办法:
发布于 2022-11-20 20:24:10
secret_detection:
allow_failure: false
https://stackoverflow.com/questions/68373563
复制相似问题