basitalisandhu

Agentic Semgrep Rules — Data skill for Claude Code

Data community

Semgrep rules for AI agent code: static analysis for LLM applications in Python, TypeScript and JavaScript.

How to install Agentic Semgrep Rules

This entry records only its repository, not the path inside it, so there is no exact command to give. Open basitalisandhu/agentic-semgrep-rules and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agentic Semgrep Rules does

Semgrep rules for AI agent code: static analysis for LLM applications in Python, TypeScript and JavaScript. Finds model output reaching exec, shells, SQL, URLs, files and HTML, user input in system prompts, over-broad tools, MCP servers without auth, leaked keys and unsafe model loading. 36 tested rules, CWE and OWASP mapping.

Alternatives in Data

  • Private GPT — Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more 57.5k ★
  • Notion Sync — /notion-sync - Push Ranked Jobs and Applications to a Notion Database 36.6k ★
  • Archify — Agent skill for beautiful, verifiable architecture, workflow, sequence, data-flow, and lifecycle diagrams—self 17.2k ★

README

agentic-semgrep-rules: Semgrep rules for AI agent code

Semgrep rules for AI agent code: static analysis for LLM applications in Python, TypeScript and JavaScript that finds model output flowing into `exec`, shells, SQL, URLs, file paths and HTML (eval of model output, SSRF through tool URLs), user input written into system prompts, tools that let the model run anything, MCP server security checks (HTTP transports without authentication, servers bound to every interface), leaked provider keys, and unsafe model or config loading. For teams that ship LLM agents, MCP servers and tool-using assistants and want these mistakes caught in a pull request rather than found in an incident.

36 rules (23 Python, 13 TypeScript/JavaScript), every one with a tested fixture, CWE and OWASP LLM Top 10 (2025) mapping, and a message that says what is wrong and how to fix it.

pip install semgrep
semgrep --config https://raw.githubusercontent.com/basitalisandhu/agentic-semgrep-rules/main/agentic-semgrep-rules.yaml .

When to use this

  • How do I catch eval of model output, or model output reaching a shell, in CI? The llm-output-to-* rules track text returned by the OpenAI, Anthropic, LiteLLM, Ollama, Google GenAI, Vercel AI and LangChain calls into exec, eval, subprocess, child_process and the other sinks in the tables below.
  • How do I find MCP servers exposed without auth? fastmcp-http-transport-without-auth, mcp-http-transport-without-auth and fastmcp-bind-all-interfaces report HTTP transports with no token verifier and servers listening on every interface.
  • Which Semgrep rules cover LangChain, the OpenAI Agents SDK, pydantic-ai, Semantic Kernel, FastMCP or the MCP TypeScript SDK? The permissions rules know those frameworks' tool decorators and the deserialization rules know LangChain's dangerous flags; the tables name each rule and the paragraph after them lists the recognised sources.
  • **How do I stop an agent tool from turning into