Last active
June 4, 2024 10:56
-
-
Save PouyaEsmaeili/9eb24e0ce9588f4738b11c55b8b15138 to your computer and use it in GitHub Desktop.
Vulnerability Scanning in Gitlab CI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
- vulnerability-scanning | |
osv-scanner: | |
stage: vulnerability-scanning | |
image: golang | |
before_script: | |
- go install github.com/google/osv-scanner/cmd/osv-scanner@v1 | |
script: | |
- osv-scanner -v | |
- osv-scanner --lockfile=requirements.txt | |
grype-scanner: | |
stage: vulnerability-scanning | |
before_script: | |
- curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin | |
script: | |
- grype version | |
- grype <image> --scope all-layers --only-notfixed -v | |
yelp-scanner: | |
stage: vulnerability-scanning | |
image: python | |
before_script: | |
- pip install detect-secrets | |
script: | |
- detect-secrets --version | |
- detect-secrets scan | |
bandit-scanner: | |
stage: vulnerability-scanning | |
image: python | |
before_script: | |
- pip install bandit | |
script: | |
- bandit -r . | |
gitleaks-scanner: | |
stage: vulnerability-scanning | |
image: ubuntu | |
before_script: | |
- git clone https://github.com/gitleaks/gitleaks.git | |
- cd gitleaks | |
- make build | |
- cd .. | |
script: | |
- gitleaks detect -v | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment