Promote policy advisor to blocking deployment gate
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- azure, javascript, yaml
Research direction
Compare the existing Stage 2.5 security gate pattern with the policy advisor and pipeline integration at Stage 2.85. Review copilot-instructions.md, .azure/git-ape.yml, and git-ape-plan.yml to define audit and deny behavior, override logging, and the PR summary. Done means Stage 2.55 reports PASSED or BLOCKED, deny mode blocks Critical/High findings, and the workflow comment includes policy compliance.
Written by the indexing model from the issue text.
Description
Description
The policy advisor skill and agent are already comprehensive — they query live subscription state, classify findings by 4-tier severity, generate remediation code (ARM JSON + CLI), and produce split reports (dev template fixes + platform subscription actions). The only structural gap is the absence of a blocking gate that prevents deployment when policy violations are found. This mirrors the existing security gate (Stage 2.5) pattern.
What already exists (no changes needed)
- ARM template policy analysis across 7 resource categories
- Live subscription policy queries (
az policy assignment list, management groups) - Microsoft Learn runtime lookup for current built-in policies
- 4-tier severity classification (Critical/High/Medium/Low) with Audit/Deny effects
- Split report: Part 1 (template fixes) + Part 2 (subscription actions)
- Auto-remediation suggestions with exact ARM JSON snippets
- Policy-as-code generation (
Microsoft.Authorization/policyAssignments) - Enforcement mode preference in
copilot-instructions.md(Audit default, Deny for production) - Pipeline integration at Stage 2.85
Scope (what's needed)
- Stage 2.55 Policy Gate — Add a blocking gate step after the policy advisor runs, mirroring the Stage 2.5 security gate pattern:
🟢 POLICY GATE: PASSED— No Critical or High policy violations. Deployment may proceed.🔴 POLICY GATE: BLOCKED— Critical or High violations found. Deployment blocked until resolved.- Override mechanism: user types "I accept the policy risk" (logged as
OVERRIDDEN).
- Config toggle — Formalize the existing audit/deny preference in
copilot-instructions.mdor.azure/git-ape.ymlas a gate mode:audit(default) — Policy report is generated and shown but does not block deployment.deny— Policy findings at Critical/High severity block deployment (gate enforced).
- Workflow integration — Add policy analysis summary to
git-ape-plan.ymlPR comment alongside security and cost sections.
Acceptance Criteria
- Policy gate step added at Stage 2.55 with PASSED/BLOCKED status.
- Gate mode configurable:
audit(non-blocking) ordeny(blocking). - Deny mode blocks deployment on Critical/High policy findings.
- Override mechanism with logged justification.
- Plan workflow PR comment includes policy compliance section.
- Dominant language
- JavaScript
- Stars
- 269
- Forks
- 45
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 15
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Azure/git-ape
-
daily-status report
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
agentic-workflows
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
agentic-workflows
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
agentic-workflows
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
agentic-workflows
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·