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.
What you need
Section titled “What you need”| 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 |
Capture a representative session
Section titled “Capture a representative session”-
Turn on capture and decrypt your app’s host (see Debug a mobile app for a device, or macOS traffic for a Mac app).
-
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.
Run the secret scanner
Section titled “Run the secret scanner”-
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.
- Filter by severity
- Kind and severity
- Where it was found
- Masked value — safe to read and share
-
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.
-
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.
What it looks for
Section titled “What it looks for”| 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 |
Check the security headers
Section titled “Check the security headers”The Security tab grades each host A–F on response header and cookie hygiene.
Per-host security grades and the issues behind them.
- Hosts, worst grade first
- Missing headers, weak cookies, risky CORS
- Show Request to jump to it
-
Select a host to see its issues: missing HSTS, CSP,
nosniffor clickjacking protection; cookies without Secure, HttpOnly or SameSite; wildcard CORS with credentials; and disclosed software versions. -
Click Show Request(s) on an issue to see the responses it came from.
Share the findings safely
Section titled “Share the findings safely”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.
Right-click a selection (or export all) and choose Export Request → HAR…, then tick Redact secrets in the save panel. Redaction removes tokens, cookies, API-key headers, credential parameters, password-like fields, and anything the scanner matches.
Fix and re-check
Section titled “Fix and re-check”-
Move client-exposed keys to the server, take credentials out of URLs, and add the missing security headers.
-
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.
- Possible secrets count
- Worst security grade
- Needs attention: each finding with Show Request