Skip to content

Harden reusable workflows: pass event context via env vars - #3

Merged
jariy17 merged 1 commit into
mainfrom
harden-actions-event-context
Sep 9, 2026
Merged

Harden reusable workflows: pass event context via env vars#3
jariy17 merged 1 commit into
mainfrom
harden-actions-event-context

Conversation

@jariy17

@jariy17 jariy17 commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

What

Bind github.event.* values to step-level env: variables and reference them as shell variables, instead of interpolating the expressions directly into run: scripts.

  • reusable-strands-command.yml — Enforce authorization step
  • reusable-pr-security-review.yml — Resolve subject step

Why

Referencing event context through env vars is the safer, more predictable pattern for shell steps and is already the convention used elsewhere in these workflows (e.g. reusable-slack-issue-notification.yml). This makes the two remaining steps consistent with it.

Notes

Behavior is unchanged — same values, same control flow. Callers pin these reusables by commit SHA, so consumer repos pick this up when they bump their pinned SHA.

Bind github.event.* values to step-level env vars and reference them as
shell variables instead of interpolating expressions directly into run
scripts. Matches the env-binding convention already used elsewhere in
these workflows (e.g. reusable-slack-issue-notification.yml).
@jariy17
jariy17 requested a review from a team September 9, 2026 20:16

@aidandaly24 aidandaly24 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jariy17
jariy17 merged commit 51d084b into main Sep 9, 2026
1 check passed
@jariy17
jariy17 deleted the harden-actions-event-context branch September 9, 2026 20:23
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