Scan files for secrets with gitleaks rules API

Find secrets in text or diffs using vendored gitleaks rules with redaction.

The Scan files for secrets with gitleaks rules operation is part of the AppSec Secrets IAM OpenAPI CI JWT SBOM API API on BRAINIAC.software. Find secrets in text or diffs using vendored gitleaks rules with redaction. It is exposed as POST /api/v1/appsec-config/secrets-scan and priced at $0.04 USDC on Base. Payment uses the x402 exact scheme: an unpaid call returns HTTP 402 with payment requirements; after paying the exact USDC amount, retry the same request with a payment-signature header and Idempotency-Key. No account and no API key are required. Data sources for this product: Caller-supplied files or snippets processed locally gitleaks default rules (MIT) SecLists JWT secrets and NCSC common passwords (MIT) NIST SP 800-63B-4; RFC 9700 OAuth Security BCP; OWASP API Security Top 10 2023 recheck (MIT); packageurl-js (MIT) Limitations: Nothing is cloned, fetched or executed at request time. Secrets are redacted in responses; no liveness checks against third-party services. Outputs are lookups or prechecks for human review. They are not legal, customs, tax, medical, or identity determinations. Outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Related operations in this group include Audit GitHub Actions workflows, Audit GitLab CI configuration, Audit CloudFormation templates, Analyse AWS IAM policy documents. Open the group documentation for the full request schema, field notes, and response examples before integrating.

POST$0.04 USDC
/api/v1/appsec-config/secrets-scan

Example request

curl -i -X POST "https://www.brainiac.software/api/v1/appsec-config/secrets-scan" \
  -H 'content-type: application/json' \
  -H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
  --data-binary @- <<'JSON'
{
  "files": [
    {
      "path": "deploy.env",
      "content": "# deploy config\nAWS_ID=AKIAZ7Q3XVJ5RK2MWN4T\nDOCS_SAMPLE=AKIAIOSFODNN7EXAMPLE\nexport GH=ghp_R8vK2mQ9xT4wL7pZ3nB6cY1dF5hJ0sA2eU4g\nSTRIPE=sk_test_aaaaaaaaaaaaaaaa\n"
    }
  ],
  "mode": "text",
  "allowlistPaths": [],
  "includeLowEntropy": false
}
JSON

An unpaid probe returns HTTP 402 with x402 payment requirements. After paying the exact USDC amount on Base, retry the identical request with a payment-signature header.

FAQ

  • Do I need an API key? No. Pay the listed USDC amount with x402.
  • What network? Base (eip155:8453), USDC.
  • Is this an official determination? No. Results are for human review against the cited sources.

Related APIs

AppSec Secrets IAM OpenAPI CI JWT SBOM API APIFull docsHow it works