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

Add a step in CI for CVEs scanning #1478

Merged

Conversation

francbartoli
Copy link
Contributor

Overview

This PR closes #1477. It uses trivy and has the following limitations:

  • It doesn't take into account Docker image vulnerabilities, a dedicated PR will come up for that specific purpose
  • It only checks for HIGH and CRITICAL vulnerabilities
  • It accepts the risk for now that the Dockerfile uses the ROOT user, this misconfiguration is ignored in the .trivyignorefile

Related issue / discussion

#1477

Additional information

Trivy is an easy-to-use, fast, and comprehensive open-source tool used by DevOps and security teams for vulnerability and infrastructure as code (IaC) scanning of containers and artifacts.  Trivy is open-source and maintained by Aquasecurity, :

  • Works with containers, file systems, or even git repositories.
  • Is easy to install with no prerequisites, such as the installation of a database.
  • Is fast to run because there is no database involved.
  • Fits the DevSecOps methodology as it can be integrated into CI systems (Circle CI, Jenkins, GitLab CI, or GitHub Actions).
    Targets
    (Ref. https://bluelight.co/blog/how-to-set-up-trivy-scanner-in-gitlab-ci-guide)

Dependency policy (RFC2)

  • I have ensured that this PR meets RFC2 requirements

Updates to public demo

Contributions and licensing

(as per https://github.com/geopython/pygeoapi/blob/master/CONTRIBUTING.md#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pygeoapi. I confirm that my contributions to pygeoapi will be compatible with the pygeoapi license guidelines at the time of contribution
  • I have already previously agreed to the pygeoapi Contributions and Licensing Guidelines

@francbartoli francbartoli self-assigned this Jan 6, 2024
Copy link
Member

@tomkralidis tomkralidis left a comment

Choose a reason for hiding this comment

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

Minor changes. In addition, we can then add the following to README.md:

[![Vulnerabilities](https://github.com/geopython/pygeoapi/actions/workflows/vulnerabilities.yml/badge.svg)](https://github.com/geopython/pygeoapi/actions/workflows/vulnerabilities.yml)

.trivyignore Show resolved Hide resolved
.github/workflows/main.yml Outdated Show resolved Hide resolved
.trivyignore Show resolved Hide resolved
.github/workflows/vulnerabilities.yml Outdated Show resolved Hide resolved
@tomkralidis tomkralidis merged commit 3c5a4cd into geopython:master Jan 6, 2024
5 checks passed
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.

Scan code base for vulnerabilities, secrets or misconfiguration
2 participants