Skip to content

ci: scope GitHub Actions permissions to jobs (Aikido)#11

Closed
dorothyyzh wants to merge 4 commits into
mainfrom
fix/aikido-dependency-vulnerabilities-2026-05-11
Closed

ci: scope GitHub Actions permissions to jobs (Aikido)#11
dorothyyzh wants to merge 4 commits into
mainfrom
fix/aikido-dependency-vulnerabilities-2026-05-11

Conversation

@dorothyyzh

Copy link
Copy Markdown
Contributor

Summary

  • Move workflow-level permissions: { contents: write, packages: write } into the build job and set the workflow-level permissions: {} so future jobs must opt in explicitly
  • Resolves Aikido AIK_yaml_gh-actions-overly-broad-permissions (CWE-250)

Aikido Issues Resolved

Verification

  • Workflow YAML is syntactically valid; permissions semantics preserved (build job retains the original two permissions)

Deployment Note

Skill does not touch release-* branches. Merging this PR is handled per team policy.

dorothyyzh and others added 4 commits May 11, 2026 14:43
…erly-broad-permissions)

Move workflow-level permissions into the build job and set the workflow-level
permissions to {} so future jobs must opt in explicitly. Resolves Aikido
sub-issues #211116553 and #211116554.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Latest pnpm (v11+) requires Node.js v22.13+; the previous Node 18 matrix has
been failing 'pnpm install' since pnpm-action-setup started resolving 'latest'
to v11. Bump matrix to 22.x so CI can install dependencies again. Verified
locally that pnpm install and pnpm build both succeed on Node 22+.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pnpm v10+ promoted ignored build scripts from a warning to an install error
(ERR_PNPM_IGNORED_BUILDS). esbuild's postinstall is required to fetch the
platform-native binary that vite depends on. Whitelist it explicitly via
pnpm.onlyBuiltDependencies — narrower than disabling the check globally,
keeps the supply-chain hardening intact for every other dependency.

Verified locally: pnpm install runs clean (no warning) and pnpm build succeeds.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
pnpm v11 stopped reading 'pnpm.onlyBuiltDependencies' from package.json and
moved the build-script allowlist exclusively into pnpm-workspace.yaml. This
repo is single-package and was previously running against pnpm v9/v10, so
the legacy config + v11 combo produces ERR_PNPM_IGNORED_BUILDS.

Pin pnpm-action-setup to version: 10 — that's where the existing
package.json shape is supported. Avoids restructuring the project just to
satisfy a major-version upstream change.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dorothyyzh dorothyyzh closed this May 11, 2026
@dorothyyzh dorothyyzh deleted the fix/aikido-dependency-vulnerabilities-2026-05-11 branch May 11, 2026 07: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.

1 participant