Skip to content

Remove unsafe pull_request_target test trigger - #958

Merged
Johan Dahlbom (daltondhcp) merged 1 commit into
Azure:mainfrom
daltondhcp:security/remove-unsafe-pr-target
Oct 20, 2026
Merged

Johan Dahlbom (daltondhcp) merged 1 commit into
Azure:mainfrom
daltondhcp:security/remove-unsafe-pr-target

Conversation

@daltondhcp

Copy link
Copy Markdown
Collaborator

Summary

  • remove the pull_request_target trigger from the credentialed integration-test workflow
  • retain manual workflow_dispatch execution behind the protected test environment
  • reduce GITHUB_TOKEN permissions to contents: read
  • prevent actions/checkout from persisting credentials

Security rationale

The previous workflow checked out and executed fork-controlled code with Azure credentials and write-scoped GitHub permissions. Environment approval reduced automatic exploitation risk but did not remove the privileged untrusted-code execution path or satisfy static analysis.

Validation

  • workflow YAML parses successfully
  • pull_request_target and fork-head checkout references are removed
  • existing environment approval remains in place

Keep credentialed integration tests behind manual dispatch and the protected test environment. Limit the workflow token to read-only access and prevent checkout from persisting credentials.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@daltondhcp
Johan Dahlbom (daltondhcp) merged commit 287c531 into Azure:main Oct 20, 2026
2 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