Repository navigation
Release 2.4.0: SensitiveParameter on all input, EncryptionKeyProvider, storage context for Eloquent casts - #11
Merged
Merged
Conversation
…, storage context for Eloquent casts - Mark input #[\SensitiveParameter] in entry points, compiled hydrators, pipes, casts and Eloquent casts so stack traces carry no card numbers - Hold the EncryptedCast derived key in a SensitiveParameterValue - Add EncryptedCast(provider:) with the EncryptionKeyProvider contract - Accept an output context in IsEloquentCastable so #[Hidden(except:)] fields can be stored - Mask card numbers in native DateMalformedStringException messages
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.
Security
#[\SensitiveParameter]in every entry point, compiled hydrator, pipe, cast and Eloquent cast, so stack traces no longer carry card numbers whenzend.exception_ignore_argsis off (S1-06).EncryptedCastderived key is held in aSensitiveParameterValueand no longer shows up invar_export(),(array)casts orjson_encode()(S1-12).DateTimeCast/DateTimeImmutableCastwithoutinputFormatmask card numbers in PHP'sDateMalformedStringException; the exception type is unchanged.Added
EncryptedCast(provider: ...)with theEncryptionKeyProvidercontract (S1-13).IsEloquentCastableaccepts an output context (AccountData::class.':storage') so#[Hidden(except: ['storage'])]fields are stored (S1-10). Without a context nothing changes.Verification
StackTraceRedactionTestruns 18 failure scenarios withzend.exception_ignore_args=0and asserts no frame argument contains the PAN.