Skip to content
HighSecrets & credentialsBLWK-AI-001

A secret is exposed in AI assistant context ​

Depends on the kind of secret found.

What this means ​

A provider secret (Anthropic, OpenAI, GitHub, AWS, …) in an assistant's context, config, or transcript.

How to fix it ​

Remove the key from the file and replace it with a new one. Anything pasted into an AI chat should be treated as leaked.

  1. Use “Remove secret from this file” below. Bulwark backs up the original first.
  2. Create a new key with the provider and delete the old one.
  3. Next time, keep keys in a password manager (Bitwarden, 1Password, KeePassXC) and pass them to tools as environment variables, for example with op run or bws run, instead of pasting them into the chat.

Bulwark can do this for you

In the app, open the issue and use “Remove secret from this file”. From a terminal: bulwark ai redact (preview), then bulwark ai redact --apply.

Check it yourself ​

Run a scan and look for BLWK-AI-001 in the results:

sh
bulwark scan
bulwark ai scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

References ​

Released under the Apache License 2.0.