runner icon indicating copy to clipboard operation
runner copied to clipboard

[BUG] Composite actions should be provisioned with `ACTIONS_RUNTIME_TOKEN` just like the node and docker ones

Open webknjaz opened this issue 2 years ago • 6 comments

Currently, ACTIONS_RUNTIME_TOKEN is exposed to nodejs and docker action types, but not the composite ones. So accessing it is rather limited to 2/3 types of the action types. It's not a private implementation detail and GitHub's own docs even show accessing it through the normal JS env var interface (process.env): https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers#requesting-the-jwt-using-environment-variables. There's also no recommendations not to use it, it's rather undocumented that it's surprisingly inaccessible from within non-actions and composite actions.

Which is why I think it's actually a bug that got overlooked, unintentionally vendor-locking the action authors to docker or nodejs. It shouldn't be like this so I'm filing this issue to ask this (and related) env vars to be exposed to all action types equally.

The other action implementations set the env var like this:

  • nodejs: https://github.com/actions/runner/blob/9e3e57ff90c089641a3a5833c2211841da1a37f8/src/Runner.Worker/Handlers/NodeScriptActionHandler.cs#L56
  • container: https://github.com/actions/runner/blob/9e3e57ff90c089641a3a5833c2211841da1a37f8/src/Runner.Worker/Handlers/ContainerActionHandler.cs#L221

webknjaz avatar Dec 17 '23 23:12 webknjaz

This issue is stale because it has been open 365 days with no activity. Remove stale label or comment or this will be closed in 15 days.

github-actions[bot] avatar Dec 23 '24 00:12 github-actions[bot]

unstale

webknjaz avatar Dec 23 '24 02:12 webknjaz

unstale

iamstarkov avatar Sep 09 '25 09:09 iamstarkov

unstale

webknjaz avatar Sep 09 '25 11:09 webknjaz

unstale

gagansuie avatar Nov 13 '25 15:11 gagansuie

If someone else stumbles upon this bug before it's resolved, as I did, I found that using this action exposes the variable to other workflow steps and helps work around it.

jeduardo avatar Jan 01 '26 22:01 jeduardo