fix(ci-cd): add ignore-scripts to avoid lifecycle execution - #25
Open
piyushsinghgaur1 wants to merge 2 commits into
Open
fix(ci-cd): add ignore-scripts to avoid lifecycle execution#25piyushsinghgaur1 wants to merge 2 commits into
piyushsinghgaur1 wants to merge 2 commits into
Conversation
add ignore-scripts to avoid lifecycle execution
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Addresses the SonarQube finding on the release workflow flagging npm lifecycle-script execution during the publish step.
npx semantic-release@25.0.5was resolving and running a package straight from the registry with lifecycle scripts enabled, which lets arbitrarypreinstall/postinstallcode from the dependency tree run inside the release job — a job that holdscontents: write,id-token: writeand the release GH PAT.Passing
--ignore-scriptsstops those lifecycle hooks from executing while still installing and runningsemantic-releaseitself, 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
How Has This Been Tested?
.github/workflows/release.yaml; no application/source code touched, so runtime behaviour and the published package are unaffected.npxflag and comment spacing.workflow_dispatchrun of the Release workflow, which publishes to npm — to be confirmed on the next real release.Checklist: