Skip to content

    Type a page, a command such as keryn scan, or a rule id.

    Rule catalog

    View as Markdown

    Keryn ships 1562 rules in 154 packs (rules 0.8.0), plus 36 third-party rules listed at the end. Filter them below by what they find, how sure they are and which edge they inspect; the address bar keeps your filters, so a filtered view can be shared. Each rule opens on its pack’s page with its message, how to fix it, references and where it sits in OWASP LLM 2025, OWASP Agentic, CWE and NIST AI RMF (see taxonomies). 126 rules also carry a synthetic snippet to try.

    The rules and the known-fix database are part of Keryn and licensed under the Keryn Software Licence: they may be used only by running Keryn. Their matching logic is not published, and they may not be copied, extracted or reproduced. This catalog shows metadata only.

    How to read a rule
    Severity
    How bad the finding is if it is real: error fails a default gate, warning and info do not.
    Confidence
    P0 exploitable as written; P1 dangerous in context; P2 a heuristic or a posture check: confirm by reading the code.
    False-positive risk
    low: an exact API or flag, so hits are almost always real; medium: the pattern is legitimate in many programs, so check each hit; high: it finds a lead to confirm, so expect benign hits.
    Edge
    The relationship the finding sits on. reaches: content or traffic gets to a thing; calls: one thing invokes another; reads: one thing reads from another; writes: one thing writes to another; sends: data leaves for another party; grants: authority is given or left unchecked; depends_on: something relies on a component it does not verify; trusts: one party believes another without evidence. The boundary it crosses, when there is one: user->prompt (untrusted input reaching a prompt); model->code (model output reaching code, a shell, a query or a page); secret->outside (a secret leaving the trusted side); supply-chain (code, models or prompts pulled in from outside).
    Taxonomy chips
    References for readers who work in OWASP LLM 2025, OWASP Agentic, CWE or NIST AI RMF. They say where a rule belongs, not that a framework is satisfied.

    By language: python 534 · typescript 448 · javascript 425 · generic 316 · json 85 · java 65 · ruby 53 · csharp 50 · go 40 · php 38 · rust 35 · yaml 25 · kotlin 25 · hcl 16 · swift 15 · c 7 · cpp 7 · dockerfile 4 · bash 1

    Pack Rules Languages
    agent-client-configs-generic-v1 3 generic
    agent-client-configs-v1 4 json
    agent-config-claude-code-v1 17 json
    agent-frameworks-2026-python-v1 33 python
    agent-frameworks-2026-ts-v1 19 typescript, javascript
    agent-guard-fail-open-v1 4 python, typescript, javascript, go
    agent-hooks-multivendor-v1 43 json
    agent-outbound-actions-v1 6 javascript, typescript, python
    agent-rules-files-v1 13 generic
    agent-security-config-v1 2 generic
    agent-trust-assignment-v1 2 python, typescript, javascript
    agent-workflow-platforms-v2 2 python, javascript, typescript
    agentic-asi-2026-v1 46 python, typescript
    ai-config-hidden-unicode-v1 3 generic
    ai-deployment-platforms-v2 6 generic, typescript, javascript, python
    ai-forensics-observability-v2 7 typescript, javascript, python, java, csharp, go
    azure-bedrock-vertex-ai-config-v2 7 generic, typescript, javascript, python
    benchmark-gaps-v1 14 python
    browser-agent-automation-v1 22 javascript, typescript, python, json
    browser-extension-bundled-artifacts-v2 7 javascript, typescript
    canonicalization-order-v1 4 python, typescript, javascript, go, php
    chrome-extension-ai-security-v2 9 javascript, typescript, generic
    ci-ai-agent-actions-v1 10 yaml
    ci-security-gate-fail-open-v1 1 generic
    claude-code-hooks-v1 6 json
    client-trusted-privilege-v1 1 python, typescript, javascript, php
    cloudflare-workers-ai-v2 8 typescript, javascript
    container-orchestration-ai-v2 7 generic
    crewai-autogen-agent-safety-v2 8 python
    crypto-claim-integrity-v1 15 python, typescript, javascript, java, go, php
    csharp-semantic-kernel-v2 6 csharp
    dataset-finetune-integrity-v2 5 python, typescript, javascript, bash
    deno-ai-edge-v2 7 typescript, javascript
    electron-ai-agent-security-v2 7 typescript, javascript
    error-oracle-disclosure-v1 2 python, typescript, javascript
    eval-trace-pii-exposure-v1 5 typescript, javascript, python
    fastapi-ai-service-v1 6 python
    firebase-ai-memory-v2 7 typescript, javascript
    gateway-credential-passthrough-v1 3 javascript, typescript, python
    general-crypto-python-v1 11 python
    general-hazards-python-v1 14 python
    general-imports-python-v1 8 python
    general-injection-csharp-v1 9 csharp
    general-injection-go-v1 7 go
    general-injection-java-v1 9 java
    general-injection-javascript-v1 6 javascript, typescript
    general-injection-kotlin-v1 12 kotlin
    general-injection-php-v1 10 php
    general-injection-python-v1 23 python
    general-injection-ruby-text-v1 3 generic
    general-injection-ruby-v1 19 ruby
    general-injection-ruby-v2 3 ruby
    general-injection-swift-v1 6 swift
    github-actions-ai-supply-chain-v2 10 generic, javascript, typescript, python
    gitlab-ci-ai-supply-chain-v2 6 javascript, typescript, python, generic
    graphql-ai-boundary-v2 6 typescript, javascript, python
    iac-ai-services-cfn-v1 12 yaml, json
    iac-ai-services-v1 19 hcl, yaml
    inventory-aibom-v1 29 generic
    inventory-aibom-v2 95 generic
    java-spring-ai-v2 8 java
    javascript-node-security-v1 16 javascript, typescript
    kotlin-ai-mobile-security-v2 8 kotlin, java
    langgraph-state-integrity-v2 5 python, typescript, javascript
    litellm-localai-gateway-v2 8 python, typescript, javascript, generic
    llm-framework-risks 6 python, javascript, typescript
    llm-output-taint-js-v1 25 javascript, typescript
    llm-output-taint-python-v1 26 python
    llm-provider-key-literal-v1 17 generic
    llm-security-hardening 8 python, javascript, typescript
    llm01-advanced-contextual-v2 14 python, javascript, typescript
    llm01-prompt-injection 8 python, javascript, typescript
    llm01-vendor-system-prompt-v1 6 python, javascript, typescript
    llm02-sensitive-data-disclosure-v2 3 python, javascript, typescript
    llm02-sensitive-prompt-trace-logging 5 javascript, typescript, python, rust
    llm03-supply-chain-hardening-v2 9 python, javascript, typescript
    llm03-supply-chain 5 python, javascript, typescript
    llm04-insecure-output-handling 5 python, javascript, typescript
    llm05-output-sink-hardening-v2 1 javascript, typescript
    llm05-output-to-html 4 javascript, typescript, generic
    llm05-output-to-shell-sql-template 6 javascript, typescript, python, rust
    llm06-agent-tool-approval 4 javascript, typescript, python
    llm06-agentic-abuse-hardening-v2 10 python, javascript, typescript
    llm06-mcp-tool-server-v2 1 python
    llm07-prompt-tool-leakage-v2 4 python, javascript, typescript
    llm07-system-prompt-leakage 5 python, javascript, typescript
    llm08-rag-vector-tenant-filter 2 javascript, typescript, python
    llm09-misinformation 5 python, javascript, typescript
    llm10-consumption-hardening-v2 2 python, javascript, typescript
    llm10-unbounded-consumption 2 javascript, typescript, python
    manifest-ai-permissions-v2 5 generic
    mcp-filesystem-command-risk 3 javascript, typescript, python, rust
    mcp-server-go-v1 12 go
    mcp-server-jvm-dotnet-rust-v1 26 java, csharp, rust, kotlin
    mcp-tool-name-integrity-v1 5 python, typescript, javascript, generic
    mcp-tool-output-hygiene-v1 9 python, typescript, javascript, go, java, csharp
    mcp-tool-server-v3 15 typescript, javascript, python, json
    mcp-transport-auth-v1 35 python, typescript, javascript
    mlops-deployment-security-v2 2 python
    model-loading-v1 14 python
    model-supply-chain-v1 22 python, typescript, javascript, dockerfile, yaml, json
    mongoose-ai-memory-v2 7 typescript, javascript
    multichannel-secret-egress-v1 6 python, typescript, javascript, go, java, php
    neon-postgres-ai-v2 5 typescript, javascript, python
    netlify-vercel-edge-ai-v2 6 typescript, javascript
    network-origin-privilege-python-v1 1 python
    nextjs-ai-routes-v2 2 typescript, javascript
    openai-anthropic-vendor-risk-v2 6 typescript, javascript, python
    orm-rag-tenant-boundary-v2 9 typescript, javascript, python
    php-laravel-ai-v2 7 php
    postgres-ai-tenant-boundary-v2 7 python, typescript, javascript, go, rust, generic
    process-execution-boundaries-v1 6 python, typescript, javascript
    prompt-redaction-ordering-v2 6 typescript, javascript, python, java, csharp, go
    rag-loader-ssrf-v1 15 python, typescript, javascript
    rails-dependency-versions-v1 4 generic
    rails-hardening-ruby-v1 8 ruby
    rails-hardening-ruby-v2 8 ruby
    rails-secrets-yaml-v1 1 yaml
    rails-version-scoped-ruby-v1 8 ruby
    rails-version-scoped-v1 15 generic
    rails-views-erb-v1 1 generic
    rails-views-haml-v1 1 generic
    rails-views-helpers-v1 3 generic
    rails-views-slim-v1 1 generic
    react-ai-ui-sinks-v2 5 typescript, javascript
    recursive-agent-loop-safety-v2 6 typescript, javascript, python, java, csharp
    redis-cache-ai-data-v2 7 python, typescript, javascript, java, csharp, php
    remote-prompt-template-supply-chain-v2 7 python, typescript, javascript, generic, php, java
    repo-automation-agent-v2 6 typescript, javascript, python
    response-schema-validation-v2 7 typescript, javascript, python, java, csharp
    rust-agent-desktop-v1 13 rust, json
    skill-command-execution-v1 25 generic
    skill-credential-access-v1 17 generic
    skill-directives-v1 18 generic
    skill-persistence-network-v1 14 generic
    state-transition-integrity-v1 8 python, typescript, javascript, go
    stream-output-safety-v2 5 typescript, javascript, python, java, csharp
    supabase-ai-edge-v2 7 typescript, javascript
    supabase-postgrest-rls-v2 5 typescript, javascript, generic
    supabase-rag-rpc-v2 4 typescript, javascript, python
    swift-ai-mobile-security-v2 8 swift
    tauri-ai-command-security-v2 6 rust, typescript, javascript, generic
    tool-authorization-policy-v2 6 typescript, javascript, python, java, csharp
    typescript-orm-ai-actions-v2 7 typescript, javascript
    vector-db-auth-isolation-v2 11 python, typescript, javascript
    vendor-sdk-response-hygiene-v1 18 python, javascript, typescript
    vendor-sdk-safety-controls-v1 10 python, javascript, typescript, yaml, hcl
    vercel-ai-sdk-v2 8 typescript, javascript
    vulnfix-ai-taint 5 javascript, python, typescript
    vulnfix-ai 69 javascript, typescript, python
    vulnfix-gaps-c-ruby-v1 14 c, cpp, ruby
    vulnfix-gaps-v1 33 python, javascript, typescript, java, csharp, go
    wordpress-ai-plugin-security-v2 7 php
    workflow-import-execution-risk 3 javascript, typescript, python

    Vendored verbatim under their own licences; Keryn did not write them.

    36 rules · licence MIT · Copyright (c) 2026 Muhammad Basit Ali · source https://github.com/basitalisandhu/agentic-semgrep-rules

    Rule Severity Languages Message
    javascript.code-execution.llm-output-to-child-process ERROR javascript, typescript Text returned by a language model is passed to child_process as a command, or as an argument with shell: true. A prompt injection in any page, document or tool result the model has read becomes OS command injection with this process’s privileges. Do not let the model compose commands. Expose fixed executables as tools, pass model-chosen values as separate array arguments to execFile or spawn without shell: true, validate them against an allowlist, and run with least privilege and a timeout.
    javascript.code-execution.llm-output-to-eval-function ERROR javascript, typescript Text returned by a language model flows into a call that compiles and runs it as JavaScript. A prompt injection in any page, document or tool result the model has read becomes arbitrary code execution in this process (the vm module is not a security boundary). Do not execute model output. If generated code must run, use an isolated sandbox (isolated-vm, a WebAssembly runtime, or a separate container with no secrets, no network and a timeout) and treat its result as untrusted data.
    javascript.injection.llm-output-to-fetch WARNING javascript, typescript A URL chosen by a language model is requested. A prompt injection can point the agent at internal services (cloud metadata endpoints, admin panels, localhost ports) or at an attacker’s server to exfiltrate data: server-side request forgery through a tool URL. Validate the URL before fetching: parse it with new URL(), allow only http and https, resolve the host and reject private, loopback and link-local ranges, apply a host allowlist where possible, disable or re-validate redirects, and set timeouts and response size limits.
    javascript.injection.llm-output-to-file-path WARNING javascript, typescript A file path chosen by a language model is opened, written or deleted without containment checks. A prompt injection can read or overwrite any file this process can reach (.env files, SSH keys, source code, other users’ data): path traversal through a tool argument. Resolve the path against a fixed base directory with path.resolve, verify the result still starts with that base (plus path.sep), reject symlinks where appropriate, and apply an allowlist of names or extensions.
    javascript.injection.llm-output-to-innerhtml WARNING javascript, typescript Text returned by a language model is inserted into the DOM as HTML. Models can be made to emit script tags, event handlers or markdown with embedded HTML, which turns a prompt injection into cross-site scripting against whoever views the answer (session theft, actions in the user’s browser). Render model output as text (textContent, React children), or convert markdown with HTML disabled and sanitise the result with DOMPurify before inserting it.
    javascript.injection.llm-output-to-sql ERROR javascript, typescript Text returned by a language model is used as a SQL statement (or interpolated into one) and executed by the database. A prompt injection becomes SQL injection: data exfiltration, modification or deletion with the privileges of the database user. Never execute model-written SQL directly. Use parameterised queries where the model only supplies values (query(text, [values]), Prisma.sql tagged templates, knex bindings), or run model-generated SQL on a read-only connection restricted to an allowlisted schema with statement timeouts.
    javascript.mcp.mcp-http-transport-without-auth WARNING javascript, typescript An MCP HTTP transport (‘$TRANSPORT’) is created inside a route handler that has no authentication middleware, and none is registered with app.use() before it. Anyone who can reach the port can list and call every tool this server exposes, and SSE and streamable-HTTP endpoints are also reachable from browsers via DNS rebinding. Protect the route with the SDK’s requireBearerAuth middleware (or your own token or session check), enable enableDnsRebindingProtection with allowedHosts, bind to localhost unless remote access is intended, and put TLS in front. Use the stdio transport for local, single-user servers.
    javascript.permissions.mcp-tool-param-to-file-path WARNING javascript, typescript A tool argument is filled in by the model and is used as a file path without a containment check. A prompt injection can make the agent read or overwrite any file this process can reach (.env files, SSH keys, other users’ data). Resolve the path against a fixed base directory with path.resolve, verify the result still starts with that base (plus path.sep), reject symlinks where appropriate, and restrict names or extensions with an allowlist in the tool schema.
    javascript.permissions.mcp-tool-param-to-shell ERROR javascript, typescript A tool argument is filled in by the model and reaches a process call as a shell command or executable. This is an “execute anything” tool: a prompt injection anywhere in the agent’s context becomes OS command injection on the host running the MCP server. Replace the free-form command with a fixed executable and typed arguments, validate each argument against an allowlist in the tool’s schema and code, use execFile or spawn without shell: true, run with least privilege and a timeout, and require human approval for anything with side effects.
    javascript.prompt-injection.user-input-in-system-prompt WARNING javascript, typescript Untrusted input (HTTP request data, CLI arguments, a form field or a chat message) is interpolated into the system prompt. The system prompt carries the model’s instructions and trust boundary; letting users write into it is a direct prompt injection path that can override guardrails, leak the prompt itself or redirect tool use. Keep the system prompt static and pass user content only in user-role messages, or in clearly delimited template variables the model is told to treat as data. If dynamic context is needed, allowlist or escape it and never let it contain instructions.
    javascript.secrets.api-key-in-command-line-arg WARNING javascript, typescript An API key or token is accepted or passed as a command-line argument. Command lines are visible to every user on the host (ps, /proc), end up in shell history, process monitors, crash reports and CI logs. Read the secret from an environment variable, a file with restricted permissions, or a secrets manager instead, and if a child process needs it pass it through its env option.
    javascript.secrets.hardcoded-llm-api-key ERROR javascript, typescript A model-provider API key is hard-coded in source. Anyone with read access to this file or its history (a fork, a bundle shipped to browsers, a container image, a CI log) can spend against your account, exfiltrate data through your provider, and impersonate your agent. Revoke this key now, then load keys from process.env or a secrets manager at runtime, never ship them in client-side bundles, and add a secret scanner (gitleaks, trufflehog or GitHub secret scanning) to CI.
    javascript.secrets.llm-api-key-logged WARNING javascript, typescript A secret read from the environment (an API key, token or password, or the whole process.env after dotenv.config()) is written to the console or a logger. Logs are copied to CI output, log aggregators, crash reports and support tickets, so this is a credential leak. Never log secrets; log only whether a key is set, or a masked suffix, and keep process.env out of debug dumps.
    python.code-execution.llm-output-to-exec-eval ERROR python Text returned by a language model flows into a call that executes it as Python. A prompt injection in any document, web page or tool result the model has read becomes arbitrary code execution in this process. Do not execute model output. If the agent must run generated code, run it in an isolated sandbox (separate container or microVM, no network, no credentials, time limit) and treat the result as untrusted data.
    python.code-execution.llm-output-to-os-system ERROR python Text returned by a language model is passed to a call that hands it to the system shell. A prompt injection becomes OS command injection with the privileges of this process. Replace os.system, os.popen and os.exec*/os.spawn* with subprocess.run([…]) using a fixed executable and list arguments, validate every model-chosen value against an allowlist, and run with least privilege and a timeout.
    python.code-execution.llm-output-to-subprocess ERROR python Text returned by a language model is passed to subprocess with shell=True (or as the program to run). A prompt injection becomes OS command injection with the privileges of this process. Do not let the model compose shell commands. Expose a small set of fixed commands as tools, pass model-chosen values as separate list arguments without shell=True, validate them against an allowlist, and run with least privilege and a timeout.
    python.deserialization.langchain-allow-dangerous-deserialization WARNING python ‘allow_dangerous_deserialization=True’ loads a pickle-based artefact (FAISS or other vector stores, saved chains, prompts) and pickle can execute arbitrary code when the file is opened. Only pass this flag for files your own pipeline produced and whose integrity you verify (checksum or signature) before loading. Never load vector stores, indexes or chains downloaded from the internet or uploaded by users with this flag.
    python.deserialization.pickle-load-model-file WARNING python This call unpickles data, and unpickling executes arbitrary code embedded in the file. Model artefacts, embeddings caches, tokenizers and agent memory files that come from a hub, a bucket, a user upload or an earlier agent run are untrusted. Use a data-only format (safetensors, ONNX, JSON, numpy .npy with allow_pickle=False), verify checksums or signatures before loading, and if pickle is unavoidable load it in an isolated process with a restricted Unpickler.find_class allowlist.
    python.deserialization.torch-load-without-weights-only WARNING python torch.load deserialises with pickle, and a crafted checkpoint executes arbitrary code when loaded. Model files pulled from hubs, shared drives, user uploads or an agent’s own downloads are untrusted input. Pass weights_only=True (the default only since PyTorch 2.6; set it explicitly to be safe on older versions), prefer the safetensors format, and verify the file’s checksum or signature before loading it. Never set weights_only=False for a file you did not produce yourself.
    python.deserialization.transformers-trust-remote-code WARNING python trust_remote_code=True downloads and executes Python code from the model or dataset repository at load time, with this process’s credentials and network access. A compromised or typosquatted repository, or a force-pushed revision, becomes remote code execution. Remove the flag and use a natively supported architecture if you can. If remote code is required, pin an exact commit with revision=“<sha>”, review that code, and load it in an isolated environment without secrets.
    python.deserialization.yaml-unsafe-load WARNING python yaml.load without SafeLoader (or with Loader, UnsafeLoader or FullLoader) can instantiate arbitrary Python objects and run code from the document. Agent configurations, prompt templates, tool manifests and skill files are increasingly fetched from repositories and marketplaces, so treat them as untrusted. Use yaml.safe_load (or Loader=yaml.SafeLoader), validate the result against a schema, and never load YAML the model wrote or downloaded with an unsafe loader.
    python.injection.llm-output-to-file-path WARNING python A file path chosen by a language model is opened, written or deleted without containment checks. A prompt injection can read or overwrite any file this process can reach (secrets, SSH keys, source code, other users’ data): path traversal through a tool argument. Resolve the path against a fixed base directory, verify the resolved path is still inside it (Path.resolve() plus is_relative_to), reject symlinks where appropriate, and apply an allowlist of extensions or names.
    python.injection.llm-output-to-html WARNING python Text returned by a language model is rendered as raw HTML. Models can be made to emit script tags, event handlers or markdown with embedded HTML, which turns a prompt injection into cross-site scripting against whoever views the answer (session theft, actions in the user’s browser). Render model output as text, or convert markdown with HTML disabled and sanitise the result with an allowlist (for example bleach or nh3) before marking it safe.
    python.injection.llm-output-to-http-request WARNING python A URL chosen by a language model is fetched. A prompt injection can point the agent at internal services (cloud metadata endpoints, admin panels, localhost ports) or at an attacker’s server to exfiltrate data: server-side request forgery through a tool URL. Validate the URL before fetching: parse it, allow only http/https, resolve the host and reject private, loopback and link-local ranges, apply a host allowlist where possible, disable redirects or re-validate on each hop, and set timeouts and size limits.
    python.injection.llm-output-to-sql ERROR python Text returned by a language model is used as a SQL statement (or interpolated into one) and executed. A prompt injection becomes SQL injection: data exfiltration, modification or deletion with the privileges of the database user. Never execute model-written SQL directly. Use parameterised queries where the model only supplies values, or run model-generated SQL on a read-only connection restricted to an allowlisted schema with statement timeouts.
    python.mcp.fastmcp-bind-all-interfaces WARNING python This MCP server binds to 0.0.0.0, so every tool it exposes is reachable from any network interface, including other containers, the LAN or the internet, depending on where it runs. MCP tools typically read files, call APIs or run commands on behalf of whoever connects. Bind to 127.0.0.1 unless remote access is intended; if it is, put the server behind TLS and authentication (OAuth bearer tokens per the MCP authorization spec) and restrict it with a firewall or network policy.
    python.mcp.fastmcp-http-transport-without-auth WARNING python This MCP server is started with an HTTP-based transport but the FastMCP instance was created without an auth provider or token verifier. Anyone who can reach the port can list and call every tool, and SSE and streamable-HTTP endpoints are also exposed to cross-origin and DNS-rebinding attacks from the browser. Configure authentication (the SDK’s auth settings with a token verifier, or FastMCP’s auth providers), validate the Origin header, bind to localhost unless remote access is intended, and put TLS in front. Use the stdio transport for local, single-user servers.
    python.permissions.agent-tool-param-to-file-path WARNING python A tool parameter is filled in by the model and is used as a file path without a containment check. A prompt injection can make the agent read or overwrite any file this process can reach (credentials, keys, other users’ data). Resolve the path against a fixed base directory, verify the resolved path is still inside it (Path.resolve() plus is_relative_to), reject symlinks where appropriate, and restrict names or extensions with an allowlist.
    python.permissions.agent-tool-param-to-shell ERROR python A tool parameter is filled in by the model and reaches a process call as a shell command or executable. This is an “execute anything” tool: a prompt injection anywhere in the agent’s context becomes OS command injection on the host running the tool. Replace the free-form command with a fixed executable and typed arguments, validate each argument against an allowlist, never use shell=True, run with least privilege and a timeout, and require human approval for anything with side effects.
    python.permissions.langchain-allow-dangerous-code WARNING python ‘allow_dangerous_code=True’ opts into LangChain components (pandas, CSV, Spark or Python agents) that execute model-generated Python in this process. Any prompt injection reaching the agent becomes arbitrary code execution with the process’s credentials. Remove the flag and use a structured tool for the analysis you need, or run the agent inside a disposable sandbox (separate container, no secrets, no network, resource limits) and treat its output as untrusted.
    python.permissions.langchain-allow-dangerous-requests WARNING python ‘allow_dangerous_requests=True’ lets the model issue arbitrary HTTP requests (RequestsToolkit, OpenAPI toolkits), including POST, PUT and DELETE, to any URL it chooses. A prompt injection can target internal services and cloud metadata endpoints or exfiltrate data: server-side request forgery with the agent’s network position. Remove the flag, restrict the toolkit to GET, and wrap it with a host allowlist and private-range blocking.
    python.permissions.langchain-dangerous-tools WARNING python ‘$TOOL’ gives the model an unrestricted shell or Python interpreter inside this process. Any prompt injection in a document, web page or tool result becomes arbitrary code execution with this process’s credentials, network access and filesystem. Prefer narrow, typed tools that do one thing with validated arguments. If code execution is a product requirement, run it in an isolated sandbox (separate container or microVM, no secrets, no network, time and memory limits) and require human approval for anything that leaves the sandbox.
    python.prompt-injection.user-input-in-system-prompt WARNING python Untrusted input (HTTP request data, CLI arguments, stdin or a chat message) is interpolated into the system prompt. The system prompt carries the model’s instructions and trust boundary; letting users write into it is a direct prompt injection path that can override guardrails, leak the prompt itself or redirect tool use. Keep the system prompt static and pass user content only in user-role messages, or in clearly delimited template variables that the model is told to treat as data. If dynamic context is needed, allowlist or escape it and never let it contain instructions.
    python.secrets.api-key-in-command-line-arg WARNING python An API key or token is accepted or passed as a command-line argument. Command lines are visible to every user on the host (ps, /proc), end up in shell history, process monitors, crash reports and CI logs. Read the secret from an environment variable, a file with restricted permissions, or a secrets manager instead, and if a child process needs it pass it through its environment.
    python.secrets.hardcoded-llm-api-key ERROR python A model-provider API key is hard-coded in source. Anyone with read access to this file or its history (a fork, a container image, a CI log, a leaked backup) can spend against your account, exfiltrate data through your provider, and impersonate your agent. Revoke this key now, then load keys from an environment variable or a secrets manager at runtime and add a secret scanner (gitleaks, trufflehog or GitHub secret scanning) to CI.
    python.secrets.llm-api-key-logged WARNING python A secret read from the environment (an API key, token or password, or the whole environment after load_dotenv) is written to stdout or a log. Logs are copied to CI output, log aggregators, crash reports and support tickets, so this is a credential leak. Never print secrets; log only whether a key is set, or a masked suffix, and keep the process environment out of debug dumps.