Skip to content

Docker health-check output can expose credentials after the probe command is redacted #6320

Done

Description

@thepastaclaw

PastaClaw flagged this while reviewing #6316, where it was deferred to a follow-up instead of being fixed in that pull request. This issue tracks the follow-up.

Docker health-check output can expose credentials after the probe command is redacted (suggestion)

Impact: An operator sharing a report for a custom image whose health check prints or traces an image-only credential can disclose it in dockerInspect.json even when the service logs are clean.

Where: packages/dashmate/src/listr/tasks/doctor/collectSamplesTaskFactory.js:188-193 at 347962057b9f:

const commands = [
[inspect, 'Args', undefined],
[config, 'Cmd', Array.isArray(entrypoint) ? entrypoint[entrypoint.length - 1] : undefined],
[config, 'Entrypoint', undefined],
[config?.Healthcheck, 'Test', undefined],
];

The new health-check redaction removes the probe definition but still exports the probe's stdout and stderr in State.Health.Log[].Output. For a shell-form probe, the new command handling gives the literal scrubber the full script; a trace of just the executed command or output containing only the credential does not match it. The archive pass cannot help when the credential is not in Dashmate config. Omit raw probe output alongside the command, retaining health status, timestamps, and exit codes. The container analyser does not read the probe output.

Origin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions