Skip to content

ci: enforce workflow security checks - #456

Merged
nickolas-dimitrakas merged 1 commit into
mainfrom
refactor/zizmor-continue-on-error-plan
Oct 21, 2026
Merged

nickolas-dimitrakas merged 1 commit into
mainfrom
refactor/zizmor-continue-on-error-plan

Conversation

@thomson-t

Copy link
Copy Markdown
Contributor

Why

Workflow security findings are currently reported without failing the check, so an insecure change can still receive a successful result. This change resolves the existing findings and makes the check fail when new findings appear.

Programme

Standalone change, no programme.

What changes

  • Pin workflow dependencies to commits and limit credentials and token permissions.
  • Add a seven-day cooldown for dependency updates and scan changes to their configuration.
  • Remove the disabled dependency automerge workflow, its unused artifact producer, and the unused code-analysis workflow. Retain the shared linter update workflow.
  • Make the workflow security scan fail on findings, with no ignored rules.

No documentation, changelog or runbook update is needed because library behavior is unchanged.

Linked work

None.

Rollout

Nothing changes in production; if this is wrong, revert the pull request.

Risks

  • New security findings can fail workflow changes; the current scan has no findings; failures appear in pull request checks.
  • Ordinary dependency updates arrive later; the configured cooldown is seven days; dependency pull requests show the update cadence.
  • Reduced permissions could block automation; required permissions are retained on the jobs that use them; build, release or update runs would report access errors.
  • The existing updater token handoff may fail; not addressed because shared updater authentication is outside this cleanup; scheduled update runs would report authentication errors.

Risk class: low.

Who

Written by: pull request author, following the requested workflow security cleanup.
Code reviewed before opening: no maintainer review yet.
Design reviewed before opening: the requester confirmed the scope on 21 October 2026; no public review record.
Decision this implements: the agreed workflow security cleanup, 21 October 2026; no public decision record.
Checked: workflow security scan, static checks and 39 JavaScript tests on 21 October 2026.
Not checked: native builds, left to the existing continuous integration jobs; live release and update runs were not dispatched.

Size

Hand-written: 131 changed lines across 7 files (62 added, 69 removed).
Generated: none.

Notes for reviewers
  • Online zizmor 1.31.1 with --no-ignores: zero findings.
  • trunk check --no-fix --ci --index: passed, including Actionlint.
  • yarn test --runInBand: 8 suites and 39 tests passed, followed by ESLint.
  • Simulator output is passed through an environment variable instead of being interpolated into the shell command.
  • The existing required build check names are preserved.

Resolve existing workflow security findings before making the scan fail
on new findings. Pin action references, restrict token permissions and
checkout credentials, and add a seven-day dependency update cooldown.

Remove unused dependency automerge and code-analysis workflows while
retaining the shared linter update workflow.

#agentic
@thomson-t
thomson-t requested a review from a team as a code owner October 21, 2026 15:00
Copilot AI balanced review requested due to automatic review settings October 21, 2026 15:00

@claude claude Bot 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.

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Besides the inline findings, I checked two other things. Dropping release-draft.yml to contents: read doesn't break it, because every write there goes through the App token passed to create-pull-request. Moving the simulator UDID into SIMULATOR_UDID keeps the same -destination value, now safely quoted.

Extended reasoning...

Only GitHub Actions config changed. The change pins actions to SHAs, narrows token permissions, deletes the dependabot-automerge and sonarcloud workflows, and makes zizmor a blocking check. In release-draft.yml, checkout uses persist-credentials: false and the only write step authenticates with the generated App token, so the default GITHUB_TOKEN never needs write scope.

Comment thread .github/workflows/zizmor.yml
Comment thread .github/workflows/trunk-upgrade.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Inaccessible shared workflow definitions leave compatibility with reduced token permissions unverified.

No open issues 🎉

What changed in this PR

Hardens CI workflows and makes workflow security findings fail checks without changing library behavior.

Changes:

  • Pins workflow dependencies and narrows credential and token access.
  • Adds seven-day dependency update cooldowns and scans Dependabot configuration changes.
  • Removes unused workflows and enables blocking security checks.
File Description
.github/​workflows/​zizmor.yml Makes findings blocking and scans Dependabot configuration changes.
.github/​workflows/​trunk-upgrade.yml Pins the shared updater and scopes permissions.
.github/​workflows/​sonarcloud.yml Removes unused code-analysis workflow.
.github/​workflows/​release-draft.yml Pins changelog action and reduces default permissions.
.github/​workflows/​pull-request.yml Hardens actions, credentials, permissions, and simulator input handling.
.github/​workflows/​dependabot-automerge.yml Removes disabled automerge workflow.
.github/​dependabot.yml Adds seven-day update cooldowns.

Review effort: Balanced

@nickolas-dimitrakas
nickolas-dimitrakas merged commit 79d92f0 into main Oct 21, 2026
13 checks passed
@nickolas-dimitrakas
nickolas-dimitrakas deleted the refactor/zizmor-continue-on-error-plan branch October 21, 2026 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants