Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,332
    • Merge requests 1,332
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #326279
Closed
Open
Issue created Mar 30, 2021 by Thiago Figueiró@thiagocsfDeveloper7 of 11 checklist items completed7/11 checklist items

Integrate Grype with Container Scanning

Why are we doing this work

The GitLab container scanning analyzer currently relies on Trivy to perform the scan.

This feature provides the option to use Grype as the scanner in the GitLab analyzer.

Relevant links

  • Comment thread discussing Anchore Engine and Grype
  • Dan and Thiago 2021-03-29 meeting notes (internal link)

Non-functional requirements

  • Documentation: update existing documentation to provide instructions on how to enable Grype as a scanner. Add instructions on how to access Grype-specific settings/features and link to upstream documentation where necessary.
  • [-] Feature flag: not necessary since the default scanner won't be changed from Trivy as part of this issue
  • [-] Performance: not necessary
  • Testing: existing tests are executed for Grype.
  • Other
    • Grype can run in offline (air-gapped) environments. This means the vulnerability database must be bundled with the analyzer image.
    • Grype produces a report that can be ingested by artifacts:reports:container_scanning.
    • Grype can scan an image given a docker registry address (or the analyzer is updated to make the image available to Grype as a local file). There is no dependency on access to a Docker host.

Implementation plan

  • Map container scanning integration variables to Grype configuration and/or execution options.
  • Update build pipeline to produce two images: current (trivy) and Grype (grype) with the appropriate tags.
  • TBC pre-fetch image so it's available as an image to Grype
  • Execute scan and produce report
  • Introduce environment variable to switch scanner to Grype

/cc @sam.white @ngaskill

Edited Jun 16, 2021 by Thiago Figueiró
Assignee
Assign to
Time tracking