Skip to content

fix: pass GitHub event context via env vars in reusable workflows#87

Merged
crowecawcaw merged 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:fix-actions-script-injection
Jun 26, 2026
Merged

fix: pass GitHub event context via env vars in reusable workflows#87
crowecawcaw merged 1 commit into
aws-deadline:mainlinefrom
crowecawcaw:fix-actions-script-injection

Conversation

@crowecawcaw

Copy link
Copy Markdown

What was the problem/requirement? (What/Why)

Some github event data is interpolated into inline scripts.

What was the solution? (How)

Move github.event.* interpolations (pull_request.number, event.action, repository.name) out of inline run: scripts and into env: blocks so they are referenced as shell variables rather than templated into script text.

What is the impact of this change?

Avoids possibility of some script injections. Not really an issue for this particular use case, but can trip up security scanners.

How was this change tested?

Triggered an action that uses this mechanism in my fork: https://github.com/crowecawcaw/deadline-cloud.github/actions/runs/28263554472/job/83744704079

Was this change documented?

n/a

Is this a breaking change?

No

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@crowecawcaw
crowecawcaw requested a review from a team as a code owner June 26, 2026 20:36
Move github.event.* interpolations (pull_request.number, event.action,
repository.name) out of inline run: scripts and into env: blocks so they
are referenced as shell variables rather than templated into script text.

Resolves ACAT script-injection finding 540a0df3-f469-4f97-ad17-b1ed5d37023d
(Bea-57529). These values are GitHub-controlled and structurally constrained,
so this is defense-in-depth, but it clears the scanner pattern permanently.

Signed-off-by: Stephen Crowe <6042774+crowecawcaw@users.noreply.github.com>
@crowecawcaw
crowecawcaw force-pushed the fix-actions-script-injection branch from 7ab2acb to 0b2927d Compare June 26, 2026 20:37
@crowecawcaw
crowecawcaw merged commit b200c75 into aws-deadline:mainline Jun 26, 2026
4 checks passed
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.

2 participants