Skip to content
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

Prevent Leaking Passwords to the Log [master] #128

Merged
merged 2 commits into from
May 28, 2024
Merged

Conversation

shundhammer
Copy link
Contributor

@shundhammer shundhammer commented May 28, 2024

Target Branch

This is for master, i.e. Factory, Tumbleweed and the Agama images.

A backport to SLE-15-SP5 and -SP6 will follow.

Bugzilla

https://bugzilla.suse.com/show_bug.cgi?id=1225432

Problem

Passwords may be leaked to the log.

Cause

When the configuration is written to file, it is also logged completely to the y2log. This includes any passwords that the user entered when configuring iSCSI.

Unfortunately, the config class is just a very thin wrapper around an array of hashes, not a real class with dedicated fields, so we cannot use the secret_attr method that we use in other places.

Fix

Don't log the complete configuration, only the fact that is was written.

The log format is unwieldy and very hard to read for a human anyway, so it's not very useful to log it in the first place.

Related Branches

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9268836373

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 30.47%

Totals Coverage Status
Change from base Build 6769252335: 0.0%
Covered Lines: 791
Relevant Lines: 2596

💛 - Coveralls

@shundhammer shundhammer merged commit 4f6496b into master May 28, 2024
10 checks passed
@shundhammer shundhammer deleted the huha-pw-leak branch May 28, 2024 12:04
@yast-bot
Copy link
Contributor

✔️ Internal Jenkins job #33 successfully finished
✔️ Created OBS submit request #1177328

@shundhammer shundhammer changed the title Prevent Leaking Passwords to the Log Prevent Leaking Passwords to the Log [master] May 28, 2024
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.

4 participants