Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CI Templates
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IT Common Platform
tenant-support
CI Templates
Merge requests
!17
[
PLATFORM-1335
] correct usage of TRIVY_SEVERITY environment variable
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
[
PLATFORM-1335
] correct usage of TRIVY_SEVERITY environment variable
akers-main-patch-13888
into
main
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
Joshua David Akers
requested to merge
akers-main-patch-13888
into
main
2 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
1
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
86cd5751
1 commit,
2 years ago
1 file
+
3
−
3
Expand all files
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
building-blocks/trivy-scan.yml
+
3
−
3
Options
@@ -19,9 +19,9 @@
cat ${TRIVY_IGNORE_FILE}
fi
if [ -n "${TRIVY_SEVERITY}" ]; then
export TRIVY_SEVERITY="
--severity
${TRIVY_SEVERITY}"
export TRIVY_SEVERITY="${TRIVY_SEVERITY}"
else
export TRIVY_SEVERITY="
--severity
CRITICAL"
export TRIVY_SEVERITY="CRITICAL"
fi
echo "Scanning $FULL_IMAGE_NAME"
trivy --version
@@ -35,7 +35,7 @@
# Prints full report
time trivy image --exit-code 0 --cache-dir .trivycache/ --no-progress --timeout 15m $TRIVY_IGNORE "$FULL_IMAGE_NAME"
# Fail on critical vulnerabilities
time trivy image --exit-code 1 --cache-dir .trivycache/
$TRIVY_SEVERITY
--no-progress --timeout 15m $TRIVY_IGNORE "$FULL_IMAGE_NAME"
time trivy image --exit-code 1 --cache-dir .trivycache/ --no-progress --timeout 15m $TRIVY_IGNORE "$FULL_IMAGE_NAME"
cache
:
paths
:
-
.trivycache/