Skip to content

fix: address CodeRabbit review on PR #89 - #94

Merged
v-Kaefer merged 1 commit into
feat/github-app-rulesetsfrom
fix/pr-89-coderabbit-security
Aug 31, 2026
Merged

fix: address CodeRabbit review on PR #89#94
v-Kaefer merged 1 commit into
feat/github-app-rulesetsfrom
fix/pr-89-coderabbit-security

Conversation

@v-Kaefer

@v-Kaefer v-Kaefer commented Aug 29, 2026

Copy link
Copy Markdown
Owner

Linked Issue

Milestone

  • M1

Summary

Applies the CodeRabbit review findings from #89 plus an extra security pass.

Arquivo Correção
.github/workflows/rulesets.yml CWE-78 / template-injection: workflow_dispatch inputs (confirmation, mode) agora passam por env: em vez de serem interpolados no shell.
project_setup/rulesets.py plan-id agora inclui repo + ações resolvidas + ruleset IDs, impedindo reuso de confirmação entre repos e após drift create→update.
config/governance/rulesets.json Removido o time maintainers hard-coded do template default; bypassActors: [] + nota de substituição.
project_setup/cli.py Handlers live resolvem repo_arg(args.repo) antes de criar o client e o repassam a require_client/require_project_client.
README.md Reconciliada a fronteira de auth do GitHub App para Projects v2; removida a limitação obsoleta "rulesets are not created".
tests/test_rulesets.py Cobertura para reuso de confirmação entre repos e drift create→update.

How to test

  • Test type: automated
  • Steps:
    • python3 scripts/validation/repo_quality.py
    • python3 -B -m unittest discover -s tests -p "test_*.py" -v

Evidence

  • Log/output attached when applicable — Ran 116 tests ... OK

Known risks

DoD checklist

  • Scope implemented as defined
  • Tests executed and documented
  • No known critical breakage introduced

Security pass adicional

  • pr-sync.yml (pull_request_target): seguro — só roda para PRs do mesmo repo, checkout apenas do base com persist-credentials: false, nunca faz checkout do PR-head.
  • project-setup.yml: todos os inputs são type: boolean, sem risco de injeção.

🤖 Generated with Claude Code

- rulesets.yml: pass workflow_dispatch inputs via env vars instead of
  interpolating them into the shell (template-injection / CWE-78)
- rulesets.py: bind plan-id fingerprint to repo + resolved actions/IDs so a
  confirmation cannot be reused across repos or after create->update drift
- config/governance/rulesets.json: drop hard-coded `maintainers` team from the
  default template; ship empty bypassActors with a substitution note
- cli.py: resolve repository before client creation and pass it to
  require_client / require_project_client in all live handlers so GitHub App
  installation resolution works without PROJECT_SETUP_APP_INSTALLATION_ID
- README: reconcile GitHub App auth boundary for Projects v2 and drop the
  obsolete "rulesets are not created" limitation
- tests: cover cross-repo confirmation reuse and create-to-update drift

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • develop
  • Q.A.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1280e484-30a6-4499-a2f9-8826e19a5784

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@v-Kaefer
v-Kaefer merged commit a86cecf into feat/github-app-rulesets Aug 31, 2026
15 of 18 checks passed
@v-Kaefer
v-Kaefer deleted the fix/pr-89-coderabbit-security branch August 31, 2026 00:26
@github-actions

Copy link
Copy Markdown

PR Sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant