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

Trivy: Implement Caching and Fallback Mechanism for Trivy Database Fetches #1

Open
JasonPierce opened this issue Oct 31, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request trivy

Comments

@JasonPierce
Copy link
Contributor

This enhancement will ensure continuous operation of the security scan workflow, reducing the potential disruptions caused by Trivy’s rate limits. When rate limits are reached on Trivy’s database fetches, we propose adding a caching and fallback mechanism. This ticket outlines the enhancements needed to minimize workflow disruptions caused by Trivy’s public rate limits and to ensure continued scanning even if the database is temporarily inaccessible.

Requirements:

  1. Caching Mechanism

    • Implement a caching mechanism to store the last successful Trivy database fetch locally or in a shared location accessible by the workflow.
    • Cache should be refreshed only when a new database fetch is successful.
  2. Fallback to Cached Database

    • If the Trivy database fetch fails due to rate limits or other network issues, the workflow should fallback to the cached database.
    • Ensure the fallback mechanism does not bypass genuine security vulnerability scans; it should only be triggered when there is an inability to fetch a new database.

Acceptance Criteria:

  1. When a database fetch is successful, it is stored in the cache and made accessible for future scans if needed.
  2. The workflow should automatically fallback to the cached database if the fetch fails due to rate limits or connectivity issues, preventing workflow failure due to database access issues.
  3. Update project documentation to include caching and fallback configuration steps and conditions under which the fallback will be activated.
@JasonPierce JasonPierce added the enhancement New feature or request label Oct 31, 2024
@JasonPierce JasonPierce self-assigned this Oct 31, 2024
@JasonPierce JasonPierce changed the title Implement Caching and Fallback Mechanism for Trivy Database Fetches Trivy: Implement Caching and Fallback Mechanism for Trivy Database Fetches Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request trivy
Projects
None yet
Development

No branches or pull requests

1 participant