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

Adds Snyk GitHub action using CLI #356

Merged
merged 6 commits into from Feb 10, 2022
Merged

Adds Snyk GitHub action using CLI #356

merged 6 commits into from Feb 10, 2022

Conversation

SHession
Copy link
Contributor

@SHession SHession commented Jan 18, 2022

What does this change?

Adds Snyk integration using the CLI via GitHub actions using a new reusable workflow. This should provide us more consistent and accurate results.

How to test

Does the GitHub action kick off correctly, do the result display as expected in the Snyk dashboard?

@SHession
Copy link
Contributor Author

Seems to be working as inteded, except it is determining the wrong "nodeVersion": "v14.17.6" and saying it has Encountered multiple node lockfiles files. Not sure why this is happening but would be interested if anyone has any thoughts. I have left the action in a debug state for reviewers.

@SHession SHession requested a review from a team January 18, 2022 15:53
@SHession SHession requested a review from Fweddi January 19, 2022 10:03
@SHession SHession force-pushed the add-snyk-workflow branch 7 times, most recently from 3e464eb to eba0751 Compare January 19, 2022 17:32

jobs:
security:
uses: guardian/.github/.github/workflows/sbt-node-snyk.yml@add-generic-snyk-workflow
Copy link

Choose a reason for hiding this comment

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

I'm no expert but I think maybe a nicer way of exposing this generic action would be to separate into its own repo and then create an example usage in a workflow in the .github repo that references the standalone action. Then the reference here can be a bit cleaner, something like guardian/snyk-generic-action@1.0.0

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 good point, I would be open to that idea. I'm not sure if there is an important distinction between workflows and actions to be made. I think workflows may need to be referenced in this convoluted way.

@jonathonherbert
Copy link
Contributor

Ace! I can't see anything in checks – do we need to do anything special to kick this off, or perhaps I'm looking in the wrong place?

@SHession
Copy link
Contributor Author

Ace! I can't see anything in checks – do we need to do anything special to kick this off, or perhaps I'm looking in the wrong place?

@jonathonherbert, the checks are, for the merged version, disabled so that we don't get conflicting results in Snyk. You can see a previously run action here: https://github.com/guardian/workflow-frontend/runs/5128202281?check_suite_focus=true. The results of that action will be visible in the Snyk dashboard.

Copy link
Contributor

@jonathonherbert jonathonherbert left a comment

Choose a reason for hiding this comment

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

Can see the action here, and can see a CLI project in snyk 👍

@prout-bot
Copy link

Seen on WORKFLOW_PROD (merged by @SHession 6 minutes and 23 seconds ago) Please check your changes!

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.

None yet

4 participants