Skip to content

Sync Dependabot action pin comments via reusable workflow - #51

Merged
jeremy merged 4 commits into
mainfrom
ci/dependabot-sync-actions-comments
Jul 27, 2026
Merged

Sync Dependabot action pin comments via reusable workflow#51
jeremy merged 4 commits into
mainfrom
ci/dependabot-sync-actions-comments

Conversation

@jeremy

@jeremy jeremy commented Jul 27, 2026

Copy link
Copy Markdown
Member

Thin caller for the dependabot-sync-actions-comments reusable workflow (basecamp/.github#8, merged as 95a9f7a2). After CI completes on a Dependabot github_actions branch, trusted default-branch code fixes any stale # vX.Y.Z pin comments — including compound ones with trailing # zizmor: ignore[...] annotations that Dependabot can't rewrite — and pushes back behind a compare-and-swap lease.

Security model (openclaw-basecamp lineage, hardened after basecamp-sdk#458 review): the Dependabot head branch is fetched as data and never executed; the push uses a write deploy key scoped to this repo's dependabot-sync environment, whose deployment branch policy allows only the default branch (App tokens can't push workflow-file changes at all). Environment + deploy key are already provisioned.

Two catch-up commits clear latent failures this PR's CI surfaced (the repo has been dormant, and both gates depend on external state that moved since CI last ran):

  • seed workflow pin commentsref-version-mismatch is an online audit; upstream tag moves left 33 stale version comments in seed/.github/workflows/. Fixed via zizmor --fix=all, with the two # zizmor: ignore[cache-poisoning] annotations its fixer clobbers restored by hand. Seed templates stay manually maintained; the sync workflow covers only .github/workflows/.
  • golang.org/x/sys v0.27.0 → v0.44.0 — clears CVE-2026-39824 flagged by the Trivy gate (indirect dep; go build ./... verified).

Runtime validation: after merge, a workflow_dispatch run against a live Dependabot actions branch (basecamp-cli#566 is the standing candidate for the fleet) proves the full fix→guard→push→re-CI loop.

Sibling callers: basecamp-sdk#459, basecamp-cli#572, hey-cli#141, fizzy-cli#189.

Thin caller for basecamp/.github's dependabot-sync-actions-comments
reusable workflow (basecamp/.github#8): after CI completes on a
Dependabot github_actions branch, trusted default-branch code fixes any
stale pin version comments and pushes back behind a compare-and-swap
lease, using the write deploy key scoped to this repo's dependabot-sync
environment (deployment branches: default branch only).
Copilot AI review requested due to automatic review settings July 27, 2026 20:07
@github-actions github-actions Bot added the ci label Jul 27, 2026
@github-actions

Copy link
Copy Markdown

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .github/workflows/dependabot-sync-actions-comments.yml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a thin GitHub Actions workflow in this repo to call the SHA-pinned basecamp/.github reusable workflow that syncs stale Dependabot action pin comments after CI completes (and supports a manual workflow_dispatch path).

Changes:

  • Introduce dependabot-sync-actions-comments workflow triggered via workflow_run on Test and via workflow_dispatch.
  • Gate execution to Dependabot dependabot/github_actions/* branches and delegate all logic to the reusable workflow pinned at 95a9f7a2….
  • Apply least-privilege defaults (permissions: {}) with scoped job permissions and secrets: inherit to allow the environment-scoped deploy key to flow to the called workflow.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/dependabot-sync-actions-comments.yml Outdated
jeremy added 2 commits July 27, 2026 13:13
One-time catch-up: the ref-version-mismatch audit is online, so upstream
tag moves since the last CI run left 33 stale version comments in the
seed templates (zizmor --fix=all, with the two cache-poisoning ignore
annotations it clobbers restored by hand). Seed templates stay manually
maintained; the new sync workflow covers only .github/workflows.
Clears CVE-2026-39824 (integer overflow in NewNTUnicodeString,
golang.org/x/sys/windows) flagged by the Trivy gate. Indirect
dependency; go build ./... verified.
Copilot AI review requested due to automatic review settings July 27, 2026 20:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/dependabot-sync-actions-comments.yml:13

  • The job-level if: doesn’t prevent this workflow from being triggered on every Test completion; it will still create a skipped workflow run for non-Dependabot branches. If the goal is to avoid noisy skipped runs, add a branches: filter under on.workflow_run so the workflow isn’t triggered at all for other branches (you can keep the job if as a safety net for workflow_dispatch).
on:
  workflow_run: # zizmor: ignore[dangerous-triggers] -- only the SHA-pinned reusable workflow (reviewed default-branch code) executes; the Dependabot head branch is fetched as data, never executed
    workflows: [Test]
    types: [completed]
  workflow_dispatch:

Comment thread .github/workflows/dependabot-sync-actions-comments.yml
Review feedback: the job-level if only skips the job after the run is
created; a trigger-level branches filter stops runs from being created
for non-Dependabot branches at all. The if stays as defense-in-depth.
Copilot AI review requested due to automatic review settings July 27, 2026 20:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

.github/workflows/dependabot-sync-actions-comments.yml:40

  • ${{ inputs.* }} context is only available for workflow_dispatch/workflow_call. Because this workflow is primarily triggered by workflow_run, these expressions will error with Unrecognized named-value: 'inputs' when the workflow_run path executes, preventing the sync job from running.
      branch: ${{ inputs.branch || '' }}
      e2e: ${{ inputs.e2e || false }}

@jeremy
jeremy merged commit dbee1ea into main Jul 27, 2026
23 checks passed
@jeremy
jeremy deleted the ci/dependabot-sync-actions-comments branch July 27, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci deps enhancement New feature or request seed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants