Repository navigation
Conversation
New org-level workflow and check that reads the Service Policy projection with GitHub OIDC and posts or updates one marked comment and a warning annotation per violated warn-mode policy, with reason, service, team, outcome, owner and remediation link. Observe-mode results are never shown, block is rendered as warn, and the comment is minimized as resolved when nothing remains. Every failure, including a stale or unreadable projection, ends in success with a note that governance status is unknown. Rendering lives in a standard-library module the producer vendors. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The producer job in devrev/security-tools vendors service_policy_render.py byte for byte; both repositories test the same sha256 so drift fails CI. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the warn-only
service-policy-checkorg workflow. On a pull request to the default branch, it reads the repository's Service Policy results and posts or updates one comment and a warning annotation per violated warn-mode policy. It never fails a pull request.This is one of four draft pull requests that together deliver the Service Policy governance check. Merge order: devrev/bundles first (and deploy), then devrev/apollo, then devrev/security-tools, then devrev/global-gh-tools. The full order, including the setup steps that switch it on, is in the rollout runbook in devrev/apollo (
docs/plans/2026-10-19-service-policy-rollout-runbook.md).What changes
.github/workflows/service-policy-check.yml: assumes a read-only AWS role through GitHub OIDC (gh-action-service-policy-read, a placeholder name until it is created), reads the heartbeat and the repository's item, and runs every step withcontinue-on-error.checks/check_service_policy.py: shows only warn and block results (block is shown as warn in v1). It finds the comment by its marker and edits it in place, minimizes it as resolved when nothing remains, and un-minimizes it when results return. A missing or stale heartbeat (older than six hours), a credential error or a failed comment all end in success with "governance status unknown".checks/service_policy_render.py: standard-library-only rendering, escaping markdown and workflow commands, and rendering a link only when it is https. The producer job in devrev/security-tools vendors this file, and both repos test the same sha256.Merging puts the workflow on
mainbut runs it nowhere. It runs only where an evaluate-mode org ruleset names it, which the runbook does on three trial repositories first.Validation
make testpasses (38 tests, 17 new).DevRev
ISS-387320
🤖 Generated with Claude Code