Skip to content
Back to skills

Laravel Go Audit

ASecurity

Security and correctness audit for Laravel for Go apps (the go.laravel.com module). Use when asked to audit, security-review or check a Laravel for Go codebase or pull request, covering record authorization and dropped auth.Authorize results, nested route scoping, signed URLs, broadcast channels, request data bound into models, raw SQL, column names from the request, process.Shell, outbound URLs (SSRF), template.HTML and web.HTML, uploads and file paths, models and Inertia props that leak pri...

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
developmentrustgophpshellbashsqltestingapisecuritydocumentation

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 18 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add airshell/laravel-php-to-rust-go --skill laravel-go-audit --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Laravel Go Audit?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Laravel Go Audit
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/airshell-laravel-go-audit/badge)](https://www.skillsdirectory.com/skills/airshell-laravel-go-audit)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: laravel-go-audit
description: "Security and correctness audit for Laravel for Go apps (the go.laravel.com module). Use when asked to audit, security-review or check a Laravel for Go codebase or pull request, covering record authorization and dropped auth.Authorize results, nested route scoping, signed URLs, broadcast channels, request data bound into models, raw SQL, column names from the request, process.Shell, outbound URLs (SSRF), template.HTML and web.HTML, uploads and file paths, models and Inertia props that leak private fields, login throttling, email verification, API tokens, debug mode and secrets, CSRF exclusions, trusted proxies, CORS, background work that is not registered or acts without authorization, workflow replay, bare goroutines and ignored errors. Each rule says how to find the hole, and the main exploits were proven by tests against go.laravel.com v0.1.0; browser-only and multi-server conditions are marked for validation. Not for writing new features (use laravel-go-best-practices) or Laravel on PHP (use laravel-owasp-security)."
license: MIT
metadata:
  author: airshell
  version: "1.0.0"
  laravelGoVersion: "0.1.x (tested 0.1.0)"
  goVersion: "1.27+"
---

# Laravel for Go Audit

Security and correctness audit for apps built with [Laravel for Go](https://laravel.com/go). Contains 28 rules across 9 categories. Every Go example is a file of a test app that compiles against `go.laravel.com` v0.1.0, and each "Tested" note records what a test there asserted (in most rules, the attack succeeded against the Incorrect code and was refused by the Correct code) and which parts rest on the docs, browser behaviour or reading the source.

**Version 1.0.0 (December 2026).** Laravel for Go is in beta, and releases before 1.0 may change APIs. Check every API against the docs bundled with the installed version (`.agents/skills/writing-laravel-go-apps/scripts/docs-path.sh` prints their path).

## How to Audit

### Step 1: Confirm the stack and read the right docs

- `go.mod` requires `go.laravel.com`; note the version
- Run `.agents/skills/writing-laravel-go-apps/scripts/docs-path.sh` and read `<docs>/documentation.md`, then the guide for each area you check. Name only APIs that exist in that version
- If arguments were given (`$ARGUMENTS`), audit only those files or features; otherwise the whole app

### Step 2: Map the attack surface

- `laravel route:list --json` (or `go run . route:list --json`): every route with its middleware. Note which have `go.laravel.com/auth.Authenticate`, and what the list does not show (`audit-recon`)
- Read `routes/` for nested routes and `routes/channels.go` for broadcast channels
- Read `bootstrap/app.go`: middleware changes, trusted proxies, CSRF exclusions, CORS, and the registries (`Jobs`, `Listeners`, `Commands`)
- Actors: guests, signed-in users, admins, API clients (request guards), other tenants

### Step 3: Collect candidates

```bash
go vet ./...
```

Then run the searches in `audit-recon` and work through the categories below. Skip what the compiler and framework already reject (the Do Not Report list in `audit-recon`).

### Step 4: Prove, then report

- Gate each candidate with `audit-verdicts` (actor, input, control, boundary, result)
- Prove Confirmed findings with a `laraveltest` test that fails before the fix and passes after (`audit-prove-with-tests`), or a complete source trace where you cannot
- Report with the template below

## Rule Categories by Priority

| Priority | Category | Impact | Prefix |
|----------|----------|--------|--------|
| 1 | Audit Method | CRITICAL | `audit-` |
| 2 | Access Control | CRITICAL | `access-` |
| 3 | Input and Queries | CRITICAL | `input-` |
| 4 | Data Exposure | HIGH | `data-` |
| 5 | Authentication | HIGH | `auth-` |
| 6 | Configuration | HIGH | `config-` |
| 7 | Background Work | HIGH | `background-` |
| 8 | Runtime | MEDIUM | `runtime-` |
| 9 | Tests | MEDIUM | `test-` |

## Quick Reference

### 1. Audit Method (CRITICAL)

- `audit-recon` - Version, docs, `route:list --json`, registries, search patterns, and what not to report
- `audit-verdicts` - Confirmed, Needs validation or Hardening; severity from what actually leaks or changes
- `audit-prove-with-tests` - A test that another user is refused, fails before the fix and passes after

### 2. Access Control (CRITICAL)

- `access-authorize-records` - An `auth.Authorize` result that is not returned, or `auth.Can` read only for its error, authorizes nothing
- `access-scope-nested-routes` - A child found by its own ID ignores the authorized parent
- `access-signed-urls` - A signed link whose route lacks `ValidateSignature`, or never expires
- `access-broadcast-channels` - A channel callback that only checks someone is signed in
- `access-mass-assignment` - `r.Bind` or `r.Validate` into a model lets the client set any field, even `id`

### 3. Input and Queries (CRITICAL)

- `input-raw-sql` - `fmt.Sprintf` into `WhereRaw` and other raw SQL
- `input-sort-and-column-names` - Column names from the request are quoted, but can still select private columns
- `input-processes` - `process.Shell` with request input runs commands; arguments starting with `-` are options
- `input-outbound-urls` - User URLs fetched without refusing internal addresses, including after redirects
- `input-template-escaping` - `template.HTML` and `web.HTML` fed by user text
- `input-uploads-and-paths` - `StoreAs` with the browser's name, uploads checked only as files, paths outside a disk

### 4. Data Exposure (HIGH)

- `data-serialize-models` - Whole models in JSON send emails, flags and hashes
- `data-inertia-props` - Optional and deferred props reach any user who asks for them

### 5. Authentication (HIGH)

- `auth-throttle-login` - No limit, a per-IP limit only, or check-then-hit under parallel requests
- `auth-verified-email` - Routes that trust the email address without `RequireVerifiedEmail`
- `auth-api-tokens` - Tokens stored in plain text work for anyone who reads the table

### 6. Configuration (HIGH)

- `config-debug-and-secrets` - Debug mode, internal messages in errors, `APP_KEY` sent or committed
- `config-csrf-exclusions` - `Except` patterns that match routes a browser session can reach
- `config-trusted-proxies` - `"*"` lets any client choose `r.IP()`, defeating throttles
- `config-cors-and-headers` - Credentials allowed for any origin; removed security headers

### 7. Background Work (HIGH)

- `background-register-and-authorize` - Listeners missing from the registry never run; jobs act on IDs nobody authorized
- `background-workflow-replay` - Side effects outside steps repeat on every advance that reaches them

### 8. Runtime (MEDIUM)

- `runtime-goroutines-and-panics` - A bare `go` with the request fails after the response, and a panic in it ends the server
- `runtime-ignored-errors` - Discarded errors from model writes, mail and HTTP calls turn failures into success

### 9. Tests (MEDIUM)

- `test-fakes-and-determinism` - A "nothing happened" proof must send valid input and show the action can happen

## Report Template

```markdown
## Laravel for Go Audit — <app>, go.laravel.com <version>

### Scope
Routes reviewed, files read, what was not covered and why.

### Confirmed
**<Title> (<CRITICAL|HIGH|MEDIUM|LOW>)**
- Actor / input / control / boundary / result
- Evidence: `file:line`, and the test that proves it (or the source trace)
- Fix: the change at the decision point

### Needs validation
- <Candidate>. Missing fact: <what>. Check: <how>.

### Hardening
- <Best practice with nothing reaching it today>
```

## How to Use

Read individual rule files for the full explanation and the incorrect and correct code:

```
rules/audit-recon.md
rules/access-authorize-records.md
rules/input-raw-sql.md
```

Each rule file contains:
- Why it matters, how to find candidates, and what the tests asserted on v0.1.0, and what rests on the docs
- Incorrect code
- Correct code
- References to the bundled guides

Related skills: `laravel-go-best-practices` (writing the code), `laravel-go-testing` (tests), `laravel-owasp-security` (Laravel on PHP).

## Full Compiled Document

For the complete guide with all rules expanded: `AGENTS.md`

Files in this skill

  • README.md5.6 KB
  • SKILL.md8 KB
  • rules/_sections.md1.8 KB
  • rules/_template.md1014 B
  • rules/access-authorize-records.md6.5 KB
  • rules/access-broadcast-channels.md4.2 KB
  • rules/access-mass-assignment.md4.5 KB
  • rules/access-scope-nested-routes.md4.4 KB
  • rules/access-signed-urls.md5.2 KB
  • rules/audit-prove-with-tests.md5.3 KB
  • rules/audit-recon.md14.9 KB
  • rules/audit-verdicts.md6.3 KB
  • rules/auth-api-tokens.md4.2 KB
  • rules/auth-throttle-login.md5.4 KB
  • rules/auth-verified-email.md3.4 KB
  • rules/background-register-and-authorize.md8.4 KB
  • rules/background-workflow-replay.md5.4 KB
  • rules/config-cors-and-headers.md5.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.