Skip to content

bug: mark password as sensitive in puppet_agent::install task #775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

jordanbreen28
Copy link

This commit marks password as sensitive in the install.json bolt task param metadata.

This prevents password from being shown in plaintext, in the bolt logs.

before:

Running task puppet_agent::install with '{"retry":5,"collection":"puppetcore8","version":"latest","password":"1234","_task":"puppet_agent::install"}' on [".."]

after:

Running task puppet_agent::install with '{"retry":5,"collection":"puppetcore8","version":"latest","password":"Sensitive [value redacted]","_task":"puppet_agent::install"}' on [".."]

@jordanbreen28 jordanbreen28 requested a review from bastelfreak as a code owner May 6, 2025 11:03
@jordanbreen28 jordanbreen28 added the bug Something isn't working label May 6, 2025
@jordanbreen28 jordanbreen28 requested a review from a team as a code owner May 6, 2025 11:03
@jordanbreen28 jordanbreen28 force-pushed the mark_password_as_sensitive branch from a3f2751 to ae6ed84 Compare May 6, 2025 14:23
@jordanbreen28 jordanbreen28 requested a review from joshcooper May 6, 2025 14:26
@jordanbreen28 jordanbreen28 force-pushed the mark_password_as_sensitive branch 5 times, most recently from 2b73996 to 2649dc2 Compare May 6, 2025 14:47
@jordanbreen28 jordanbreen28 marked this pull request as draft May 6, 2025 14:51
@jordanbreen28 jordanbreen28 force-pushed the mark_password_as_sensitive branch 5 times, most recently from 06395f3 to 94ad6e4 Compare May 6, 2025 15:28
@jordanbreen28 jordanbreen28 force-pushed the mark_password_as_sensitive branch 4 times, most recently from d8fbc20 to bfab55a Compare May 6, 2025 16:11
@jordanbreen28 jordanbreen28 marked this pull request as ready for review May 6, 2025 16:12
This commit marks `password` as sensitive in the install.json bolt task
param metadata.

This prevents password from being shown in plaintext, in the bolt logs.

before:
```
Running task puppet_agent::install with '{"retry":5,"collection":"puppetcore8","version":"latest","password":"1234","_task":"puppet_agent::install"}' on [".."]
```

after:
```
Running task puppet_agent::install with '{"retry":5,"collection":"puppetcore8","version":"latest","password":"Sensitive [value redacted]","_task":"puppet_agent::install"}' on [".."]
@jordanbreen28 jordanbreen28 force-pushed the mark_password_as_sensitive branch from bfab55a to 86c4070 Compare May 7, 2025 07:07
@jordanbreen28 jordanbreen28 changed the title bug: mark password as sensitive in install.json bug: mark password as sensitive in puppet_agent::install task May 7, 2025
Copy link
Contributor

@joshcooper joshcooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified both tasks redact the password:

ssh

Running task puppet_agent::install with '{"retry":5,"collection":"puppetcore8","version":"8.12.0","username":"forge-key","password":"Sensitive [value redacted]","_task":"puppet_agent::install"}' on ["shy-forerunner.delivery.puppetlabs.net"]

winrm

Running task puppet_agent::install with '{"retry":5,"collection":"puppetcore8","version":"8.11.0.60.g0b032a12d","username":"forge-key","password":"Sensitive [value redacted]","_task":"puppet_agent::install"}' on ["winrm://dramatical-pill.delivery.puppetlabs.net"]

@joshcooper joshcooper merged commit f434c10 into main May 7, 2025
16 checks passed
@joshcooper joshcooper deleted the mark_password_as_sensitive branch May 7, 2025 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants