Repository navigation
fix(gh-16): register collector listeners once and reset state per request - #25
Conversation
- run-command and ai-apply need code_actions (unset = local only); wider denylist - debugbar injected only when DigDeep::check() passes - session values and more auth headers redacted - Js::from() in HTML exports and inline handlers; AI text escaped before markup - CDN scripts pinned with SRI - ai_model/ai_provider fall back to defaults when env is unset - AI endpoints probe the laravel/ai trait instead of autoloading agents (501, not fatal) - EXPLAIN uses the right syntax per driver BREAKING CHANGE: outside local, run-command and ai-apply return 403 unless DIGDEEP_CODE_ACTIONS=true. Closes #11, closes #12, closes #13, closes #14, closes #15, refs #7
One QueryAnalyzer::schema() replaces the duplicated sqlite_master/PRAGMA code in the database page and the MCP AnalyzeQueries tool. Closes #5
PHP 8.4/8.5 x Laravel 12/13. Covers the gate, CSRF, code actions, debugbar gating, redaction, export XSS, AI defaults, schema and EXPLAIN. Closes #6
…rations
- Controllers and Middleware -> src/Http, Commands -> src/Console/Commands
- digdeep-migrations publish tag
- fix: non-Laravel responses with status >= 400 no longer error in the profiler
- fix: digdeep:status crashed with a TypeError under strict_types
BREAKING CHANGE: LaravelPlus\DigDeep\{Controllers,Middleware,Commands} namespaces moved to Http\Controllers, Http\Middleware and Console\Commands.
Refs #21
…ommands, MCP 80 tests, 75% line coverage; CI fails under 70%. Closes #22
…nd bodies
One Redactor (src/Support/Redactor.php) driven by config('digdeep.redact')
replaces three copies of key/header masking. It now also covers SQL
bindings (sensitive columns and hash-looking values), log context,
response bodies and outgoing HTTP client bodies. Response body capture
can be switched off with DIGDEEP_CAPTURE_RESPONSE_BODIES=false.
Closes #18
…uest startRequest() created new collectors and re-registered every listener on each call. In long-lived workers that piled up listeners and kept old collectors alive. Listeners are now registered once; later requests copy fresh state into the bound collectors. Request, response, route, Inertia and exception data are reset too, so nothing leaks between requests. Closes #16
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 39354595 | Triggered | Laravel APP_KEY | 7baa676 | phpunit.xml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Closes #16
Stacked on #24.
What
DigDeepCollector::startRequest()registers listeners on the first call only. Later calls copy a fresh instance's state into the collectors the listeners are bound to (one smallresetFrom()helper, no per-collector reset methods).QueryCollectortakes its start time in the constructor so a reset updates it. Readonly is dropped on theLogCollector/LifecycleCollectortimestamps for the same reason.Checks
startRequest()calls leave theQueryExecutedlistener count unchanged, and only the second request's data is reported. It fails on the old code.composer test90 passed, lint and analyse clean, gitleaks clean.