Add #[\SensitiveParameter] to more functions taking secrets - #23782
Open
jordikroon wants to merge 5 commits into
Open
jordikroon wants to merge 5 commits into
jordikroon wants to merge 5 commits into
Conversation
jordikroon
marked this pull request as draft
September 20, 2026 00:12
jordikroon
marked this pull request as ready for review
September 20, 2026 00:12
jordikroon
force-pushed
the
sensitive-parameter-adoption
branch
from
September 20, 2026 00:22
fd1f5fb to
f351ab3
Compare
jordikroon
force-pushed
the
sensitive-parameter-adoption
branch
from
September 20, 2026 00:23
f351ab3 to
ee89463
Compare
kocsismate
reviewed
Sep 20, 2026
| sodium | ||
| --FILE-- | ||
| <?php | ||
| foreach ([ |
Member
There was a problem hiding this comment.
why doesn't this test also trigger an exception just like the rest of the tests?
Girgias
reviewed
Sep 20, 2026
Girgias
left a comment
Member
There was a problem hiding this comment.
Makes sense, one minor question as I don't fully understand the characteristics of it.
| function snmp_set_oid_numeric_print(Snmp\OidOutput|int $format): true {} | ||
|
|
||
| function snmp2_get(string $hostname, string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} | ||
| function snmp2_get(string $hostname, #[\SensitiveParameter] string $community, array|string $object_id, int $timeout = -1, int $retries = -1): mixed {} |
Member
There was a problem hiding this comment.
What is sensitive about the $community variable?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several functions still accepted passwords, keys, etc without marking them as
#[\SensitiveParameter].This may (likely) not be complete, but this is what I could find.
As
mhashis deprecated I was debating if we should include it, but I don't see any downsides. It's a free protection for those who still rely on it.