Skip to content

docs: document redact_secrets agent flag#2581

Merged
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/document-docker-agent-pr-2577-changes-8b547e34
Apr 28, 2026
Merged

docs: document redact_secrets agent flag#2581
dgageot merged 1 commit intodocker:mainfrom
dgageot:board/document-docker-agent-pr-2577-changes-8b547e34

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Apr 28, 2026

Documents the redact_secrets agent flag introduced in #2577.

That PR added a single agent-level switch that wires up two complementary defenses:

  1. A pre_tool_use builtin hook that scrubs detected secrets from every tool call's arguments before the tool runs.
  2. A before_llm_call message transform that scrubs the same patterns from outgoing chat messages (content, multi-part text, prior reasoning content, and JSON-encoded tool-call arguments) before they reach the model provider.

Detection uses the docker-agent secretsscan ruleset (GitHub PATs, AWS keys, Stripe / Slack / GitLab / Hugging Face tokens, JWTs, PEM private keys, Docker Hub PATs, …); each detected span is replaced with the literal [REDACTED].

Changes

  • docs/configuration/agents/index.md — added redact_secrets to the YAML schema example and the properties reference table, plus a new Redacting Secrets section with example YAML, ruleset coverage, and callouts about false negatives and the equivalent manual hook entry.
  • docs/configuration/hooks/index.md — added the redact_secrets (pre_tool_use) row to the Available built-ins table, and updated the Auto-injected built-ins callout to mention redact_secrets: true and that the agent flag also wires up the chat-side message transform.
  • docs/guides/secrets/index.md — added a Preventing Secret Leaks section pointing readers to redact_secrets for defense-in-depth against secrets leaking through the conversation itself, with a cross-link to the agent configuration page.

@dgageot dgageot requested a review from a team as a code owner April 28, 2026 16:23
@dgageot dgageot merged commit c3f7fd1 into docker:main Apr 28, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants