eth0izzle / shhgit

Ah shhgit! Find secrets in your code. Secrets detection for your GitHub, GitLab and Bitbucket repositories.
MIT License
3.84k stars 481 forks source link

Usage Instructions for Gitlab #65

Closed vikas1389 closed 3 years ago

vikas1389 commented 4 years ago

Hi We have about 200 gitlab repos- could you please help us with usage instructions with gitlab.

vikas1389 commented 4 years ago

config.yaml reference for gitlab would also help.

eth0izzle commented 4 years ago

Hey @vikas1389, you can use GitLab CI/CD pipeline to execute shhgit with the --local flag; https://docs.gitlab.com/ee/ci/introduction/ - then no need to worry about your config.yaml

vikas1389 commented 4 years ago

@eth0izzle Like- I can use this docker image docker pull eth0izzle/shhgit and command like below

shhgit --local [Directory]

Currently we use community edition of gitlab.

KrustyHack commented 3 years ago

Ay,

I don't know if it can help but here is an example of .gitlab-ci.yml file to use ShhGit in Gitlab CI :

---
# Run ShhGit Security Scanner
shhgit-security-scanner:
  image: gcr.io/changecommerce/proximis/tools/shhgit
  stage: test
  script:
    - mkdir -p /tmp/shhgit
    - mv ./config.yaml /tmp/shhgit/config.yaml
    - /app/shhgit -config-path /tmp/shhgit/ -local ./
  retry:
    max: 2
    when: runner_system_failure

And add .git in blacklisted_paths in config.yaml.