Llm Security
OfficialHelps with LLMs, security as part of building AI and machine learning applications workflows.
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 semgrep/skills --skill llm-security -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
semgrep
Matched to the vendor's own GitHub organisation.
Install target
Live repository
Not pinned. Installing fetches whatever the repository holds at the time you run the command.
Automated safety checks
This skill passed all 6 checks. We read its files at one commit and looked for the things that make a skill dangerous to run — not for whether it works.
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 undeclared network calls: passed
Makes no network calls.
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.
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 semgrep/skills at 68177b8830.
The exact upstream commit SHA that was scanned is recorded, so the result refers to specific bytes.
- Commit
- 68177b8830
- Manifest
- skills/llm-security/SKILL.md
- Scanned
- 14 files, 7,025 lines
About this skill
What it does
This skill provides security guidelines for building LLM applications, based on the OWASP Top 10 for LLM Applications 2025. It offers both proactive and reactive modes to identify and mitigate potential security risks. In proactive mode, it automatically checks for relevant security concerns during development or review. In reactive mode, it provides access to detailed code examples and rules related to specific vulnerabilities when a user requests information about LLM security.
When to use it
- When building chatbot/conversational AI applications to address prompt injection, system prompt leakage, output handling, or unbounded consumption risks.
- For RAG (Retrieval Augmented Generation) systems to protect against vector weaknesses, prompt injection, sensitive disclosure, and misinformation.
- When developing AI agents with tools to manage excessive agency, prompt injection, output handling, and sensitive information disclosure.
- During fine-tuning/training processes to prevent data poisoning, supply chain vulnerabilities, and sensitive disclosures.
- For LLM-powered APIs to address unbounded consumption, prompt injection, output handling, and sensitive disclosure concerns.
Key capabilities
- Proactive Security Checks: Automatically identifies potential security risks during development.
- Reactive Guidance: Provides code examples and rules based on user queries about LLM security.
- OWASP Top 10 Alignment: Based on the OWASP Top 10 for LLM Applications 2025.
- Pattern-Specific Rules: Offers prioritized rule sets tailored to different application patterns (Chatbot, RAG system, AI agent with tools, etc.).
- Detailed Rule Files: Provides access to specific rule files covering vulnerabilities like Prompt Injection (LLM01), Sensitive Information Disclosure (LLM02), and Data Poisoning (LLM04).
Example prompts
- "What are the security considerations for building a chatbot?"
- "How can I prevent prompt injection in my RAG system?"
- "Show me code examples for handling LLM output securely."
- “What rules should I follow when fine-tuning an LLM?”
Tips & gotchas
- To ensure relevant results, specify the type of application you are building (e.g., chatbot, RAG system).
- The skill provides code examples and rules; it does not automatically fix vulnerabilities. You need to apply the suggested patterns or flag vulnerable areas yourself.
- Refer to
rules/_sections.mdfor a complete index of all rules and their corresponding OWASP/MITRE references.