Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Filament Csp Nonce Laravel Package

asignua/filament-csp-nonce

CSP nonce support for Filament: generates a per-request nonce and applies it to Filament's inline scripts and styles, so your admin panel runs under a strict Content Security Policy without unsafe-inline. Simple Laravel/Filament integration with minimal configuration.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: The package is a cross-cutting Laravel security/HTTP-layer component: CSP nonce policy, Reporting API headers, Blade/view rewriting, and Filament panel integration. It fits naturally as middleware plus service-provider configuration rather than an application-domain dependency. v1.0.1 is a reliability patch, not an architectural change, and improves fit for production Laravel apps that need CSP enforcement without building nonce and reporting plumbing in-house.
  • Integration feasibility: Feasible for a standard Laravel app using Blade and Filament. Typical integration is Composer install, config publishing, middleware registration, policy configuration, report endpoint configuration, and optional Filament view overrides. The fixes around error-page rewriting, Blade nonce detection, report-to groups, and subdirectory base paths remove several sharp edges that would otherwise consume integration effort.
  • Technical risk: Moderate until validated in the target app. CSP enforcement can break inline styles/scripts, fonts, error pages, and panel UI. v1.0.1 changes behavior by rewriting framework and resources/views/errors pages by default; teams with custom error views should verify output. The nonce-detection fix may change generated markup. Reporting remains dependent on endpoint capacity and correct report-uri/report-to/Reporting-Endpoints configuration. The 128 KB report-body cap is safer for 20-entry batches but still requires monitoring.
  • Key questions: Which Laravel, PHP, and Filament versions are supported? Is report-only mode available for staged rollout? Can error-page rewriting be disabled or scoped? Where are reports stored, and what retention/PII controls exist? Does it support multiple Filament panels, custom domains, and subdirectory installs? How does it behave under Octane/queues? What is the upgrade path from v1.0.0, and are there hidden config changes beyond the documented fixes?

Integration Approach

  • Stack fit: Strong fit for Laravel + Blade + Filament applications needing CSP hardening and reporting. It is less relevant for APIs-only services or apps without server-rendered views. The package sits in the request/response path and should be treated as security infrastructure, not product functionality.
  • Migration path: For a new adoption, begin in report-only mode in staging, enable error-page rewriting, validate Filament panels and font loading, verify subdirectory/base-path behavior if applicable, then move to enforcement in production. For existing v1.0.0 users, v1.0.1 is a patch upgrade, but validate the default error-view rewrite and nonce-detection changes before broad rollout.
  • Compatibility: Confirm Laravel/PHP/Filament version constraints and whether published Filament view overrides require blade.paths. Validate Bunny Fonts loading through Filament’s ->font() and confirm expected behavior when the debug exception page is blocked inside a panel. Subdirectory installs should be explicitly tested because that was a v1.0.1 fix.
  • Sequencing: 1) Add dependency and baseline config; 2) run report-only in staging; 3) validate framework and custom error pages; 4) validate Filament assets, fonts, and panel pages; 5) test subdirectory/base-path headers; 6) canary enforce in production; 7) monitor reports and roll back to report-only if violations are noisy or user-facing breakage appears.

Operational Impact

  • Maintenance: Low-to-moderate. The package is config-driven, but CSP policy must be maintained as frontend assets, fonts, and panel views change. Pin versions and review patch releases, especially security-adjacent ones like v1.0.1.
  • Support: Improved by v1.0.1 docs, but still requires CSP literacy. Support teams need guidance for blocked resources, Filament panel issues, and the expected debug-page block inside panels. Document report-only fallback and config toggles.
  • Scaling: Main scaling concern is the reporting endpoint, not request middleware. The 128 KB body cap supports full 20-entry Reporting API batches, reducing silent 204 drops, but high-traffic apps still need endpoint capacity, storage, retention, and aggregation. Validate report volume before enforcing broadly.
  • Failure modes: CSP can block inline styles on error pages, Filament fonts, or debug pages; nonce detection can misclassify Blade echoes; report-to groups can be overwritten if config semantics are misunderstood; reports can be dropped if payload limits or endpoints are misconfigured; subdirectory installs can emit incorrect report headers if base-path handling regresses. Use report-only rollout and monitoring to catch these.
  • Ramp-up: Allocate backend/security time for middleware, headers, and report handling, plus frontend/Filament time for CSP compatibility. A one-to-two sprint pilot is reasonable for a typical app, with a runbook for CSP violations and report review before enforcement.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings