New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

olgunozoktas/laravel-security-check

100 zero-AI static and runtime security checks for Laravel, PHP, Database, Livewire, Alpine, Inertia, JS/TS, React, Vue and Svelte apps with CWE/OWASP SARIF 2.1.0, Markdown, JUnit, strict mode, baselines, diff scanning and caching.
126

Larablocks Analysis

olgunozoktas/laravel-security-check works with Laravel 12 and 13 (latest release v0.1.1, Nov 6, 2026).

Recommendation checks

Use with care

Use with care: meets 2 of 5 checks.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Nov 6, 2026)
  • First released under 90 days ago
  • 126 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Too new to judge
  • Last stable release: Nov 6, 2026.
  • 2 releases in the last 12 months.
  • First released: Nov 6, 2026.
  • Monthly downloads: 126.
  • 2 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.

Install
composer require olgunozoktas/laravel-security-check
Latest Version:v0.1.1
PHP:^8.3
Laravel:12 · 13
License:MIT
Last Updated:Nov 10, 2026
Links: GitHub  ·  Packagist
Maintainer: olgunozoktas

laravel-security-check

Latest Version on Packagist Total Downloads Tests PHP Laravel License

Fast, zero-AI static & runtime security checks for Laravel, PHP, Database, Livewire, Alpine, Inertia, JavaScript/TypeScript, React, Vue & Svelte applications.

php artisan security:check reads your app's configuration, routes, database settings, PHP/Blade source, frontend components, and dependency lockfiles without modifying anything. Every check lives in its own file, maps to official CWE and OWASP Top 10 (2021) identifiers, and exits 1 when any finding reaches --fail-on (default medium).

Highlights

  • 104 calibrated checks across 7 groups: config (14), database (11), code (39), livewire (15), alpine (4), frontend (18), and dependencies (3) — including Filament, Octane, Horizon/Telescope/Pulse, GraphQL, multi-tenancy, and backup storage security.
  • Single-pass Visitor engine + --cache: file checks share one hot scan pass per file with a bounded 16 MB memory cap, raw-text pre-filtering, one PHP tokenizer pass per file, one directory walk per root folder, the PCRE JIT turned on for the scan, and SHA-1 per-file ResultCache (--cache) for sub-second repeat runs. A cold scan of a 3,097-file app takes about 1.4 s (see docs/taint-and-architecture.md).
  • 1-hop intra-method taint tracking: tracks variables assigned from HTTP request inputs across lines ($url = $request->input('url'); Http::get($url);) while clearing taint on match, in_array, basename, realpath, (int), and $request->validated().
  • Comment & string-literal aware: PHP token_get_all masking, Blade {{-- ... --}} stripping, and a JS/TS/JSX/Vue/Svelte lexer prevent false findings on comments and docs strings — and ensure commented-out authorization calls never silence real holes.
  • Strict mode, baselines & diff scanning: --strict elevates 17 defense-in-depth checks and enables strict-only rules; --baseline / --generate-baseline lets legacy apps fail CI only on new regressions; --diff=<ref> / --staged scans only changed files.
  • CWE/OWASP metadata, --explain & --profile: inspect any check's CWE, OWASP category, vulnerable snippet, and safe fix right in your terminal (--explain=raw-sql), and profile slowest checks and cache hit rates (--profile).
  • 6 CI-ready output formats: text, json, SARIF 2.1.0 (--format=sarif with CWE/OWASP tags for GitHub Code Scanning), GitHub Actions annotations (--format=github), Markdown PR tables (--format=markdown), and JUnit XML (--format=junit).

Install

composer require --dev olgunozoktas/laravel-security-check

Usage

php artisan security:check                                       # run all 104 checks
php artisan security:check --strict                              # strict mode + ignore-reason enforcement
php artisan security:check --only=database,code --fail-on=high   # narrow by group or check name
php artisan security:check --except=dependencies                 # exclude groups or checks
php artisan security:check --offline                             # skip network audits (composer/npm audit)
php artisan security:check --diff=origin/main                    # scan only changed files vs a git ref
php artisan security:check --staged                              # scan only git-staged files (pre-commit)
php artisan security:check --cache --profile                     # reuse per-file cache + print timing stats
php artisan security:check --generate-baseline=security-baseline.json
php artisan security:check --baseline=security-baseline.json     # fail CI only on newly introduced findings
php artisan security:check --explain=raw-sql                     # CWE, OWASP, vulnerable & safe code examples
php artisan security:check --json                                # machine-readable JSON (with CWE/OWASP)
php artisan security:check --format=sarif > security.sarif       # GitHub Code Scanning SARIF 2.1.0
php artisan security:check --format=github                       # GitHub Actions PR annotations
php artisan security:check --format=markdown > security.md       # Pull-request summary table
php artisan security:check --format=junit > security-junit.xml   # GitLab CI / Jenkins / CircleCI JUnit XML
php artisan security:check --list                                # list all checks with CWE IDs

Without installing the package into an app, run the standalone CLI from this repository:

bin/security-check /path/to/laravel-app [--only=...] [--except=...] [--fail-on=medium] [--format=text|json|sarif|github|markdown|junit] [--strict] [--offline] [--diff=<ref>] [--staged] [--baseline=<file>] [--generate-baseline=<file>] [--cache] [--profile] [--explain=<check>] [--list]

Exit codes: 0 = no finding at or above --fail-on, 1 = finding at or above --fail-on, 2 = invalid option or app boot failure.

Quick CI Setup (GitHub Actions SARIF + PR Diff)

- name: Run Laravel Security Check (SARIF)
  run: php artisan security:check --strict --offline --format=sarif > security.sarif
  continue-on-error: true

- name: Upload SARIF to GitHub Code Scanning
  uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: security.sarif

For fast pull-request gates, GitLab CI JUnit XML, Markdown PR comments, and Git pre-commit hooks, see docs/ci-integration.md.

Documentation (/docs)

Browse the complete index at docs/README.md:

Guide Purpose
docs/strict-and-baselines.md --strict mode (17 elevated checks, strict-only checks, ignore reasons), baseline workflow, stale entries, and ignore-until
docs/ci-integration.md GitHub Actions SARIF 2.1.0, PR diff annotations, Markdown comments, JUnit XML (GitLab/Jenkins/CircleCI), and --staged hooks
docs/taint-and-architecture.md 1-hop taint tracking sources & sanitizers, Visitor + ResultCache design patterns, and measured benchmarks
docs/writing-checks.md Write custom app checks in app/SecurityChecks/ with BaseFileCheck, SourceMasker, TaintTracker, and Pest tests

What a finding means

A finding is a candidate, not a verdict: static analysis sees the code shape, not every runtime data flow. Each finding reports file:line, why the shape is risky, its CWE/OWASP category, and a concrete fix.

  • high: a live vulnerability when the shape matches reality (SQL injection, command injection, unsafe unserialize, Zip Slip, unguarded Livewire mutator or #[On] listener, unsigned webhook, unscoped user cache key, Filament/Horizon/Telescope open access, Octane singleton request leak, leaked secret, disabled TLS verification, VITE_* secret, public DB backups).
  • medium: a dangerous pattern that becomes exploitable with untrusted input or misconfiguration (raw Blade {!! !!}, Alpine expression injection, React dangerouslySetInnerHTML, Vue v-html, missing postMessage origin check, Inertia full-User sharing, unvalidated Livewire #[Validate] action, non-atomic balance updates, SVG uploads, multi-tenancy DB::table() bypass, GraphQL depth/complexity disabled, public Vite source maps).
  • low: defense-in-depth or confirm-intent warnings (public POST route, $guarded = [], missing security headers, non-expiring Sanctum tokens, missing SRI on CDN assets). 17 defense-in-depth checks elevate to medium under --strict.
  • info: an audit check that could not run (for example composer or npm unavailable or offline).

A check that throws is reported as a medium finding (The check failed: …), never as a silent pass.

Inline suppressions

When a line has been reviewed and verified safe, add a directive inside a real comment on the same line or the line directly above it (markers inside string literals are ignored). Use ignore-until(YYYY-MM-DD) for time-boxed debt; expired directives automatically stop suppressing findings and emit inline-ignore-expired. In --strict mode, every suppression must include a reason (inline-ignore-reason).

// security-check:ignore[raw-sql] $column is validated by match() above
$query->orderByRaw("$column DESC");

// security-check:ignore-until(2027-01-15)[mass-assignment] migrating legacy model to $fillable
protected $guarded = [];
{{-- security-check:ignore[unescaped-blade] sanitized by HTMLPurifier --}}
{!! $cleanHtml !!}
// security-check:ignore[react-dangerous-html] trusted compile-time SVG
<div dangerouslySetInnerHTML={{ __html: iconSvg }} />

The checks (104 total)

Group Check CWE What it finds
alpine blade-in-alpine-expression CWE-79 Server data inside an Alpine expression attribute (x-data, x-init, @click, :bind …): HTML-escaping does not protect JavaScript. Respects safe_alpine_expressions and skips Blade <x-...> component props. Accepts output that cannot hold a quote: numbers (count(), (int), $loop->index), a class constant, a ternary of string literals.
alpine persisted-secret CWE-922 $persist writes plain-text localStorage that any script on the origin reads and that survives logout.
alpine url-binding CWE-79 An Alpine-bound href, src, action or formaction without scheme validation. Skips <x-...> Blade component props and configured safe_url_functions.
alpine x-html CWE-79 x-html writes into innerHTML and compiles Alpine directives inside it (skips DOMPurify.sanitize(...)).
code broadcast-channels CWE-862 routes/channels.php callbacks unconditionally returning true (also fn (User $u): bool => true), letting any authenticated user subscribe to private/presence WebSocket channels.
code client-file-name CWE-22 An upload stored under getClientOriginalName(): path traversal, .php extensions and filename collisions are client-controlled.
code code-execution CWE-94 Dynamic PHP code execution sinks: eval(), create_function(), preg_replace /e, request/taint-controlled include/require, call_user_func and Blade::render/compileString.
code command-injection CWE-78 Shell execution (exec, shell_exec, system, passthru, popen, proc_open, real tokenizer backticks, Process::run string commands) built from variables or tainted request inputs without argument arrays or escapeshellarg().
code csrf-exceptions CWE-352 URIs excluded from CSRF verification (wildcards outside webhooks flagged as medium).
code debug-leftovers CWE-489 phpinfo(), xdebug_info(), dd(), dump(), var_dump(), ray(), @dd and @dump left in application code or views. A method named dump() is not a call.
code env-auth-bypass CWE-489 Environment checks (APP_ENV !== 'production' or app()->isLocal()) bypassing auth, gates, middleware, or webhook signature verification.
code env-outside-config CWE-1188 env() outside config/: returns null after php artisan config:cache.
code filament-admin-access CWE-862 Filament installed without User implementing FilamentUser::canAccessPanel() (or unconditionally returning true).
code forms-without-csrf CWE-352 A Blade POST <form> missing @csrf (the tag may span lines; the whole form up to </form> is read).
code horizon-telescope-auth CWE-862 Horizon::auth(), Telescope::auth(), or viewHorizon/viewTelescope/viewPulse gates unconditionally returning true.
code insecure-tls CWE-295 Disabled TLS verification (Http::withoutVerifying(), CURLOPT_SSL_VERIFYPEER => false, 'verify' => false, 'verify_peer' => false).
code login-throttle CWE-307 A POST /login or two-factor-challenge route without rate limiting. A RateLimiter call counts only in login code.
code mass-assignment CWE-915 $guarded = [], Model::unguard(), or writing $request->all()/$request->input() directly into a model.
code non-expiring-signed-url CWE-613 Permanent URL::signedRoute() used for auth, magic-login, verification, reset, invite, impersonate, download or billing flows instead of URL::temporarySignedRoute().
code octane-state-leak CWE-362 Laravel Octane container singletons capturing $app['request']/Auth::user(), or mutable static properties holding per-request user/tenant state.
code open-redirect CWE-601 Redirecting to request-supplied or 1-hop tainted URLs (redirect(), redirect()->away(), header('Location: ...')).
code path-traversal CWE-22 Filesystem or Storage read/write/delete/download paths derived from request input or 1-hop tainted variables without basename()/realpath(). The temporary path of an upload is not input; its client file name is.
code raw-sql CWE-89 Raw SQL (DB::select/selectOne/scalar/raw/unprepared, *Raw, sprintf, PDO::query/exec) built from interpolated, concatenated or 1-hop tainted variables.
code regex-injection CWE-1333 A preg_*() or Str::match() pattern built from request input or 1-hop tainted variables without preg_quote() (ReDoS, pattern injection).
code secrets-in-code CWE-798 Hardcoded live secrets (Stripe, AWS, private keys, GitHub, Slack, Google/Firebase, OpenAI, Anthropic, SendGrid, Mailgun, npm), remote DB URIs with passwords, or tracked .env/key files in git.
code sensitive-data-in-logs CWE-532 Logging raw $request->all(), headers, passwords, tokens or secrets, or attaching secret keys to visible Context::add().
code sensitive-endpoint-throttle CWE-307 Password-reset, OTP verification, email verification notification, or magic-link POST endpoints missing throttle middleware or RateLimiter.
code session-fixation CWE-384 Manual Auth::login()/attempt() without session()->regenerate() or Auth::logout() without session()->invalidate() (or flush() + regenerate()). A form request that logs in is checked against the controller or action that type-hints it.
code ssrf-request CWE-918 Outbound HTTP requests (Http::*, curl_init, Guzzle ->request) made to request-supplied or 1-hop tainted URLs.
code svg-upload-allowed CWE-434 Upload validation rules (mimes:, mimetypes:, extensions:, File::types) explicitly permitting SVG files (stored XSS risk).
code unencrypted-sensitive-job CWE-312 Queued ShouldQueue jobs holding password/token/secret/card/SSN properties without implementing ShouldBeEncrypted.
code unescaped-blade CWE-79 {!! !!} raw HTML output and json_encode() in Blade without JSON_HEX_TAG. Skips plain-text mail views (mail/**/*-text.blade.php, mail/**/text/) and output that no user controls (csrf_field(), e(), nl2br(e()), a literal route()/url()/asset()/__(), $slot, $attributes).
code unprotected-routes CWE-862 State-changing routes (POST, PUT, PATCH, DELETE) without auth, signed, can or role/permission middleware.
code unsafe-deserialization CWE-502 unserialize() without ['allowed_classes' => false] or an explicit class list (also on the next lines), and dynamic phar:// stream wrapper paths.
code unsafe-markdown CWE-79 Str::markdown(), Str::inlineMarkdown(), str($x)->markdown() or a CommonMark converter without 'html_input' => 'strip' and 'allow_unsafe_links' => false (the defaults keep raw HTML and javascript: links). In Blade only inside {!! !!}. Skips literal text, translations, files of the app and sanitized output.
code unscoped-cache-key CWE-639 Cache::remember() / rememberForever() / flexible() (also after store() or tags()) using a static literal key while reading auth()/$request->user() inside the callback (cross-user leak).
code unvalidated-uploads CWE-434 Uploaded files stored in a file with no MIME/type validation rule (mimes, mimetypes, image, File::types).
code variable-overwrite CWE-621 extract() without EXTR_SKIP and 1-argument parse_str() overwriting local PHP variables.
code weak-authorization CWE-863 loginUsingId/onceUsingId from request input, unconditional Gate::before(fn () => true), and withoutMiddleware() stripping auth/CSRF.
code weak-cryptography CWE-327 md5/sha1 password hashing, predictable RNG (rand/mt_rand/uniqid) for tokens/OTPs, ECB/DES/RC4 ciphers, loose ==/!= on secrets, and non-constant-time === on HMAC/signatures. Secret names are matched by whole word parts ($resetToken, $pin; not $shipping).
code weak-password-rules CWE-521 A new-password rule that accepts fewer than 8 characters: min:6, between:4,64, Password::min(6), new Password(6), or a Livewire #[Validate] on $password. Skips login forms and rule lists with a Password rule object.
code webhook-signature CWE-345 Webhook POST/PUT/PATCH routes whose controller lacks webhook signature verification middleware or HMAC/SDK signature checks.
code xxe-injection CWE-611 External XML entity flags (LIBXML_NOENT, LIBXML_DTDLOAD, libxml_disable_entity_loader(false)).
code zip-slip CWE-22 ZipArchive::extractTo() without validating archive entry names against .. directory traversal.
config app-key CWE-321 Empty APP_KEY, or a key of the wrong length for app.cipher (16 bytes for AES-128, 32 for AES-256).
config auth-config CWE-916 Weak app.cipher, low bcrypt rounds (< 10), unthrottled password reset brokers, non-expiring Sanctum tokens, and private local disk rooted under public/.
config cookie-encryption-bypass CWE-315 Cookies excluded from EncryptCookies (encryptCookies(except: [...])), high severity for auth/session/token/secret cookie names; skips standard UI preference cookies.
config cors CWE-942 Wildcard CORS origins (* or .* pattern), high severity when supports_credentials is enabled.
config debug-mode CWE-215 APP_DEBUG=true outside local and testing.
config dev-tools-in-production CWE-489 Debug tools (Debugbar, Query Detector, Clockwork, Ray, Pail, Boost) in Composer require instead of require-dev, or Telescope enabled in production.
config graphql-security CWE-400 Lighthouse/GraphQL missing max_query_depth or max_query_complexity, introspection enabled in production/--strict, or GraphiQL enabled in production.
config https-in-production CWE-319 Plain http:// APP_URL in production.
config oauth-sanctum-wildcard CWE-601 Wildcard domains in sanctum.stateful or wildcard / plain-HTTP production OAuth services.*.redirect URIs.
config public-files CWE-538 Sensitive files under public/ (.env*, .git, dumps, .sql, .sqlite, .bak, .log, .pem, .key, phpinfo.php, adminer.php, .DS_Store), and public/hot in production (scripts load from the Vite dev server).
config security-headers CWE-693 Unsafe CSP directives ('unsafe-eval', 'unsafe-inline' without nonce/hash in script-src, default-src *) and missing HTTP security headers in production or --strict.
config session-cookies CWE-614 session.http_only = false, session.secure = false in production, or session.same_site = none/null.
config trusted-hosts CWE-640 Password reset routes (or Fortify resetPasswords) without trustHosts(), the TrustHosts middleware, URL::forceRootUrl() or ResetPassword::createUrlUsing(): the reset link takes its host from the request's Host header.
config trusted-proxies CWE-348 Wildcard trusted proxies (trustProxies(at: '*') / $proxies = '*') allowing IP and Host header spoofing when directly reachable.
database atomic-balance-mutation CWE-362 Non-atomic read-modify-write on balance/credits/wallet_balance/quota/stock/inventory outside DB::transaction() / lockForUpdate().
database backup-storage-security CWE-200 config/backup.php (spatie/laravel-backup) writing SQL dumps to a public disk or omitting archive encryption password in production/--strict.
database cli-db-password-exposure CWE-214 Passing database passwords on mysqldump/mysql/pg_dump/psql command lines (-p, --password, PGPASSWORD env prefix) visible in ps aux.
database database-config-hardening CWE-16 Empty production DB passwords, root/postgres/sa superusers, PDO::ATTR_EMULATE_PREPARES, MYSQL_ATTR_MULTI_STATEMENTS, MYSQL_ATTR_LOCAL_INFILE, disabled MySQL strict mode, unencrypted remote production connections, and SQLite files inside public/.
database destructive-migrations CWE-798 Hardcoded weak or plaintext passwords in production migrations/seeders and interpolated DB::unprepared() in migrations.
database dynamic-sql-identifiers CWE-89 Request input, 1-hop tainted variables or unvalidated Livewire properties passed as SQL column names, table names, JSON paths or sort directions.
database eloquent-strict-mode CWE-915 Strict mode (--strict): verifies Model::shouldBeStrict()/preventSilentlyDiscardingAttributes() and Relation::enforceMorphMap() in app/Providers/.
database multi-tenancy-bypass CWE-639 Raw DB::table() queries in multi-tenant apps bypassing Eloquent global tenant scopes without an explicit tenant/workspace/team filter.
database scoped-route-bindings CWE-639 Nested parent/child Eloquent model routes missing ->scopeBindings() or explicitly calling ->withoutScopedBindings().
database sensitive-columns-exposure CWE-915 Privileged/secret columns in Eloquent $fillable (is_admin, role, balance, stripe_id, two_factor_secret …), makeVisible() on secrets/passwords, and secret casts stored unencrypted. role, roles, permission, permissions and admin count only on account and membership models (an Authenticatable or Pivot model, an account-like class name, or a person foreign key such as user_id in $fillable).
database unsafe-db-operations CWE-89 Runtime DB::unprepared(), disabled foreign key constraints, withoutGlobalScopes(), ddRawSql(), and DB::enableQueryLog() in application code.
dependencies composer-audit CWE-1104 Runs composer audit --locked to report installed PHP packages with known security advisories.
dependencies dependency-lockfiles CWE-829 Insecure http:// or git:// package URLs, secure-http: false in composer.json, and missing application lockfiles.
dependencies npm-audit CWE-1104 Runs npm audit --omit=dev --json on package-lock.json to report vulnerable production JS/React/Vue dependencies.
frontend client-storage-secrets CWE-922 Storing auth tokens, JWTs, API keys or passwords in localStorage, sessionStorage, or JS-writable document.cookie.
frontend dom-xss-sinks CWE-79 Unsanitized dynamic values written to innerHTML, outerHTML, insertAdjacentHTML, document.write, or $(...).html() in JS/TS/JSX/TSX/Vue/Svelte and Blade <script> blocks.
frontend fetch-credentials-untrusted CWE-352 fetch(..., { credentials: 'include' }) or axios withCredentials: true targeting URLs derived from query/hash/referrer input.
frontend frontend-env-leak CWE-200 Secret-named VITE_*, MIX_*, NEXT_PUBLIC_*, NUXT_PUBLIC_* or REACT_APP_* variables exposed in client bundles.
frontend inertia-shared-props-leak CWE-200 Sharing raw $request->user()/Auth::user() models (all columns & loaded relations) or secret config()/env() keys into Inertia props.
frontend insecure-iframe CWE-1021 <iframe> combining sandbox="allow-scripts allow-same-origin" (sandbox escape) or dynamic src without sandbox.
frontend js-dynamic-code-execution CWE-95 Browser eval(), new Function(), string-argument setTimeout/setInterval, and URL-tainted dynamic import().
frontend js-open-redirect CWE-601 Client-side navigation (location.href, location.assign, location.replace, window.open) driven directly from URL query/hash/referrer parameters.
frontend js-prototype-pollution CWE-1321 Direct writes to __proto__ / constructor.prototype or deep-merging untrusted parsed JSON/URL parameters without prototype key guards.
frontend js-weak-random CWE-338 Predictable Math.random() used for tokens, nonces, CSRF values, OTPs, secrets or session IDs (names matched by whole word parts: otpCode, not spinnerId).
frontend jwt-decode-without-verify CWE-347 jwt.decode()/jwtDecode() parsing JWT claims without signature verification.
frontend post-message-origin CWE-346 addEventListener('message', ...) handlers missing an event.origin check and postMessage(..., '*') sending sensitive data.
frontend react-dangerous-html CWE-79 React dangerouslySetInnerHTML without a sanitizer, unescaped JSON.stringify in script tags, javascript: JSX URLs, and URL-tainted href/src/action props.
frontend store-persist-secrets CWE-922 Zustand, Redux (redux-persist) or Pinia store persistence serializing auth tokens, JWTs, secrets or passwords to browser storage.
frontend subresource-integrity CWE-353 External CDN <script> and <link rel="stylesheet"> tags missing Subresource Integrity (integrity="sha384-...").
frontend unsafe-target-blank CWE-1022 External or dynamic <a target="_blank"> links with rel="opener" or missing rel="noopener noreferrer".
frontend vite-source-maps CWE-540 vite.config.* setting sourcemap: true or 'inline', exposing full unminified frontend source code in production.
frontend vue-dangerous-html CWE-79 Vue v-html and Svelte {@html} without a sanitizer, and Vue javascript: / $route.query URL bindings.
livewire computed-cache-without-key CWE-639 #[Computed(cache: true)] with no key:: cached globally across all users instead of per user/tenant.
livewire event-listener-auth CWE-862 #[On(...)] public Livewire listener that writes records without authorization (browsers can call it via __dispatch).
livewire file-upload-config CWE-434 Livewire temporary_file_upload missing rules or with empty middleware when WithFileUploads is used.
livewire identity-public-property CWE-200 Public properties named for protected PII/secret fields (email, token, password, apiKey …) serialized into wire:snapshot.
livewire lazy-mount-secrets CWE-200 Passing tokens, secrets or signed URLs as mount props to a lazy Livewire component (base64-encoded in page HTML).
livewire livewire-update-throttle CWE-770 Strict mode (--strict): verifies the Livewire update endpoint carries throttle middleware.
livewire middleware-not-repeated CWE-862 Livewire pages behind non-persistent middleware (permission:, role:, password.confirm) that does not re-run on update requests.
livewire model-on-public-property CWE-200 Public properties typed as Eloquent Model/Collection publishing class names and primary keys in wire:snapshot.
livewire payload-limits CWE-400 Partial config('livewire.payload') overrides whose shallow merge silently disables omitted DoS caps (max_size, max_nesting_depth, max_calls, max_components).
livewire public-page-props CWE-200 Public array prop bags ($props, $pageProps, $payload, $data) exposed and writable in wire:snapshot.
livewire unauthorized-mutator CWE-862 Public Livewire mutator methods that persist records without authorization.
livewire untyped-public-property CWE-20 Untyped public properties letting the browser supply arbitrary types.
livewire url-writable-identifier CWE-639 #[Url] record-identifier properties without #[Locked].
livewire validate-attribute-without-call CWE-20 Components using real-time #[Validate] whose persisting actions omit $this->validate().

Your own checks

Drop a class implementing Olgun\SecurityCheck\Check (or extending BaseCheck / BaseFileCheck) into app/SecurityChecks/ (namespace App\SecurityChecks). CheckRegistry discovers it automatically — nothing is registered by hand. Extending BaseFileCheck opts into the single-pass file Visitor, --cache, and --diff/--staged. See docs/writing-checks.md for a complete example.

AI agents (Laravel Boost skill)

The package ships an agent skill at resources/boost/skills/laravel-security-check/SKILL.md. In an app with Laravel Boost, php artisan boost:install (or boost:update) installs it for your agents. It tells an agent when to run security:check, how to triage each finding (fix, inline ignore with a reason, or config), how to use a baseline, --diff and CI output, and how to write the app's own checks.

Config

Publish the configuration file:

php artisan vendor:publish --tag=security-check-config

Available keys in config/security-check.php:

  • checks_path / checks_namespace: directory and namespace for custom application checks.
  • public_routes: URI patterns (Str::is()) intentionally callable without auth middleware.
  • safe_raw_output: regex for intentional {!! !!} Blade expressions.
  • safe_alpine_expressions: array of exact expressions (or expression => reason pairs) or regex string for intentional server-built Alpine code.
  • safe_url_functions: list of JS sanitizer helper names allowed in Alpine URL bindings (e.g. ['safeUrl']).
  • ignore_paths: glob patterns (Str::is()) excluded from reporting.
  • disabled_checks: check names or groups turned off by default.
  • frontend_paths: folders scanned for JS, TypeScript, React, Vue, and Svelte files.
  • cache_path: location of the per-file SHA-1 cache used when --cache is passed. A change of the config, of --strict, of the package's checks or of your own checks in checks_path makes the cache start again.

More products by the same author

Other production web applications and developer tools maintained by the same author:

Product What it is
Main App Curated multi-platform application directory (macOS, web, iOS, Windows) running Laravel + Livewire.
FindUtils 460+ free browser tools — converters, formatters, PDF tools, generators, and calculators with no signup and local-first browser processing.
Emoji Favicons Turn any of 3,773 Unicode emojis into an edge-hosted SVG, PNG, or ICO favicon with one <link> tag and a documented API.
DataVisitors Privacy-first software analytics for websites, apps, and servers — no cookies on visitors by default, tracking sources, behavior, and conversions.

License

MIT — see LICENSE.

Alternatives to olgunozoktas/laravel-security-check

jorijn/laravel-security-checker

Checks your composer.lock against the Packagist security advisories database fro...

1,958,007 202
nth-root/phpstan-security

A PHPStan extension that checks your code for security vulnerabilities

2,790 5
exin/enlightn

Fork of Enlightn with Laravel 12 support

25,940
qiick/laravel-audit

Shared audit log for qiick Laravel products: the activity_log table, a secret-sa...

1,380 0
williamug/audited

The only Laravel audit package that ships a complete admin UI — Livewire table,...

2,886 2

Version History

Version Released PHP Laravel License
v0.1.1 ^8.3 ^12.0|^13.0 MIT
v0.1.0 ^8.3 ^12.0|^13.0 MIT