feat(health): catch credentials inline in committed systemd units #5618
ccantynzAI Reviewcommented 1d ago
AI Triage
(no summary)
Priority: medium Risk area: mixed
Suggested labels: (no label suggestions) Suggested reviewers: (no reviewer suggestions)
Suggestions only — nothing has been applied. The PR author stays in control.
gluecron[bot]🤖 botAI Reviewcommented 1d ago
AI review unavailable
The platform's AI balance is exhausted, so AI generation is temporarily unavailable. Nothing was lost. You can queue this as a repair for the internal agent from the repository's Health page, or try again once the balance is restored. The PR is otherwise unchanged.
Cross-repo impact
See what breaks downstream if this PR merges.
⮌ Merged
This pull request was merged into main.
c comment · e edit title · m merge · a approve · r request changes · ? shortcuts
From a live incident on the Vapron platform (2026-08-28), reported with the mechanism:
systemctl show <unit> -p Environmentprinted four real credentials to an unprivileged account. Not a permissions bug — systemd publishesEnvironment=over D-Bus andsystemctl showis unprivileged, sochmoddoes nothing. The fix isEnvironmentFile=, which D-Bus exposes as a path.Checked our own surfaces first — clean, measured
Environment=at all (verified with keys-only output so no value could enter a transcript).Environment=we generate isBUILD_SHA/BUILD_TIMEin the dormant self-deploy path.What a repo scanner can honestly reach
The committed subset. Customers commit unit files;
.servicewasn't even in the eligible extension set; and no existing rule matchedEnvironment="KEY=value"— the credential word sits before the inner=, with the quote ahead of it, which none of the generic patterns fit.New
criticalrule with the D-Bus reason in its message, so the finding teaches the fix. The scope note says plainly that a unit edited live on a box is invisible here by construction — claiming runtime coverage would be the lie this module keeps un-learning.Honesty stack applies
${VAR}substitutions and<your-token-here>placeholders cleared, build metadata doesn't match,EnvironmentFile=never fires, prose scoped out viaNOT_PROSE— asserted with a full-length example value after the first draft of that test passed only because...was under the length floor.Verification