Skip to content

security(promtail): redact secrets from syslog pipeline (#190)#513

Merged
mvillmow merged 1 commit into
mainfrom
190-syslog-pipeline-redaction
May 13, 2026
Merged

security(promtail): redact secrets from syslog pipeline (#190)#513
mvillmow merged 1 commit into
mainfrom
190-syslog-pipeline-redaction

Conversation

@mvillmow
Copy link
Copy Markdown
Contributor

Summary

Closes #190.

  • Add the same five replace pipeline stages used by the hermes and nats scrape jobs to the syslog job in configs/promtail.yml:
    • bearer <token>
    • token=<value>
    • key=<value>
    • secret=<value>
    • password=<value>
  • Add TestPromtailConfig.test_redaction_enabled_jobs_have_secret_patterns, iterating over {syslog, hermes, nats} and asserting each job carries all five required redaction expressions. Prevents future regressions where a redaction-enabled job ships without the standard stages.

Scope

Test plan

  • pytest tests/test_configs.py::TestPromtailConfig -v — 12/12 pass locally (coverage gate is unrelated to config tests).
  • CI green on the new branch.
  • Auto-merge with squash once required checks pass.

Apply the same five replace stages used by the hermes and nats scrape jobs
(bearer, token=, key=, secret=, password=) to the syslog job. Host-level
syslog may contain credentials if system services log them, so the same
redaction guarantees must hold.

Adds tests/test_configs.py::test_redaction_enabled_jobs_have_secret_patterns,
which iterates over the set {syslog, hermes, nats} and asserts each carries
all five patterns — preventing future regressions where a new redaction-
enabled job ships without the required stages.

Closes #190

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mvillmow mvillmow enabled auto-merge (squash) May 13, 2026 02:53
@mvillmow mvillmow merged commit b94a69e into main May 13, 2026
20 checks passed
@mvillmow mvillmow deleted the 190-syslog-pipeline-redaction branch May 13, 2026 04:04
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.

Add syslog pipeline redaction stages for secret patterns

1 participant