Context
⚠️ AI finding (Semgrep). Composite action: impact depends on how callers pass the working-directory input. Currently hardcoded in Scalingo workflows — risk is low in practice.
Vulnerable code in go-linter/action.yml:56
Using variable interpolation ${{...}} with github context data in a run: step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. github context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".
Severity: High
Semgrep Assistant (AI) recommends the following fix:
Move the GitHub Actions input out of the run command and into an environment variable, then reference the variable in double quotes in the run step.
- Move the
${{ inputs.working-directory }} expression out of the run: command and into an environment variable by adding or updating env: for this step, like WORKING_DIRECTORY: ${{ inputs.working-directory }}.
- Change the
run: line to reference the environment variable inside double quotes: cp ${GITHUB_ACTION_PATH}/golangci.yml "$WORKING_DIRECTORY/.golangci.yml".
Using an environment variable in double quotes protects against command injection if the input contains spaces or special characters.
References:
Affected file(s):
SLA
- Severity:
HIGH
- Treatment due date:
2026-07-25
Impact
Expected behavior
Required changes
Acceptance criteria
References
Context
Vulnerable code in go-linter/action.yml:56
Using variable interpolation
${{...}}withgithubcontext data in arun:step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code.githubcontext data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable withenv:to store the data and use the environment variable in therun:script. Be sure to use double-quotes the environment variable, like this: "$ENVVAR".Severity: High
Semgrep Assistant (AI) recommends the following fix:
Move the GitHub Actions input out of the run command and into an environment variable, then reference the variable in double quotes in the run step.
${{ inputs.working-directory }}expression out of therun:command and into an environment variable by adding or updatingenv:for this step, likeWORKING_DIRECTORY: ${{ inputs.working-directory }}.run:line to reference the environment variable inside double quotes:cp ${GITHUB_ACTION_PATH}/golangci.yml "$WORKING_DIRECTORY/.golangci.yml".Using an environment variable in double quotes protects against command injection if the input contains spaces or special characters.
References:
Affected file(s):
go-linter/action.yml:56SLA
HIGH2026-07-25Impact
Expected behavior
Required changes
Acceptance criteria
References