Skip to content

docs: formalize .semgrepignore convention for pre-existing findings - #33

Merged
smartwatermelon merged 1 commit into
mainfrom
claude/docs-semgrepignore-convention-1a2b3c
Aug 3, 2026
Merged

docs: formalize .semgrepignore convention for pre-existing findings#33
smartwatermelon merged 1 commit into
mainfrom
claude/docs-semgrepignore-convention-1a2b3c

Conversation

@smartwatermelon

Copy link
Copy Markdown
Owner

Summary

  • Documents the .semgrepignore convention (per-repo, narrowly-scoped, justified inline) as the recommended fix for pre-existing Semgrep findings blocking unrelated commits, since semgrep scan --staged doesn't exist and the pre-commit hook scans the whole tracked repo.
  • Adds this as a subsection under the existing "Option 3: Semgrep" section in docs/local-code-review-options.md, referencing the validated 2026-04-09 usage in smartwatermelon/tensegrity and explaining why it's preferred over filtering semgrep scan to staged-file targets.
  • Includes an illustrative (non-tensegrity-specific) .semgrepignore snippet.

Closes #1

Test plan

  • Docs-only change; no build/test/lint commands in this repo
  • Pre-commit hook passed (markdownlint auto-fixed formatting; code review correctly skipped for markdown-only change)
  • Pre-push hook passed (Semgrep clean, adversarial-reviewer PASS, codebase reviewer PASS)

https://claude.ai/code/session_01SsnvQEpWgMxcRocq8bBVSE

semgrep scan --staged doesn't exist, so the pre-commit hook scans the
whole tracked repo and can be blocked by pre-existing findings on
unrelated files. Document the per-repo .semgrepignore workaround (narrow
scope, justified inline) validated in smartwatermelon/tensegrity, so
future repos don't have to rediscover it via issue #1's comment thread.

Claude-Session: https://claude.ai/code/session_01SsnvQEpWgMxcRocq8bBVSE
@smartwatermelon
smartwatermelon merged commit c5b0537 into main Aug 3, 2026
2 checks passed
@smartwatermelon
smartwatermelon deleted the claude/docs-semgrepignore-convention-1a2b3c branch August 3, 2026 15:47
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.

Semgrep: --staged flag does not exist — scan scope is broader than intended

1 participant