ds-semgrep
Skill20 starsChanged 46 days agoMITView on GitHub
Run a local static application security test (SAST) with Semgrep to find exploitable patterns in source code.
- Installs packages
In this repository52 other files it gives its agents.
- ds-dev-skill-benchSkill
- ds-agent-reviewSkill
- ds-architecture-planSkill
- ds-arenaSkill
- ds-blast-radiusSkill
- ds-blueprintSkill
- ds-bug-reviewSkill
- ds-clarity-reviewSkill
- ds-code-quality-reviewSkill
- ds-comment-reviewSkill
- ds-data-modeSkill
- ds-data-reviewSkill
- ds-debugSkill
- ds-deslopSkill
- ds-doc-quality-reviewSkill
- ds-exploreSkill
- ds-git-modeSkill
- ds-go-reviewSkill
- ds-grill-meSkill
- ds-handoffSkill
- ds-howSkill
- ds-humanizeSkill
- ds-interaction-modeSkill
- ds-java-reviewSkill
- ds-notebook-reviewSkill
- ds-onboardingSkill
- ds-osvSkill
- ds-perf-planSkill
- ds-project-checkpointSkill
- ds-project-resumeSkill
- ds-python-reviewSkill
- ds-quality-gateSkill
- ds-reflectSkill
- ds-retroSkill
- ds-roadmapSkill
- ds-rust-reviewSkill
- ds-security-reviewSkill
- ds-shell-reviewSkill
- dsSkill
- ds-specSkill
- ds-step-modeSkill
- ds-tdd-modeSkill
- ds-test-modeSkill
- ds-test-quality-reviewSkill
- ds-tiger-style-modeSkill
- ds-tldtSkill
- ds-ts-reviewSkill
- ds-ui-modeSkill
- ds-ui-quality-reviewSkill
- ds-verify-thisSkill
- ds-zig-reviewSkill
- ds-zoom-outSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Before /ds-security-review to surface mechanical SAST leads.
- Distinctive: line 12
After a change to confirm no new dangerous patterns were introduced.
- Distinctive: line 17
No args: scan the current directory with the default Semgrep ruleset.
- Very specific: line 25
Check for semgrep binary. If missing:
- Distinctive: line 32
Stop here. Do not proceed without the binary.
- Distinctive: line 34
Run the scan with the default security ruleset:
- Very specific: line 51
Do not auto-fix. Summarize actionable next steps and hand off to /ds-security-review for context and verification.
- Distinctive: line 74
If zero findings: report clean with the ruleset and scope scanned.
- Distinctive: line 78
Never apply Semgrep's autofix for security rules without human review — experimental fixes can change behavior or miss context.
- Very specific: line 79
Treat Semgrep matches as leads, not verdicts.
- Very specific: line 80
Use p/default for speed; use p/security-audit or p/owasp-top-ten only when explicitly requested.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/ds-semgrep is the local SAST counterpart to /ds-osv (dependency scanning). It runs Semgrep against the repo to catch dangerous patterns — injection sinks, secret leaks, auth bypass shapes, and other code-level weaknesses — without leaving the machine. Complements /ds-security-review by providing fast, mechanical findings that the review then triages and verifies in context.
When To Use
- Before
/ds-security-reviewto surface mechanical SAST leads. - After a change to confirm no new dangerous patterns were introduced.
- As a standalone quick scan when
semgrepis already installed.
Arguments
- No args: scan the current directory with the default Semgrep ruleset.
<path>: scan a specific file or directory.--config <id>: use a specific ruleset (e.g.p/default,p/security-audit,p/owasp-top-ten). Defaults top/default.--json: emit machine-readable JSON instead of the human summary.--fix: do not auto-fix; Semgrep autofix is experimental and unsafe for security findings. Report only.
Process
- Check for
semgrepbinary. If missing:
Stop here. Do not proceed without the binary.Install semgrep: macOS: brew install semgrep pip: pip install semgrep Other: https://semgrep.dev/docs/getting-started/ - Run the scan with the default security ruleset:
semgrep --config=p/default --error --json <path-or-.> - Parse the JSON output. Classify findings:
- ERROR (blocking) — high-confidence security matches
- WARN — medium-confidence patterns that need review
- INFO — low-confidence or style-oriented findings
- For each finding report:
- File path and line range
- Rule ID and message
- Confidence/experimental flag
- A one-line description of why the pattern matters
- Whether it is a known-exploit class (e.g. SQL injection, SSRF, hardcoded secret) or a defense-in-depth gap
- Do not auto-fix. Summarize actionable next steps and hand off to
/ds-security-reviewfor context and verification.
Output
Semgrep SAST: <N> findings (<B> blocking, <M> warnings, <I> info)
BLOCKING
<file>:<line>-<line> <rule-id>
<short description>
Why it matters: <one-line attack vector or risk>
WARNINGS
<file>:<line> <rule-id>
...
INFO: <N> findings — run with --config=p/security-audit to expand.
Next steps:
Review blocking findings with /ds-security-review.
Re-run /ds-semgrep after fixes to confirm the pattern is gone.If zero findings: report clean with the ruleset and scope scanned.
Rules
- Never apply Semgrep's autofix for security rules without human review — experimental fixes can change behavior or miss context.
- Treat Semgrep matches as leads, not verdicts. Every finding must be traced through
/ds-security-reviewto confirm exploitability. - Use
p/defaultfor speed; usep/security-auditorp/owasp-top-tenonly when explicitly requested.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

