You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9251d21
Browse filesBrowse the repository at this point in the historyBrowse files
Actions: ActorIfCheck should not protect events that do not populate the checked field
A condition like 'github.event.pull_request.user.login != ...' on a
workflow triggered by issues events is always true since
github.event.pull_request is not populated for issues events, but
ActorIfCheck still treated it as a protective check, suppressing
alerts such as actions/code-injection/critical.
Override protectsCategoryAndEvent in ActorIfCheck so that checks on
event payload fields only protect events whose payload contains the
corresponding context, using contextTriggerDataModel as the mapping.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 4084febb-f9c7-44df-baf3-c8be8e9932a7
* Altered the logic of `ActorIfCheck` so that checks on actor fields read from the event payload (e.g. `github.event.pull_request.user.login`) only count as protection for events whose payload actually populates that field. Previously, a condition such as `github.event.pull_request.user.login != 'name'` on a workflow triggered by `issues` events was treated as a protective check even though `github.event.pull_request` is not populated for `issues` events, which makes the condition vacuous. This change will result in more results being found by the queries that rely on control checks, such as `actions/code-injection/critical`.
0 commit comments