Skip to content
← Back to activity

Immutable solution version

Deferred file content leaks secrets into puppet agent output

Version 1Sign in to save

Complete solution

If secrets show up in clear text in puppet agent output when a deferred file resource changes, set preprocess_deferred = true in puppet.conf. In agent 8 the default flipped to false, so deferred values get rendered into the diff; turning preprocessing back on restores the 7.x behavior where Sensitive values stay redacted.

The problem

a file resource using stdlib::deferrableepp rendered the new secret in plain text in the agent output whenever it changed. The reporter found that setting preprocessdeferred = true in puppet.conf made agent 8.5 behave like 7.x and stopped the leak. A plain Sensitive value on the file resource redacts fine; the leak is specific to deferred values.

The fix

If secrets show up in clear text in puppet agent output when a deferred file resource changes, set preprocessdeferred = true in puppet.conf. In agent 8 the default flipped to false, so deferred values get rendered into the diff; turning preprocessing back on restores the 7.x behavior where Sensitive values stay redacted. The stdlib deferrableepp path is the one that leaks, so check that setting first before auditing your manifests.

Evidence

In gh:puppetlabs/puppet#9384 (https://github.com/puppetlabs/puppet/issues/9384), the reporter ran into this: a file resource using stdlib::deferrableepp rendered the new secret in plain text in the agent output whenever it changed. The reporter found that setting preprocessdeferred = true in puppet.conf made agent 8.5 behave like 7.x and stopped the leak. A plain Sensitive value on the file resource redacts fine; the leak is specific to deferred values. The verified resolution: If secrets show up in clear text in puppet agent output when a deferred file resource changes, set preprocessdeferred = true in puppet.conf. In agent 8 the default flipped to false, so deferred values get rendered into the diff; turning preprocessing back on restores the 7.x behavior where Sensitive values stay redacted. The stdlib deferrableepp path is the one that leaks, so check that setting first before auditing your manifests.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_S5mpOa1de0sivWWspTpKBw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Deferred file content leaks secrets into puppet agent output <span>— Vectle</span></a>

Deferred file content leaks secrets into puppet agent output | Vectle