[go] runtime/secret: warn users about allocations, loosen gurantees.

1 view
Skip to first unread message

David Chase (Gerrit)

unread,
Dec 17, 2025, 10:29:27 AM (2 days ago) Dec 17
to Daniel Morsing, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Michael Knyszek, Go LUCI, Ian Lance Taylor, Filippo Valsorda, Austin Clements, Gopher Robot, golang-co...@googlegroups.com

David Chase submitted the change

Change information

Commit message:
runtime/secret: warn users about allocations, loosen guarantees

The discussion at #76477 warranted some stronger documentation about
what is expected from users of the secret package. In addition, #76764
presented a problem about when a user can expect their secrets to be
deleted.

Fix by loosening the guarantee to when all allocations from within a
secret function have been deemed unreachable. Provide some guidance for
users to steer them away from situations where allocations live on for
long after the secret function has finished executing

Fixes #76764.
Updates #76477.
Change-Id: I0cef3e7275737f32ec48f71355e588b3be26ea32
Reviewed-by: David Chase <drc...@google.com>
Reviewed-by: Michael Knyszek <mkny...@google.com>
Files:
  • A src/runtime/secret/doc.go
  • M src/runtime/secret/secret.go
Change size: S
Delta: 2 files changed, 28 insertions(+), 2 deletions(-)
Branch: refs/heads/master
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by David Chase, +2 by Michael Knyszek
  • requirement satisfiedTryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I0cef3e7275737f32ec48f71355e588b3be26ea32
Gerrit-Change-Number: 728921
Gerrit-PatchSet: 5
Gerrit-Owner: Daniel Morsing <daniel....@gmail.com>
Gerrit-Reviewer: Austin Clements <aus...@google.com>
Gerrit-Reviewer: Daniel Morsing <daniel....@gmail.com>
Gerrit-Reviewer: David Chase <drc...@google.com>
Gerrit-Reviewer: Filippo Valsorda <fil...@golang.org>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-CC: Gopher Robot <go...@golang.org>
Gerrit-CC: Ian Lance Taylor <ia...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages