Skip to content

[VUL-575] Command Injection vulnerability in Scalingo/actions go-linter/action.yml - due 25/07/2026 #71

Description

@yanjost

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.

  1. 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 }}.
  2. 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):

  • go-linter/action.yml:56

SLA

  • Severity: HIGH
  • Treatment due date: 2026-07-25

Impact

Expected behavior

Required changes

Acceptance criteria

  • The vulnerability described above is no longer exploitable
  • The fix is covered by automated tests
  • No regression in related functionality

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions