From 554e771197244b07319307abbc905c74ce916ed8 Mon Sep 17 00:00:00 2001 From: scttbnsn <80784472+scttbnsn@users.noreply.github.com> Date: Thu, 26 Nov 2026 17:39:48 -0500 Subject: [PATCH 1/2] docs(agents): check dev for high code scanning alerts before promoting --- AGENTS.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index acd5c33..03d0a0b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,6 +35,20 @@ contract tests that pin the shapes other repositories depend on. Verify promotions with tree equality (`git diff --quiet origin/main origin/dev/repository-standards`), never commit ancestry. +- Before opening a promotion, check dev for open code scanning alerts at + high or above. `main`'s ruleset blocks merges on them and dev PRs don't. + This must print 0: + + ```sh + alerts="repos/CodesWhat/.github/code-scanning/alerts" + gh api "$alerts?state=open&ref=refs/heads/dev/repository-standards" \ + --jq '[.[] | .rule | select(.security_severity_level == "high" + or .security_severity_level == "critical" or .severity == "error")] + | length' + ``` + + Fix each alert, or dismiss it with a reason once it's verified as a false + positive. Never change the ruleset to get past it. - There is no shared admission queue; pace hosted review and heavy CI with the maintainer directly. Add `review-ready` for a PR's first CodeRabbit review and request subsequent fix-batch reviews explicitly. From 3a0497a10266aaab6f63f007d43a5b24f39bffe3 Mon Sep 17 00:00:00 2001 From: scttbnsn <80784472+scttbnsn@users.noreply.github.com> Date: Thu, 26 Nov 2026 18:45:10 -0500 Subject: [PATCH 2/2] docs(agents): count code scanning alerts across every page --- AGENTS.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 03d0a0b..98af2cb 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -41,8 +41,9 @@ contract tests that pin the shapes other repositories depend on. ```sh alerts="repos/CodesWhat/.github/code-scanning/alerts" - gh api "$alerts?state=open&ref=refs/heads/dev/repository-standards" \ - --jq '[.[] | .rule | select(.security_severity_level == "high" + gh api --paginate \ + "$alerts?state=open&ref=refs/heads/dev/repository-standards&per_page=100" | + jq -s '[.[][] | .rule | select(.security_severity_level == "high" or .security_severity_level == "critical" or .severity == "error")] | length' ```