You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds pull-requests: read permission to the tests.yaml workflow
The "Check async/await compliance in diff" step now checks whether the current branch's open PR carries the skip-async-migration label before running check-diff-async
If the label is present the step exits cleanly; otherwise the check runs as before
Behaviour
Scenario
Result
PR has skip-async-migration label
Step skips, exits 0
PR does not have the label
check-diff-async runs normally
No open PR (direct push / workflow_dispatch)
check-diff-async runs normally
Pre-requisite
The skip-async-migration label must be created in the repository settings before use.
"after each" hook for "should fail if trying to overwrite a delete marker"::MPU with x-scal-s3-version-id header With v4 signature "after each" hook for "should fail if trying to overwrite a delete marker"
The reason will be displayed to describe this comment to others. Learn more.
${{ github.ref_name }} is user-controlled (the branch name) and interpolated directly into a run: script, which is a script injection vector. The practical risk here is low since the workflow triggers on push (attacker already has write access) and permissions are read-only, but the standard hardening is to pass it through an env var instead of inline interpolation.
```suggestion
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: ${{ github.ref_name }}
run: |
if gh pr list --head "$BRANCH_NAME" --state open --json labels
--jq '.[].labels[].name' 2>/dev/null | grep -qx 'skip-async-migration'; then
echo "Skipping async/await check: 'skip-async-migration' label found"
else
yarn run check-diff-async
fi
Script injection: ${{ github.ref_name }} is interpolated directly into a run: block. Pass it through an env var instead for defense-in-depth.
Review by Claude Code
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
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.
Summary
pull-requests: readpermission to thetests.yamlworkflowskip-async-migrationlabel before runningcheck-diff-asyncBehaviour
skip-async-migrationlabelcheck-diff-asyncruns normallyworkflow_dispatch)check-diff-asyncruns normallyPre-requisite
The
skip-async-migrationlabel must be created in the repository settings before use.Closes CLDSRV-926