DashboardKnowledgeGitHub Actions untrusted contexts

GitHub Actions untrusted contexts

Category: preference
Confidence: 1.00
ID: 01a082db-d839-72cd-89e9-90f9ad6043ae
Project ID: (global)
Cross-project: Yes
Recalled in other projects: 0
Source session: 0HhxYmKC9XzCymoiO
Created: 2026-08-27 15:54:54
Updated: 2026-09-08 21:10:40

Content

Always treat GitHub event fields, dispatched refs, and selected workflow YAML as attacker-controlled. Chose default-branch workflow_run execution plus a production environment restricted to main over in-workflow ref guards because GitHub loads caller-selected YAML before any guard or checkout. A manual workflow_dispatch relay may remain only if it has permissions: {}, no repository secrets, and receives only production secrets protected from non-main refs. permissions: {} removes GITHUB_TOKEN, not ${{ secrets.* }}; secret-bearing jobs require protected-environment isolation and default-branch trusted execution.

Move to: