Skip to content

docs: add policy for ADO PR checks#16845

Open
PawelWMS wants to merge 1 commit intotomls/base/mainfrom
pawelwi/ado-checks-policy
Open

docs: add policy for ADO PR checks#16845
PawelWMS wants to merge 1 commit intotomls/base/mainfrom
pawelwi/ado-checks-policy

Conversation

@PawelWMS
Copy link
Copy Markdown
Contributor

Adding documentation defining our policy for fork PR checks running in ADO pipelines. I've put the policy in the form of AI instructions, so they can be referenced by the agents.

Base automatically changed from asalinas/tomls/pr-check to tomls/base/main April 24, 2026 17:47
@PawelWMS PawelWMS force-pushed the pawelwi/ado-checks-policy branch from bd1a43f to 0810451 Compare April 24, 2026 18:42
@PawelWMS PawelWMS marked this pull request as ready for review April 24, 2026 18:43
Copilot AI review requested due to automatic review settings April 24, 2026 18:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a documented security policy and rationale for handling GitHub fork PRs in Azure DevOps (ADO) PR-check pipelines, with guidance structured to be consumable by AI agents.

Changes:

  • Added a long-form threat model and design guidance for securing (or disabling) fork PR execution in ADO PR checks.
  • Added a normative, enforceable fork-PR policy as an instructions file scoped to ADO workflow YAML and helper scripts.
  • Updated existing ADO pipeline instructions to reference the new fork-PR policy and rationale.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
docs/ado-pipelines-fork-pr-security.md Adds long-form security rationale, threat model, and design variants for fork PR safety in ADO pipelines.
.github/instructions/ado-pr-check-fork-policy.instructions.md Adds the authoritative policy instructions governing fork PR behavior for ADO pipelines.
.github/instructions/ado-pipeline.instructions.md Cross-links the main ADO pipeline guidance to the new fork-PR policy and rationale.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +232 to +241
| Risk surface | Shared project (A) | Isolated project (B) |
|---|---|---|
| Direct SC token theft from fork PR | Blocked by SC "Required template" + branch control | Blocked by SC "Required template" + branch control |
| Build identity reads other repos / feeds / artifacts | **Possible** — depends on identity's project-wide permissions | Near-zero — nothing else exists in the project |
| Self-hosted agent pool poisoning | **Possible** if pool is shared with other pipelines | Eliminated (single consumer; use hosted agents) |
| Misconfigured neighbor SC/VG weakens posture | **Possible** — drift, mistakes by other admins | Not applicable — no neighbors |
| Admin blast radius | Project Admins of shared project (often many) | Project Admins of isolated project (small) |
| Wrapper in GitHub repo can be replaced via merged malicious PR | Same risk in both — mitigated by CODEOWNERS + branch protection | Same risk in both — mitigated by CODEOWNERS + branch protection |
| Federated credential subject drift | Same risk in both — mitigated by periodic Entra audit | Same risk in both — mitigated by periodic Entra audit |
| Operational cost | Low (reuse existing project) | Higher one-time setup; small ongoing overhead |
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

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

The comparison table rows start with ||, which creates an empty first column in GitHub-flavored Markdown and can render oddly. Use a single leading | per row (and align the separator row) to produce a clean 3-column table.

Copilot uses AI. Check for mistakes.
isolation is broken. Audit federated credentials on the Entra app
periodically.
4. **One-time cost.** Setup, ownership, and ongoing maintenance of a
dedicated project is more work than reusing an existing one. Not a
Copy link

Copilot AI Apr 24, 2026

Choose a reason for hiding this comment

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

Grammatical agreement: the subject is plural ('Setup, ownership, and ongoing maintenance'), so it should be 'are more work' rather than 'is more work'.

Suggested change
dedicated project is more work than reusing an existing one. Not a
dedicated project are more work than reusing an existing one. Not a

Copilot uses AI. Check for mistakes.
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