File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ set -euo pipefail
1111: " ${COMMIT_HASH:? COMMIT_HASH environment variable must be set} "
1212: " ${GH_REF_NAME:? GH_REF_NAME environment variable must be set} "
1313
14- # Additional validation for semver format (defense in depth)
14+ # Additional validation for semver format
1515if ! [[ " ${SEMVER:- } " =~ ^[0-9]+\. [0-9]+\. [0-9]+$ ]]; then
1616 echo " Error: SEMVER must be numeric X.Y.Z format, got: ${SEMVER:- <empty>} " >&2
1717 exit 1
1818fi
1919
2020METAMASK_WORKFLOW=" pr_rc_rwy_pipeline"
2121
22- # Use jq to safely construct JSON payload to prevent injection attacks
22+ # Use jq to safely construct JSON payload
2323JSON_PAYLOAD=$( jq -n \
2424 --arg branch " $GH_REF_NAME " \
2525 --arg pipeline_id " $METAMASK_WORKFLOW " \
Original file line number Diff line number Diff line change @@ -30,14 +30,13 @@ jobs:
3030 exit 1
3131 fi
3232
33- # Validate branch name doesn't contain dangerous characters
3433 BRANCH_NAME="release/${SEMVER}"
3534 if [[ "$BRANCH_NAME" =~ [^a-zA-Z0-9._/-] ]]; then
3635 echo "Error: semver contains invalid characters for branch name" >&2
3736 exit 1
3837 fi
3938
40- echo "✅ Semver validation passed: ${SEMVER}"
39+ echo "Semver validation passed: ${SEMVER}"
4140 echo "Branch name: ${BRANCH_NAME}"
4241
4342 bump-version :
You can’t perform that action at this time.
0 commit comments