数据分析

DCL Secret Leak Detector

试用

在 AI agent 输出与流水线数据落到用户或日志之前,扫出其中暴露的 API key、token 和各类技术凭证。

它能做什么

覆盖 8 类敏感凭据:API key、云服务凭证、JWT、私钥、数据库连接串、.env 赋值、Webhook 签名密钥、带鉴权的内部端点。可作为纯指令清单在 agent 上下文内免费跑,也可调用 DCL Trust Oracle MCP 服务做真实正则扫描,每次 $0.02,通过 x402 协议在 Base 上以 USDC 结算并返回链上审计凭证。任意类别命中即返回 NO_COMMIT 并附上脱敏样本,可直接接入交付前拦截环节。

什么时候用它

  • 代码生成 agent 提交 shell、Docker、CI 配置前的硬编码凭证检查
  • 工具调用型 agent 的回复写入日志或下游 API 之前过一遍
  • 内部 Wiki、Runbook 接入 RAG 后的输出审计
  • 在多阶段 LLM 输出流水线里加一道凭据闸门

技能文档

DCL Secret Leak Detector — Leibniz Layer™

Publisher: @daririnch · Fronesis Labs Version: 2.0.0 Part of: DCL Skills · Leibniz Layer™ Security Suite MCP endpoint: https://mcp.fronesislabs.com/mcp (DCL Trust Oracle)


⚠️ Now backed by a live, paid regex scan — same checklist, real server

Starting with v2.0.0, the categories below can be run two ways:

  1. Free, instruction-only — the agent works through the checklist itself, entirely inside its own context. No network call, no charge.
  2. Paid, live — the same eight categories, run as real regex against the live DCL Trust Oracle MCP server, settled on-chain via x402 in USDC on the Base network, returning a cryptographic tx_hash seal. No subscription, no account — pay per call.

Unlike some other DCL skills, this one is a close one-to-one match: the live tool implements the same S1-S8 categories documented here, so the two modes should agree. Use the free mode for manual review or offline work; use the live mode when you want an independently verifiable, on-chain-anchored proof of the scan.


What this skill does

Scans AI agent outputs, tool results, and pipeline data for exposed secrets and credentials — before they reach users, logs, or downstream systems.

What gets detected

CategoryPattern class
api_keyProvider-prefixed keys: OpenAI, Anthropic, Stripe, GitHub, Slack, SendGrid, Twilio patterns
cloud_credentialAWS access key IDs, AWS secret access keys, GCP service account fragments
tokenJWTs, Bearer tokens
private_key_pemPEM header/footer blocks for any private key type
database_urlConnection strings with embedded credentials: proto://user:pass@host
connection_stringADO.NET / ODBC style strings with User ID=/Password= fields
env_assignment.env-style lines where the variable name matches known secret patterns
webhook_secretSigned secrets for platforms like Stripe
internal_endpointURLs containing API keys or tokens as query parameters

Live tool (paid, USDC on Base via x402)

MCP toolPriceWhat it runs
dcl_evaluate_secrets$0.02Regex scan across all 8 categories above; any finding → NO_COMMIT

Connecting to the live server

{
  "mcpServers": {
    "dcl-trust-oracle": {
      "url": "https://mcp.fronesislabs.com/mcp"
    }
  }
}

Payment is handled automatically for x402-capable clients; clients without native x402 support fall back to a guided payment flow. No API key or account signup is required — only a wallet capable of paying in USDC on Base. Prices are set server-side and may change; the MCP tool description returned by the server at call time is the source of truth.

Calling the tool

result = dcl_evaluate_secrets(
    response=agent_output,
    agent_id="my-agent-01",
)

if result["verdict"] == "NO_COMMIT":
    block_and_alert(result["findings"])
else:
    log_audit(result["tx_hash"])

Output shape

{
  "verdict": "COMMIT | NO_COMMIT",
  "risk_score": 0.0,
  "findings": [
    {
      "type": "api_key",
      "provider": "openai",
      "position": 87,
      "redacted_sample": "sk****************3456",
      "severity": "critical",
      "category": "S1"
    }
  ],
  "detection_count": 0,
  "categories_checked": ["S1","S2","S3","S4","S5","S6","S7","S8"],
  "categories_clear": ["S1","S2","S3","S4","S5","S6","S7","S8"],
  "tx_hash": "string",
  "chain_index": 0,
  "input_hash": "string",
  "timestamp": 0.0,
  "seal_text": "🔒 Verified by Leibniz Layer | Fronesis Labs\nHash: ...\nIntent: ...\nSealed: ... — Base Mainnet\nVerify: https://x402.fronesislabs.com/verify/...",
  "verify_url": "https://x402.fronesislabs.com/verify/"
}

Only input_hash (a hash of the scanned text) and finding metadata are written to the audit chain — the raw text and any real secret values are never stored. redacted_sample shows only the first 2 and last 4 characters of any match.


Free instruction-only checklist (no network call, no charge)

Paste the text to scan into the conversation and work through the checklist below entirely inside the agent's own context. Nothing here contacts any server.

Step 1 — Confirm content is in context

Verify the text to scan is present in the conversation. If not provided, ask the user to paste it.

Step 2 — Compute content fingerprint

content_hash = SHA-256(raw text submitted for scanning)

Step 3 — Run the detection checklist

Work through every category below. For each match found, record type, provider (if identifiable), position, a redacted_sample (first 2 and last 4 chars only), and severity. If no patterns match a category, mark it CLEAR.

Step 4 — Apply verdict logic

ConditionVerdict
Any finding at any severityNO_COMMIT
No findingsCOMMIT

Secrets have no safe threshold — any detected secret results in NO_COMMIT.

Step 5 — Compute DCL fingerprint

analysis_content  = verdict + all findings serialized + timestamp
analysis_hash     = SHA-256(analysis_content)
dcl_fingerprint   = "DCL-SLD-" + date + "-" + content_hash[:8] + "-" + analysis_hash[:8]

Detection Checklist

S1 — API Keys (Critical)

  • Short prefix followed by 20+ alphanumeric chars matching known provider key formats
  • Live payment key prefixes (distinct from test/publishable key prefixes)
  • Version control platform personal access token prefixes
  • Messaging platform bot/user token prefixes

S2 — Cloud Credentials (Critical)

  • Cloud provider access key ID patterns
  • Cloud provider secret key context: high-entropy string near credential field names
  • Service account JSON fragments: private key fields, client email fields

S3 — Tokens & JWTs (Critical)

  • JWT pattern: three base64url segments separated by dots
  • Bearer token context: authorization header values with high-entropy content

S4 — Private Keys (Critical)

  • PEM block opening/closing markers for any private key type

S5 — Database & Connection Strings (Critical)

  • URI with embedded credentials: protocol + :// + username + : + password + @ + host
  • ORM/driver connection strings containing password parameter fields

S6 — Environment Variable Assignments (Major)

  • Variable assignments where the name contains KEY, SECRET, TOKEN, PASS, PWD, CREDENTIAL, AUTH

S7 — Webhook & Signed URL Secrets (Major)

  • Webhook secret prefixes for known payment/developer platforms
  • Signed URL patterns where a signature or secret appears as a query parameter

S8 — Internal Endpoints with Auth (Minor → Major)

  • Internal hostnames with auth query parameters
  • Any URL where api_key=, token=, secret=, or access_token= appears with a non-trivial value

Secret Leak Detector vs DCL Sentinel Trace

These two skills are complementary, not competing. Run both.

DCL Sentinel TraceDCL Secret Leak Detector
FocusPersonal identity dataTechnical credentials
CatchesEmails, phones, national IDs, IBANs, card PANsAPI keys, tokens, private keys, DB URLs
Primary riskPrivacy breachSecurity breach / credential compromise
Live tooldcl_evaluate_pii ($0.02)dcl_evaluate_secrets ($0.02)

A response can be PII-clean and still contain a live credential. Both checks are necessary for complete output coverage.


Where Secret Leak Detector fits in the DCL pipeline

Untrusted input
        │
        ▼
DCL Prompt Firewall          ← blocks malicious input
        │ COMMIT
        ▼
      LLM call
        │
        ▼
DCL Policy Enforcer          ← policy & jailbreak check
        │ COMMIT
        ▼
DCL Sentinel Trace           ← PII redaction
        │ COMMIT
        ▼
DCL Secret Leak Detector     ← this skill — credential & secret scan
        │ COMMIT
        ▼
DCL Semantic Drift Guard     ← hallucination & grounding check
        │ IN_COMMIT
        ▼
Safe to deliver

High-risk agent patterns

Coding agents — generate shell scripts, Dockerfiles, CI configs, Terraform. Common vector for hardcoded credentials appearing in generated output.

DevOps / infrastructure agents — read deployment configs, env files, Kubernetes secrets. May quote them verbatim in responses.

RAG pipelines over internal docs — internal wikis and runbooks routinely contain credentials left by engineers. Retrieved chunks can carry them into LLM context and outputs.

Tool-calling agents — an agent that calls an API internally may reproduce the key in its reasoning trace or final response.


Privacy & Data Policy

Operated by Fronesis Labs. The free checklist runs 100% instruction-only — no network requests, no content transmitted anywhere. For the live tool: only a hash of the scanned text (input_hash) and finding metadata are written to the on-chain audit trail; raw text and detected secret values are never stored server-side. Only redacted samples ever appear in output.

Full policy: https://fronesislabs.com/#privacy · Questions: support@fronesislabs.com


  • dcl-sentinel-trace — PII redaction and identity exposure detection
  • dcl-prompt-firewall — Input-layer injection and jailbreak detection
  • dcl-policy-enforcer — Policy and jailbreak detection for AI outputs
  • dcl-semantic-drift-guard — Hallucination and grounding check

Leibniz Layer™ · Fronesis Labs · fronesislabs.com

常见问题

免费清单和付费扫描有什么差别?
免费模式完全在 agent 上下文内跑同一套 8 类清单,无网络调用、无费用;付费模式把文本发到 DCL Trust Oracle MCP 服务做真实正则扫描,通过 x402 在 Base 上用 USDC 结算,返回链上审计记录,两者覆盖的类别一致。
在线扫描会保留我提交的原文吗?
不会。链上只写入扫描文本的 SHA-256 input_hash 和发现元数据,原文与明文凭据都不落库;findings 中只展示命中的前 2 位和后 4 位字符,例如 sk****************3456。
跟 DCL Sentinel Trace 是什么关系?
Sentinel Trace 关注个人身份信息(邮箱、电话、身份证号、银行卡号等);Secret Leak Detector 关注技术凭据(API key、token、私钥、数据库连接串等),两者互补而非替代,通常需要一起跑才能覆盖完整。

相关技能

通过 x402 在 Base 上用 USDC 结算的付费 MCP 审计,为 LLM 或智能体输出给出判定、置信度与链上 tx_hash。

18 次安装

Detect API keys, tokens, and credentials in code with 50+ patterns, entropy analysis, and multiple report formats

在输入层拦截注入与越权指令,每次调用按 x402 协议链上结算并留下哈希审计记录。

18 次安装