Hardening pass: 24 findings, one commit each - #6
Open
belisarh wants to merge 51 commits into
Open
Conversation
belisarh
force-pushed
the
redactor/hardening
branch
from
August 27, 2026 07:41
adffa8d to
8986d3b
Compare
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.
Closes the 24 findings from the hardening review. One commit per finding.
411 tests · 1,100 assertions · 95.3% coverage · PHPStan level 10, no baseline · Pint clean.
Redaction
User bob@example.com placed order 123→User [REDACTED] placed order 123.message,title,url,path,ip,user_agent,sourceandtargetremoved from the shipped safe lists.session_idmoved from safe to blocked; it was previously in both, and safe won.*wildcards the README documents.max_depth, default 32) and cycle-aware.charset_thresholds).Patterns
mode(replace/mask/partial/remove/full),keep,mask_character,captureandvalidator.luhn,ibanandssnreject values of the right shape that cannot be the real thing.aws_secret_keyno longer matches any 40-character alphanumeric run.api_key_generic,base64_keyandpassword_assignmentkeep their labels and replace only the value.url_with_authcaptures just the credentials and precedesemailin all profiles.credit_carduses partial mode;ibanis detectable for the first time.API
redactWithMetadata()returns aRedactionResultcarryingvalue,wasRedacted,redactedKeysandfindings.redactSafely()never throws and fails closed._redactedmarkers are no longer written into lists or over an existing key.addStrategy(),removeStrategy(),calculateShannonEntropy()andisCommonPattern(); the last two are public onShannonEntropyStrategy.RedactorandScannerare container singletons.Logging
RedactorProcessor/RedactorTapredact message, context and extra without replacing the channel's formatter.ReadactFormatter::formatBatch()formats every record; it previously returned only the first.ReadactFormatteraccepts an inner formatter to wrap.Scanning
--output=sarifemits SARIF 2.1.0 for GitHub code scanning.--baseline/--update-baselinesuppress accepted findings; the file stores hashes, never secrets.vendor/*andnode_modules/*work.php artisan redactor:validateresolves every profile and fails on broken ones.Config
REDACTOR_MAX_OBJECT_SIZEwas ignored andREDACTOR_SCAN_MAX_FILE_SIZEcrashed the scan command.mergeConfigFrom()runs inregister(), notboot().max_depth,charset_thresholds,scan.skip_binary,scan.respect_gitignore,scan.baseline.Performance
BlockedKeysStrategy::shouldHandle: 1.223 µs → 0.288 µs, via a key matcher compiled once per pattern list.Packaging and CI
illuminate/support ^12.0|^13.0. Every 11.x release is flagged by a Packagist advisory, so Composer refuses to install any of them.symfony/finderwidened to^7.0|^8.0.fail-fastdisabled.pestphp/pest-plugin-laraveldev dependency; it was the only thing pinning the test toolchain to one Laravel major.Tests\removed from the production autoload;.gitattributesadded.spatie/laravel-package-tools; declaredsymfony/finderandmonolog/monolog.failOnWarning,failOnRisky,failOnDeprecationenabled.tests/Performanceruns in acoverage: nonejob; boundary tests pin every redaction threshold.composer mutate; not run in CI.LICENCE.mdrenamed toLICENSE.md, fixing the README links and Packagist licence detection.Breaking changes
Pre-1.0. Full list in
CHANGELOG.md; the significant ones are span replacement, thesafe_keyssemantics and default list, the Monolog processor move, structured scan findings, and the four removed methods.