Skip to content

fix(gh-11)!: production hardening, any-DB support, tests + CI - #20

Merged
Nejcc merged 6 commits into
mainfrom
fix/prod-hardening
Oct 31, 2026
Merged

Nejcc merged 6 commits into
mainfrom
fix/prod-hardening

Conversation

@Nejcc

@Nejcc Nejcc commented Oct 31, 2026

Copy link
Copy Markdown
Member

Stacked on #9 (secure-by-default, CSRF via web group, body redaction, 404). It retargets to main once #9 merges.

Security

Bugs

Tooling (#6)

Pest + Testbench (15 tests), Pint, and a GitHub Actions matrix of PHP 8.4/8.5 × Laravel 12/13. .gitattributes keeps tests and CI out of dist archives. The README now matches the code (requirements, config table, security, storage).

Testing

  • vendor/bin/pest: 15 passed on Laravel 13 (Testbench 11, Pest 5) and on Laravel 12 (Testbench 10, Pest 4).
  • The export XSS test fails against the old template and passes with the fix.
  • vendor/bin/pint --test clean, gitleaks clean.

Not in this PR (tracked)

#16 listener leak in Octane/worker mode · #17 size cap / unbounded collectors / prune per write · #18 redact bindings, log context, response bodies · #19 skip streamed responses, sampling.

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, closes #5, closes #6. Refs #7.

Nejcc added 4 commits October 31, 2026 15:24
- 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
@Nejcc Nejcc added the breaking label Oct 31, 2026
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@gitguardian

gitguardian Bot commented Oct 31, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
39354595 Triggered Laravel APP_KEY 7baa676 phpunit.xml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. 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


🦉 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.

@Nejcc
Nejcc changed the base branch from fix/security-and-bugs to main October 31, 2026 14:58
@Nejcc
Nejcc merged commit 75dbd0c into main Oct 31, 2026
6 of 7 checks passed
Nejcc added a commit that referenced this pull request Oct 31, 2026
@Nejcc
Nejcc deleted the fix/prod-hardening branch November 2, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment