-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Add snyk docker scanning feature #289
Conversation
a5f0b7c
to
44b0cd5
Compare
For now added simple script to check existence and load |
@grzesuav Will need a rebase. |
169039a
to
4910bbb
Compare
@grzesuav https://travis-ci.com/github/AdoptOpenJDK/openjdk-docker/jobs/297127853 seems to fail (some of the 13 builds passed OK). Might need to dig in if Snyk is causing errors downstream for some reason. |
c04ff51
to
91bd58a
Compare
not sure why build is failing as it happens after snyk is installed. For now I haven;t even try to scan anything, will try to debug tommorow |
5b3aa36
to
419d5c8
Compare
@grzesuav It's now passed the tests, so I guess you can take out the debug and try again? |
9ec0ca1
to
8e9a6d3
Compare
793e082
to
d294c75
Compare
@grzesuav - I think this is good? |
d294c75
to
702fc08
Compare
702fc08
to
a548239
Compare
done | ||
local tags=("${@[@]}") # copy arguments to local array | ||
for i in "${tags[@]}" | ||
do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whitespace embedding
|
||
printf -v expanded_tags "-t ${repo}:%s " "${tags[@]}" # concatenate to single strin : -t repo:tag -t repo:tag2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitepsace again?
for i in "${tags[@]}" | ||
do | ||
printf "...scanning %s" "${tags[$i]}" | ||
snyk test --docker "${tags[$i]}" --file=="${dockerfile}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitepspace
#!/usr/bin/env bash | ||
if [ -z "${SNYK_AUTH_TOKEN}" ];then | ||
printf "Snyk authentication token not set, skipping snyk analysis" | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't you exit?
|
||
snyk auth "${SNYK_AUTH_TOKEN}" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kill extra whitespace
For testing adoptium/infrastructure#779