Skip to content

fix(ci-cd): add ignore-scripts to avoid lifecycle execution - #25

Open
piyushsinghgaur1 wants to merge 2 commits into
masterfrom
fix/sonar
Open

fix(ci-cd): add ignore-scripts to avoid lifecycle execution#25
piyushsinghgaur1 wants to merge 2 commits into
masterfrom
fix/sonar

Conversation

@piyushsinghgaur1

Copy link
Copy Markdown
Contributor

Description

Addresses the SonarQube finding on the release workflow flagging npm lifecycle-script execution during the publish step. npx semantic-release@25.0.5 was resolving and running a package straight from the registry with lifecycle scripts enabled, which lets arbitrary preinstall/postinstall code from the dependency tree run inside the release job — a job that holds contents: write, id-token: write and the release GH PAT.

Passing --ignore-scripts stops those lifecycle hooks from executing while still installing and running semantic-release itself, closing the hotspot without changing release behaviour.

Also normalised the inline-comment spacing in the same file so it matches the repo's YAML formatting.

Fixes # (sonar hotspot on .github/workflows/release.yaml)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Change is scoped to .github/workflows/release.yaml; no application/source code touched, so runtime behaviour and the published package are unaffected.
  • YAML parses and the workflow structure is unchanged apart from the npx flag and comment spacing.
  • End-to-end verification requires a workflow_dispatch run of the Release workflow, which publishes to npm — to be confirmed on the next real release.

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine (unchanged — no source files modified)
  • New tests added or existing tests modified to cover all changes (n/a — CI workflow change)
  • Code conforms with the style guide
  • API Documentation in code was updated (n/a)
  • Any dependent changes have been merged and published in downstream modules

@sonarqubecloud

sonarqubecloud Bot commented Sep 9, 2026

Copy link
Copy Markdown

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