moleske / concourse-cve-scan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Concourse-CVE-Scan

This repository is an example of a Concourse pipeline that utilizes a scan task. This task allows an OSS CF Component contributor to scan a configured Github repository for CVEs with Anchore tools syft and grype.

Utilizing this example's scan-for-cves task enables contributors to check for CVEs earlier in their release processes, as it will scan a Github repository branch that can be configured in the pipeline's resources.

Getting Help

This work is being done by Ryan Hall as a member of TAS Slingshots. TAS Slingshots is a group within MAMBG.

If you would like assistance in implementing the Scan task in your Concourse pipeline, please reach out to Ryan for help:

Implementation:

This example can be suited for your purposes with a small amount of customization. To get you familiar with how this works, here's what's involved in this scan:

  • ci/ci.yml - A pipeline definition utilizing 3 resources and 1 task that can be customized using 6 inputs:

    • L23: uri: - Github URI of the Github Repo to be scanned.
    • L24: branch: - Name of the Branch within the repo to be scanned.
    • L35: GRYPE_FAILURE_LEVEL: - Sets the severity threshold for grype to fail on detected CVEs.
      • Configurable as: [none | negligible | low | medium | high | critical]
      • Defaults to none if not configured.
  • tasks/scan.yml - The task definition for the scan task. This is ready for consumption using the params & inputs from the CI.

  • tasks/scan.sh - The script definition for the scan task. This is ready for consumption with the task definition.

  • images/slingshot-scanner - The image definiton for the docker image used for the scan task. Pre-installs syft, grype, and some other basic Linux tooling.

Contributing & Feedback

  • If you would like to contribute, please do so utilizing a PR and a branch containing your changes. Request a review prior to merging. Tag @rhall-pivotal.
  • Feedback & Feature Requests, please file a new issue and let me know what's on your mind!

Resources:

About


Languages

Language:Shell 100.0%