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

ci(cve): Scan the war and docker images with grype #1432

Merged
merged 1 commit into from
May 23, 2023

Conversation

MichaelsJP
Copy link
Member

@MichaelsJP MichaelsJP commented May 5, 2023

This PR introduces grype as another vulnerability check, next to Snyk. It's being implemented as an informational action right now. It's not as convenient as Snyk, but it seems as it's used frequently in the corporate world. Part of the reasons are, it's open source and way more picky in terms of what is being reported and what not.

The check is executed as the following action:

- name: Run the Anchore Grype scan action to SARIF
  uses: anchore/scan-action@v3
  id: scan
  with:
    fail-build: false
    output-format: sarif

There are two checks now with that action that check for the docker image as well as for the war file.

The results are first printed to the runner's log and as well uploaded as a SARIF file with github/codeql-action. The results of the SARIF file can then be viewed in the code scanning GitHub overview:

https://github.com/GIScience/openrouteservice/security/code-scanning?query=pr%3A1432+tool%3AGrype+is%3Aopen

Additionally, it runs each Sunday at 00:00 am.

The goal for now is to just inform us of detected vulnerabilities to be able to react in time.

@MichaelsJP MichaelsJP linked an issue May 5, 2023 that may be closed by this pull request
3 tasks
@MichaelsJP MichaelsJP self-assigned this May 5, 2023
@takb takb added this to To do in ors general May 5, 2023
@MichaelsJP MichaelsJP changed the title ci(CVE): Scan the created docker images with grype ci(cve): Scan the created docker images with grype May 5, 2023
@MichaelsJP MichaelsJP force-pushed the feat/1420-integrate-grype branch 8 times, most recently from 6ddfc50 to 861ad15 Compare May 5, 2023 13:29
@takb takb moved this from To do to Review in ors general May 15, 2023
@MichaelsJP MichaelsJP force-pushed the feat/1420-integrate-grype branch 14 times, most recently from 5eec325 to 86fa648 Compare May 19, 2023 09:52
@MichaelsJP MichaelsJP force-pushed the feat/1420-integrate-grype branch 2 times, most recently from 4dee031 to fb43e69 Compare May 22, 2023 15:42
@github-actions github-actions bot added ci 👷 and removed ci 👷 labels May 22, 2023
@MichaelsJP MichaelsJP requested a review from takb May 22, 2023 15:46
@github-actions github-actions bot added ci 👷 and removed ci 👷 labels May 22, 2023
@MichaelsJP MichaelsJP marked this pull request as ready for review May 22, 2023 16:06
@github-actions github-actions bot added ci 👷 and removed ci 👷 labels May 22, 2023
@MichaelsJP MichaelsJP changed the title ci(cve): Scan the created docker images with grype ci(cve): Scan the war and docker images with grype May 22, 2023
@github-actions github-actions bot added ci 👷 and removed ci 👷 labels May 22, 2023
@MichaelsJP MichaelsJP enabled auto-merge May 22, 2023 16:07
@MichaelsJP MichaelsJP force-pushed the feat/1420-integrate-grype branch 2 times, most recently from 68a909d to 59bcb4e Compare May 23, 2023 08:27
The check tests for all CVEs but doesn't fail if one is found. The checks are only for information right now.
Copy link
Contributor

@takb takb left a comment

Choose a reason for hiding this comment

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

Sounds good, though we will have to revisit when we merge the modularization branch.

@MichaelsJP MichaelsJP merged commit d980473 into master May 23, 2023
16 checks passed
ors general automation moved this from Review to Awaiting release May 23, 2023
@MichaelsJP MichaelsJP deleted the feat/1420-integrate-grype branch May 23, 2023 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
ors general
  
Awaiting release
Development

Successfully merging this pull request may close these issues.

Integrate new github actions
2 participants