Last active
January 8, 2023 07:43
-
-
Save s2504s/831ff7c5ca96d1aa0d6988caeede7c5b to your computer and use it in GitHub Desktop.
Trivy scan
This file contains hidden or 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
| docker run -v trivy-cache:/root/.cache -v /var/run/docker.sock:/var/run/docker.sock aquasec/trivy i --ignore-unfixed --skip-dirs "/tmp" --no-progress --severity CRITICAL,HIGH,MEDIUM --exit-code 1 --timeout 5m my_image_name | |
| Create map with skipped dirs - key is SOURCE_REPO_URL and value is a list with skipped directories: | |
| ```bash | |
| def skip_dirs = [ | |
| 'my_git_url.git': ["/tmp", "/bin/"], | |
| ] | |
| ``` | |
| Add this var to a CLI: | |
| ```bash | |
| ... --ignore-unfixed --skip-dirs "${skip_dirs[env.SOURCE_REPO]?.join(" ")}" ... | |
| ``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment