Skip to content

In-memory secrets policy - #1064

Open
volovyks wants to merge 4 commits into
developfrom
serhii/secrecy-and-secret-policy
Open

In-memory secrets policy#1064
volovyks wants to merge 4 commits into
developfrom
serhii/secrecy-and-secret-policy

Conversation

@volovyks

@volovyks volovyks commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

I've noticed a security vulnerability (we are printing the whole key except for 4 characters) in impl fmt::Debug for SecretKey and have decided to create a policy for in-memory secret management.

Please share your opinions. I'm planning to wrap everything in SecretString or SecretBox.
The question of "How far we want to go" is open. SKs definitely deserve that. We also have Ts and Ps, URLs (with API keys), technically, even the messages between nodes are secrets.

Other ideas on how we can better protect against unintentional key loss are welcome.

Comment thread doc/SECRET_MANAGEMENT.md

@yvonneanne yvonneanne left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clear and well-organized doc!

I assume there will be follow-up issues/PRs to enforce it.

Consider adding

  • clippy.toml with disallowed_types
  • tripwire test by log scanning in integration tests
  • gitleaks for Rule 6

@volovyks

Copy link
Copy Markdown
Contributor Author

@yvonneanne Yes, this would definitely be a couple of PR, probably 1 for each requirement.

I've extended the policy with an automation plan. Nice suggestions!

@jakmeier jakmeier left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great initiative to write this down in a doc inside the repo!

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.

6 participants