ci(actions): optimize main CI lanes#51912
Conversation
🔒 Aisle Security AnalysisWe found 2 potential security issue(s) in this PR:
1. 🟡 GitHub Action dependency not pinned to commit SHA (oven-sh/setup-bun)
DescriptionThe composite action
Vulnerable code: - name: Setup Bun
if: inputs.install-bun == 'true'
uses: oven-sh/setup-bun@v2.2.0RecommendationPin third-party actions to an immutable commit SHA, and keep the human-readable tag in a comment for maintenance. Example: - name: Setup Bun
if: inputs.install-bun == 'true'
# v2.2.0
uses: oven-sh/setup-bun@<40-char-commit-sha>
with:
bun-version: "1.3.9"Additionally:
2. 🔵 CI security regression: secret-scanning, workflow audit (zizmor), and dependency audit removed from GitHub Actions CI
DescriptionThe
With this job removed, these checks are no longer enforced on CI runs (push/PR). While the hooks still exist in Relevant removed CI block (from this change): secrets:
...
- name: Detect committed private keys
run: pre-commit run --all-files detect-private-key
- name: Audit changed GitHub workflows with zizmor
...
run: |
...
pre-commit run zizmor --files "${workflow_files[@]}"
- name: Audit production dependencies
run: pre-commit run --all-files pnpm-audit-prodNo equivalent checks appear elsewhere in the GitHub workflows after this change (search across RecommendationRe-introduce CI enforcement for these security checks (either restore the Example (restore a dedicated job): secrets:
if: github.event_name != 'pull_request' || !github.event.pull_request.draft
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install pre-commit
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit
- name: Detect committed private keys
run: pre-commit run --all-files detect-private-key
- name: Audit changed workflows with zizmor
env:
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
run: |
set -euo pipefail
mapfile -t workflow_files < <(git diff --name-only "${BASE_SHA}" HEAD -- '.github/workflows/*.yml' '.github/workflows/*.yaml')
[ ${#workflow_files[@]} -eq 0 ] || pre-commit run zizmor --files "${workflow_files[@]}"
- name: Audit production dependencies
run: pre-commit run --all-files pnpm-audit-prodAlso consider making Analyzed PR: #51912 at commit Last updated on: 2026-03-22T00:12:52Z |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bc46e01a48
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Greptile SummaryThis PR makes two targeted CI optimizations: bumps Key changes:
Confidence Score: 5/5
Last reviewed commit: "Merge branch 'main' ..." |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74ad0521ab
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 499c36a72f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - name: Test skill Python scripts | ||
| run: python -m pytest -q skills | ||
|
|
||
| secrets: | ||
| if: github.event_name != 'pull_request' || !github.event.pull_request.draft | ||
| runs-on: blacksmith-16vcpu-ubuntu-2404 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| submodules: false | ||
|
|
||
| - name: Ensure secrets base commit | ||
| uses: ./.github/actions/ensure-base-commit | ||
| with: | ||
| base-sha: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }} | ||
| fetch-ref: ${{ github.event_name == 'push' && github.ref_name || github.event.pull_request.base.ref }} | ||
|
|
||
| - name: Setup Node environment | ||
| uses: ./.github/actions/setup-node-env | ||
| with: | ||
| install-bun: "false" | ||
| use-sticky-disk: "false" | ||
| install-deps: "false" | ||
|
|
||
| - name: Setup Python | ||
| id: setup-python | ||
| uses: actions/setup-python@v6 | ||
| with: | ||
| python-version: "3.12" | ||
| cache: "pip" | ||
| cache-dependency-path: | | ||
| pyproject.toml | ||
| .pre-commit-config.yaml | ||
| .github/workflows/ci.yml | ||
|
|
||
| - name: Restore pre-commit cache | ||
| uses: actions/cache@v5 | ||
| with: | ||
| path: ~/.cache/pre-commit | ||
| key: pre-commit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
|
|
||
| - name: Install pre-commit | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| python -m pip install pre-commit | ||
|
|
||
| - name: Detect committed private keys | ||
| run: pre-commit run --all-files detect-private-key | ||
|
|
||
| - name: Audit changed GitHub workflows with zizmor | ||
| env: | ||
| BASE_SHA: ${{ github.event_name == 'push' && github.event.before || github.event.pull_request.base.sha }} | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||
| if [ -z "${BASE_SHA:-}" ] || [ "${BASE_SHA}" = "0000000000000000000000000000000000000000" ]; then | ||
| echo "No usable base SHA detected; skipping zizmor." | ||
| exit 0 | ||
| fi | ||
|
|
||
| if ! git cat-file -e "${BASE_SHA}^{commit}" 2>/dev/null; then | ||
| echo "Base SHA ${BASE_SHA} is unavailable; skipping zizmor." | ||
| exit 0 | ||
| fi | ||
|
|
||
| mapfile -t workflow_files < <( | ||
| git diff --name-only "${BASE_SHA}" HEAD -- '.github/workflows/*.yml' '.github/workflows/*.yaml' | ||
| ) | ||
| if [ "${#workflow_files[@]}" -eq 0 ]; then | ||
| echo "No workflow changes detected; skipping zizmor." | ||
| exit 0 | ||
| fi | ||
|
|
||
| printf 'Auditing workflow files:\n%s\n' "${workflow_files[@]}" | ||
| pre-commit run zizmor --files "${workflow_files[@]}" | ||
|
|
||
| - name: Audit production dependencies | ||
| run: pre-commit run --all-files pnpm-audit-prod | ||
|
|
||
| checks-windows: |
There was a problem hiding this comment.
Restore secret and dependency audit lane
Removing the secrets job drops all CI enforcement for detect-private-key, zizmor, and pnpm-audit-prod; after this commit, those checks are no longer run anywhere in .github/workflows (I checked workflow definitions), so PRs and pushes can merge with committed private keys, risky workflow changes, or vulnerable production dependencies that CI previously blocked. If the goal is to reduce runtime, this lane should be narrowed, not removed without an equivalent replacement.
Useful? React with 👍 / 👎.
* ci(actions): optimize main ci lanes * ci(actions): drop unused secrets lane * ci(actions): keep build-smoke on prs
* ci(actions): optimize main ci lanes * ci(actions): drop unused secrets lane * ci(actions): keep build-smoke on prs
* ci(actions): optimize main ci lanes * ci(actions): drop unused secrets lane * ci(actions): keep build-smoke on prs
* ci(actions): optimize main ci lanes * ci(actions): drop unused secrets lane * ci(actions): keep build-smoke on prs
* ci(actions): optimize main ci lanes * ci(actions): drop unused secrets lane * ci(actions): keep build-smoke on prs
Summary
mainCI is doing redundant work, the Bun lane emits a GitHub Actions Node 20 deprecation warning, and the legacysecretslane appears unused.mainpush lane is the Node 22 compatibility lane, the Bun setup warning becomes a reliability risk before the June 2, 2026 GitHub Actions cutoff, and an unused lane adds noise and maintenance surface.dist-buildartifact forbuild-smokeonpush, and removed thesecretsjob fromci.yml.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
None.
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation:Repro + Verification
Environment
Steps
mainCI run (23390388316) and identify the critical-path jobs..github/actions/setup-node-env/action.ymland.github/workflows/ci.ymlto remove the Bun deprecation warning, trim redundantmainwork, and drop the unusedsecretslane.Expected
mainCI keeps coverage, but the Node 22 lane becomes compatibility smoke instead of a second full Linux test run.build-smokereuses the existingdist-buildartifact onpushinstead of rebuilding it again.secretslane no longer runs.Actual
Evidence
Reference run analyzed: https://github.com/openclaw/openclaw/actions/runs/23390388316
Latest upstream Bun action release used: https://github.com/oven-sh/setup-bun/releases/tag/v2.2.0
Human Verification (required)
What you personally verified (not just CI), and how:
actionlinton.github/workflows/ci.yml;python3 scripts/check-composite-action-input-interpolation.py; reposcripts/committeron touched files.build-smokeonly downloads artifacts onpush, still builds locally on PRs;compat-node22still exercises build + CLI startup + release packaging surface under Node 22; removingsecretsleaves no downstreamneedsreferences.Review Conversations
Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoFailure Recovery (if this breaks)
.github/actions/setup-node-env/action.yml,.github/workflows/ci.ymlbuild-smokefailing to finddist-buildonpush, or a missing check that someone still expected from the removedsecretslane.Risks and Mitigations
pnpm testsuite on Node 22.build-smokeartifact reuse onpushcould drift from PR behavior.pnpm build; onlypushreuses the artifact already produced bybuild-artifacts.secretsjob still exists outside the workflow file.AI Assistance