dgtlss/clearance
Clearance is a lightweight Laravel package for simple, expressive access control. Define permissions and check authorization with clean, readable code, integrating smoothly with Laravel’s gates and policies while keeping authorization logic organized and easy to maintain.
clearance.lock.json. That's a decision to make permission changes reviewable at PR time rather than discoverable in production incidents.fetch-depth: 0, --baseline=origin/main), CODEOWNERS protection on the lock/workflow/verification config, and required code-owner review. Budget this as a ~1-sprint platform/security workstream, not a dependency bump.3 for missing refs and invalid baselines is fail-closed behavior. Decide the org convention: alert and block, never retry-and-ignore.Adopt when:
Look elsewhere or defer when:
Executives. "Today an access-widening change gets the same review weight as a typo fix. Clearance makes permission changes an explicit, reviewed artifact and blocks PRs that try to approve their own expansion. Investment is roughly a sprint of CI and CODEOWNERS work; the return is a control that maps directly to access-change-control requirements in our compliance narrative." Flag honestly that v1.0.0 shipped with a self-approval bypass — the recommended adoption path is v1.0.1 with --baseline plus code-owner review, not "upgrade and move on."
Engineering. "Upgrade to v1.0.1, then add php artisan clearance:check --baseline=origin/main to PR CI with fetch-depth: 0 on actions/checkout. Protect clearance.lock.json, the workflow, and verification config with CODEOWNERS and required code-owner review. Missing refs and invalid baselines exit 3 — treat as fail-closed and page on it rather than retry. Warden and Advisor integrations still use checkout-lock semantics, so run the Git-baseline command alongside them, not instead of them."
Security. Frame the threat model precisely: pre-1.0.1, a pull request could widen access, update or approve its own lock, and pass clearance:check. Post-fix, approvals committed in the PR's lock cannot override the trusted baseline; checkout lock changes surface as review warnings with baseline_ref and lock_changed JSON fields. Regression coverage now includes self-approved widening, unchanged locks, invalid baselines, monorepo paths, and symlink redirection. Validate the control by attempting a deliberately self-approving PR after rollout — the gate is only proven when it fails.
How can I help you explore Laravel packages today?