Skip to content
Back to search

skills

A collection of skills for AI coding agents from Semgrep

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/semgrep-skills/badge.svg)](/listings/semgrep-skills)

HTML

<a href="/listings/semgrep-skills"><img src="/api/listings/semgrep-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

npx skills add semgrep/skills

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 167 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Agent Skills [Beta]
  2. A collection of skills for AI coding agents. Skills are packaged instructions and scripts that extend agent capabilities. This should be considered beta-level software; it's primarily generated by transforming open-source Semgrep rules into skill format.
  3. Skills follow the [Agent Skills](https://agentskills.io/) format.
  4. ## Installation
  5. ```bash
  6. npx skills add semgrep/skills
  7. ```
  8. ## Available Skills
  9. ### code-security
  10. Comprehensive code security guidelines from Semgrep Engineering covering OWASP Top 10, infrastructure security, and secure coding best practices across 15+ languages.
  11. **Use when:**
  12. - Writing new code
  13. - Reviewing code for security vulnerabilities
  14. - Asking about secure coding practices
  15. - Configuring cloud infrastructure (Terraform, Kubernetes, Docker)
  16. **Categories covered:**
  17. | Impact | Category | Description |
  18. |--------|----------|-------------|
  19. | **Critical** | SQL Injection | Parameterized queries, ORM safety |
  20. | **Critical** | Command Injection | Shell command safety, input validation |
  21. | **Critical** | Cross-Site Scripting (XSS) | Output encoding, DOM safety |
  22. | **Critical** | XML External Entity (XXE) | XML parser configuration |
  23. | **Critical** | Path Traversal | File path validation |
  24. | **Critical** | Insecure Deserialization | Safe deserialization patterns |
  25. | **Critical** | Code Injection | Eval safety, template injection |
  26. | **Critical** | Hardcoded Secrets | Environment variables, secret management |
  27. | **Critical** | Memory Safety | Buffer overflows, use-after-free (C/C++) |
  28. | **High** | Insecure Cryptography | Strong hashing (SHA-256+), encryption (AES) |
  29. | **High** | Insecure Transport | HTTPS, certificate validation, TLS |
  30. | **High** | Server-Side Request Forgery | URL validation, allowlists |
  31. | **High** | JWT Authentication | Signature verification, algorithm safety |
  32. | **High** | Cross-Site Request Forgery | CSRF tokens, SameSite cookies |
  33. | **High** | Prototype Pollution | Object key validation (JavaScript) |
  34. | **High** | Unsafe Functions | Dangerous function alternatives |
  35. | **High** | Terraform AWS | S3, IAM, EC2, RDS security |
  36. | **High** | Terraform Azure | Storage, App Service, Key Vault |
  37. | **High** | Terraform GCP | GCS, GCE, GKE, IAM |
  38. | **High** | Kubernetes | Pod security, RBAC, secrets |
  39. | **High** | Docker | Non-root containers, image pinning |
  40. | **High** | GitHub Actions | Script injection, action pinning |
  41. | **Medium** | Regex DoS | Catastrophic backtracking prevention |
  42. | **Medium** | Race Conditions | TOCTOU, secure temp files |
  43. | **Medium** | Code Correctness | Common bugs, type errors |
  44. | **Low** | Best Practices | Code quality patterns |
  45. | **Low** | Performance | Efficiency anti-patterns |
  46. | **Low** | Maintainability | Code organization |
  47. **Languages:** Python, JavaScript/TypeScript, Java, Go, Ruby, PHP, C/C++, C#, Scala, Kotlin, Rust, HCL (Terraform), YAML (Kubernetes)
  48. ---
  49. ### llm-security
  50. Security guidelines for LLM applications based on the OWASP Top 10 for Large Language Model Applications 2025.
  51. **Use when:**
  52. - Building LLM-powered applications
  53. - Implementing RAG systems
  54. - Securing AI/ML pipelines
  55. - Reviewing code that interacts with language models
  56. **Categories covered:**
  57. | Impact | Category | Description |
  58. |--------|----------|-------------|
  59. | **Critical** | Prompt Injection | Input validation, content segregation, output filtering |
  60. | **Critical** | Sensitive Information Disclosure | PII detection, permission-aware RAG |
  61. | **Critical** | Supply Chain | Model verification, safetensors, ML-BOM |
  62. | **Critical** | Data and Model Poisoning | Training data validation, anomaly detection |
  63. | **Critical** | Improper Output Handling | Context-aware encoding, parameterized queries |
  64. | **High** | Excessive Agency | Least privilege, human-in-the-loop |
  65. | **High** | System Prompt Leakage | External guardrails, no secrets in prompts |
  66. | **High** | Vector and Embedding Weaknesses | Permission-aware retrieval, tenant isolation |
  67. | **High** | Misinformation | RAG, fact verification, confidence scoring |
  68. | **High** | Unbounded Consumption | Rate limiting, budget controls |
  69. **Frameworks:** OWASP LLM Top 10, MITRE ATLAS, NIST AI RMF
  70. ---
  71. ### semgrep
  72. Run Semgrep static analysis scans and create custom detection rules for security vulnerabilities and bug patterns.
  73. **Use when:**
  74. - Running security scans with Semgrep
  75. - Creating custom Semgrep rules
  76. - Detecting specific vulnerability patterns
  77. - Setting up Semgrep in CI/CD pipelines
  78. **Capabilities:**
  79. | Feature | Description |
  80. |---------|-------------|
  81. | **Quick Scans** | Run `semgrep --config auto` or use curated rulesets |
  82. | **Rulesets** | security-audit, owasp-top-ten, cwe-top-25, trailofbits |
  83. | **Custom Rules** | Pattern matching and taint mode for data flow analysis |
  84. | **Test-Driven** | Write test cases first with `ruleid:` and `ok:` annotations |
  85. | **CI/CD** | GitHub Actions integration with diff-aware scanning |
  86. **Rule Creation Workflow:**
  87. 1. Analyze the vulnerability pattern
  88. 2. Create test cases first (test-driven development)
  89. 3. Analyze AST structure with `semgrep --dump-ast`
  90. 4. Write the rule (taint mode for injection, pattern matching for syntax)
  91. 5. Iterate until 100% tests pass
  92. 6. Optimize patterns
  93. **When to use taint mode:** SQL injection, command injection, XSS, path traversal, SSRF - any vulnerability where untrusted data flows to a dangerous sink.
  94. ---
  95. ## Usage
  96. Skills are automatically available once installed. The agent will use them when relevant tasks are detected.
  97. **Examples:**
  98. ```
  99. Review this React component for security issues
  100. ```
  101. ```
  102. Help me implement input validation for my LLM chat endpoint
  103. ```
  104. ```
  105. Create a Semgrep rule to detect hardcoded API keys in Python
  106. ```
  107. ## Development
  108. ### Building Skills
  109. ```bash
  110. make install # Install dependencies
  111. make validate # Validate all skills
  112. make build # Build AGENTS.md for all skills
  113. make zip # Create distribution packages
  114. make # All of the above
  115. ```
  116. ### Single Skill Operations
  117. ```bash
  118. make validate-skill SKILL=code-security
  119. make build-skill SKILL=llm-security
  120. ```
  121. ## Skill Structure
  122. Each skill contains:
  123. - `SKILL.md` - Instructions for the agent
  124. - `rules/` - Individual rule files (for skills with rules)
  125. - `scripts/` - Helper scripts for automation (optional)
  126. - `references/` - Supporting documentation (optional)
  127. ## Acknowledgments
  128. Originally created by [@DrewDennison](https://x.com/drewdennison) at [Semgrep](https://semgrep.dev). This work was heavily inspired by Vercel's [React Best Practices](https://vercel.com/blog/introducing-react-best-practices).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.