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

introduce Snyk security scans for V2 images #4575

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

RafalSkolasinski
Copy link
Contributor

@RafalSkolasinski RafalSkolasinski commented Jan 11, 2023

What this PR does / why we need it:

This PR introduced GitHub Workflow to run Snyk security scans on Core V2 images.

Which issue(s) this PR fixes:

Fixes #4572

Special notes for your reviewer:

Test run results in here

Copy link
Contributor

@adriangonz adriangonz left a comment

Choose a reason for hiding this comment

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

Changes look good! Added a couple minor questions below, but shouldn't block a merge.

env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: |
make -C scheduler lint
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you know why need to run the linter here, instead of using Snyk's GH action?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In all other tasks there was make -C <directory> fmt but scheduler did not have fmt but lint command. Not sure exactly why it is there. I first assumed it was for Go to pull modules but that does not make sense actually... I may try without it.

But to why these are here: it's because these were present in V1 tasks.

id: docker-tag
run: |
USER_INPUT="${{ github.event.inputs.docker-tag }}"
echo ::set-output name=value::${USER_INPUT:-"latest"}
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh wow - is this wizardry to default to latest if no tag is present?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's to use default for input usually coming as parameter to "on_dispatch" in workflows running "on_push". There may be more elegant way (though I doubt, unless some new features were added) but that is what I found when working on SCv2 release workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants