Repository navigation
fix(clawhub): reject mutable GitHub skill refs - #97157
Conversation
|
Codex review: needs changes before merge. Reviewed July 11, 2026, 9:41 AM ET / 13:41 UTC. Summary PR surface: Source +9, Tests +27. Total +36 across 2 files. Reproducibility: yes. Current main accepts resolver commit strings without full-SHA enforcement, and the submitted real CLI fixture demonstrates mutable-ref installation before the fix; the remaining source URL mismatch follows directly through the metadata writers. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge
Security Review findings
Review detailsBest possible solution: Canonicalize the complete resolver-approved GitHub identity before side effects so download, policy, origin, lock, telemetry, and source links all identify the same immutable commit. Do we have a high-confidence way to reproduce the issue? Yes. Current main accepts resolver commit strings without full-SHA enforcement, and the submitted real CLI fixture demonstrates mutable-ref installation before the fix; the remaining source URL mismatch follows directly through the metadata writers. Is this the best way to solve the issue? No, not yet. The resolver acceptance boundary is the narrowest maintainable fix, but the returned resolution remains partly mutable because its persisted source URL is still resolver-controlled. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fa77fe10d526. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +9, Tests +27. Total +36 across 2 files. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (5 earlier review cycles)
|
|
Pushed This commit extends the fix past the download path: The refreshed @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Addressed both rank-up moves; head is unchanged at [P1] Real CLI / fixture-registry proof (replaces the stubbed-driver evidence). Drove the real
Compatibility decision. The install-resolution type already documents this field as a "Commit-pinned source approved by ClawHub's install resolver policy" ( @clawsweeper re-review |
ce97339 to
5ceedac
Compare
|
@clawsweeper re-run |
|
🦞🧹 I asked ClawSweeper to review this item again. |
bc60b88 to
7c9631c
Compare
7c9631c to
bd5b396
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd5b3961e5
ℹ️ 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".
| ); | ||
| } | ||
| throw new Error(resolution.message || `Skill "${resolution.slug}" is not installable.`); | ||
| return { ...resolution, github: { ...resolution.github, commit } }; |
There was a problem hiding this comment.
Rebuild the source URL from the pinned commit
When the resolver returns a valid full SHA in github.commit but leaves github.sourceUrl pointing at a mutable ref such as .../tree/main/..., this accepts the resolution and only canonicalizes commit. The later readInstallResolutionSourceUrl(latestResolution) path then persists that mutable URL into .clawhub/origin.json and the lockfile, so status/source metadata can still point users at moving code even though the installed version was pinned. Validate that sourceUrl matches the normalized commit, or build it from repo/path/commit here before returning the canonical resolution.
Useful? React with 👍 / 👎.
bd5b396 to
75619a8
Compare
|
Land-ready work completed for exact head What changed:
Review:
Exact-head evidence:
Safety boundary for contributor code: fresh single-SHA AWS lease; public network; Tailscale disabled; empty instance profile; trusted-main bootstrap; IMDSv2 IAM endpoint denied; isolated Known proof gaps: none. |
|
Merged via squash.
|
* fix(clawhub): reject mutable GitHub skill refs Co-authored-by: yetval <[email protected]> * chore: keep release notes in PR metadata --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
ClawHub marks GitHub-backed skill resolutions as immutable but OpenClaw trusted the resolver's
github.commitstring without enforcing a full commit SHA. A branch or tag such asmaincould therefore be downloaded, installed, and persisted asmutable: false, allowing the installed code to move behind an allegedly pinned identity.This behavior is present in current
main, stablev2026.6.11, and betav2026.7.1-beta.5.Why This Change Was Made
assertInstallResolutionAllowed, before any download or filesystem side effect.git:installs unchanged; direct Git installs intentionally support mutable refs and record them as mutable.The submitted later-stage validation was moved to the resolver acceptance boundary so downstream callers cannot accidentally reuse the raw ref.
User Impact
Normal ClawHub GitHub-backed installs continue unchanged. A custom or malformed resolver response containing a branch, tag, short SHA, or other non-pinned ref now fails with clear guidance before download. This enforces ClawHub's documented 40-character commit contract; it adds no config, migration, or fallback surface.
Evidence
mainfails before archive download, extraction, policy evaluation, or installation.oxfmtandgit diff --checkpass.check:changedpassed.mainfailed before archive download or filesystem metadata.f6075a5060ed3c86536055700d95eb68655162eeunchanged through codeload, origin, and lock metadata.Root
CHANGELOG.mdis release-owned, so the release-note context and @yetval credit are carried here and in the replacement commit.