Semgrep
ListedSemgrep analyzes code for security vulnerabilities and style issues, automating bug detection and improving code quality quickly.
Install on your platform
Showing Claude Code. One command installs this skill into any of the agents below.
- 1
Run this in your project
terminal$ npx skills add trailofbits/skills --skill semgrep -a claude-code Uses the open-source
skillsCLI and needs Node.js. Add-gto install it for your user instead of this project.
What we know about this skill
Publisher
trailofbits
Taken from the source listing. We haven't verified who controls this account.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill failed 1 of 6 checks. A failure is not proof of bad intent; it means something in the code needs a human to look at it before you run it.
No undeclared network calls: failed
Contacts 1 host that is neither well-known infrastructure nor declared in the skill's frontmatter: json.schemastore.org.
Every host the skill dials — from its scripts, its config endpoints or the commands it tells the agent to run — is either well-known package and API infrastructure or declared in its own frontmatter. Links in documentation are not counted.
Hosts contacted
json.schemastore.orgundeclaredWhat it found
- plugins/static-analysis/skills/semgrep/scripts/merge_sarif.py:167contacts json.schemastore.org
"$schema": "https://json.schemastore.org/sarif-2.1.0.json",
Declares what it does: passed
SKILL.md parses and declares a name and a description.
SKILL.md exists, its frontmatter parses, and it declares a name and a description.
No obfuscated payloads: passed
No encoded or obfuscated payloads.
No base64, hex or compressed blob is decoded and then executed, and no encoded shell commands.
No credential access: passed
Reads no keys, tokens, keychains or credential files.
Neither the code nor the SKILL.md instructions read SSH keys, cloud credentials, keychains, token stores, browser cookie databases or dotfiles that hold secrets.
No pipe-to-shell installers: passed
No pipe-to-shell or download-and-run installers.
No `curl … | sh` pattern, in the code or in the instructions, that runs code fetched at run time.
Pinned to a commit: passed
Scanned trailofbits/skills at 82fe822625.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- 82fe822625
- Scanned
- 8 files, 2,745 lines
About this skill
What it does
Semgrep is a fast, open-source static analysis tool that finds bugs and vulnerabilities in code. It uses pattern matching to identify potential issues across various programming languages, allowing for automated code review and security auditing. Semgrep can be used to enforce coding standards and detect common security flaws like SQL injection or cross-site scripting.
When to use it
- Automated Code Review: Integrate semgrep into your CI/CD pipeline to automatically scan code changes for potential issues before merging.
- Security Auditing: Use semgrep to identify common vulnerabilities in existing codebases, helping prioritize remediation efforts.
- Enforcing Coding Standards: Define custom rules with semgrep to ensure consistent coding practices across a team or project.
- Finding Bugs Quickly: Semgrep’s speed makes it ideal for quickly identifying and addressing potential bugs during development.
Key capabilities
- Fast static analysis
- Pattern matching for code review
- Support for multiple programming languages
- Custom rule definition
- Automated vulnerability detection
Example prompts
- "Run semgrep on this Python file to check for security vulnerabilities."
- "Find all instances of SQL injection in this Java project using semgrep."
- "Enforce our coding standards by running semgrep with the 'no-unused-imports' rule."
Tips & gotchas
Semgrep requires a basic understanding of code and programming concepts to effectively define and interpret rules. While fast, complex codebase analysis can still take considerable time depending on size and complexity.