Skip to content
← All Resources

Claude Code Saved the Approval. And the Secret.

Documented public credential exposure. A saved Claude Code approval can retain a credential. Test what gets written to disk and what can reach a repository.

The practical point

An approval can persist after a command finishes. When a coding tool saves the command itself, the approval record becomes another place a secret can travel.

What Apiiro found in public repositories

Apiiro reported in November 2026 that Claude Code can save the full command when a developer grants standing permission. A literal password in the command can therefore end up in a local project settings file. If that file is committed to a public repository, the saved command can become public with it.

Apiiro classified credentials in 1,122 public copies of the local settings file. Its researchers reproduced the product behavior using Opus 5.5 and Fable 5.1 and did not test the credentials they found. A file removed from the current branch can still be present in repository history.

Follow a fake secret through one approval

In a disposable project, approve a command containing a fake credential marker. Inspect the saved permission, then stage the relevant settings file and run the same commit check your team uses. Keep the test local.

Pass evidence. The release engineer can show whether the approval retained the marker and whether the repository check stops that marker from being committed. Save the redacted permission record and the check result.

If the test fails. If the marker passes the check, keep standing approvals narrow while the team fixes and retests the guard. If a real credential was exposed, assign someone to rotate or revoke it and investigate where it traveled, including repository history.

Three checks before approval

Inventory the files, transcripts and logs the agent writes when it receives permission.

Test repository protections against those files and check history for earlier copies.

Assign an owner to rotate credentials if exposure occurs, then review how the tool receives secrets without saving literal values.

How Anvaylo helps

Anvaylo’s assessment can document which standing approvals should remain restricted until the release engineer demonstrates that agent-generated settings are covered by the team’s credential checks.

The preparation materials are free. The human-led assessment is a separate paid service.

Which permission record could carry a credential into your next commit?

Sources

Read the video transcript

Imagine approving a database check in Claude Code and choosing “yes, and don’t ask again.” Claude Code can store the full command in a project settings file. If the command contains a password, that password can end up in the saved approval. If the file is committed to a public repository, the approval goes with it.

In November, security researchers at Apiiro reported finding credentials in more than eleven hundred public copies of that local settings file. They reproduced how the product saves approvals with Opus five point five and Fable five point one. The researchers didn’t test whether the credentials they found still worked. A credential can also remain in the commit history after a file is removed.

Test the path with a fake secret. Approve a command in a disposable project, inspect what the tool records, then see whether the commit check flags the test value. In the real workflow, pass secrets through approved references and assign someone to rotate exposed credentials.

Anvaylo helps teams review what standing approvals retain, where those files can travel, and what evidence is needed before expanding those approvals.

Could your next commit contain yesterday’s AI approval?

Download Anvaylo’s AI Use-Case Readiness Assessment at anvaylo.com/resources. Anvaylo. Governance Intelligence.

APPLY THIS TO YOUR OWN WORKFLOW

Explore the related executive guide and companion working records.

Explore the free assessment guide and working records →