使用云原生构建扫描当前项目 .cnb.yml:
# .cnb.yml
.run-arrowhead-cnb: &run-arrowhead-cnb
docker:
image:
name: docker.cnb.cool/tencent/cloud/keenlab/arrowhead-cnb:main
stages:
- name: run arrowhead-cnb
script: arrowhead-cnb --output output.json ./
- name: report
script: cat output.json
main:
push:
- *run-arrowhead-cnb
输出报告格式为 JSON,默认输出到 output.json,具体 schema 可以参考 output schema。
完整例子可以参考 arrowhead-cnb-examples。
arrowhead-cnb.yml 进行配置:# .cnb.yml
# 使用仓库中 arrowhead-cnb.yml 作为配置文件
.run-arrowhead-cnb: &run-arrowhead-cnb
stages:
- name: run arrowhead-cnb
image: docker.cnb.cool/tencent/cloud/keenlab/arrowhead-cnb:main
args: ["--config", "arrowhead-cnb.yml"]
- name: report
script: cat output.json
main:
push:
- *run-arrowhead-cnb
# .cnb.yml
.run-arrowhead-cnb: &run-arrowhead-cnb
stages:
- name: run arrowhead-cnb
image: docker.cnb.cool/tencent/cloud/keenlab/arrowhead-cnb:main
settings:
config:
loglevel: info
infosec:
excludes:
- "./.git/*"
threads: 8
- name: report
script: cat output.json
main:
push:
- *run-arrowhead-cnb
配置文件格式可以参考 config-schema.json。
infosec 敏感信息扫描配置。
excludes 排除扫描的文件或目录,支持 glob。threads 扫描时使用的线程数。