Secrets scanning
Secrets scanning searches code and history for leaked credentials. What it catches, and how AI CodeOps handles secrets instead: encrypted, masked, kept from AI.
Secrets scanning is the automated search of source code, commit history, logs and other artefacts for credentials that shouldn't be there: API keys, access tokens, passwords, private keys and connection strings. A scanner flags each match so the secret can be revoked and rotated.
What it is
Scanners match known token formats (many providers use recognisable prefixes), high-entropy strings and patterns such as private key headers. They run in three places: before a commit (a pre-commit hook), on push or pull request, and across the full history of a repository. Some Git hosts can block a push that contains a known token format.
Finding a secret is only half the job. Once it's been pushed, assume it's compromised: revoke it, issue a new one, and then clean the history.
Why it matters
Leaked credentials are one of the most common ways attackers get in, and a secret in Git history stays there after the line is deleted. AI coding tools add a new path for leaks: an agent that can see a credential can copy it into code, a log or a prompt.
In AI CodeOps
AI CodeOps doesn't scan your repositories for secrets. Keep your existing scanner. What AI CodeOps does is keep the secrets it holds away from the AI and out of logs, and review AI changes for exposed credentials.
Workspace secrets. Under Configure → Settings, you store credentials that build jobs need. For each secret:
storage encrypted at rest with AES-256-GCM; saving fails rather than
storing plain text if the platform's encryption key is missing
display masked after saving; the value is never shown again
scope limited to specific workflows, an expiry date, disable, rotate in place
delivery injected into build jobs as environment variables
build log the value is removed from the output
AI agents never receive it
Creating, updating, toggling and deleting a secret are recorded in the audit log as secret.created, secret.updated, secret.toggled and secret.deleted. The Secret Manager role can manage secrets without any other access.
Other credentials. Git tokens and model provider keys are encrypted with AES-256-GCM too. Headers you set on an MCP server, such as a bearer token, are encrypted and never sent back to the browser. Workspace API keys are stored only as a hash and shown once.
AI changes. The Security Auditor checks for secrets among other risks when it reviews a change, and the findings pass records what it finds. A high or critical finding blocks the pull request until it's triaged.
Related terms
- Static application security testing (SAST): code analysis that often includes secret patterns.
- Role-based access control (RBAC): who may manage secrets.
- Audit log: the record of every secret change.
Frequently asked questions
Does AI CodeOps scan my repositories for leaked secrets?
No. There's no secrets scanner. Keep using your Git host's or CI's scanner. The Security Auditor agent does look for exposed secrets in the AI changes it reviews.
Do AI agents get my workspace secrets?
No. Workspace secrets are only injected into build jobs as environment variables, their values are removed from the build log, and AI agents never receive them.
Can I see a secret's value after saving it?
No. After saving, the console only shows a mask.