baer-software/larabeacon
baer-software/larabeacon is a Laravel package that brings Beacon support to your application with minimal setup, simple configuration, and a framework-friendly API. It's a small, early-stage project with limited adoption, so it's best suited for experimentation or evaluation rather than production u...
LaraBeacon is a development-time Composer dependency (require --dev) with no runtime footprint in the shipped application — no service provider boot cost in production, no migrations, no queue workers. Architecturally it belongs in the same layer as Pint, PHPStan/Larastan and Rector: a quality gate that runs locally and in CI, not a feature of the product.
The v3.2.0 additions extend that layer in three useful directions:
| Capability | Architectural role |
|---|---|
| Laravel/PHP security-support checks | Turns "are we on a supported stack?" from a quarterly audit into a deterministic build signal |
| GitHub Action + SARIF upload | Surfaces findings where reviewers already work (code scanning tab / PR annotations) rather than in build logs |
| Laravel Boost skill + guidelines | Pushes house rules into AI-assisted coding workflows, which is where a growing share of Laravel code is now authored |
The notable architectural characteristic is that the package is opinionated about vendor lifecycle, not just code correctness. That makes it a good complement to Rector (which performs the actual upgrade) — LaraBeacon signals when, Rector does what. It does not replace either dependency auditing (composer audit) or static analysis; treat findings as a partially overlapping third source.
Integration cost is low and well-bounded:
working-directory, profile, fail-on, baseline, sarif-file, upload-sarif and args, which covers monorepos (working-directory), incremental adoption (baseline) and phased enforcement (fail-on) without custom wrapper scripting.baseline is the key input for feasibility: it lets us adopt on a large existing codebase without a 400-finding wall on day one.The two non-trivial dependencies are GitHub code scanning permissions (security-events: write plus code scanning enabled for the repo — GitHub Advanced Security for private repos) and Laravel Boost being present for the guidelines/skill to land. Neither is heavy, but both need to be verified in a pilot rather than assumed.
Default-on failing checks in a minor release. The support-window checks run in the default and --profile=production scans and fail when a supported-but-near-EOL release is detected (Laravel 12, PHP 8.2 with the 180-day default). A team that installed LaraBeacon at 3.1 and auto-bumped to 3.2 can see a previously green command start failing with no code change. This is behaviourally a breaking change shipped under a patch/minor version. Mitigation is cheap — set support_warning_days, or use --profile=ci — but it must be documented, because the failure message will be misread as "our stack is insecure."
Semantic-version trust. Given the above, "expose to ^3.2" is not a safe consumption policy. Pin to an exact version and let Renovate/Dependabot open a PR, so the CI profile change is reviewed rather than absorbed silently.
Floating action tag. uses: A-Baer/LaraBeacon@v3 is a movable major tag on a third-party action that runs with repository token permissions. Pin to a commit SHA, per standard supply-chain hygiene, and review the action's code once before org-wide rollout.
Fork/PR token restrictions. SARIF upload requires security-events: write; on pull_request events from forks the token is read-only, so upload-sarif may fail or be skipped while the scan itself succeeds. Decide explicitly whether that is a hard failure or tolerated.
Commercial boundary and telemetry. Interactive runs now mention LaraBeacon Pro and link to self-service Cloud registration. The hints are correctly suppressed in CI, quiet, non-interactive and exported runs, so there is no pipeline noise — but we need a written answer on whether Cloud registration or Pro usage transmits source code, findings, or repo metadata off-network. Air-gapped or regulated repos may need the interactive hints and any network calls disabled outright.
Exit-status semantics. The action "keeps the scan's exit status," which is right. The open question is whether support-window failures are subject to fail-on severity gating — if not, fail-on: error may still fail the build on an EOL warning, which changes how we tune the gate.
Single-maintainer dependency. A-Baer/LaraBeacon is a small-vendor package. A dev-only tool is a low-blast-radius bet, but the CI gate becomes load-bearing once we enforce it — so we need a fallback path (run the artisan command directly, drop the SARIF upload) if maintenance stalls.
composer.json for 3.2.x, and what is the vendor's stated support policy for LaraBeacon itself?composer install? Does it need a Composer auth token for private packages in a monorepo?fail-on purposes?support_warning_days is committed and reviewable) or is it config/env only?Fit is good for a standard Laravel estate on GitHub Actions with Composer-based CI. Prerequisites to confirm in the pilot:
There is no prior install, so this is greenfield adoption rather than a migration. Treat it as a four-phase rollout rather than a switch-on:
| Phase | Scope | Configuration | Exit criteria |
|---|---|---|---|
| 0 — Evaluate | One representative repo, local only | Default install, no CI wiring; run with export, inspect SARIF by hand | Findings triaged; noise level judged acceptable |
| 1 — Observe | 2–3 repos, CI non-blocking | --profile=ci, upload-sarif: true, fail-on: none or continue-on-error |
SARIF appears in code scanning; upload works on PRs including forks, or the fork policy is decided |
| 2 — Baseline | All in-scope repos | Commit baseline, set support_warning_days per org policy (recommend 180 or higher, not lower) |
Alert count per repo is stable and owned by a named team |
| 3 — Enforce | Repos with stable baselines | fail-on set to the agreed severity; job becomes a required check |
Two weeks green with no bypasses, or documented bypass list |
Do not skip Phase 2. Enforcing without a baseline converts an existing backlog into a blocked release train on day one, and the predictable outcome is that someone disables the check.
composer.json; pin the Action to a SHA, not @v3.production profile — a deliberate, documented split we should mirror in our own conventions: CI mode for gating, default/production profile for periodic upgrade-readiness sweeps (e.g. a weekly scheduled job).php artisan boost:update must run after every LaraBeacon upgrade or the guidelines/skill go stale. That is a manual step today — put it in the developer bootstrap script and note it in the upgrade ticket template.permissions: security-events: write and contents: read explicitly to the workflow; don't rely on default token scopes.support_warning_days value, profile usage (CI vs. scheduled production scan), fail-on threshold, SHA pinning, fork-PR policy.Low, but not zero:
php artisan boost:update must follow each upgrade where Boost is used — automate it or it will be forgotten, and stale guidelines are worse than none because AI agents will follow them confidently.sarif-file input lets us decouple generation from upload if needed.support_warning_days is a tunable policy knob, and the resolution is either a scheduled upgrade or a documented, approved window extension.support_warning_days policy and the baseline files to a named owner (platform team), otherwise each repo forks its own policy.| Failure | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Default scan fails on a supported stack after minor bump | High | Red build, confusion | Pin exact version; set support_warning_days; use --profile=ci in PRs |
| SARIF upload denied (no GHAS on private repo, or fork PR) | Medium | Silent loss of findings | Pre-check licensing; decide whether fork PRs are continue-on-error |
| Action runs but finds no Composer deps (missing install/auth) | Medium | Empty or errored scan | Verify install step and Composer auth in pilot |
Floating @v3 tag moves unexpectedly |
Low | Unreviewed change in CI | SHA pin + Dependabot PR review |
| Stale Boost guidelines after upgrade | Medium | AI agents follow outdated rules | Put boost:update in bootstrap/upgrade checklist |
| Outbound call on Cloud registration in air-gapped env | Low | Policy violation | Confirm telemetry posture in writing before enabling |
| Gate disabled by frustrated team after unbaselined enforcement | Medium | Tool abandoned | Baseline before enforcing; named owner per repo |
| Vendor maintenance stalls | Low | Gate must be replaced | Fallback is running the artisan command directly and dropping SARIF upload |
fail-on gating, SARIF/permissions behaviour).Recommendation: adopt, but as a pinned dev dependency with a scheduled production-profile sweep and a SHA-pinned Action, not as an unpinned PR-blocking gate. The value in 3.2.0 is the upgrade-readiness signal and the SARIF/code-scanning bridge; the risk is a behaviour-changing minor and a floating Action tag, both of which are cheap to neutralise with pinning and a baseline before enforcement.
How can I help you explore Laravel packages today?