GITHUB_TOKEN not present in script set as ACTIONS_RUNNER_HOOK_JOB_STARTED
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
The env var GITHUB_TOKEN is not present in the context of the script set as ACTIONS_RUNNER_HOOK_JOB_STARTED.
Not sure if this has some security concern, but we would need a valid GITHUB_TOKEN during our pre-job script.
To Reproduce
Steps to reproduce the behavior:
- Create a simple bash script that run the command
envand set its path as env var forACTIONS_RUNNER_HOOK_JOB_STARTED - Trigger the workflow
- See there is no GITHUB_TOKEN available.
Expected behavior
The env var GITHUB_TOKEN should be present in the context of the script set as ACTIONS_RUNNER_HOOK_JOB_STARTED.
Runner Version and Platform
Version of your runner?
2.308.0
OS of the machine running the runner?
Linux Debian 11, Kubernetes (GKE) using actions-runner-controller.
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the ACTIONS_RUNNER_HOOK_JOB_STARTED behavior with the bash script that runs env, using runner version 2.308.0 on Linux. Trace how the pre-job hook environment is created and determine whether GITHUB_TOKEN can be exposed safely. Done means the expected token behavior is documented by a regression test or a confirmed security limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, github-actions
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100