-
Notifications
You must be signed in to change notification settings - Fork 58
ci: build release SDKs and NPM packages on self-hosted runners #4562
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PastaPastaPasta
wants to merge
4
commits into
dashpay:v4.2-dev
Choose a base branch
from
PastaPastaPasta:ci/release-sdks-on-self-hosted
base: v4.2-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+277
−111
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
00f4071
ci: build SDK release artifacts on self-hosted runners
PastaPastaPasta b7fc7a0
ci: build npm release packages on self-hosted runner
PastaPastaPasta 18d9cb6
ci: add npm release build dry run
PastaPastaPasta f9723d3
fix(ci): dispatch npm dry run before merge
PastaPastaPasta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: dashpay/platform
Length of output: 30411
🌐 Web query:
actions/checkout v4 clean false existing .git post-checkout hook git checkout behavior💡 Result:
In
actions/checkoutv4, theclean: falseinput instructs the action to skip thegit clean -ffdx && git reset --hard HEADcommand that normally runs before fetching [1][2]. This setting does not affect the standard operation of subsequentgit checkoutorgit switchoperations initiated by the action [3]. Regardingpost-checkouthooks: 1. Triggering: Thepost-checkouthook is natively triggered by Git whenever agit checkoutorgit switchcommand successfully updates the working tree [4]. Ifactions/checkoutperforms a checkout operation, any correctly configured and executablepost-checkouthook present in the repository's.git/hooksdirectory will be executed by Git [4]. 2. Behavior with existing.git: If you are usingclean: falsewith an existing.gitdirectory, the action will still attempt to prepare the repository for the requested ref [3]. If this process involves a Git command that updates the working tree (e.g.,git checkoutorgit fetchfollowed by a reset/switch), thepost-checkouthook will execute as per standard Git behavior [4]. 3. Execution Context: Note that GitHub Actions runners often have specific environment configurations. Ensure that your hook script is executable (e.g.,chmod +x .git/hooks/post-checkout) and that its dependencies (like interpreters or path variables) are available within the runner's environment, as Git hooks do not automatically inherit the full environment of the CI job. In summary,clean: falsesimply prevents the action from proactively wiping your directory, but it does not disable Git's internal hook mechanisms. If the action's internal logic performs a checkout that triggers the hook, the hook will run [4].Citations:
Other (CWE-269): Improper Privilege Management
Reachability: Internal · Exploitability: Moderate
Remove persisted Git metadata before the credentialed checkout.
clean: falsepreserves.git/hookson both persistent self-hosted runners. A pull request job can leave an executablepost-checkouthook in the workspace.actions/checkoutcan trigger that hook with the release job token before the later cleanup step. Delete.gitbefore checkout, or use a fresh worktree outside the persistent cache path. Do not rely only onpersist-credentials: false.🧰 Tools
🪛 zizmor (1.29.0)
[warning] 150-161: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
📍 Affects 2 files
.github/workflows/release-kotlin-sdk.yml#L157-L157(this comment).github/workflows/release-swift-sdk.yml#L111-L111🤖 Prompt for AI Agents