Skip to content

Commit bd03267

Browse files
Casmoclaude
andauthored
ci: fix the Security workflow (pin actions, dependabot cooldown, real security-check gate) (#279)
* chore(ci): pin GitHub Actions to commit SHAs across the monorepo Pin every `uses:` reference to a full commit SHA (with a version comment so Dependabot keeps them current) across the root workflows and all packages/*/.github workflows. Resolves the semgrep github-actions-mutable-action-tag findings. Applied with pinact. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(ci): add a 7-day Dependabot cooldown to every update entry Add `cooldown: { default-days: 7 }` to each ecosystem in every dependabot.yml across the monorepo (and normalise the one pre-existing cooldown to 7 days). Resolves the semgrep dependabot-missing-cooldown findings and delays pulling freshly-published (possibly compromised) releases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(security-check): treat empty $guarded as a warning, not a failure Backstage's 17 core models deliberately use `$guarded = []` because writes go through validated Filament admin forms, not raw request mass assignment. The security check flagged all of them as a high-severity failure — a false positive relative to the architecture. Split the mass-assignment check so empty $guarded is a medium warning while sensitive fields in $fillable remain a hard failure. Add a Pest test asserting `backstage:security-check --package-only` exits 0, and record the decision in ADR-0003. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(ci): pin actions pinact could not auto-resolve, add pinact config Three pint.yml refs pointed at non-existent tags (laravel-pint-action @latest / @2.4.0, git-auto-commit-action @v5.0) that pinact could not resolve; pin them to valid release SHAs by hand. Add .pinact.yaml so both the one-shot pin and the CI guard cover packages/*/.github workflows, not just the root. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci(security): gate on the security check, add an action-pinning guard The Backstage Security Check job never actually ran: this is a package repo with no `artisan` binary, and it passed a non-existent `--ci` flag, all masked by continue-on-error. Run it through the test harness instead (a Pest test that boots the full provider stack), mirroring the run-tests MySQL service + extensions + DB env, and drop continue-on-error so it genuinely gates CI. Add an Action Pinning job (pinact-action, fix disabled) that fails when any workflow reintroduces an unpinned action. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 14a89b0 commit bd03267

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434

3535
steps:
3636
- name: Checkout code
37-
uses: actions/checkout@v5
37+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
3838

3939
- name: Setup PHP
40-
uses: shivammathur/setup-php@v2
40+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
4141
with:
4242
php-version: ${{ matrix.php }}
4343
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo

.github/workflows/update-changelog.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ jobs:
1414

1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
1818
with:
1919
ref: main
2020

2121
- name: Update Changelog
22-
uses: stefanzweifel/changelog-updater-action@v1
22+
uses: stefanzweifel/changelog-updater-action@a938690fad7edf25368f37e43a1ed1b34303eb36 # v1.12.0
2323
with:
2424
latest-version: ${{ github.event.release.name }}
2525
release-notes: ${{ github.event.release.body }}
2626

2727
- name: Commit updated CHANGELOG
28-
uses: stefanzweifel/git-auto-commit-action@v7
28+
uses: stefanzweifel/git-auto-commit-action@4a55954c782fc1ea30b9056cd3e7a2b40ca8887d # v7.2.0
2929
with:
3030
branch: main
3131
commit_message: Update CHANGELOG

0 commit comments

Comments
 (0)