Skip to content

fix: npm ci --ignore-scripts across all workflows#12

Merged
hjgraca merged 1 commit into
mainfrom
fix-npm-ci-ignore-scripts
Jun 26, 2026
Merged

fix: npm ci --ignore-scripts across all workflows#12
hjgraca merged 1 commit into
mainfrom
fix-npm-ci-ignore-scripts

Conversation

@hjgraca

@hjgraca hjgraca commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Why

SonarCloud flagged (on the powertools PR that vendors this example) that package-manager install scripts should not run during installation — dependency lifecycle scripts (preinstall/install/postinstall) execute arbitrary code from dependencies at install time, a supply-chain risk.

Change

Add --ignore-scripts to every runnable npm ci in the repo:

  • .github/workflows/ci.yml — repo CI (the required check)
  • .github/workflows/triage.yml — repo-root triage
  • examples/github-pr-label-actions/.github/workflows/pr-label-actions.yml — source-of-truth for the vendored copy shipped to consumers
  • examples/triage-github-actions/.github/workflows/triage.yml
  • examples/triage-jira-gitlab-runner/.gitlab-ci.yml — GitLab before_script
  • matching README YAML snippets kept in sync

README mermaid/prose mentions of "npm ci" (diagram labels, not commands) were left as-is.

Verification

  • Both GitHub-Actions examples: npm ci --ignore-scripts + tsc --noEmit + flue build --target node all clean.
  • The pr-label-actions agent also ran end-to-end with --ignore-scripts (skill activated, GitHub tools called, correct decision).
  • All workflow YAML + the GitLab CI file parse.

The same fix already shipped to the vendored copy in aws-powertools/powertools-lambda-dotnet#1229.

SonarCloud flagged that package-manager install scripts should not run during
installation — dependency lifecycle scripts (preinstall/install/postinstall) run
arbitrary code at install time. Add --ignore-scripts to every runnable npm ci:

  - .github/workflows/ci.yml, .github/workflows/triage.yml (repo CI + triage)
  - examples/github-pr-label-actions, triage-github-actions (Actions workflows)
  - examples/triage-jira-gitlab-runner/.gitlab-ci.yml (GitLab before_script)
  - matching README YAML snippets kept in sync

Verified both GitHub-Actions examples install + tsc + flue build (and the
pr-label-actions agent runs end-to-end) with --ignore-scripts.
@hjgraca hjgraca merged commit 36179c8 into main Jun 26, 2026
2 checks passed
@hjgraca hjgraca deleted the fix-npm-ci-ignore-scripts branch June 26, 2026 14:40
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