Interpolating inputs.artifact_name directly into the shell script is unsafe as it allows for potential command injection. By using an intermediate environment variable, the value is handled as data rather than executable code during shell expansion.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1094
**Author:** [@RinZ27](https://github.com/RinZ27)
**Created:** 1/1/2026
**Status:** ✅ Merged
**Merged:** 1/2/2026
**Merged by:** [@profvjreddi](https://github.com/profvjreddi)
**Base:** `main` ← **Head:** `security/fix-shell-injection`
---
### 📝 Commits (1)
- [`19bc61e`](https://github.com/harvard-edge/cs249r_book/commit/19bc61ee4e90f98f73936f62cf5554dd0a94e963) Security: mitigate shell injection in build workflow
### 📊 Changes
**1 file changed** (+4 additions, -3 deletions)
<details>
<summary>View changed files</summary>
📝 `.github/workflows/book-build-baremetal.yml` (+4 -3)
</details>
### 📄 Description
Move artifact name evaluation to `env` context.
Interpolating `inputs.artifact_name` directly into the shell script is unsafe as it allows for potential command injection. By using an intermediate environment variable, the value is handled as data rather than executable code during shell expansion.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1094
Author: @RinZ27
Created: 1/1/2026
Status: ✅ Merged
Merged: 1/2/2026
Merged by: @profvjreddi
Base:
main← Head:security/fix-shell-injection📝 Commits (1)
19bc61eSecurity: mitigate shell injection in build workflow📊 Changes
1 file changed (+4 additions, -3 deletions)
View changed files
📝
.github/workflows/book-build-baremetal.yml(+4 -3)📄 Description
Move artifact name evaluation to
envcontext.Interpolating
inputs.artifact_namedirectly into the shell script is unsafe as it allows for potential command injection. By using an intermediate environment variable, the value is handled as data rather than executable code during shell expansion.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.