Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

grzesuav
Copy link
Contributor

@grzesuav
Copy link
Contributor Author

For now added simple script to check existence and load nvm script

@karianna karianna added this to the March 2020 milestone Mar 6, 2020
@karianna
Copy link
Member

karianna commented Mar 6, 2020

@grzesuav Will need a rebase.

@grzesuav grzesuav force-pushed the snyk_docker_scanning branch 6 times, most recently from 169039a to 4910bbb Compare March 11, 2020 22:08
@karianna
Copy link
Member

@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.

@grzesuav grzesuav force-pushed the snyk_docker_scanning branch 2 times, most recently from c04ff51 to 91bd58a Compare March 17, 2020 22:01
@grzesuav
Copy link
Contributor Author

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

@grzesuav grzesuav force-pushed the snyk_docker_scanning branch 7 times, most recently from 5b3aa36 to 419d5c8 Compare March 22, 2020 14:02
@karianna
Copy link
Member

@grzesuav It's now passed the tests, so I guess you can take out the debug and try again?

@grzesuav grzesuav force-pushed the snyk_docker_scanning branch 5 times, most recently from 9ec0ca1 to 8e9a6d3 Compare March 24, 2020 19:14
@grzesuav grzesuav force-pushed the snyk_docker_scanning branch 2 times, most recently from 793e082 to d294c75 Compare March 24, 2020 20:33
@karianna
Copy link
Member

@grzesuav - I think this is good?

done
local tags=("${@[@]}") # copy arguments to local array
for i in "${tags[@]}"
do
Copy link
Member

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
Copy link
Member

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}"
Copy link
Member

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
Copy link
Member

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}"


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kill extra whitespace

@grzesuav
Copy link
Contributor Author

grzesuav commented Mar 25, 2020

@karianna fixed whitespaces in #304

also, closing in favour of #304

@grzesuav grzesuav closed this Mar 25, 2020
@grzesuav grzesuav deleted the snyk_docker_scanning branch March 25, 2020 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants