Repository navigation
feat(skills): approve a third-party skill by registry id against a pinned hash (#878) - #985
Merged
Merged
Conversation
…, valid, approved_hash)
…osine floor applies
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
Contributor
Author
|
Cora's finding on Generated by Claude Code |
This was referenced Dec 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
tole skills fetch <registry-id> --pinned-sha <sha256> [--source-url U] [--workspace DIR](#878, step 3 of #973). It approves a third-party skill the owner already placed in a skills directory, after tying it to a uteke registry id. Base isdevelop(#975 has merged).Why
#878 asked for a fetch from the uteke registry at a pinned SHA. Verified against uteke 0.24.1 and its source: no CLI or remote surface returns a skill body.
skill showanswers a manifest, the package hash and a ledger, the remote dropssource_path, and the "registry" is a library of directories already on a machine. So tole does not fetch code: no new network path, nothing unpacked, nothing executed, so no transport to bound. The owner brings the bytes by a channel they chose (git clone at the commit, a copy) and this command verifies them.Changes
skill/fetch.rs(shell-tools builds): resolves the id withUtekeSkillIndex::show(name and recorded hash only), reads the local package with the feat(skills): load only owner-approved skill content hashes #591 limits (no symlink, size and file caps), and requires its hash to equal BOTH--pinned-shaand uteke's recorded hash. Either mismatch, a missing or malformed record, or a 40-digit git commit pin (cannot be checked against bytes) refuses before anything is written.approve, with--source-url, the registry id and the pin as stated data.approveandfetchshareapprove_and_record; the approval re-reads the package and records the hash it verified from that same snapshot, so a file edited during the prompt is refused and nothing is written.TOLE_UNDER_SESSIONor a child agent (security(trust): owner-only trust records can be written by the agent (tole CLI from run_command, file tools when the workspace holds the data dir) #684), and without a terminal on stdin, with no--hashbypass (stricter thanapprove), so serve, acp, cron and scripts cannot reach it. CLI subcommand only: no model tool, nothing from project config. Like every owner command the gate is advisory (feat(plugins): sandbox wrapper for third-party stdio servers, lazy start, tool retrieval by meaning #601): a model with a shell can allocate a pty. Errors are redacted with the process secrets and made terminal-safe.safe_text,package_listing) in bothfetchand the existingapprove, because a name containing ESC, CR or a newline could hide or forge the listing the owner reads before typingy.docs/skills-registry-design.mddecision, open questions and caveats, README, CHANGELOG. The caveat is stated everywhere: uteke records its hash from the same directory, so equality with the pin adds little unless the pin comes from a source the owner trusts independently of that directory.Testing
skill::fetch(fake uteke whoseshowalso returns injection text inbodyandcontent): match then ledger line equals the manual line and holds no body text; pin mismatch; uteke mismatch; missing or malformed record; edited local file; staleexpecthash refuses and writes no approval or ledger file; commit-sized or malformed pin refused before uteke is called; onlyskill showandskill --helpare ever called; symlinked package refused; "n" or EOF at the prompt writes nothing and "y" writes exactly one ledger line; a file name with ESC, CR and a forgedhashline cannot forge the listing.owner_only_e2e(real binary):skills fetchrefused under a session, under a child agent and without a terminal, writing nothing and never calling uteke. The positive real-tty path is covered only through the injectedrunseam (a unit test), not through a pty.approve, no model tool or config path), hash binding (same snapshot hashed and recorded, same feat(skills): load only owner-approved skill content hashes #591 limits, ledger before approvals as before), uteke-as-attacker handling (id validated byname_ok, output capped, onlyapproved_hashorcurrent.hashread), ledger line shape and control-character rejection, and the refusal of 40-digit commit pins. It found the unsanitized file names in the prompt (fixed here, also inapprove), test gaps (stale-hash andcli()ordering, now covered) and a doc-honesty point about the pin (now stated everywhere).cargo fmt, clippy-D warnings(default,--no-default-features,--no-default-features --features shell-tools) clean.skill::lib tests,owner_only_e2eandface_paritypass. Twotests/agents.rstests (parent_spawns_child_polls_until_settled,a_run_never_touches_the_machine_home) failed in the author's sandbox (real HOME has.codecoraand acorabinary on PATH); CI is the arbiter.scripts/review-local.shnot run (no LLM key in the author session); the CI Cora job is the gate.