Skip to content

make test suite more secure#1698

Merged
SFJohnson24 merged 3 commits into
mainfrom
alert-fix-144
Apr 22, 2026
Merged

make test suite more secure#1698
SFJohnson24 merged 3 commits into
mainfrom
alert-fix-144

Conversation

@gerrycampion
Copy link
Copy Markdown
Collaborator

@gerrycampion gerrycampion commented Apr 20, 2026

Attempt to fix the critical security issues by:

  • from a pr request, upload the code as an artifact using the pull_request trigger in an unprivileged environment instead of the pull_request_target trigger.
  • inside the test suite workflow, use workflow_run trigger instead of pull_request_target
  • for workflow_run / pull request triggers, download the artifact. For other triggers, checkout the code as usual.

Comment on lines +35 to +38
if: github.event_name != 'workflow_run'
uses: actions/checkout@v6
with:
ref: ${{ (inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number)) || github.event.pull_request.head.sha || github.ref }}
ref: ${{ (inputs.pr_number && format('refs/pull/{0}/head', inputs.pr_number)) || github.ref }}
Comment thread .github/workflows/upload-pr-artifact.yml Fixed
@gerrycampion gerrycampion marked this pull request as ready for review April 21, 2026 01:58
Copy link
Copy Markdown
Collaborator

@SFJohnson24 SFJohnson24 left a comment

Choose a reason for hiding this comment

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

This PR correctly resolves vulnerabilities around pull_request_target and workflow_run triggers.

@SFJohnson24 SFJohnson24 merged commit 2a32391 into main Apr 22, 2026
12 of 13 checks passed
@SFJohnson24 SFJohnson24 deleted the alert-fix-144 branch April 22, 2026 17:37
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.

3 participants