# Laravel Rust Vulnerability Scanner: What to Scan and Which Tools to Use

> There is no single vulnerability scanner for Laravel Rust yet. You need three layers: dependency audits for Cargo and npm, a code review for the framework's unsafe escape hatches, and an external scan of the deployed app. Here is what each layer finds and how to run it.

**Author:** Matt King | **Published:** December 5, 2026 | **Category:** Tools & Reviews

---

Laravel Rust has been public since 1 December 2026, and no scanner has been built specifically for it yet. Anyone claiming otherwise this week is relabelling a generic tool. What works today is three layers, each finding a different kind of problem.

| Layer | Finds | Tool |
| --- | --- | --- |
| Dependencies | Known-vulnerable crates and npm packages | `cargo audit`, `cargo deny`, `npm audit` |
| Code | Unsafe use of framework escape hatches | `grep`, Clippy, review |
| Deployed app | Misconfiguration visible from the internet | An external scanner |

## Layer 1: dependencies

A Laravel Rust app has two lockfiles: `Cargo.lock` for the backend and `package-lock.json` for the Inertia and React front end.

```bash
cargo install cargo-audit
cargo audit
```

`cargo audit` checks every crate in `Cargo.lock` against the [RustSec advisory database](https://rustsec.org/). The framework sits on Axum, Tokio and SQLx, so an advisory in any of them is an advisory for you.

`cargo deny` goes further. It can fail the build on advisories, on unwanted licences, on crates from unknown registries and on duplicate versions:

```bash
cargo install cargo-deny
cargo deny check
```

Then the front end:

```bash
npm audit --omit=dev
```

Run all three in CI and on a schedule. New advisories appear against code that has not changed.

One note if you deploy on Laravel Cloud: its pre-filled build command for Rust apps starts with `npm ci --audit false`, so the build does not run an npm audit for you. Do it in CI.

## Layer 2: the code

Rust and the framework remove whole bug classes, and the remaining risk concentrates in a handful of named escape hatches. That makes code scanning unusually easy: search for them.

```bash
# Raw SQL that bypasses parameter binding
grep -rn "AssertSqlSafe\|db::sqlx" src/

# Forms that anyone may submit
grep -rn "validate(anyone)" src/

# CSRF and cookie-encryption exclusions
grep -rn "PreventRequestForgery\|without_middleware\|EncryptCookies::except" src/

# Unescaped template output
grep -rn "|safe\|with_html\|tojson" resources/views/

# Unescaped output in React
grep -rn "dangerouslySetInnerHTML" resources/js/
```

For each hit, ask one question: can request input reach this? `AssertSqlSafe` around a constant is fine; around a `format!` with a request field it is SQL injection. `#[validate(anyone)]` is right for a contact form and wrong for an account update.

Also read `src/config/cors.rs`. The default allows any origin on `api/*`.

For general Rust hygiene, run Clippy with warnings as errors (`cargo clippy -- -D warnings`), and check for `unsafe` blocks in your own code. A typical application should have none.

What no tool will find is missing authorisation. A handler that loads an invoice by ID without checking its owner compiles, passes Clippy and audits clean. Write tests that request other users' records and expect `403` or `404`.

## Layer 3: the deployed application

Some problems only exist in production: the proxy that drops a header, the `APP_URL` left on `http://`, the debug flag set to fix something at 2 a.m. An external scan looks at the app the way an attacker does. For Laravel Rust, the checks that matter are:

- **Security headers.** The framework sends only `X-Frame-Options` and `X-Content-Type-Options`. HSTS, CSP, Referrer-Policy and Permissions-Policy are missing unless you added them. ([Header checker](/tools/header-check))
- **CORS.** Whether `api/*` reflects arbitrary origins, and whether it does so with credentials.
- **Cookies.** `Secure`, `HttpOnly` and `SameSite` on the session cookie. `Secure` depends on `APP_URL` being `https`. ([Cookie checker](/tools/cookie-checker))
- **TLS.** Certificate validity, protocol versions and ciphers at whatever terminates HTTPS in front of the binary. ([SSL checker](/tools/ssl-checker))
- **Debug mode.** Trigger an error and confirm the response says "Server Error" and nothing more.
- **Exposed files.** Backups, database dumps, source maps and anything else that ended up in `public/`.
- **Secrets in JavaScript bundles.** API keys compiled into the front end by Vite.
- **Host header handling.** Production should answer `400` for a host that is not `APP_URL`.
- **Subdomain takeover.** Dangling DNS records, which have nothing to do with your language.

### What StackShield covers today

StackShield's [external scanner](/tools/laravel-scanner) was built for Laravel PHP. Pointed at a Laravel Rust app, the language-independent checks work now: headers, TLS, cookie flags, CORS, exposed files and backups, secrets in JavaScript bundles, Host header poisoning and subdomain takeover. The PHP-specific checks (Telescope, Horizon, Ignition, Livewire versions) have nothing to find, because those components do not exist in Laravel Rust.

StackShield also has a Laravel Rust and Go profile. It recognises the framework from the pages it builds itself (the `/up` health page and the built-in error page), reports the debug page or debug JSON if a response contains it, and flags an application running with `APP_ENV=local`. One limit to know about: Laravel Rust only shows debug output on a server error, and we do not try to make your application fail. A pass means no debug output came back, not proof that `APP_DEBUG` is off, so confirm that from your environment settings.

You can run the [free scan](/free-scan) against a Laravel Rust deployment today to cover the list above.

## Putting it in CI

A minimal pipeline for a Laravel Rust app:

```bash
cargo clippy -- -D warnings
cargo test
cargo audit
npm audit --omit=dev
```

Then scan the deployed environment after each release, because none of those four commands can see your production configuration.

For what each finding means and how to fix it, see the [Laravel Rust security guide](/blog/laravel-rust-security-guide) and the [production checklist](/checklists/laravel-rust-production).

---

## Frequently Asked Questions

### Is there a vulnerability scanner built for Laravel Rust?

Not a dedicated one yet. The framework went to beta on 1 December 2026. Today you combine cargo audit for dependencies, code search for the framework escape hatches, and an external scanner for the deployed application.

### Does StackShield scan Laravel Rust applications?

The language-independent external checks work on a Laravel Rust app today: security headers, TLS, cookie flags, CORS, exposed files and backups, secrets in JavaScript bundles, Host header handling and subdomain takeover. Checks specific to Laravel PHP, such as Telescope, Horizon and Livewire versions, have nothing to find. A Laravel Rust and Go profile recognises the framework and reports debug output or a local environment when a response shows it.

### Does cargo audit find vulnerabilities in my own code?

No. It compares the crates in Cargo.lock against the RustSec advisory database. It says nothing about your handlers, your authorisation logic or your configuration.

### What can an external scan not see on a Laravel Rust app?

Anything behind authentication and anything in the code: broken authorisation, unsafe raw SQL, weak API token handling, and whether SESSION_ENCRYPT is on. Those need code review and tests.

