-
Notifications
You must be signed in to change notification settings - Fork 5
Preview/google osv-scanner #80
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
Conversation
WalkthroughIntroduces a new osv-scanner.toml file containing only commented default settings and example sections for IgnoredVulns and PackageOverrides. No active configuration is enabled. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-Merge Checks (1 passed, 2 warnings)❌ Failed Checks (2 warnings)
✅ Passed Checks (1 passed)
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🔭 Outside diff range comments (1)
osv-scanner.toml (1)
1-21
: Add OSV-Scanner to CI
We didn’t find any existing OSV-Scanner integration in your workflows. To enforce this new config, please add a GitHub Actions workflow that runs the scanner on every push and pull request.• Create .github/workflows/osv-scanner.yml with something like:
name: OSV Vulnerability Scan on: push: branches: [ main ] pull_request: jobs: scan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: google/osv-scanner-action@v1 with: config_file: osv-scanner.toml• Ensure the path to your config is correct and commit the new workflow.
🧹 Nitpick comments (3)
osv-scanner.toml (3)
5-9
: Tighten examples: document supported ID types and prefer RFC3339 date formatMinor clarity improvements to reduce future confusion for contributors.
Apply this diff to enrich the examples:
-# id = "CVE-YYYY-XXXX" -# # ignoreUntil = 2025-12-31 -# reason = "why this is safe to ignore" +# id = "CVE-YYYY-XXXX" # also supports OSV-YYYY-NNNN and GHSA-xxxx IDs +# # ignoreUntil = 2025-12-31T00:00:00Z +# reason = "why this is safe to ignore"
11-13
: Optional: include a second match example for Maven/Go to signal ecosystem-specific fieldsA small addition can help users discover fields like group (Maven) or module path (Go).
Example (comment-only):
# # Match fields (any subset): name, version, ecosystem, group # name = "axios" # ecosystem = "npm" +# # Example (Maven): +# # name = "log4j-core" +# # group = "org.apache.logging.log4j" +# # ecosystem = "Maven"
1-21
: CI integration suggestion: add/confirm an automated OSV scan stepNow that a policy file is present, consider adding a CI job (e.g., GitHub Action) to run osv-scanner with this config and fail on new vulns while honoring policy exceptions.
If you want, I can draft a minimal GitHub Actions workflow (push/PR) using google/osv-scanner-action that points to this config.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these settings in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
Gemfile.lock
is excluded by!**/*.lock
and included by*
,**/*
📒 Files selected for processing (1)
osv-scanner.toml
(1 hunks)
🔇 Additional comments (2)
osv-scanner.toml (2)
1-3
: Template-only config is safe and non-invasiveAdding a commented template that mirrors default behavior is a low-risk way to introduce OSV-Scanner policy. No behavior changes at runtime.
10-20
: Revert to top-level action keys and YYYY-MM-DD expiry formatThe upstream schema defines all action flags (
ignore
,vulnerability.ignore
,license.ignore
,license.override
) as top-level keys within each[[PackageOverrides]]
block—not under an[actions]
table—and expiry fields use a simpleYYYY-MM-DD
string. The suggestedactions.*
prefix and RFC3339 timestamp aren’t supported.• Keep the original example keys and date format:
[[PackageOverrides]] name = "axios" ecosystem = "npm" # Actions (pick any): ignore = true # ignore both vulns and license vulnerability.ignore = true # ignore only vulnerabilities license.ignore = true # ignore only license license.override = ["MIT"] # override license(s) effectiveUntil = "2025-12-31" # expiry date in YYYY-MM-DD reason = "temporary exception"Likely an incorrect or invalid review comment.
Summary by CodeRabbit