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
Harden review-trigger workflow: consistency and cost improvements #35431
${{ github.actor }} and ${{ github.repository }} are interpolated directly in shell via ${{ }}. The PR correctly hardened inputs.pr_number and comment body via env:, but missed these. Not exploitable today (GitHub usernames are [a-zA-Z0-9-]), but inconsistent with the hardening pattern.
OIDC and AzDO tokens are masked but persisted to $GITHUB_OUTPUT between steps. Since the OIDC token is only needed to get the AzDO token, and the AzDO token is only needed to trigger the pipeline, all three operations could be combined into a single step — avoiding intermediate token storage.
The job-level if: checks comment body but not actor permission. Any user who comments /review spins up a runner before the permission step rejects them. Low individual cost but could be abused at scale.
Possible fix: Move permission check to a lightweight pre-job, or exit with exit 0 (not exit 1) on unauthorized users to avoid noisy failed runs.
Identified via multi-model adversarial code review (3 independent reviewers with consensus validation).
Activity
Harden review-trigger workflow: env-var inputs, single-step token flo…