Repository navigation
feat: implement issue #398 — Compliance: secret_scanning_ai_detection - #482
Conversation
|
Warning Review limit reached
More reviews will be available in 33 minutes and 17 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR adds a bash library ( ChangesPush-protection enforcement
Sequence DiagramsequenceDiagram
participant Script as Standards-sync Script
participant ppLib as pp_apply_security_and_analysis
participant jq as jq (payload builder)
participant ghAPI as gh api PATCH
Script->>ppLib: call with REPO set
ppLib->>ppLib: check DEV_LEAD_DRY_RUN mode
loop for each PP_REQUIRED_SA_SETTINGS key
ppLib->>jq: build JSON patch payload
jq-->>ppLib: return payload
ppLib->>ghAPI: PATCH repos/REPO/security-and-analysis
alt success
ghAPI-->>ppLib: 200 OK
else failure (422, 403, etc)
ghAPI-->>ppLib: error response
ppLib->>ppLib: warn to stderr, continue
end
end
ppLib-->>Script: return 0 (always success)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a helper script scripts/lib/push-protection.sh to enforce GitHub security and analysis settings on repositories, along with a comprehensive suite of unit tests in tests/test_push_protection.bats. The review feedback suggests a robust improvement to simplify the JSON payload generation in the script by passing the bash array directly to jq using --args, which avoids a subshell and handles empty arrays more gracefully.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 233e48af7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Dev-Lead — rate-limited (intent: review-changes)PR: #482 |
|
Note @don-petry I received your request but all AI engines are currently rate-limited. I'll retry automatically once the rate limit clears. |
Dev-Lead — review-changes (applied)Changes committed and pushed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3f9a00cc6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #482 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
|
Auto-rebase failed — merge conflict — this branch has conflicts with Claude will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention. To resolve manually instead: |
…repo (#482) agents: uses local 'git tag -f', not host gh-api (companion to #1049) (#1055) * feat: implement issue #1054 — canary-rollout PROMOTE fails for cross-repo (#482) agents: uses local 'git tag -f', not host gh-api (companion to #1049) * fix(bot): address bot feedback [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…b) + host-aware cross-repo tag moves (#1054) Implements #1045 part b — the timer advances the fleet, no manual step. Automation: - promote-all subcommand (cmd_promote_all): iterates every registry agent and forwards to cmd_promote, so each PROMOTE-ready agent advances exactly one ring per run while BLOCKED/REGRESSION agents are left untouched by the gate. A per-agent failure is logged and skipped so one agent cannot halt the fleet sweep. Human approval stays OVERRIDE-ONLY, never a required gate. - workflow: schedule now runs the gated auto-promote when the org variable CANARY_AUTO_PROMOTE == 'true' (promote-all, real move), else read-only evaluate-all. The arm variable is the single kill-switch. dispatch gains evaluate-all/promote-all options (promote-all defaults to --dry-run). Cross-repo fix (#1054): - _gh_move_tag: force-move/create a channel tag on a cross-repo agent's HOST via gh api (PATCH then POST), the counterpart of `git tag -f` + push. - cmd_promote / cmd_rollback are now host-aware: an agent hosted in THIS repo moves its tag via local git; a cross-repo agent (the 6 #482 reusables on petry-projects/.github) moves it on its host via gh api — local `git tag -f` failed with "nonexistent object" for a host commit absent from this checkout. Tests: +3 bats (promote-all fleet iteration; cross-repo promote dry-run takes the host gh-api path not local git; real cross-repo promote moves the host tag via gh api PATCH + records the GITHUB_OUTPUT). 55/55 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…b) + host-aware cross-repo tag moves (#1054) (#1056) * feat(canary-rollout): gated scheduled fleet auto-promote (#1045 part b) + host-aware cross-repo tag moves (#1054) Implements #1045 part b — the timer advances the fleet, no manual step. Automation: - promote-all subcommand (cmd_promote_all): iterates every registry agent and forwards to cmd_promote, so each PROMOTE-ready agent advances exactly one ring per run while BLOCKED/REGRESSION agents are left untouched by the gate. A per-agent failure is logged and skipped so one agent cannot halt the fleet sweep. Human approval stays OVERRIDE-ONLY, never a required gate. - workflow: schedule now runs the gated auto-promote when the org variable CANARY_AUTO_PROMOTE == 'true' (promote-all, real move), else read-only evaluate-all. The arm variable is the single kill-switch. dispatch gains evaluate-all/promote-all options (promote-all defaults to --dry-run). Cross-repo fix (#1054): - _gh_move_tag: force-move/create a channel tag on a cross-repo agent's HOST via gh api (PATCH then POST), the counterpart of `git tag -f` + push. - cmd_promote / cmd_rollback are now host-aware: an agent hosted in THIS repo moves its tag via local git; a cross-repo agent (the 6 #482 reusables on petry-projects/.github) moves it on its host via gh api — local `git tag -f` failed with "nonexistent object" for a host commit absent from this checkout. Tests: +3 bats (promote-all fleet iteration; cross-repo promote dry-run takes the host gh-api path not local git; real cross-repo promote moves the host tag via gh api PATCH + records the GITHUB_OUTPUT). 55/55 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
… agent) (#1165) PR-1 of versioning ci-failure-analyst (#1159, Option A). Currently `valid_agent` recognizes only pr-review/dev-lead (this-repo) + feature-ideation + the six #482 reusables (cross-repo), so `cut-release.sh ci-failure-analyst …` is rejected — you can't cut its first release. ci-failure-analyst's reusable is hosted in THIS repo (petry-projects/.github-private), so add it to the this-repo `valid_agent` case (→ `agent_host_repo` resolves to .github-private). Dry-run now resolves `ci-failure-analyst/v1.0.0` + `ci-failure-analyst/ stable` correctly. Tests: +valid_agent accepts ci-failure-analyst, +agent_host_repo resolves this-repo; updated the "unknown agent is rejected" fixture (it used ci-failure-analyst as its negative example, now valid) to a genuinely-unknown name. test_cut_release.bats 45/45. Next (this issue): cut v1.0.0 + channels → register in canary-rings.json → repin the 4 consumers. Refs #1159. Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…der the canary-ring model (extend cut-release.sh; coordinate with #866) (#915) * feat: implement issue #870 — Bring #482's .github-hosted reusables under the canary-ring model (extend cut-release.sh; coordinate with #866) * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1036) (#1044) canary-rings.json contained only dev-lead, so the fleet-wide `evaluate-all` covered nothing else and the #482 rollout couldn't be completed by the automation. Add the six .github-hosted reusables (agent-shield, auto-rebase, dependency-audit, dependabot-automerge, dependabot-rebase, pr-review-mention). Ring assignment is EXPLICIT (not host-relative): host is petry-projects/.github but next=.github-private, ring0=.github, ring1=TalkTerm+bmad, stable="*" (the org-owner decision from #870 — inverted from the $host/$org_infra default). dependabot-rebase has no .github-private caller → soak_start_ring: ring0. Gate = the #548 defaults (copied from dev-lead); benign list empty (these have been clean). run_workflow = each caller's workflow display name. dev-lead stalled on #1036; added per the monitor unblock mandate. Config only — no channel tags moved, no releases cut. Refs #1036, #1025, #548. Co-authored-by: Claude Code Bot <bot@petry-projects>
…1045 part a) (#1047) The agent workflow_dispatch choice was hardcoded to [dev-lead], so manual evaluate/promote/rollback couldn't target the 6 #482 reusables now in the registry. List all 7 so they can be evaluated + promoted. (The gated SCHEDULED auto-promote — #1045 part b, decision A — remains for dev-lead.) Refs #1045, #1044. Co-authored-by: Claude Code Bot <bot@petry-projects>
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050) * feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github * fix(reviews): address review comments [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…repo (#482) agents: uses local 'git tag -f', not host gh-api (companion to #1049) (#1055) * feat: implement issue #1054 — canary-rollout PROMOTE fails for cross-repo (#482) agents: uses local 'git tag -f', not host gh-api (companion to #1049) * fix(bot): address bot feedback [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…b) + host-aware cross-repo tag moves (#1054) (#1056) * feat(canary-rollout): gated scheduled fleet auto-promote (#1045 part b) + host-aware cross-repo tag moves (#1054) Implements #1045 part b — the timer advances the fleet, no manual step. Automation: - promote-all subcommand (cmd_promote_all): iterates every registry agent and forwards to cmd_promote, so each PROMOTE-ready agent advances exactly one ring per run while BLOCKED/REGRESSION agents are left untouched by the gate. A per-agent failure is logged and skipped so one agent cannot halt the fleet sweep. Human approval stays OVERRIDE-ONLY, never a required gate. - workflow: schedule now runs the gated auto-promote when the org variable CANARY_AUTO_PROMOTE == 'true' (promote-all, real move), else read-only evaluate-all. The arm variable is the single kill-switch. dispatch gains evaluate-all/promote-all options (promote-all defaults to --dry-run). Cross-repo fix (#1054): - _gh_move_tag: force-move/create a channel tag on a cross-repo agent's HOST via gh api (PATCH then POST), the counterpart of `git tag -f` + push. - cmd_promote / cmd_rollback are now host-aware: an agent hosted in THIS repo moves its tag via local git; a cross-repo agent (the 6 #482 reusables on petry-projects/.github) moves it on its host via gh api — local `git tag -f` failed with "nonexistent object" for a host commit absent from this checkout. Tests: +3 bats (promote-all fleet iteration; cross-repo promote dry-run takes the host gh-api path not local git; real cross-repo promote moves the host tag via gh api PATCH + records the GITHUB_OUTPUT). 55/55 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
* feat: wire cut-release.sh cross-repo publish via gh api (#872) The six #482 reusables + feature-ideation are hosted in petry-projects/.github, so their release/channel tags belong on THAT repo. cut-release.sh previously resolved refs against local git and refused live cross-repo cuts (the push target was an open question). This wires it: - For cross_repo_agents, resolve the ref against petry-projects/.github via `gh api repos/.../commits/<ref>` (an `origin/` prefix is stripped → its main), and publish with `--push`: create the annotated `<name>/vX.Y.Z` release object + force-move the `<name>/<channel>` tag via `gh api git/tags` + `git/refs`. - This-repo agents (pr-review, dev-lead) keep the existing local-git path unchanged. Immutability is preserved cross-repo: an existing release tag is never overwritten. - `--push` for a cross-repo agent needs GH_TOKEN with contents:write on .github. New helpers (strip_origin pure; gh_resolve_sha / gh_tag_exists / gh_create_annotated_tag / gh_move_tag wrappers). Tests: +4 strip_origin pure cases and a new gh-mocked integration suite (dry-run / print-only / --push create+move / immutability refusal / native path untouched) — 46 pass, shellcheck clean. Docs (versioning.md, runbook.md) updated: cross-repo path is now wired, not "dry-run only". Refs #872, #870. * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Code Bot <bot@petry-projects> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…1036) (#1044) canary-rings.json contained only dev-lead, so the fleet-wide `evaluate-all` covered nothing else and the #482 rollout couldn't be completed by the automation. Add the six .github-hosted reusables (agent-shield, auto-rebase, dependency-audit, dependabot-automerge, dependabot-rebase, pr-review-mention). Ring assignment is EXPLICIT (not host-relative): host is petry-projects/.github but next=.github-private, ring0=.github, ring1=TalkTerm+bmad, stable="*" (the org-owner decision from #870 — inverted from the $host/$org_infra default). dependabot-rebase has no .github-private caller → soak_start_ring: ring0. Gate = the #548 defaults (copied from dev-lead); benign list empty (these have been clean). run_workflow = each caller's workflow display name. dev-lead stalled on #1036; added per the monitor unblock mandate. Config only — no channel tags moved, no releases cut. Refs #1036, #1025, #548. Co-authored-by: Claude Code Bot <bot@petry-projects>
…1045 part a) (#1047) The agent workflow_dispatch choice was hardcoded to [dev-lead], so manual evaluate/promote/rollback couldn't target the 6 #482 reusables now in the registry. List all 7 so they can be evaluated + promoted. (The gated SCHEDULED auto-promote — #1045 part b, decision A — remains for dev-lead.) Refs #1045, #1044. Co-authored-by: Claude Code Bot <bot@petry-projects>
… 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github (#1050) * feat: implement issue #1049 — canary-rollout evaluate mis-reports all 6 cross-repo (#482) reusables as 'fully rolled out' — reads local tags, not .github * fix(reviews): address review comments [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…repo (#482) agents: uses local 'git tag -f', not host gh-api (companion to #1049) (#1055) * feat: implement issue #1054 — canary-rollout PROMOTE fails for cross-repo (#482) agents: uses local 'git tag -f', not host gh-api (companion to #1049) * fix(bot): address bot feedback [skip ci-relay] * chore: dev-lead update (review-changes) [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…b) + host-aware cross-repo tag moves (#1054) (#1056) * feat(canary-rollout): gated scheduled fleet auto-promote (#1045 part b) + host-aware cross-repo tag moves (#1054) Implements #1045 part b — the timer advances the fleet, no manual step. Automation: - promote-all subcommand (cmd_promote_all): iterates every registry agent and forwards to cmd_promote, so each PROMOTE-ready agent advances exactly one ring per run while BLOCKED/REGRESSION agents are left untouched by the gate. A per-agent failure is logged and skipped so one agent cannot halt the fleet sweep. Human approval stays OVERRIDE-ONLY, never a required gate. - workflow: schedule now runs the gated auto-promote when the org variable CANARY_AUTO_PROMOTE == 'true' (promote-all, real move), else read-only evaluate-all. The arm variable is the single kill-switch. dispatch gains evaluate-all/promote-all options (promote-all defaults to --dry-run). Cross-repo fix (#1054): - _gh_move_tag: force-move/create a channel tag on a cross-repo agent's HOST via gh api (PATCH then POST), the counterpart of `git tag -f` + push. - cmd_promote / cmd_rollback are now host-aware: an agent hosted in THIS repo moves its tag via local git; a cross-repo agent (the 6 #482 reusables on petry-projects/.github) moves it on its host via gh api — local `git tag -f` failed with "nonexistent object" for a host commit absent from this checkout. Tests: +3 bats (promote-all fleet iteration; cross-repo promote dry-run takes the host gh-api path not local git; real cross-repo promote moves the host tag via gh api PATCH + records the GITHUB_OUTPUT). 55/55 passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…der the canary-ring model (extend cut-release.sh; coordinate with #866) (#915) * feat: implement issue #870 — Bring #482's .github-hosted reusables under the canary-ring model (extend cut-release.sh; coordinate with #866) * chore: apply manual instructions [skip ci-relay] --------- Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
Closes #398
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
Tests
Documentation