chore(ci): add semgrep security scanning to pre-commit and CI#3395
Closed
SuyashJain17 wants to merge 3 commits intoOWASP:mainfrom
Closed
chore(ci): add semgrep security scanning to pre-commit and CI#3395SuyashJain17 wants to merge 3 commits intoOWASP:mainfrom
SuyashJain17 wants to merge 3 commits intoOWASP:mainfrom
Conversation
Contributor
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughAdds Semgrep static analysis to the repository: a new CI job Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Collaborator
|
Closing in favor of #3406 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Proposed change
Resolves #2984
This PR adds Semgrep static analysis scanning to the OWASP Nest project to detect security vulnerabilities across both backend (Python/Django) and frontend (TypeScript/JavaScript/React) components.
The integration is intentionally minimal and non-intrusive, focusing on visibility first rather than enforcement, so existing developer workflows and CI stability are not impacted.
Summary of changes
1. Local development (optional)
stages: [manual]p/security-auditruleset to focus on real security vulnerabilities and avoid noisy style or best-practice warnings2. CI/CD integration
Added a new semgrep-scan job to the existing CI/CD workflow
Runs using the official semgrep/semgrep container image
Uses the p/security-audit ruleset
Runs in non-blocking mode (no --error flag) so findings are reported without failing the build
Includes a bounded timeout to prevent runaway scans
This setup ensures consistent security scanning in CI while allowing the team to review findings before enabling stricter enforcement in future iterations.
Scope of changes
Modified files:
.pre-commit-config.yaml.github/workflows/run-ci-cd.yamlNo application code, tests, or runtime behavior were changed
Future follow-ups (out of scope for this PR)
Enable
--erroronce findings are reviewed and addressedPromote the pre-commit hook from manual to automatic if adoption is positive
Add SARIF upload for GitHub Security Dashboard integration
Checklist
make check-testlocally: all warnings addressed, tests passed