Skip to main content

Changelog

Real entries from every ShieldCI surface: the SaaS platform, the free open-source package, and the pro package. Filter by product to narrow in.

0
entries
0
major versions
0
in the last 90 days
Free Packagev1.27.0

shieldci/laravel v1.27.0

Changed

  • •maintenance-mode-status asks Laravel whether the application is down, so cache-driver and relocated-storage outages are reported, which can fail a default fail_on: high build (#742)
  • •maintenance-mode-status warns at Medium when the maintenance driver cannot answer, such as an unreachable cache store, instead of passing (#742)
  • •maintenance-mode-status no longer runs under --ci, since a CI checkout is never in maintenance mode (#742)
  • •logic-in-routes grades a complex read such as Post::whereIn('id', $ids)->get() Medium instead of High (#752)
  • •logic-in-routes reports restore() as a database write, which can fail a default fail_on: high build (#752)
  • •logic-in-routes analyses closures on routes registered through a chain such as Route::middleware(), prefix() or name(), which can fail a default fail_on: high build (#753)
  • •logic-in-routes grades static job dispatch, Artisan facade calls and notify() as business logic, which can fail a default fail_on: high build (#756)
  • •logic-in-routes counts writes through ?->, relation methods such as sync(), the signed-in user such as auth()->user()->update() and property hops, which can fail a default fail_on: high build (#757)
  • •logic-in-routes counts further Eloquent writes, such as createMany(), forceCreate(), updateOrFail() and saveQuietly(), which can fail a default fail_on: high build (#757)
  • •logic-in-routes counts writes on a models-namespace class named like a utility, such as App\Models\File::create(), which can fail a default fail_on: high build (#757)
  • •logic-in-routes grades a collection push($value) or a first-class callable such as ->delete(...) on a model chain Medium instead of High (#757)
  • •mass-assignment-vulnerabilities reports #[Unguarded] and #[Guarded([])] Critical on a direct Model or Authenticatable subclass with no fillable columns, which can fail a default fail_on: high build (#762)
  • •logic-in-routes matches Eloquent write methods regardless of case, such as ->Delete(), which can fail a default fail_on: high build (#770)
  • •logic-in-routes reports writes in query callbacks, on route-bound models, Auth::guard('api')->user(), Request::user() and model collections, which can fail a default fail_on: high build (#778)
  • •logic-in-routes reports reads on route-bound models and Request::user(), such as fn (Post $post) => $post->comments()->get(), at Low when allow_simple_reads is off (#778)
  • •logic-in-routes adds the newly detected write or business logic to an already-reported closure's message, which changes its fingerprint (#756, #757, #770, #778)
  • •logic-in-routes gives a regraded closure, such as a whereIn() read chain or a closure that is only a DB::table() read, a new message, which changes its fingerprint (#752, #788)
  • •logic-in-routes reads route files under routes/ that the configured paths leave out, which can fail a default fail_on: high build (#794)
  • •logic-in-routes reports a route file that cannot be parsed or read as a Low issue instead of passing (#794)
  • •sql-injection recognises $request?->input() and the other nullsafe $request?-> reads as user input, which can fail a default fail_on: high build (#797)

Fixed

  • •logic-in-routes grades a route closure that is one read chain, such as fn () => Post::paginate(15), as a read instead of High business logic (#752)
  • •logic-in-routes no longer grades a bare app() call that reads application information, such as app()->getLocale(), as business logic (#755)
  • •logic-in-routes no longer grades a models-namespace class named like a facade, such as App\Models\Event::find(1), as a facade call (#757)
  • •mass-assignment-vulnerabilities no longer reports a model that declares neither $fillable nor $guarded, since the base Model already guards every attribute (#762)
  • •mass-assignment-vulnerabilities reads Eloquent attributes such as #[Fillable] through the file's imports, so an aliased import counts and an App\Attributes\Fillable does not (#762)
  • •mass-assignment-vulnerabilities reads only the leading array of #[Fillable], as Laravel does, so #[Fillable(['name'], 'password')] lists only name (#762)
  • •mass-assignment-vulnerabilities no longer reports $guarded = [] beside a non-empty fillable list, or on a model extending Pivot or MorphPivot (#762)
  • •mass-assignment-vulnerabilities honours $visible and #[Visible], so a sensitive field the allow-list leaves out is not reported as unhidden (#762)
  • •mass-assignment-vulnerabilities no longer checks $hidden on a model extending a project base class, unless the model declares its own (#762)
  • •logic-in-routes no longer treats a *Model class declared under app/ without extending Eloquent, such as a view model, as an Eloquent model (#771)
  • •logic-in-routes no longer grades a non-query static call such as DashboardViewModel::make() on an unreadable *Model class as business logic, unless the closure writes (#771)
  • •logic-in-routes grades a read with a whereHas() or when() query callback, or an eager-load constraint, as a read instead of business logic (#778)
  • •logic-in-routes grades local scopes named like collection methods, such as Article::filter(), as reads (#778)
  • •logic-in-routes grades reads on a route-bound model, auth()->guard('api')->user() or Request::user() as reads (#778)
  • •logic-in-routes grades a closure that only assigns plain values or reads and returns a read, directly or through view(), as that read (#778)
  • •logic-in-routes grades cache() and session() helper chains like their facade forms (#778)
  • •logic-in-routes no longer grades whereIn() on an in-memory collection as a database query (#778)
  • •shield:baseline creates a missing baseline directory, and reports a file it cannot write with an error and exit 1 instead of an uncaught ErrorException (#786)
  • •logic-in-routes grades a closure that is only a DB::table() read like the same read on a model, instead of High raw database queries (#788)
  • •phpstan and collection-call-optimization run PHPStan with laravel/pao disabled, so shield:analyze inside an AI coding agent no longer passes with no findings (#792)
  • •phpstan and collection-call-optimization report an error instead of passing when PHPStan prints JSON that is not its report (#792)
  • •phpstan and collection-call-optimization quote an error PHPStan reports outside any file as a 500-character excerpt when longer, instead of the whole text (#793)
  • •phpstan and collection-call-optimization keep shieldci.excluded_paths out of the PHPStan run unless the project config uses excludes_analyse, so an unparseable excluded file no longer stops it (#795)
  • •phpstan and collection-call-optimization leave Blade templates out of the PHPStan run, so a template PHPStan cannot parse no longer stops it (#795)
  • •phpstan no longer reports findings inside Blade templates, which PHPStan reads as plain PHP (#795)
  • •phpstan and collection-call-optimization return Skipped when every analysed path is excluded or holds only Blade templates, instead of analysing those files anyway (#795)
Free Packagev1.26.0

shieldci/laravel v1.26.0

Changed

  • •csrf-protection grades $except patterns matching every request, such as ** and */*, Critical instead of High, which changes their fingerprint (#666)
  • •csrf-protection reads an exclusion on a routes/web.php route variable after withTrashed() or a nullsafe call, which can fail a default fail_on: high build (#668)
  • •csrf-protection reports a route given web then excluded through its variable as excluded, not missing web, which changes its fingerprint (#668)
  • •csrf-protection reports each route on a registrar or router variable at its own line, which changes its fingerprint (#668)
  • •login-throttling no longer credits a throttle added through a route variable after an early return, which can fail a default fail_on: high build (#668)
  • •login-throttling reports a login route on a registrar after apiSingleton(), which can fail a default fail_on: high build (#668)
  • •csrf-protection checks Blade <form> tags spanning several lines and reads @csrf only inside the form, which can fail a default fail_on: high build (#676)
  • •csrf-protection reads an unquoted method=post, a > inside a quoted attribute or echo, and an upper-case </FORM>, which can fail a default fail_on: high build (#676)
  • •csrf-protection ignores @csrf inside a Blade or HTML comment, which can fail a default fail_on: high build (#676)
  • •csrf-protection reports a route file when any load of it leaves out web, which can fail a default fail_on: high build (#677)
  • •csrf-protection reports a route excluding the CSRF class its loading group applies, which can fail a default fail_on: high build (#677)
  • •csrf-protection reports removing, replacing or excluding an app CSRF subclass from the web group, which can fail a default fail_on: high build (#678)
  • •csrf-protection reports a redefined bootstrap/app.php web group with a X::class.':params' entry and no CSRF class, which can fail a default fail_on: high build (#678)
  • •csrf-protection names a credited subclass taken out of the bootstrap/app.php web group by its own name, which changes its fingerprint (#678)
  • •csrf-protection matches framework CSRF class names case-insensitively, which can fail a default fail_on: high build (#678)
  • •authentication-authorization lets a route action array's middleware replace the registrar's and reads its excluded_middleware, which can fail a default fail_on: high build (#680)
  • •authentication-authorization checks bare-method routes in Route::controller() groups, which can fail a default fail_on: high build (#680)
  • •authentication-authorization reads only the first withoutMiddleware() argument on a route or registrar, which can fail a default fail_on: high build (#696)
  • •authentication-authorization grades mutating Route::match() and Route::any() routes, which can fail a default fail_on: high build (#696)
  • •authentication-authorization treats excluding Authenticate::class as removing the auth alias, which can fail a default fail_on: high build (#696)
  • •authentication-authorization checks routes on a registrar a group callback captures with use, which can fail a default fail_on: high build (#696)
  • •database-status probes every read replica of a read/write-split connection, including one a DB::extend() resolver builds, which can fail a default fail_on: high build (#713)
  • •directory-write-permissions grades a missing or broken storage symlink Medium instead of Critical, so a fresh install warns rather than fails (#718)
  • •dev-dependencies-production scans the config.vendor-dir directory when composer lists no removals and installed.json is missing, which can fail a default fail_on: high build (#719)
  • •eloquent-n-plus-one reports a proven relation method call even when a column or accessor shares its name, which can fail a default fail_on: high build (#722)
  • •eloquent-n-plus-one grades a relation guessed from its name, or a chain of relations, Medium instead of High (#729)
  • •eloquent-n-plus-one grades findings Medium in a Console/Commands file that calls chunk(), each(), lazy() or eager-loads (#729)
  • •eloquent-n-plus-one checks views rendered from route closures, inline view() and with() bindings, and nested relation loops, which can fail a default fail_on: high build (#736)
  • •eloquent-n-plus-one reports relation reads and queries on an outer loop's variable inside an inner loop, which can fail a default fail_on: high build (#736)

Fixed

  • •csrf-protection credits middleware added through a route variable, such as $route->middleware('web') in a custom route file (#668)
  • •csrf-protection no longer reports a resource narrowed to read actions with ->only() on its variable (#668)
  • •csrf-protection reads action-array middleware on routes made on Route::getFacadeRoot() (#668)
  • •login-throttling credits throttle added through a route variable after withTrashed() or where*(), or inside a loop body (#668)
  • •login-throttling credits throttle on a registrar after singleton() (#668)
  • •authentication-authorization keeps a registrar variable's middleware when whereNumber(), a nullsafe middleware() or singleton() precedes group() (#668)
  • •csrf-protection no longer reports a commented-out form, an element such as <formation>, or a GET form with data-method, formmethod or :method (#676)
  • •csrf-protection credits an app subclass of the CSRF middleware and reads Class::class.':params' web group entries (#678)
  • •csrf-protection matches exclusions by exact name or subclass, as Laravel does, so a leading-backslash string no longer strips the class (#678)
  • •csrf-protection keeps a web group's known CSRF entries when an appended list cannot be read, and ignores exclusions with parameters such as 'X:strict' (#678)
  • •authentication-authorization counts the Authenticate class, its app subclasses and custom groups holding auth as authentication (#680)
  • •authentication-authorization reads auth from route action arrays, HasMiddleware controllers and controller constructors (#680)
  • •authentication-authorization treats guest:<guard> like guest (#680)
  • •authentication-authorization reads only the first argument of a group's withoutMiddleware(), so a later 'auth' no longer strips auth (#680)
  • •authentication-authorization applies the middleware every load of a route file gives it, such as a then: closure, to its routes (#693)
  • •authentication-authorization applies the prefix of a registrar a then: closure captures, so public_routes entries match (#693)
  • •authentication-authorization applies an auth group's middleware to a route file required inside its callback (#696)
  • •authentication-authorization credits a can group attribute or action key as authorization on Laravel 11+ (#696)
  • •authentication-authorization treats a route's withoutMiddleware(Authenticate::class) like withoutMiddleware('auth') (#696)
  • •authentication-authorization ignores withoutMiddleware text in comments when applying a route file's registration middleware (#696)
  • •config-outside-config no longer reports UUIDs or long snake_case and camelCase identifiers as API keys (#712)
  • •config-outside-config matches excluded_domains against a host with a trailing dot and skips null entries instead of erroring (#712)
  • •config-outside-config lets an excluded_domains entry such as *.example.org cover the bare domain (#712)
  • •directory-write-permissions reads an empty filesystems.links as no links instead of checking public/storage (#718)
  • •dev-dependencies-production reports only dev packages among the packages composer would remove (#719)
  • •eloquent-n-plus-one reads columns declared by #[Fillable], #[Appends], casts(), $attributes and Attribute accessors instead of reporting them as relations (#722)
  • •eloquent-n-plus-one matches accessors case-insensitively, so getFirstNameAttribute() read as $item->firstname is no longer reported (#722)
  • •eloquent-n-plus-one no longer treats a method with a built-in return type, such as permalink(): string, as a relation (#722)
  • •eloquent-n-plus-one knows the activities relation of Spatie's LogsActivity trait, so its models are read in full (#722)
  • •eloquent-n-plus-one reads self:: and static:: queries inside a model as that model, so undeclared names are no longer reported (#729)
  • •eloquent-n-plus-one no longer types static calls on facades and other non-model classes, such as DB::table()->get(), as models (#736)
  • •eloquent-n-plus-one honours break N, so a query followed by break 1 or break 2 out of every loop is no longer reported (#736)
  • •eloquent-n-plus-one no longer reports relation property writes or relations eager-loaded through withWhereHas(), load() or a nested with() closure (#736)
  • •shield:analyze restores the caller's time limit afterwards, so an in-process call no longer leaves its timeout on a queue worker (#739)
Free Packagev1.25.0

shieldci/laravel v1.25.0

Changed

  • •up-to-date-migrations reads migration state from the migrator, so Laravel 9 releases without migrate:status --pending report pending migrations instead of an error (#641)
  • •up-to-date-migrations checks the table named in database.migrations, so a missing renamed table is reported, which can fail a default fail_on: high build (#641)
  • •unused-global-middleware warns instead of passing when the container cannot build TrustProxies (#644)
  • •cache-driver grades failover, storage and session stores instead of reporting them as unsupported, which can fail a default fail_on: high build (#652)
  • •cache-driver reports a null default store in production or staging as caching disabled, which can fail a default fail_on: high build (#652)
  • •cache-driver no longer runs in CI mode, since the CI environment says nothing about the production cache (#652)
  • •cache-prefix-configuration grades database stores Low and Redis, Memcached or DynamoDB stores Medium, so stock Laravel 11+ no longer fails a default fail_on: high build (#654)
  • •cache-prefix-configuration counts the Redis and Memcached client prefix, which changes the fingerprint of Redis findings (#654)
  • •cache-prefix-configuration treats a store's empty prefix as set instead of falling back to cache.prefix, as Laravel does (#654)
  • •cache-prefix-configuration checks the shared stores behind a failover default store instead of skipping it (#654)
  • •collection-call-optimization reports findings the project's PHPStan config narrows or ignores, instead of passing (#655)
  • •collection-call-optimization grades findings Medium instead of High, so they no longer fail a default fail_on: high build (#655)

Fixed

  • •up-to-date-migrations no longer reports a renamed migrations table as missing (#641)
  • •unused-global-middleware no longer flags TrustHosts, which validates the Host header without TrustProxies (#644)
  • •unused-global-middleware reads the proxies a TrustProxies subclass returns from proxies(), instead of telling users to delete it (#644)
  • •shield:analyze --format=json, --report and shield:baseline substitute invalid UTF-8 instead of writing an empty report or baseline or dropping the upload (#646)
  • •phpstan includes the project config under every name PHPStan discovers, such as phpstan.dist.neon, so errors the project ignores are no longer reported (#660)
  • •phpstan and collection-call-optimization leave out findings in files matched by shieldci.excluded_paths, such as app/Legacy/* (#661)
  • •collection-call-optimization leaves resources/views out of its PHPStan run, so a Blade template that does not parse no longer errors the run (#663)
Free Packagev1.24.0

shieldci/laravel v1.24.0

Changed

  • •login-throttling reads login routes written over several lines, with Route::match(), named arguments, an aliased facade or a router variable, which can fail a default fail_on: high build (#615)
  • •csrf-protection reports a route held in a variable whose CSRF middleware a later withoutMiddleware() removes, which can fail a default fail_on: high build (#615)
  • •framework-override analyzes a project checked out under a directory named tests, such as /builds/tests/app, instead of skipping every file, which can fail a default fail_on: high build (#624)
  • •authentication-authorization checks routes on a registrar chain, a router or registrar variable, an arrow-function group, or assigned to a variable, which can fail a default fail_on: high build (#626)
  • •authentication-authorization applies a group's withoutMiddleware('auth') or excluded_middleware to routes at any depth, which can fail a default fail_on: high build (#626)
  • •authentication-authorization exempts a route only when every URL its route file is served at matches public_routes, which can fail a default fail_on: high build (#626)
  • •authentication-authorization reports a FormRequest with no authorize() method at High when an unprotected sensitive action uses it, which can fail a default fail_on: high build (#626)
  • •queue-timeout-configuration treats a missing retry_after as Laravel's 60 seconds instead of 90, which can fail a default fail_on: high build (#628)
  • •queue-timeout-configuration grades each connection against every Horizon supervisor on it, merged with defaults as Horizon does, which can fail a default fail_on: high build (#628)
  • •queue-timeout-configuration reads connection_timeouts by queue connection name, which can fail a default fail_on: high build (#628)
  • •frontend-vulnerable-dependencies warns instead of passing when npm audit or yarn audit did not run or the lock file misses a declared dependency (#631)
  • •frontend-vulnerable-dependencies grades info advisories as Low and advisories with no severity as High, instead of Critical (#631)
  • •queue-timeout-configuration no longer reads a connection's timeout key as the worker timeout, since no queue worker reads it, which can fail a default fail_on: high build (#635)
  • •queue-timeout-configuration fails a Horizon supervisor whose timeout is 0, negative or empty, since its jobs never time out, which can fail a default fail_on: high build (#635)

Fixed

  • •authentication-authorization reads a route file's prefix from more registration forms, such as a then: callback in a variable or a provider in app/Providers/, so listed public_routes match (#613)
  • •authentication-authorization no longer reports Auth::user() without a null check in a method reached only by routes carrying auth (#613)
  • •csrf-protection and authentication-authorization credit middleware set on a registrar derived from a router variable (#615)
  • •login-throttling no longer reads route text inside a string or heredoc as a login route (#615)
  • •login-throttling credits a throttled login route written over several lines to its controller, instead of reporting the controller method as lacking rate limiting (#615)
  • •framework-override no longer reports the Laravel 9 and 10 HTTP and Console Kernels as extending core framework classes (#624)
Free Packagev1.23.0

shieldci/laravel v1.23.0

Changed

  • •login-throttling grades an api file passed to group() through a path variable by the API rules, which can fail a default fail_on: high build (#578)
  • •config-outside-config scans projects checked out under a tests/, config/, vendor/, database/seeders/ or database/factories/ directory instead of skipping them, which can fail a default fail_on: high build (#582)
  • •autoloader-optimization reports an unoptimized Composer autoloader at High, which can fail a default fail_on: high build (#584)
  • •config-outside-config reports loopback and private-IP URLs written with userinfo, such as http://user@127.0.0.1 (#585)
  • •csrf-protection, login-throttling and authentication-authorization apply only the last middleware() call before group(), which can fail a default fail_on: high build (#588)
  • •login-throttling applies only the last middleware() call a Route::middleware() chain makes before a verb such as post(), which can fail a default fail_on: high build (#588)
  • •login-throttling stops crediting a throttle removed by api(remove:) or removeFromGroup(), which can fail a default fail_on: high build (#595)
  • •login-throttling reads only the leading array of ->middleware(['auth'], 'throttle:5,1'), as Laravel does, which can fail a default fail_on: high build (#595)
  • •login-throttling no longer gives the web group's throttle to a route file registered by a group that does not name web, such as Route::prefix('hooks')->group(...), which can fail a default fail_on: high build (#595)
  • •login-throttling drops a parameterless ThrottleRequestsWithRedis when a route excludes ThrottleRequests, as Laravel does, which can fail a default fail_on: high build (#595)
  • •login-throttling applies a route's and its groups' middleware exclusions to the throttle its controller registers, which can fail a default fail_on: high build (#595)
  • •login-throttling grades routes/api.php by the API rules when it is registered through positional withRouting() arguments, withRouting(api: $file) or a provider path method, which can fail a default fail_on: high build (#595)
  • •csrf-protection, login-throttling and authentication-authorization read ->attribute('withoutMiddleware', ...) as a withoutMiddleware() call and report the routes it uncovers, which can fail a default fail_on: high build (#599)
  • •csrf-protection reports Laravel 13 routes excluding the ValidateCsrfToken a Kernel web group lists, which can fail a default fail_on: high build (#602)
  • •csrf-protection reports a route whose action array removes web or the CSRF middleware through excluded_middleware, as it does withoutMiddleware(), which can fail a default fail_on: high build (#609)
  • •csrf-protection reports Route::middleware('web')->post('/x', ['middleware' => 'auth', ...]), since the action array's middleware replaces the registrar's as it does in Laravel, which can fail a default fail_on: high build (#609)
  • •csrf-protection drops the extra keys of a controller callable such as [InvoiceController::class, 'store', 'middleware' => 'web'] and the middleware its registrar set, as Laravel does, which can fail a default fail_on: high build (#609)

Fixed

  • •csrf-protection reads route files passed to group() through a path variable instead of reporting their POST routes (#578)
  • •config-outside-config no longer reports prefixed snake_case identifiers, such as api_response_cache_key, as API keys (#582)
  • •config-outside-config no longer reports public hosts that start with localhost or a private IP, such as localhost.run (#585)
  • •login-throttling compares a class string with a leading backslash as written, so withoutMiddleware('\Illuminate\Routing\Middleware\ThrottleRequests:5,1') no longer removes throttle:5,1 (#595)
  • •csrf-protection, login-throttling and authentication-authorization apply the middleware a route registrar held in a variable carries (#595, #599)
  • •authentication-authorization recognises groups on a router variable, app('router') or a group callback's router parameter, and group in any case, instead of reporting the routes they protect (#599)
  • •csrf-protection no longer reports Laravel 11/12 routes excluding ValidateCsrfToken when the Kernel web group runs VerifyCsrfToken (#602)
  • •csrf-protection no longer reports a route excluding a CSRF class when the Kernel's global $middleware runs CSRF, since withoutMiddleware() only filters route middleware (#602)
  • •csrf-protection no longer reports a route excluding a CSRF class the web group lists with parameters, such as csrf:strict, unless the exclusion names the same Class:params string (#602)
  • •csrf-protection no longer assumes a bootstrap/app.php web-group class without a parent extends VerifyCsrfToken, so excluding the framework VerifyCsrfToken is no longer reported (#602)
  • •csrf-protection reads the middleware key of a route's action array, such as ['middleware' => 'web', 'uses' => ...], instead of reporting no "web" middleware detected (#609)
  • •csrf-protection reads the methods a Route::match() call names through a methods: argument, so a GET-only route is no longer reported (#609)
Free Packagev1.22.0

shieldci/laravel v1.22.0

Changed

  • •csrf-protection reports preventRequestForgery(except: ['*']) on Laravel 13 at Critical instead of passing it, which can fail a default fail_on: high build (#539)
  • •csrf-protection reports web(remove: [PreventRequestForgery::class]) on Laravel 13 at Critical instead of passing it, which can fail a default fail_on: high build (#539)
  • •csrf-protection reports a group('web', ...), replace or removeFromGroup() call that drops the CSRF middleware from the web group, which can fail a default fail_on: high build (#539)
  • •csrf-protection reads except: lists and the $except property through the AST, so a '*' entry in any position is reported at Critical and can fail a default fail_on: high build (#544)
  • •csrf-protection keeps judging the web group after a group('web', ...) call it cannot read, so a later CSRF removal is reported, which can fail a default fail_on: high build (#544)
  • •csrf-protection reports a web-group replacement for the CSRF middleware that it cannot read at Medium, instead of passing it, since the replacement may not extend the CSRF middleware (#544)
  • •csrf-protection no longer lets a route borrow ->middleware('web') from the next statement, or a one-line web group cover the rest of the file, which can fail a default fail_on: high build (#547)
  • •csrf-protection checks write routes registered through Route::any(), Route::match(), Route::resource() or $router->post(), which can fail a default fail_on: high build (#547)
  • •csrf-protection reports a route in a custom route file whose CSRF middleware is removed through withoutMiddleware() or excluded_middleware, which can fail a default fail_on: high build (#547)
  • •csrf-protection reports a route that strips CSRF through withoutMiddleware() or excluded_middleware in routes/web.php or a file web covers, which can fail a default fail_on: high build (#556)
  • •csrf-protection checks apiResource(), singleton() and the other resource forms like resource(), which can fail a default fail_on: high build (#556)
  • •csrf-protection checks routes registered on $this->router, app('router'), a parameter typed Router or a group callback's parameter, which can fail a default fail_on: high build (#556)
  • •csrf-protection reports Route::middleware('web')->middleware('auth')->post(...), since the later middleware() call replaces web as it does in Laravel, which can fail a default fail_on: high build (#556)
  • •csrf-protection moves some routes between its no "web" middleware detected and CSRF-excluded messages, so their baseline entries stop matching (#556)
  • •login-throttling grades a route file registered through Route::group(['middleware' => 'api'], ...) by the API rules, which can fail a default fail_on: high build (#549)
  • •login-throttling grades every file in a group([...]) list registered under api by the API rules, which can fail a default fail_on: high build (#555)
  • •login-throttling grades files an api route file loads through require or group(), and files required inside an api group, by the API rules, which can fail a default fail_on: high build (#560)
  • •login-throttling reports a login route in such a file as API authentication route instead of Login route, so its baseline entry stops matching (#549)
  • •login-throttling reports a login route whose throttle is removed through withoutMiddleware() or excluded_middleware, which can fail a default fail_on: high build (#560)
  • •login-throttling covers a login route only when every prefix and domain its route file is registered under is throttled, which can fail a default fail_on: high build (#560)
  • •login-throttling no longer counts a computed middleware name such as 'throttle'.config(...) on a route file registration, which can fail a default fail_on: high build (#560)
  • •login-throttling counts a group() call as a route group only when it is made on the router, which can fail a default fail_on: high build (#560)
  • •BootstrapRouteParser::getGroupRegisteredRouteFiles() returns each registration's group calls as a calls list instead of a single call, so code reading call breaks; the method is now @internal (#560, #575)
  • •csrf-protection reports a Kernel that names CSRF only in $middlewarePriority or a use import as not registering it, which can fail a default fail_on: high build (#568)
  • •authentication-authorization applies a group's prefix to every file in a ->group([...]) list, so a public_routes pattern written without that prefix may stop matching (#571)
  • •authentication-authorization applies the prefix a withRouting(then:) callback registers a route file under, so public_routes patterns written for that prefix match and ones written for /api/... may stop matching (#571)

Fixed

  • •csrf-protection accepts Laravel 13's PreventRequestForgery and preventRequestForgery(), instead of reporting a Kernel that registers it as missing CSRF (#539)
  • •csrf-protection no longer reports use() or remove(), which edit the global stack rather than the web group (#539)
  • •csrf-protection no longer reports removing or replacing the other Laravel version's CSRF class name, which leaves the web group unchanged (#544)
  • •csrf-protection reads a Kernel comment as commented-out CSRF middleware only when the comment is itself a middleware entry (#544)
  • •csrf-protection ignores commented-out entries in the CSRF middleware's $except property, instead of reading them as live exclusions (#544)
  • •csrf-protection reads custom route files through the AST, so web counts at any position in a route's or group's middleware (#547)
  • •csrf-protection recognises Route::middleware('web')->group(...) in a custom route file, instead of reporting its routes (#547)
  • •csrf-protection keeps a web group open past the closing }); of a nested non-web group, instead of reporting the routes after it (#547)
  • •csrf-protection counts the CSRF middleware applied directly to a route or group, such as ->middleware(VerifyCsrfToken::class), as protection (#547)
  • •csrf-protection covers files a custom route file requires inside a web group, at any depth, instead of reporting their routes (#547)
  • •csrf-protection and login-throttling recognise a route file registered through ->Middleware(...) in any letter case, such as Route::Middleware('web')->group(...) (#547)
  • •csrf-protection treats a route file registered through Route::group(['middleware' => 'web'], ...) as covered, and one registered under api as skipped, instead of reporting their POST routes (#549)
  • •login-throttling keeps the framework's throttle verdict when throttle is re-registered to a class it cannot read, such as a package middleware (#552)
  • •csrf-protection no longer reports a commented-out Kernel CSRF entry when the web group or global stack runs CSRF on an active line (#553)
  • •csrf-protection and login-throttling read every file in a ->group([...]) list, instead of only a single path or closure (#555)
  • •csrf-protection no longer reports excluding VerifyCsrfToken on Laravel 13, where the web group still runs PreventRequestForgery (#556)
  • •csrf-protection no longer reports routes in files that routes/api.php loads, such as a versioned API layout (#556)
  • •csrf-protection and login-throttling resolve require base_path(...) inside a route group, so the required file inherits its registration (#560)
  • •csrf-protection no longer reports routes an api group reaches inside a custom route file, or a file loaded only inside such a group, as missing web middleware (#576)
Free Packagev1.21.0

shieldci/laravel v1.21.0

Added

  • •MiddlewareThrottleDetector reports whether named middleware groups in the Kernel or bootstrap/app.php are throttled (#520)
  • •BootstrapRouteParser takes an optional judge, so an app alias for ThrottleRequests counts as a throttle (#530)

Changed

  • •app-key-security explains how to rewrite an export or quoted APP_KEY line that php artisan key:generate cannot replace (#524)

Fixed

  • •debug-mode reads app.debug from the returned config array, so a commented-out or nested debug entry is no longer reported (#509)
  • •app-key-security reads key and cipher from the returned config array, so commented-out or nested entries are no longer reported (#511)
  • •app-key-security accepts the AES-128-GCM and AES-256-GCM ciphers, instead of reporting them at High (#513)
  • •app-key-security reports an APP_KEY whose size does not match the configured cipher, which Laravel's encrypter rejects (#516)
  • •app-key-security checks each APP_PREVIOUS_KEYS entry against the cipher on Laravel 11+, where a wrong-size entry fails any request that uses the encrypter (#519)
  • •login-throttling recognises group throttles set with ThrottleRequests::using(), an aliased import or a chained configurator call (#520)
  • •app-key-security reads the APP_KEY name as dotenv does, so export APP_KEY= and quoted names are found and app_key is not (#524)
  • •app-key-security validates the last of several APP_KEY lines, the one Laravel reads, rather than the first (#524)
  • •login-throttling matches group throttle middleware by name rather than substring, so skip-throttle no longer counts as a throttle (#526)
  • •login-throttling no longer reports a login controller whose route group throttles with a class form, such as ThrottleRequests::class (#530)
  • •env-variables-complete no longer reports export, quoted or lowercase .env names that Laravel loads as missing (#531)
  • •env-example-documented reports a lowercase .env name such as app_name as undocumented, since dotenv loads it as a separate variable (#531)
  • •env-example-documented counts export and quoted names in .env.example as documented, and skips the inner lines of multi-line values (#531)
  • •login-throttling no longer credits throttle text near a route, so ->middleware('throttles.audit') no longer clears a login route (#533)
  • •login-throttling credits a throttle passed after another middleware, such as ->middleware('auth', 'throttle:6,1') (#533)
  • •env-variables-complete reads .env values as dotenv does, so report_redundant reports CACHE_TTL=60 # seconds restating a default (#535)
  • •csrf-protection treats a route file registered with ->middleware('auth', 'web') as web, instead of reporting its POST routes (#536)
  • •login-throttling judges a route file registered with ->middleware('auth', 'api') against the api group throttle, not the web group's (#536)
Free Packagev1.20.0

shieldci/laravel v1.20.0

Added

  • •OriginReachabilityChecker::probeFollowingSameHost() follows same-host redirects and returns a new RedirectChain (#499)

Changed

  • •phpstan explains an unsupported level, such as 10 on PHPStan 1, before starting PHPStan (#504)

Fixed

  • •missing-error-tracking reads Nightwatch's flags from the process environment, not only .env (#498)
  • •xss-vulnerabilities no longer grades the CSP of an off-host redirect, such as a Cloudflare Access login page (#499)
  • •xss-vulnerabilities warns when its CSP check cannot reach the origin, instead of passing (#499)
  • •phpstan passes 'max' through to PHPStan, instead of running at level 5 (#504)
  • •debug-mode no longer reports print_r() or var_export() returning their output, unless it is printed (#505)
  • •debug-mode no longer reports debug_backtrace(), which never prints (#505)
  • •config-outside-config counts an environment marker only in a subdomain, so dev.to is no longer reported (#506)
  • •config-outside-config reports hosts on the reserved .test, .localhost and .local TLDs (#506)
Free Packagev1.19.0

shieldci/laravel v1.19.0

Added

  • •DetectsErrorTracking shares the error-tracking package list, now including Flare, Inspector and Nightwatch (#494)

Fixed

  • •missing-error-tracking no longer passes on a tracker installed only under require-dev (#494)
  • •asset-cache-headers warns about an asset it could not fetch, instead of failing at High (#495)
  • •asset-cache-headers probes assets under app.asset_url or app.mix_url rather than app.url (#495)
Free Packagev1.18.0

shieldci/laravel v1.18.0

Added

  • •OriginReachabilityChecker takes an optional ProbeRequest, so a probe can send Accept-Encoding and keep the origin's Content-Encoding (#488)

Changed

  • •login-throttling reports each unthrottled login route in routes/auth.php, replacing the single file-level Breeze or Jetstream finding (#483, #491)

Fixed

  • •login-throttling ignores commented-out code, so a commented-out route or throttle no longer changes the result (#482)
  • •login-throttling scans routes/web.php, which every install registers in the web group, so an unthrottled POST /login is reported (#483)
  • •login-throttling no longer lets an api-group throttle, such as the stock throttle:api, clear web login routes or skip the Fortify check (#483)
  • •login-throttling no longer reports a login controller whose route carries throttle middleware or whose FormRequest throttles, such as $request->authenticate() (#484, #486)
  • •login-throttling reads a route's throttle to the end of its statement, so a one-line route no longer borrows the next route's throttle (#490)
  • •login-throttling credits a login route only with its own controller's or middleware's throttling, so a throttled web controller no longer hides an unthrottled API route (#491)
  • •login-throttling detects a login route chained after another call, such as Route::middleware('guest')->post() (#491)
  • •login-throttling no longer reports Fortify without a limiters config or after Fortify::ignoreRoutes(), since neither leaves an unthrottled Fortify login route (#491)
  • •login-throttling checks Fortify even when the app calls RateLimiter itself, and reports a login pipeline that leaves out EnsureLoginIsNotThrottled (#491)
Free Packagev1.17.0

shieldci/laravel v1.17.0

Added

  • •The report lists files the parser could not read under parse_failures, and the console warns that a pass does not cover them (#457)
  • •The report includes parser_compatibility, and the console warns when the installed php-parser is older than the running PHP (#457)
  • •phpstan reports declarations PHP refuses to compile, such as a colliding import, under a new Critical compile-errors category (#474)
  • •phpstan reports every used void result under a new High used-void-result category, rather than as Critical or High by call type (#479)

Changed

  • •Requires shieldci/analyzers-core ^2.8 (was ^2.6), for parse-failure reporting (#457)
  • •chunk-missing no longer exempts a fetch because its select uses DB::raw() (#458)
  • •service-container-resolution names an enum it reports, such as App\Enums\Status::label, rather than Unknown::label (#454)
  • •service-container-resolution names an anonymous class such as LabelService@anonymous::label, rather than a non-existent App\Services\Anonymous::label (#454)
  • •missing-database-transactions names an anonymous class after its resolved parent, such as App\Support\Handler@anonymous (#470)
  • •phpstan reports compile errors and used void results as Compile Errors detected and Used Void Results detected, so a baselined row is reported once more (#474, #479)

Fixed

  • •chunk-missing no longer flags a fetch bounded by a key list, such as whereIn('id', $ids), unless the list is a subquery (#458, #471)
  • •chunk-missing no longer flags a fetch grouped only by columns its whereIn() or where() filters pin, since it returns one row per combination (#458)
  • •chunk-missing reports a loop over a fetch captured by a closure's use (#454)
  • •missing-database-transactions tells apart same-named methods of different classes in one file (#466)
  • •missing-database-transactions no longer treats a helper as protected when only a class declared inside DB::transaction() calls it (#454)
  • •mixed-query-builder-eloquent no longer drops a file with two imports on one alias and reports a pass (#452)
  • •mixed-query-builder-eloquent counts connection-qualified writes and further write methods, such as updateFrom(), against its withoutGlobalScope() exemption (#460)
  • •mixed-query-builder-eloquent keeps a table reported as mixed after a later query-builder read (#464)
  • •authentication-authorization no longer errors on a file with two imports on one alias (#463)
  • •service-container-resolution and missing-docblock no longer error on a file with two imports on one alias (#473)
  • •framework-override, fat-model and logic-in-routes no longer skip a file with two imports on one alias (#473)
  • •eloquent-n-plus-one recognises a model referenced in a different case, such as product::get() (#465)
  • •eloquent-n-plus-one flags a relationship registered through parent::resolveRelationUsing() (#468)
  • •fillable-foreign-key and mass-assignment-vulnerabilities recognise a model whose parent is a relative name, such as Catalog\Record (#467)
  • •phpstan fails the build and lists the files under stopped_at when PHPStan stops at a file it cannot parse or reflect, instead of warning (#474, #478)
  • •collection-call-optimization returns an error instead of a pass when PHPStan stops at a file (#474)
Free Packagev1.16.1

shieldci/laravel v1.16.1

Changed

  • •Issue messages name an anonymous class the way PHP does, such as Migration@anonymous, rather than Unknown (#435)

Fixed

  • •missing-database-transactions recognises DB::connection(...)->transaction() and a fully qualified or aliased DB::transaction() (#421, #446)
  • •missing-database-transactions no longer counts a cache, filesystem or queue client call as a database write, including one declared on a parent or trait (#421, #427, #441)
  • •chunk-missing no longer reports a facade read such as Cache::get() as an unchunked query (#421)
  • •eloquent-n-plus-one, chunk-missing and missing-database-transactions no longer exempt an app model named like a facade, such as App\Models\Event (#424, #428, #436, #446)
  • •missing-database-transactions, missing-docblock, service-container-resolution, mixed-query-builder-eloquent and chunk-missing analyze a method correctly when it declares a nested class (#435)
  • •eloquent-n-plus-one inherits a parent model's relationships when extends uses different case or a relative name (#448)
  • •mixed-query-builder-eloquent tracks a model assigned through an imported name, such as $query = User::query() (#439)
Free Packagev1.16.0

shieldci/laravel v1.16.0

Added

  • •OriginReachabilityChecker probes each origin the app declares once and names the outcome, so an unreachable host cannot read as a clean result (#404)

Changed

  • •env-http-accessibility verifies TLS certificates on its probes, so a staging origin with a self-signed certificate warns rather than passing (#408)
  • •Requires shieldci/analyzers-core ^2.6 (was ^2.5), for the shared AST parser every analyzer now resolves through (#412)

Fixed

  • •logic-in-blade and eloquent-n-plus-one analyze Blade views containing a multi-line directive, an inline @php, a @switch or a raw <?php tag, rather than skipping them and reporting a pass (#407, #409, #413, #414, #416)
  • •logic-in-blade no longer reports blade-unclosed-php-block for a @php that is not a directive, such as one written in prose or inside {{-- --}} (#414)
  • •logic-in-blade no longer reports blade-inline-php for a <?php occurring inside a @php block body, such as one in a string or heredoc (#416)
  • •env-http-accessibility warns when a location produced no response, instead of reporting the web server properly configured from zero replies (#408)
Free Packagev1.15.3

shieldci/laravel v1.15.3

Changed

  • •Requires shieldci/analyzers-core ^2.5 (was ^2.3), so a failed analyzer's stack trace no longer records each frame's arguments (#398)

Fixed

  • •method-length no longer loses a method's declarative exemption to a leading assignment or a trailing comment (#394)
  • •method-length exempts up to 15 declarative statements rather than 5, so six RateLimiter::for() blocks are no longer flagged (#394)
  • •An analyzer that catches its own failure truncates and redacts the message, so database-status no longer reports a raw PDO error (#401)
Free Packagev1.15.2

shieldci/laravel v1.15.2

Fixed

  • •phpstan and collection-call-optimization run on projects that require a newer PHP than the php first on PATH, instead of aborting with "PHPStan produced no analysable output" (#390)