Skip to content

Guides

Find leaked secrets

Scan captured traffic for API keys, tokens, card numbers and PII with the Insights secret scanner, check security headers, and share findings safely with redaction.

Before you ship, you want to know if your app is sending API keys to the client, putting tokens in URLs, or exposing card numbers. This guide captures your app’s traffic, runs the Insights secret and PII scanner over it, reviews the security header grades, and exports a redacted report you can share.

Cloak Proxy capturing your app, with HTTPS decrypted The scanner reads decrypted request and response bodies
A representative session: sign in, load the main screens, do a purchase if there is one More traffic means more coverage
  1. Turn on capture and decrypt your app’s host (see Debug a mobile app for a device, or macOS traffic for a Mac app).

  2. Exercise the app: sign in, open the screens that load data, and run any flow that handles money or personal details. The scanner only sees what the app actually sends.

  1. Open Insights (<kbd>⌥</kbd> <kbd>⌘</kbd> <kbd>I</kbd>) and select the Secrets tab. Insights analyzes the captured traffic automatically.

    Leaked secrets, masked. Each row says what kind, where, and on which host.

    1. Filter by severity
    2. Kind and severity
    3. Where it was found
    4. Masked value — safe to read and share
    The Insights Secrets tab listing a Stripe secret key in a URL and an AWS access key in a response body, both masked, marked High
  2. Each row shows the Kind, Where it was found (URL, request/response header or body, with the key or parameter name), the masked Value, the Host, and the request number. Use the Show menu to filter by severity.

  3. Select a finding to read its advice (for example, “Rotate this key and keep it on the server”), then click Show Request to jump to the exact request.

Finding Severity Notes
AWS, GitHub, Stripe, Slack, OpenAI, Anthropic, Google keys High / Medium Known key shapes; anything in a URL is raised to High
Private keys (-----BEGIN … PRIVATE KEY-----) High Should never reach a client
JSON Web Tokens outside the Authorization header Medium End up in logs and caches
Card numbers High Luhn-checked, so random digits don’t match
Credentials in URL parameters (?api_key=…, token=…) High URLs are logged everywhere
Credentials over plain HTTP (Authorization, Cookie, password fields) High Readable by anyone on the network
Email addresses in URLs Low PII in logs and referrers

The Security tab grades each host A–F on response header and cookie hygiene.

Per-host security grades and the issues behind them.

  1. Hosts, worst grade first
  2. Missing headers, weak cookies, risky CORS
  3. Show Request to jump to it
The Insights Security tab with hosts graded A to F on the left and a list of issues for shop.example.com on the right
  1. Select a host to see its issues: missing HSTS, CSP, nosniff or clickjacking protection; cookies without Secure, HttpOnly or SameSite; wildcard CORS with credentials; and disclosed software versions.

  2. Click Show Request(s) on an issue to see the responses it came from.

Export the findings without the secrets.

Click Export Report in the Insights toolbar to save a Markdown report (endpoints, errors, secrets, security grades, schema changes) for a pull request, ticket or CI log. Secret values in the report are masked.

  1. Move client-exposed keys to the server, take credentials out of URLs, and add the missing security headers.

  2. Capture a fresh session and open Insights again. The Overview tab shows Possible secrets and the Worst security grade at a glance, so you can confirm they dropped.

    The Overview tiles summarize secrets and the worst grade.

    1. Possible secrets count
    2. Worst security grade
    3. Needs attention: each finding with Show Request
    The Insights Overview with tiles for requests, endpoints, errors, possible secrets, worst security grade and schema changes, and a needs-attention list