Copilot commented on code in PR #270:
URL: https://github.com/apache/skywalking-eyes/pull/270#discussion_r3057749992


##########
header/action.yml:
##########
@@ -54,4 +54,7 @@ runs:
     - shell: bash
       env:
         GITHUB_TOKEN: ${{ inputs.token }}
-      run: license-eye -v ${{ inputs.log }} -c ${{ inputs.config }} header ${{ 
inputs.mode }}
+        INPUTS_LOG: ${{ inputs.log }}
+        INPUTS_CONFIG: ${{ inputs.config }}
+        INPUTS_MODE: ${{ inputs.mode }}
+      run: license-eye -v ${INPUTS_LOG} -c ${INPUTS_CONFIG} header 
${INPUTS_MODE}

Review Comment:
   Passing inputs via env vars is a good step, but the bash expansion is 
currently unquoted. This still allows word-splitting/globbing (e.g., spaces 
creating extra args) which can become option/argument injection against 
`license-eye`. Quote the expanded variables (and consider using `--` to 
terminate options if the CLI supports it) so each input is passed as a single 
argument.
   ```suggestion
         run: license-eye -v "${INPUTS_LOG}" -c "${INPUTS_CONFIG}" header 
"${INPUTS_MODE}"
   ```



##########
header/action.yml:
##########
@@ -45,7 +45,7 @@ runs:
   using: composite
   steps:
     - name: Set up Go
-      uses: actions/setup-go@v6
+      uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
       with:
         go-version: 1.25

Review Comment:
   YAML numeric parsing can unintentionally coerce version strings (notably 
values like `1.10` becoming `1.1`). It’s safer to quote `go-version` values 
consistently (e.g., `\"1.25\"`) to ensure `setup-go` receives an exact string.
   ```suggestion
           go-version: "1.25"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to