[codex] Harden preflight review trust checks - #45
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ 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 |
Review: Harden preflight review trust checksThis PR ports four trust-resolution hardening fixes into the shared 1.
|
20a5165 to
5500b24
Compare
Review: Harden preflight review trust checksThis PR ports security hardening from a consumer repo into the shared Three bugs survived verification: Bug 1 - Issue body not scanned for trusted_metadata_bot authors (medium)
Bug 2 - Resolved trusted_metadata_bot review comments are never suppressed (medium) Inline comment posted on lines 559-560. Bug 3 - canonical_path swallows only ENOENT, not ENOTDIR (low) Inline comment posted on line 238. |
5500b24 to
f878319
Compare
Security Preflight Hardening ReviewThis PR correctly tightens several trust-boundary gaps: explicit Findings (low severity):
|
f878319 to
7e32f2a
Compare
Review: Harden preflight review trust checksThis PR correctly tightens trust resolution on three fronts: explicit configs outside the git root are now classified global (triggering team-slug warnings), ENV trust configs pointing at missing files now abort rather than silently falling through to the home config, and the diff-safety downgrade in 1. Object-identity check for
|
7e32f2a to
917a2b8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 917a2b882b
ℹ️ 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".
917a2b8 to
efd3957
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: efd3957ce8
ℹ️ 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".
efd3957 to
3691802
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3691802ad0
ℹ️ 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".
Review: Harden preflight trust checksThis PR extends the trust-resolution pipeline with four well-scoped changes: fail-closed on a missing Three findings survived verification: CONFIRMED — Issue body not scanned for metadata-bot authors (line 533)
PLAUSIBLE —
|
3691802 to
a6c4910
Compare
Review summaryReviewed the trust-resolution and metadata-bot hardening in Portability (AGENTS.md): No consumer-repo-specific commands, labels, branches, or paths leaked into Correctness: Traced the git-remote-based repo/host matching ( Metadata-bot text scanning: The new Shell/Ruby safety: No blocking issues found. Left two minor/non-blocking inline notes:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 13877472bb
ℹ️ 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".
Review: Harden preflight review trust checksThis PR extends I traced the new git-remote-URL parsing/host-matching logic (the mechanism that decides whether a trust config's git working tree matches the target repo) and found one real correctness bug, plus a design observation. Details below as inline comments. Summary of findings:
No security-severity or portability issues found — the new logic is appropriately scoped to |
Review summaryThis PR ports the React on Rails PR #4288 hardening work into I ran 8 independent review passes (correctness, removed-behavior, cross-file, reuse/simplification/efficiency/altitude/conventions) plus targeted verification. Most candidate issues turned out to be non-issues — the security-relevant refactors (metadata-bot warning-scanning, resolved-bot-comment suppression, Two things worth fixing, posted as inline comments:
Nothing else survived verification at this effort level. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a4ceba38c
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cd57c8f564
ℹ️ 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".
Review summaryFocused review of the trust-resolution hardening in Portability — no consumer-repo-specific commands, labels, branches, or paths were introduced in Security / correctness — traced the new host/port-matching logic (
Shell/Ruby safety: all subprocess calls use Left one minor inline nit about having two separately-configurable git-probe timeouts. No blocking issues found from static/manual review. Caveat: I was not able to execute |
Review: Harden preflight review trust checks (#45)This PR ports a set of security-hardening fixes into Findings, most severe first (also left as inline comments where the diff allowed it):
No portability issues found — no consumer-repo-specific commands/labels/branches/paths were hardcoded in the touched skill files, and the new |
Review summaryThis PR hardens I ran 8 parallel review passes (line-by-line scan, removed-behavior audit, cross-file call tracing, reuse/simplification/efficiency, altitude, and CLAUDE.md/AGENTS.md conventions). Findings, most severe first:
Portability / shared-skill hygiene: no consumer-repo-specific commands, labels, branches, or paths were found hardcoded in the shared skill code — all new seams ( Shell/Ruby helper safety: all git/gh subprocess calls consistently use array-form Nothing else survived adversarial verification at this effort level — the host/port default-port matching, GHE remote parsing, and metadata-bot warning-scan widening all checked out correctly against their test coverage. |
Review: Harden pr-security-preflight trust checksWent through the full diff (script, new lib/git_probe_env.rb, the ~900 new test lines, and the doc/CHANGELOG updates) with a focus on correctness, security, and portability. Portability - clean. Nothing in skills/ hardcodes a consumer-repo command, label, branch, or path; docs/CHANGELOG stay generic (the justin808 logins in test fixtures are pre-existing placeholder data, not new policy). Shell/Ruby safety - solid. All subprocess calls use array-form Open3.capture3/system (no shell interpolation), git/gh calls are timeout-wrapped, and the new PrBatchGitProbeEnv.probe_env deliberately strips GIT_DIR/GIT_WORK_TREE/GIT_CONFIG_* (including dynamically-named GIT_CONFIG_KEY_N/VALUE_N) so an inherited or injected git environment can't redirect where git/gh think the repo lives. That's exercised by dedicated tests (test_script_git_probes_clear_injected_git_config_remotes, test_git_remote_url_newline_cannot_inject_matching_remote, test_malformed_remote_port_does_not_crash_preflight), which is the right level of paranoia for something feeding a trust decision. Logic review - traced through the new host-inference (repo_option_info/current_repo_info/inferred_github_host_from_local_git) and repo-local-vs-global trust classification (trust_config_repo_local?, git_root_matches_repo?, remote_matches_github_host?, github_remote_from_remote_url) paths, including port/scheme edge cases (default ports, ssh.github.com:443, GHES with custom ports). Every failure mode I could construct (missing git, unmatched remotes, mismatched host/port, unparseable URLs) fails closed to 'global,' correctly forcing OWNER/team-slug qualification rather than silently trusting an unqualified slug. The suspicious-vs-suspicious_warnings split (only new diff lines can block; comment/review/issue text is warning-only regardless of pattern) is unchanged in spirit, and the new source_actor_coverage_findings correctly closes a real gap: trusted_pr_source? now also requires non-truncated timelineItems/target-author coverage before downgrading a diff warning, not just commit-author coverage. No bugs found. Strong test coverage for a change this security-sensitive - no inline comments to add. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d389ae8623
ℹ️ 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".
Summary
pr-security-preflighthelper.AGENT_WORKFLOWS_TRUST_CONFIGpoints at a missing file, and warn on unqualified team slugs in global configs.Validation
ruby skills/pr-batch/bin/pr-security-preflight-test.rbgit diff --checkbin/validate