Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## [Unreleased]

### Fixed — false positives on real Laravel apps
Measured on invoiceninja, monica, akaunting, koel and BookStack with no config: HIGH/CRITICAL findings 951 → 63, default output 92 lines across the five apps. Of the remaining HIGH/CRITICAL findings read by hand, 30 of 42 are worth a look and 12 are false positives; none is a confirmed vulnerability. Details and every remaining false positive: `research/laravel-scan/README.md`.
Measured on invoiceninja, monica, akaunting, koel and BookStack with no config: HIGH/CRITICAL findings 951 → 63, default output 92 lines across the five apps. All 63 remaining HIGH/CRITICAL findings were read by hand: 38 are worth a look and 25 are false positives; none is a confirmed vulnerability. Details and every remaining false positive: `research/laravel-scan/README.md`.
- `laravel-parser`: unresolved class middleware is classified by name instead of defaulting to `ir:auth_gate` (invoiceninja `SessionDomains` made public routes read as authenticated); `RedirectIfAuthenticated` / `guest` are never auth gates; `ValidateSignature` / `signed` / `signed:relative` are signature checks.
- `laravel-parser`: Laravel's built-in aliases are recognised without a `Kernel.php` (Laravel 11+): `auth`, `auth.basic`, `can:…`, `role:…`, `ability:…`, `abilities:…`, `guest`.
- `laravel-parser`: authorization in the controller is read beyond `$this->authorize()` / `Gate::allows()`: permission helpers (`$this->checkPermission()`, `checkOwnablePermission()`, `ensure…`), `$user->can()` / `hasRole()` / `hasPermissionTo()`, global `userCan()`, `Gate::denies/any/none/inspect`, `authorizeForUser()`, `authorizeResource()` in the constructor (with `except`/`only`), and constructor `$this->middleware([...])` arrays, enum entries and chained `->only()` / `->except()`.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ Detector coverage differs per framework — see [Supported frameworks](#supporte

Measured on five real Laravel apps (invoiceninja, monica, akaunting, koel, BookStack), no config:
**92 findings shown** by default across all five, **63 HIGH/CRITICAL** (down from 951 in 0.10.0).
Of the HIGH/CRITICAL ones we checked by reading the code, 71% were worth a reviewer's attention and
29% were false positives; none was a confirmed vulnerability. Every number, and each false positive,
is in [`research/laravel-scan`](research/laravel-scan/README.md).
We read the code behind all 63: 60% were worth a reviewer's attention and 40% were false positives;
none is a confirmed vulnerability. Every number, and each false positive, is in
[`research/laravel-scan`](research/laravel-scan/README.md).

> Coming from **Enlightn** (archived in January 2026)? ArchMind covers a different, complementary area — route-level authorization, tenant isolation and transactions, with a CI regression guard — and runs on Windows, macOS and Linux.

Expand Down
16 changes: 11 additions & 5 deletions research/laravel-scan/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,17 @@ HIGH+CRITICAL findings: **951 → 63 (−93%)**. Default output (what a new user
|---|---|---|
| **Worth a look** (verified) | 30 | invoiceninja `POST /api/v1/reports/*` ×28 — `GenericReportRequest::authorize()` returns `true`; a non-admin without `view_reports` is not rejected, their input is blanked in `prepareForValidation()` and the report job still runs. invoiceninja `POST /quickbooks/action` — `authorize()` returns `true`, any company user can force-push/pull an invoice to QuickBooks. koel `GET /api/youtube/search/song/{song}` — no `SongPolicy::access` check (only matters for private songs in Plus). |
| **False positive** (verified) | 12 | invoiceninja `system_logs` store/update/destroy ×4 (handlers always return 400, no write); `quickbooks/settings` and client `payment_methods` PUT/PATCH ×2 (routed methods don't exist; controllers use traits so ArchMind can't prove it); `client/subscriptions/{subscription}/purchase` ×3 (public checkout page by design). koel `itunes/song/{album}` (redirects to iTunes, no private data); koel collaboration-invite token (returned to the inviter by design). |
| **Not verified** | 21 | invoiceninja app-level actions: check_subdomain, reactivate_email, feedback, filters, connected_account ×2, companies/current, emails/entityHistory, one_time_token, preview ×2, quickbooks/reconnect_url, support/messages/send, self-update/check_version, tasks/sort, verify ×2, subscriptions/steps/check, client credit_response, client payment_methods POST, client quotes/download. |
| **Confirmed vulnerability** | 0 | Two candidates (invoiceninja client/vendor `documents/download_multiple`, company-only query) were withdrawn: `DownloadMultipleDocumentsRequest::authorize()` checks every document with `contactCanAccessDocument()`. |
| **Worth a look** (second pass, 2026-11-24) | 8 | invoiceninja: FormRequests returning `true` on company-scoped actions with no `view_*`/`edit_*` permission check (`emails/entityHistory`, `preview`, `preview/purchase_order`, `tasks/sort`), account-level SMS verification open to any user (`verify`, `verify/confirm`), and two flows under private review (`one_time_token`, `reactivate_email/{bounce_id}`). |
| **False positive** (second pass) | 13 | invoiceninja: no-side-effect handlers (`check_subdomain`, `filters/{entity}`, `self-update/check_version`, `subscriptions/steps/check`); actions only on the caller's own user (`feedback`, `connected_account` ×2, `companies/current`, `support/messages/send`); `quickbooks/reconnect_url` (pinned to the stored realm ID); client `payments/credit_response` (unguessable payment hash); client `payment_methods` POST (contact's own client); client `quotes/download` (scoped by `client_contact_id` inside a helper method). |
| **Confirmed vulnerability** | 0 | Two earlier candidates (invoiceninja client/vendor `documents/download_multiple`, company-only query) were withdrawn: `DownloadMultipleDocumentsRequest::authorize()` checks every document with `contactCanAccessDocument()`. Two flows from the second pass are being reported privately to the maintainers; nothing has been confirmed at runtime. |

Verified precision: **30 of 42 (71%)** are worth a reviewer's attention; 12 of 42 are false positives.
Precision on all 63: **38 (60%)** are worth a reviewer's attention; **25 (40%)** are false positives.
None is a confirmed vulnerability — do not market this as "found N vulnerabilities".

The 13 second-pass false positives point at four detector gaps (not fixed yet): handlers with no side
effect, actions only on `auth()->user()` or the contact's own client, lookups keyed by an unguessable
secret, and caller-scoped queries inside a called helper method.

## What was wrong, and the fix (each with a test in laravel-parser / explainer)

| Root cause | Example | Fix |
Expand Down Expand Up @@ -68,11 +73,12 @@ None is a confirmed vulnerability — do not market this as "found N vulnerabili
- Any `ir:service_call` still counts as an authorization layer in `missing_authorization` (explainer
fact extraction) — a source of false negatives, not false positives. Changing it affects every framework.
- MEDIUM/LOW findings were not triaged.
- 21 HIGH findings above are unverified.

## Exit bar status

Set in the first version of this file: "≥ 70% real or worth a look, and no app > ~30 HIGH/CRITICAL without config".
- Precision bar: met on the verified set (71%), with zero confirmed vulnerabilities.
- Precision bar: **not met** — 60% on all 63 (71% on the first 42 read; the last 21 were mostly
invoiceninja app-level actions with 13 false positives). Closing the four detector gaps above is
the next step.
- Volume bar: met for 4 of 5 apps; invoiceninja has 60 (28 are one report pattern). An `archmind.json`
`ignoreFindings` or a per-route ignore would bring it under; not added.
Loading