Repository navigation
CI: harden claude-code-review.yml and claude.yml security/reliability - #39
jnasbyupgrade wants to merge 1 commit into
Conversation
claude-code-review.yml: - Trust gate now checks PR author (user.login), not head repo owner -- head.repo.owner.login is always this repo's own org for upstream-branch-headed PRs, so it silently skipped review regardless of who opened the PR. - Checkout step no longer overrides repository:/ref: to point at the PR's fork -- claude-code-action fetches and reviews the PR's content itself; the override was also breaking that internal fetch. Restored persist-credentials: false on that step. - --allowedTools mcp__github_inline_comment__create_inline_comment so the code-review plugin's agent-mode run actually starts the inline-comment MCP server (was silently falling back to one consolidated comment). - actions: write permission -- no narrower scope exists for cache-write alone; without it, the action's internal cache save silently fails every run. claude.yml: - actions: write (was read) for the same cache-write reason. - actions/checkout@v4 -> @v7.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
Closing as fully superseded -- this was a standalone copy of the claude-code-review.yml/claude.yml hardening bundled in #35, split out at the time because #35 hadn't merged yet. #35 has since merged, and diffing this branch against current master for both files now shows zero difference. Nothing left to contribute. |
e80485e Release 2.4.0 (#135) cca6885 Use the _PGXNTOOL_/_ prefix for internal test-gate variables and targets (#130) 88b3c11 Error when PGXNTOOL_ENABLE_TEST_INSTALL=yes but test/install/ is empty (#131) 065dd27 Validate PGXNTOOL_VERIFY_RESULTS_MODE (#132) 9cb2a53 Reject PGXNTOOL_PGTLE_VERSION values that aren't an exact pg_tle range name (#134) 51062d3 Fix `make test` failing when test/sql/ does not exist (#133) 5e5f002 check-test-install-error-stop.sh: accept \include and anchor patterns (#128) c25cdf4 Fix stale and inaccurate user docs (#129) f6fda71 Require HISTORY.asc issue numbers in ascending order (#125) 9b65063 Warn when two DOCS entries install to the same filename (issue #115) (#124) e8ed42d Guarantee test/install/*.sql schedule ordering (#120) 51c75ac Add post-tag-version-bump to freeze default_version after a release (#95) dffddf3 Only let an explicit ON_ERROR_STOP excuse a later turn-off in test/install (#122) 52b22fd Let `make results` seed a new test's first expected output (#121) af25072 CLAUDE.md: fix monitor-ci.sh doc mismatch, no --commit flag exists (#116) a3b85fe Rename build-results target to results-build (#123) 7a5f724 Import Postgres-Extensions/ai's shared CLAUDE.md into dev-facing docs (#117) 0a6db44 Gate the main test suite on test-build; add build-results; require ON_ERROR_STOP in test/install (#109) 59bb298 Add PGXNTOOL_ENABLE_FS_INSTALL and PGXNTOOL_ENABLE_PGXN_INSTALL (#91) bedf9b6 Add `make print-pgtle` target for combined pg_tle install files (#94) 5aafc8f ci: pin claude-code-action to a SHA in claude-code-review.yml (#112) 0d6bef9 Rename internal-only variables to the _PGXNTOOL_ shape (#93) 9fa8ae0 ci: bump GitHub Actions to latest versions (#98) 5d1d337 Fix claude-code-review.yml trust gate: check PR author, not head repo owner (#102) 2f36a12 Document `superuser`/`trusted`; split general PostgreSQL guidance into its own docs (#113) c50d8e6 claude-code-review.yml: allow the inline-comment MCP tool so review comments post individually (#105) a6d3287 Release 2.3.0 (#89) 1a7ee20 CLAUDE.md: fix pre-existing documentation-accuracy errors (#88) 35fd187 Fix DATA wildcard skipping historical full-install version scripts (#48) (#80) f9ce2a2 Fix installcheck running before install; make test now fails on regressions (#83) 3ceb930 Rename PGTLE_VERSION to PGXNTOOL_PGTLE_VERSION (#85) 2de8429 claude-code-review.yml: add missing --comment flag (#84) 957bdf6 Restrict @claude mention trigger to a trusted account (#82) b67064b Release 2.2.0 (#77) d949d6d Fix stale README/CLAUDE.md docs; rename internal-only test shim (#76) 6d7822c ci: grant actions:write so bun cache save succeeds (#75) 2738f59 README.asc: fix stale docs, document undocumented API surface (#74) d1d3bee Add make pgxntool-version to print the embedded pgxntool version (#73) 493a0f8 Fix parallel-build SQL corruption, remote hardcoding, and add safety checks (#61) 3b0e3de Fix make pgtle PGTLE_VERSION=X being silently ignored (#66) 21b35ef ci: skip paired-test-PR requirement for doc-only PRs (#71) 55efd03 Rename EXTENSION_VERSION_FILES to EXTENSION__CURRENT_VERSION__FILES (#69) 9d0a856 Fix pgtle.sh rejecting non-numeric version aliases like 'stable' (#57) (#63) 9c2f75f Docs: versioned SQL file tracking tradeoffs and update-testing pattern (#60) c38cf2a ci: never check out fork PR head in claude-code-review pull_request_target job (#70) aab8f2b pgtle_versions.md: fix wrong uninstall_extension() version claim (#59) e2c9174 README.asc: make tag creates a git tag, not a branch (#58) eb84bc6 Stamp 2.1.0 9fbe6f4 Fix results ordering, control file whitespace, ENABLE_* override, debug levels (#31) 88bb4f2 Add Claude Code GitHub Actions workflows (#41) af5bbbb ci: pass repo owners to run-tests.yml for fork-account matching (#40) c7928af Fix repo-root guard to work inside a git worktree (#39) b062fca ci: point reusable test workflow at @master b6cdbfd Add CI workflows and multi-session PR guard (#33) 1ba0987 Stamp 2.0.3 1931cbe Fix pgxntool-sync remote and make it runnable without make (#37) 8176304 Stamp 2.0.2 3e142ab Fix parse_control_file: remove comments before stripping quotes (#27) cacc301 Stamp 2.0.1 bf1db6b Fix bash 3.2 / Linux compatibility issues (#26) 62d0fcb Fix broken ifeq for --load-language=plpgsql on PG < 13 (#24) 121f0b3 Stamp 2.0.0 ad3ca7e Remove .source support; add test/install, test/build, and verify-results (#18) c010cf8 Fix bash 3.2 compatibility (#23) abeb9d3 Remove .source file support from pg_regress integration (#22) 08c1879 Stamp 1.1.2 6e0dad2 Fix double --dbname bug that defeated unique test database names 639756c Stamp 1.1.1 6ba3176 Fix pg_tle exception handler and empty upgrade files (#15) 3b8cb2a Stamp 1.1.0 550a901 Remove commit.md (maintained in pgxntool-test) d73ca93 Add unique test database names to prevent conflicts (#13) 9b344be Add update-setup-files.sh for 3-way merging after pgxntool-sync (#12) ab7f6e2 Stamp 1.0.0 3a571ba Add pg_tle support and modernize test infrastructure (#11) b96ea6d Add support for Claude code; build and doc improvements (#9) e9c24de Fix pg_regress on versions > 12 (#5) REVERT: bed3604 Fix pg_regress on versions > 12 (#5) (#6) git-subtree-dir: pgxntool git-subtree-split: e80485ea77ec6dbdfa1dc9217d1c8b7ed2a94f43
Summary
Split out from the
advanced-testing/cistack (PR #35) at the user's request -- this is standalone CI hardening, unrelated to that stack's actual content, and needs to land independently/faster.claude-code-review.ymluser.login), not head repo owner --head.repo.owner.loginis always this repo's own org for upstream-branch-headed PRs (e.g.gh stack), so it silently skipped review regardless of who opened the PR. Confirmed via the check-runs API:claude-reviewshowedconclusion: "skipped"on a whole PR stack that was legitimately the trusted account's own work.repository:/ref:to point at the PR's fork --claude-code-actionfetches and reviews the PR's content itself; the override was also breaking that internal fetch (couldn't find remote ref pull/<n>/head). Restoredpersist-credentials: falseon that step (was silently dropped when the override was removed -- same permissions block grantspull-requests: write, a real write-capable credential, with nothing here that legitimately needs it in.git/config).--allowedTools mcp__github_inline_comment__create_inline_commentso the code-review plugin's agent-mode run actually starts the inline-comment MCP server (was silently falling back to one consolidated comment instead of real per-line inline comments).actions: writepermission -- no narrower scope exists for cache-write alone; without it, the action's internal cache save silently fails every run (a warning, not a hard failure, so it looks fine while just being slower/uncached).claude.ymlactions: write(wasread) for the same cache-write reason.actions/checkout@v4->@v7.Test plan