Skip to content

fix: use env var indirection for boolean inputs (CMD_EXEC)#51

Open
nbuckwalt wants to merge 1 commit intojlumbroso:mainfrom
nbuckwalt:fix/cmd-exec-inputs-env-indirection
Open

fix: use env var indirection for boolean inputs (CMD_EXEC)#51
nbuckwalt wants to merge 1 commit intojlumbroso:mainfrom
nbuckwalt:fix/cmd-exec-inputs-env-indirection

Conversation

@nbuckwalt
Copy link
Copy Markdown

Security Fix: CMD_EXEC via direct input interpolation

Summary

7 boolean inputs are directly interpolated into the `run:` shell script via `${{ inputs.xxx }}` expressions:

  • `inputs.android`, `inputs.dotnet`, `inputs.haskell`, `inputs.large-packages`
  • `inputs.docker-images`, `inputs.tool-cache`, `inputs.swap-storage`

A caller passing `'; malicious_command; true` as any of these inputs would execute arbitrary shell code in any job using this action.

Fix

Map all 7 inputs to an `env:` block (`ANDROID`, `DOTNET`, `HASKELL`, `LARGE_PACKAGES`, `DOCKER_IMAGES`, `TOOL_CACHE`, `SWAP_STORAGE`) and reference the quoted env vars in the script. Behavior is identical.

References

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant