Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches: [main]
pull_request:
# Lets release/sea/mirror-github-packages be re-run by hand against the current release when the automatic push-triggered run never dispatched (e.g. a GitHub Actions scheduling outage) or partially failed — no new commit needed.
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -85,7 +87,7 @@ jobs:

release:
needs: verify
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -132,7 +134,7 @@ jobs:

sea:
needs: release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -224,7 +226,7 @@ jobs:
mirror-github-packages:
name: Mirror to GitHub Packages
needs: release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛡️ Codex Security Review · Automatically triggered

P1 Badge Security: Bind manual mirrors to a main-derived release

If a collaborator can create the latest release and dispatch main, this condition now lets them invoke the mirror without landing a commit. The job then resolves that mutable release, checks out its tag, and runs tag-controlled install/build code while NODE_AUTH_TOKEN has packages: write; release-derived values are also interpolated into shell. The collaborator can publish a malicious GitHub Packages version or exfiltrate the token, bypassing main review. Bind downstream jobs to a release output verified as an ancestor of main, pass values through env, and expose the token only at publish.

Useful? React with 👍 / 👎.

runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
Expand Down
Loading