Skip to content

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

    multichannel-secret-egress-v1

    View as Markdown

    6 rules · Keryn Software Licence · rules 0.8.0 · all packs

    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.

    error python data-flow rule python, requests, httpx

    A secret (environment variable, config field, or credential-named attribute) reaches an outbound request URL/body or a raised exception without passing through a redactor. Filtering the user-facing response does not help if the secret still leaves through a tool call, an outbound request, or an error message. Redact on every channel, or never put the raw secret on one.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).

    CWE-200 CWE-201 CWE-532 LLM02 LLM06 ASI03

    Fix: Apply the same redaction to every outbound channel (tool-call arguments, request URLs and bodies, exception and error text), or keep the raw secret out of them entirely; send a credential only in the Authorization header of the service that owns it.

    References: https://cwe.mitre.org/data/definitions/201.html · https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/

    Try it: a snippet that triggers this rule

    Written for this page, not taken from any project. Save it as app/billing_sync.py and scan it with keryn scan app --verbose; the finding below appears.

    app/billing_sync.py
    import os
    import requests
    BASE = "https://billing.example.com/v2"
    def fetch_invoices(customer_id: str):
    api_token = os.environ["BILLING_API_TOKEN"]
    url = f"{BASE}/customers/{customer_id}/invoices?token={api_token}"
    resp = requests.get(url, timeout=10)
    resp.raise_for_status()
    return resp.json()["items"]
    if __name__ == "__main__":
    for inv in fetch_invoices("cus_1042"):
    print(inv["number"], inv["amount_due"])

    Checked with Keryn’s browser engine when this page was built: it reports keryn.egress.py.secret-to-side-channel at line 10 (error, proof 2). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.

    error typescript, javascript data-flow rule typescript, nodejs, axios

    A secret (process.env or a credential-named field) reaches an outbound request URL/body or a thrown error without passing through a redactor. Filtering the user-facing response does not help if the secret still leaves through a tool call, an outbound request, or an error message. Redact on every channel, or never put the raw secret on one.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).

    CWE-200 CWE-201 CWE-532 LLM02 LLM06 ASI03

    Fix: Apply the same redaction to every outbound channel, or keep the raw secret out of them; send a credential only in the Authorization header of the service that owns it.

    References: https://cwe.mitre.org/data/definitions/201.html · https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/

    Try it: a snippet that triggers this rule

    Written for this page, not taken from any project. Save it as src/notify.js and scan it with keryn scan src --verbose; the finding below appears.

    src/notify.js
    const webhook = "https://hooks.example.com/ops";
    export async function reportFailure(job, err) {
    const key = process.env.PAYMENTS_API_KEY;
    const res = await fetch(`${webhook}?job=${encodeURIComponent(job)}&key=${key}`, {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify({ job, message: err.message }),
    });
    if (!res.ok) {
    throw new Error(`webhook returned ${res.status}`);
    }
    }

    Checked with Keryn’s browser engine when this page was built: it reports keryn.egress.ts.secret-to-side-channel at line 5 (error, proof 2). The rule’s own logic is not published, so it cannot run in this tab; the pack list in the playground shows what does.

    error go data-flow rule go

    A secret (environment variable or credential-named field) reaches an outbound request URL or a formatted error without a redactor. Filtering the user-facing response does not help if the secret leaves through a request or an error. Redact on every channel, or keep the raw secret off them.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).

    CWE-200 CWE-201 CWE-532 LLM02 LLM06 ASI03

    Fix: Redact on every outbound channel, or keep the raw secret out of request URLs/bodies and error text; send a credential only in the Authorization header of the service that owns it.

    References: https://cwe.mitre.org/data/definitions/201.html · https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/

    error java data-flow rule java

    A secret (environment variable or credential-named field) reaches an outbound request URL or a thrown exception without a redactor. Filtering the user-facing response does not help if the secret leaves through a request or an error. Redact on every channel.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).

    CWE-200 CWE-201 CWE-532 LLM02 LLM06 ASI03

    Fix: Redact on every outbound channel, or keep the raw secret out of request URLs and exception text; send a credential only in the Authorization header of the service that owns it.

    References: https://cwe.mitre.org/data/definitions/201.html · https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/

    error php data-flow rule php

    A secret (getenv or $_ENV) reaches an outbound request URL or a thrown exception without a redactor. Filtering the user-facing response does not help if the secret leaves through a request or an error. Redact on every channel.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).

    CWE-200 CWE-201 CWE-532 LLM02 LLM06 ASI03

    Fix: Redact on every outbound channel, or keep the raw secret out of request URLs and exception text; send a credential only in the Authorization header of the service that owns it.

    References: https://cwe.mitre.org/data/definitions/201.html · https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/

    error csharp data-flow rule csharp, dotnet

    A secret (Environment.GetEnvironmentVariable or a credential-named field) reaches an outbound request URL or a thrown exception without a redactor. Filtering the user-facing response does not help if the secret leaves through a request or an error. Redact on every channel.

    Confidence P1: dangerous in context. False-positive risk medium: the pattern is legitimate in many programs, so check each hit.

    Edge inspected: sends data leaves for another party; it crosses the secret->outside boundary (a secret leaving the trusted side).

    CWE-200 CWE-201 CWE-532 LLM02 LLM06 ASI03

    Fix: Redact on every outbound channel, or keep the raw secret out of request URLs and exception text; send a credential only in the Authorization header of the service that owns it.

    References: https://cwe.mitre.org/data/definitions/201.html · https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/