Use case
Find hardcoded secrets before they ship
Semgrep's secret rules flag cloud keys, tokens and passwords in the files you scan. Claude reviews each hit with the value redacted, and your dashboard shows the flagged line so you can rotate the key and remove it.
Illustrative example: the key is redacted before any AI review.
In short: a full scan runs Semgrep's secret rules over your repository's working tree; a pull request review reports what they find in the changed files. Known key and token formats and secret-named values are redacted before any snippet reaches Claude, via Amazon Bedrock, and each real hit gets an explanation and a fix. Secrets in past commits are not covered yet.
What gets flagged
Semgrep's default ruleset includes secret rules for cloud keys, API tokens and hardcoded passwords in source and config files. They run in the same no-network sandbox as the rest of the code scan.
Each hit is routed to the secrets and data-exposure specialist, whose review decides whether the value is actually a secret and whether it crosses a boundary unsafely, such as into a log or an error response. You get a verdict with a confidence level, a plain-English explanation and a suggested fix, usually moving the value to a secrets manager or environment variable.
Redacted before any AI call
The snippet Claude reviews passes through a redactor first. It knows the key and token formats Semgrep's secret rules look for (cloud, payment, messaging and source-control providers, private keys, JWTs) and masks any value assigned to a secret-looking name such as STRIPE_KEY or DB_PASSWORD, so the model sees [REDACTED] in their place. The finding in your dashboard keeps the flagged line, so you can see exactly what to remove. The clone is deleted when the scan ends.
What is not covered yet
Scans read the files at the commit you scan, not your git history. A key that was committed and later deleted is not found. Catching keys in pull requests, before they merge, is the part OpenRouting can do today.
What to do when a secret is found
If a credential has been committed:
- Rotate it first. Treat it as compromised, even if the repository is private.
- Move the new value to a secrets manager or environment variable, and remove it from the file.
- Check what the key could reach and whether it was used while exposed.
- Purge it from history if you need to, and coordinate the force-push with your team.
Common questions
Does OpenRouting scan git history?
Not yet. A scan reads the files at the commit you scan, so a key that was committed and later deleted is not found. Run a history-aware secret scanner over your repository if you need that today, and treat any key that was ever committed as exposed.
Are my secrets sent to an AI model?
Not as raw values. Known key and token formats and secret-named values are redacted before any AI model or assistant sees them. Claude, via Amazon Bedrock, sees [REDACTED] in place of a recognised key, token or password; a value in a format the redactor doesn't know, under a name that doesn't look secret, could still reach it, so rotate any real key a scan flags. The finding in your dashboard still shows the flagged line so you can find and fix it.
Does deleting a secret from a file fix it?
No. Git keeps history, so the commit that added the key is still readable by anyone who can clone the repository. Rotate the credential first; purging it from history is optional clean-up after that.
Can I catch a key before it reaches the main branch?
Yes. A pull request review runs the same Semgrep rules and reports findings only in the files the PR changes, for 10 credits. The key is still in the PR branch's commits, so rotate it as well as removing it.
What if the flagged value is a placeholder or test fixture?
The secrets specialist's review decides whether the value is actually a secret, and Claude's verdict says when a hit looks like a placeholder or test value. You mark it false positive, and it stays dismissed on later scans unless the issue gets worse.