agentleFS
stoffl6781stoffl6781/claude-skill/skills/laravel-security-audit/SKILL.md

laravel-security-audit

Skill1 starsChanged 7 months agoMITView on GitHub

Security-Audit für Laravel-Apps. Nutze bei: "Security Audit", "Sicherheitsprüfung", "Go-Live Checkliste", "ist die App sicher", "Pre-Launch Check", "DSGVO-Check", "Security Hardening".

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Laravel Security Audit

Allgemeine Security-Regeln → CLAUDE.md Kapitel 1 + 2. Dieser Skill fokussiert auf Audit-Methodik.

Severity Framework

LevelBedeutungZeitrahmen
KRITISCHMuss vor Go-Live behoben seinSofort
HOCHErnstes RisikoInnerhalb 1 Woche
MITTELVerbesserungspotenzialNächster Sprint
NIEDRIGBest PracticeBacklog

Workflow

  1. Automatisiert: composer audit + npm audit für Dependency-Checks
  2. Manuell: Checkliste unten durchgehen
  3. Report: Priorisierte Findings mit konkreten Fixes

Checkliste

KRITISCH

Auth & Authorization:

  • Alle sensiblen Routes durch Middleware geschützt? (auth, verified, can:)
  • Rate-Limiting auf Login? (throttle Middleware)
  • Password-Hashing: bcrypt/argon2 (nie MD5/SHA1)
  • Policies für Authorization (nicht Gate::check im Blade)

Injection:

  • Kein rohes SQL – immer Query Builder / Eloquent
  • Blade {{ }} überall (kein {!! !!} ohne Grund)
  • Keine gefährlichen PHP-Funktionen mit User-Input

Environment:

  • APP_DEBUG=false in Production
  • APP_ENV=production
  • .env nicht in Git, nicht im Webroot
  • Keine Secrets in Code hardcodiert

HOCH

Mass Assignment: $fillable oder $guarded auf allen Models CSRF: @csrf in allen Formularen File Uploads: Typ-Validierung, Größenlimit, nicht in /public direkt Session: secure, httponly, samesite=lax in config/session.php API: Sanctum/Passport für Auth, Rate-Limiting auf allen Endpoints Headers: X-Frame-Options, X-Content-Type-Options, Strict-Transport-Security

MITTEL

Dependencies: composer audit + npm audit – kritische sofort, Rest im nächsten Release Logging: Keine Passwörter/IBAN/Keys loggen, IPs anonymisieren Error Handling: Keine Stack-Traces in Production

DSGVO-spezifisch

Lösch-Routine (Anonymisierung statt hartem Löschen):

$user->update([
    'name' => 'Gelöschter Nutzer',
    'email' => "deleted_{$user->id}@example.com",
    'phone' => null,
]);

IP-Anonymisierung in Logs:

$anonymizedIp = preg_replace('/\d+$/', 'x', $request->ip());

Prüfpunkte:

  • Keine externen Ressourcen ohne Consent (Fonts, Analytics, CDN)
  • Cookie-Consent vor Tracking-Code
  • Datenschutzerklärung mit allen genutzten Diensten

Report-Format

# Security Audit – {Projekt} ({Datum})

## Zusammenfassung
{X} Kritisch, {Y} Hoch, {Z} Mittel

## Findings
| # | Severity | Kategorie | Finding | Datei | Empfehlung |
|---|----------|-----------|---------|-------|------------|
| 1 | KRITISCH | Auth | Routes ohne Middleware | routes/web.php | auth Middleware |

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.