Skip to content

feat: move Vanir signature generation to a cron job#5126

Draft
cuixq wants to merge 14 commits intogoogle:masterfrom
cuixq:vanir
Draft

feat: move Vanir signature generation to a cron job#5126
cuixq wants to merge 14 commits intogoogle:masterfrom
cuixq:vanir

Conversation

@cuixq
Copy link
Copy Markdown
Contributor

@cuixq cuixq commented Mar 25, 2026

#4611

This PR introduces a new vanir_signatures worker to enrich OSV records with Vanir signatures. This cron job identifies modified vulnerabilities, generates the signatures, and updates both the Datastore and GCS with the enriched data.

  • Implements the core logic for the signature generation cron job:
    • Tracks the last run time in Datastore to only process vulnerabilities modified since the previous execution.
    • Only processes vulnerabilities with at least one GIT affected range.
    • Skips vulnerabilities that already contain Vanir signatures in their database_specific field.
    • Also skips Linux Kernel vulnerabilities.
  • Uses the vanir library to generate signatures and updates the database_specific field of affected packages.
    • Includes a --dry-run flag and --output-dir option for testing and inspection of generated signatures without modifying production data.

@cuixq
Copy link
Copy Markdown
Contributor Author

cuixq commented Mar 25, 2026

/gemini review

@cuixq
Copy link
Copy Markdown
Contributor Author

cuixq commented Mar 25, 2026

/gemini review

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.

1 participant