cisagov / cisagov/skeleton-docker

Possible run-shell-injection

Open
#180 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
22
Forks
14
Avg merge
1d 18h
Merged PRs (30d)
4

Description

Hi Team, one comment, possible run-shell-injection severity high at `.github/workflows/build.yml` line 187. Using variable interpolation with GitHub context data in a run: step could allow an attacker to inject their own code into the runner. GitHub context data can have user input and should be treated as untrusted. Alternatively, you can use an intermediate environment variable with env: to store the data and use the environment variable in the run: script. Also, be sure to use double-quotes with the environment variable, like: `"$ENVVAR"`.

_Originally posted by @dv4harr10 in https://github.com/cisagov/client-cert-update/issues/53#issuecomment-1819409062_

Contributor guide

Open the contributing guide

Research direction

Open .github/workflows/build.yml and inspect the run: step at line 187, focusing on GitHub context data used in the shell command. Replace direct interpolation with the issue’s suggested env: approach and ensure the environment variable is quoted. Done means untrusted context is no longer interpolated directly while the workflow remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, shell, yaml
Domain
ci-cd, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.