-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from groldan/trivy_library_dependency_analysis
Trivy vulnerability analysis and fixes to docker images at the library level
- Loading branch information
Showing
5 changed files
with
51 additions
and
16 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/sh | ||
|
||
v1=1.0-RC5 | ||
echo Gettig current version... | ||
v2=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) | ||
|
||
echo Comparing $v1 vs $v2... | ||
echo Summary: | ||
|
||
for i in `docker images|grep geoservercloud|grep "$v2 "|sort|cut -d" " -f1` | ||
do | ||
export image=$i | ||
echo "* $image:" | ||
echo "\t\`$v1\`": $(trivy image --vuln-type library --no-progress --light $image:$v1 | grep Total) | ||
echo "\t\`$v2\`": $(trivy image --vuln-type library --no-progress --light $image:$v2 | grep Total) | ||
done | ||
|
||
echo $v2 library vulnerabilities | ||
for i in `docker images|grep geoservercloud|grep "$v2 "|sort|cut -d" " -f1` | ||
do | ||
export image=$i | ||
echo "--------------------------------------------------" | ||
echo "$image:" | ||
trivy image --vuln-type library --no-progress -s "HIGH,CRITICAL" $image:$v2 |grep -v INFO | ||
done |
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
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