Skip to content

DEVOPS-825 - Add Trivy container security scanning#27

Merged
jsfillman merged 13 commits intomainfrom
develop
Jun 9, 2022
Merged

DEVOPS-825 - Add Trivy container security scanning#27
jsfillman merged 13 commits intomainfrom
develop

Conversation

@jsfillman
Copy link
Copy Markdown
Contributor

Summary

This PR adds vulnerability scanning to our base pull request workflows by:

  1. Creating a new reusable_trivy-scans.yml workflow.
  2. Adding a call to the above workflow in pr_build.yaml.

Overview

  • The step reusable_trivy-scans.yml first uses an older version of Trivy to check for the following CVEs, which are automatically rejected by NERSC:
  • If any of these errors are found, the entire workflow will fail.
  • If none of these CVEs are found, the latest version of Trivy is run to check for any additional errors.
    • Any responses that are found will show as a failure and be listed in the PR's Checks tab, but the workflow itself will pass.

Testing

  1. Created a repo that builds Zookeeper docker images.
  2. Created a PR that tries to build a version known to have the above log4j errors.
  • This PR fails, and gives useful errors.
  1. Created a second PR that builds a known-good version of Zookeeper.
  • This PR shows a passing workflow, but fails on the latest Trivy check, providing a convenient list of vulnerabilities.

Copy link
Copy Markdown
Member

@kkellerlbl kkellerlbl left a comment

Choose a reason for hiding this comment

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

looks good to me

@jsfillman jsfillman merged commit 4af565b into main Jun 9, 2022
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.

2 participants