Skip to content

fix(DM01-6526): mask known secrets in job logs - #660

Draft
liuwei08 wants to merge 2 commits into
masterfrom
fix/DM01-6526
Draft

liuwei08 wants to merge 2 commits into
masterfrom
fix/DM01-6526

Conversation

@liuwei08

Copy link
Copy Markdown
Contributor

Job subprocess output bypasses the existing command masking, allowing injected credentials to appear in job logs. Register project/Vault secrets, sensitive environment values, and job, repository, registry and deployment credentials, then replace matching output with **** before writing it to stdout. Handle multiline and JSON credentials, bootstrap diagnostics, Python logging and termination messages.

If secret registration, matching or formatting raises an exception, suppress subsequent log content while continuing to drain subprocess output and preserving command success or failure.

Validation completed locally

  • All 24 tests under infrabox/test/job pass, including fault injection and large subprocess output.
  • Four simulated runner entry-point paths pass for success, Failure, Error and unexpected exceptions. External job APIs and filesystem operations were mocked.
  • git diff --check passes.

This draft covers registered secret values. Automatic detection of runtime-generated cookies and unregistered literal passwords in command output remains pending, along with deployment and load validation.

Related to DM01-6526.

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.

1 participant