agentleFS
jmylchreestjmylchreest/aide/skills/semgrep/SKILL.md

semgrep

Skill18 starsChanged 3 months agoMITView on GitHub

Run Semgrep security and code quality analysis

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run Semgrep to detect security vulnerabilities and code quality issues in the codebase.

    line 17
  2. Distinctive:

    If JSON output is too large, use text output:

    line 28
  3. Distinctive:

    Read the file and surrounding context

    line 53
  4. Very specific:

    Too many findings: Use --severity ERROR to focus on critical issues first

    line 67
  5. Very specific:

    Slow scan: Use --config auto instead of multiple rule packs to avoid re-scanning

    line 68
  6. Very specific:

    False positives: Add # nosemgrep: rule-id with a comment explaining why

    line 70

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Semgrep Security Analysis

Run Semgrep to detect security vulnerabilities and code quality issues in the codebase.

Workflow

1. Run Semgrep scan

# Auto-detect rules for the project's languages
semgrep scan --config auto --json --quiet 2>/dev/null | head -c 50000

If JSON output is too large, use text output:

semgrep scan --config auto --quiet 2>/dev/null

2. For specific rule sets

# Security-focused rules only
semgrep scan --config "p/security-audit" --json --quiet

# OWASP Top 10
semgrep scan --config "p/owasp-top-ten" --json --quiet

# Language-specific
semgrep scan --config "p/golang" --json --quiet
semgrep scan --config "p/python" --json --quiet
semgrep scan --config "p/typescript" --json --quiet

3. Triage results

For each finding:

  1. Read the file and surrounding context
  2. Assess whether the finding is a true positive or false positive
  3. For true positives, fix the issue following the suggestion in the finding
  4. For false positives, consider adding a # nosemgrep inline comment with justification

4. Scan specific files

# Scan only changed files
semgrep scan --config auto --json --quiet -- path/to/file.py

Common Issues

  • Too many findings: Use --severity ERROR to focus on critical issues first
  • Slow scan: Use --config auto instead of multiple rule packs to avoid re-scanning
  • Missing rules: Install additional rules with semgrep registry
  • False positives: Add # nosemgrep: rule-id with a comment explaining why

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.