Skip to content

Ignore short env values in secure Docker redaction - #51

Merged
chrisknvidia merged 2 commits into
NVIDIA:mainfrom
Hashim1999164:fix-short-env-redaction-corrupt-origin
Aug 17, 2026
Merged

Ignore short env values in secure Docker redaction#51
chrisknvidia merged 2 commits into
NVIDIA:mainfrom
Hashim1999164:fix-short-env-redaction-corrupt-origin

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Tier 3 secure Docker exec redaction treated every non empty environment value as a secret. Policy flags such as CLAUDE_CODE_DISABLE_POLICY_SKILLS set to 1 then rewrote every digit 1 in command output, which corrupted NVIDIA Build bridge loopback origins during preflight.

This change applies the existing eight character exact secret length floor in _redact and when collecting secret values, matching llm_judge and local environment redaction. Short flags no longer destroy bridge health check origins. Longer credential values remain redacted.

Fixes #50

Verification

  1. Added focused regression tests for short env flags versus real credentials
  2. Ran the secure Docker redaction tests with uv run pytest
  3. Ran ruff check on the changed source and test files
  4. Updated CHANGELOG.md under Security

Motivation:

Tier 3 docker exec redaction treated every non empty environment value
as a secret. Policy flags such as CLAUDE_CODE_DISABLE_POLICY_SKILLS=1
then rewrote every digit 1 in command output, corrupting NVIDIA Build
bridge loopback origins during preflight.

Modifications:

Apply the existing eight character exact secret length floor in
_redact and when collecting secret values for secure Docker exec.
Add regression coverage for short flags versus real credentials.

Result:

Short env flags no longer destroy bridge health check origins, while
longer credential values are still redacted from docker exec output.

Signed-off-by: Hashim1999164 <64767361+Hashim1999164@users.noreply.github.com>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The minimum-length guard is applied both when collecting candidate values and when performing replacement, so short policy flags no longer corrupt Docker exec output while credential-length values remain redacted. The focused secure Docker environment tests pass locally (17 passed), Ruff passes on the changed Python files, and CI, Security, and DCO are green. No blocking findings.

@rng1995

rng1995 commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Request @chrisknvidia to review the PR

@chrisknvidia chrisknvidia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, Looks good to me.

@chrisknvidia
chrisknvidia merged commit 3a9a0f8 into NVIDIA:main Aug 17, 2026
15 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.

[BUG]: Tier 3 always fails - output redaction rewrites every "1" and corrupts the NVIDIA Build bridge origin

3 participants