gitlab ci中的gitleaks

问题描述 投票:1回答:1

我正在尝试在GitLab CI中手动设置gitleaks,以扫描我的GitLab存储库中的秘密。我认为我的工作配置错误。作业通过,但输出unknown flag 'c',并且gitleaks帮助对话,但没有预期的实际基于gitleaks的实际输出。

我的`.gitlab-ci.yml'看起来像:

stages:
  - security

gitleaks:
  stage: security
  image: zricethezav/gitleaks
  script:
    - gitleaks --verbose --repo-path=$PWD

关于我可能要去哪里的任何建议?

gitlab-ci gitlab-ce
1个回答
0
投票

看看是否this example works better

stages:
  - leaks
  - test

leaks:gitleaks:
  stage: leaks
  image: 
    name: "zricethezav/gitleaks"
    entrypoint: [""]
  script:
    - gitleaks -v --repo-path=./ --config=gitleaks.toml

您可以调整阶段名称,但是添加一个空的入口点,并且config file可能会有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.