feat(security): add Snyk scope baseline to generated projects#106
feat(security): add Snyk scope baseline to generated projects#106williaby wants to merge 1 commit into
Conversation
Add .snyk, .dcignore, and .vscode/settings.json to the generated project
directory so every project scaffolded from this template scopes Snyk to
project-owned code only.
Snyk scans the on-disk working tree, not git or manifests, so without these
files it walks into .venv/, .worktrees/, node_modules/, and site-packages/
and reports third-party dependency vulnerabilities as if they belong to the
project (observed: ~192 noise findings from vendored packages). .gitignore
does not constrain Snyk's filesystem scan.
Changes:
- {{cookiecutter.project_slug}}/.snyk: exclude paths for .venv, .worktrees,
node_modules, site, htmlcov, out, and **/site-packages/**
- {{cookiecutter.project_slug}}/.dcignore: same exclusion set for Snyk Code
- {{cookiecutter.project_slug}}/.vscode/settings.json: snyk.advanced.additionalParameters
for the VS Code Snyk extension
- {{cookiecutter.project_slug}}/.gitignore: negation patterns to track
.vscode/settings.json despite the .vscode/ ignore rule
- CHANGELOG.md: document the addition under [Unreleased]
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 3 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
.snyk,.dcignore, and.vscode/settings.jsonto the generated project directory ({{cookiecutter.project_slug}}/) so every scaffolded repo scopes Snyk to project-owned code from day one..venv/,.worktrees/,node_modules/, and vendoredsite-packages/and reports third-party vulnerabilities as if they belong to the project..gitignoredoes not constrain Snyk's scan. A real team hit ~192 noise findings this way.{{cookiecutter.project_slug}}/.gitignorewith negation patterns so.vscode/settings.jsonis tracked despite the.vscode/ignore rule.CHANGELOG.mdunder[Unreleased].Files changed
.snykexclude:paths scope Snyk SCA scan.dcignore.vscode/settings.jsonsnyk.advanced.additionalParametersscopes VS Code extension.gitignoresettings.jsonCHANGELOG.mdTest plan
pre-commit run --all-filespasses (confirmed locally: all 25 hooks pass)cookiecutter.jsonis untouched (verified: no diff){{ }}cookiecutter markers (verified).snykexclude:block covers.venv,.worktrees,node_modules,site,htmlcov,out,**/site-packages/**.dcignoreuses gitignore-style path syntax.vscode/settings.jsonappears in git after generation (negation in.gitignoreconfirmed)Generated with Claude Code