Index of every page on this site: llms.txt
All skills
andrewyng avatar

/semgrep-review

@d1b8cd6
by Andrew Ngandrewyng/openworker20k stars
2,802
Run it yourself

Run a semgrep scan and turn findings into triaged, contextual fixes

  • 1 file
  • 2.2 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/andrewyng/openworker/semgrep-review

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈21 tokens for metadata: the name and description. ≈537 when used: this file.

Description uses 1.1% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈84 characters, or 1.1%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Run a static-analysis pass with semgrep and own the findings end to end.

  1. Check the tool: semgrep --version. If it's missing, ask for it with request_tool("semgrep", …) rather than skipping the pass. If the user declines, continue with a targeted manual review — read the routes/handlers, the auth and session code, every query built by string concatenation, deserialization, and outbound requests built from user input — and say in your report that the static pass was manual, so the user knows the coverage is narrower than a full scan. Note that community semgrep rules miss whole classes (e.g. SQL built through a project's own DB wrapper), so reading the code is worth doing even when it runs.
  2. Scan the repo (from its root): semgrep scan --config auto --json --quiet -o /tmp/semgrep.json Use --config auto unless the repo carries its own rules (.semgrep.yml, semgrep.yml) — prefer the repo's own configuration when present.
  3. Parse the JSON and triage EVERY finding — do not echo the raw report:
    • Read the flagged code and enough surrounding context to judge reachability.
    • Is the tainted input attacker-controlled or internal? Is there an upstream guard?
    • Rate: critical / high / medium / low / noise, with a one-line justification each.
  4. Fix what's real, highest severity first:
    • Match the codebase's own conventions (its validation helpers, escaping utilities, parameterized-query style) — read neighboring code before writing the fix.
    • Add or extend a test that fails without the fix where the test harness makes that reasonable.
    • Group fixes by theme (one branch per theme), never one giant mixed diff.
  5. For findings you judge noise, say WHY (e.g. constant input, dead code, framework already escapes) — never silently drop them, and never add ignore rules to make the scanner quiet without agreement.
  6. Deliver: a short findings table (severity · location · verdict · action) and the fix branches/PRs. If the repo has no semgrep config, offer to commit a starter .semgrep.yml pinned to the rulesets that mattered here.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at d1b8cd6. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 months ago

README badge

README badge for andrewyng/openworker/semgrep-review