feat: add relyable scanner adapter (functional re-derivation evidence)#11
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 10:37 PM ET / July 18, 2026, 02:37 UTC. Summary Reproducibility: not applicable. as a bug report: this is a new scanner integration, and the PR body supplies a concrete claimed Docker-mode run rather than a failing current-main reproduction. Review metrics: 2 noteworthy metrics.
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:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Decide whether functional re-derivation belongs in ClawScan’s built-in scanner catalog; if accepted, rebase the branch, retain explicit per-scanner credential forwarding and Docker-only execution acknowledgement, then validate the rebuilt runtime with a redacted live scan. Do we have a high-confidence way to reproduce the issue? Not applicable as a bug report: this is a new scanner integration, and the PR body supplies a concrete claimed Docker-mode run rather than a failing current-main reproduction. Is this the best way to solve the issue? Unclear until maintainers choose the product boundary. The adapter follows the repository’s command-backed, raw-evidence pattern, but adding an execution-capable scanner to the built-in runtime is not the only viable delivery model. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a37f49f1b09f. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
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 (3 earlier review cycles) |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Per the clawsweeper review's security-boundary finding: generic ANTHROPIC_API_KEY / OPENAI_API_KEY are removed from the scanner's OptionalEnv, so the sandbox env passthrough never auto-forwards an operator's generic provider keys to this scanner. Setting RELYABLE_LLM_API_KEY (+ RELYABLE_LLM_PROVIDER) is an explicit per-scanner opt-in; standalone relyable-scan still honors the generic keys outside ClawScan. Verified live in both directions: the prefixed key forwards and enables the cold lane; a generic key alone no longer reaches the scanner (llmLaneAvailable: false in-sandbox).
0479449 to
da490d0
Compare
|
Rebased onto current Resolution notes:
Refreshed validation on the rebased head:
Command and run summary (paths redacted): The relyable scanner block, from {
"schemaVersion": "relyable-scan-v1",
"axis": "functional-rederivation",
"scanner": {"name": "relyable", "version": "0.2.0"},
"allowHostExec": true,
"llmLaneAvailable": false,
"skills": [{
"skill": "drifted-adder",
"grade": "self_spec",
"selfSpecTier": "S-B",
"verdict": "DIVERGED",
"tools": {"drifted-adder:add": "CONTRADICTS"}
}]
}
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Per the maintainer's direction to keep the runtime image lean, the Dockerfile no longer installs relyable; the scanner stays registry-backed and operator-installed: - docker/clawscan-runtime/Dockerfile: back to upstream (no RELYABLE_REF, no install line — zero new bytes in the shipped image) - docs/scanners.md: new 'Relyable and the sandbox' section — clawscan install for host mode; derived-image recipe + --sandbox-image or profile sandbox.image for Docker mode - adapter: an 'executable file not found' failure now points at the derived-image / clawscan-install paths, since the stock image no longer carries relyable-scan - registry description + both catalog rows note the not-preinstalled posture Sandbox semantics are unchanged: --allow-host-exec is still passed only in Docker sandbox mode, and relyable itself stays fail-closed without an acknowledgement.
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: feat: add relyable scanner adapter (functional re-derivation evidence) This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
What
Adds
relyableas a registry-backed scanner adapter — deliberately notpreinstalled in the runtime image (see Execution safety) — emitting graded
functional re-derivation evidence for a skill — does it still reproduce the author's own committed spec?
The adapter shells out to
relyable-scan <target> --json(veriker/relyable, Python ≥3.11; installed on the
host via
clawscan install relyable, or into a derived sandbox image for Docker mode)and preserves its
relyable-scan-v1payload as raw evidence, exactly like the other command-backedscanners.
Why this belongs in a security-scan harness
It's a different, complementary axis — and it's deliberately labeled as such
(
"axis": "functional-rederivation"is stamped in-schema). Provenance provesauthorship; the security scanners prove it won't hurt you; neither proves the skill
does what its docs claim. A skill whose behavior has drifted from its own documented
contract — regression, post-publish tampering, or an honest bug — is a trust signal the
current scanner set can't produce. Relyable emits the strongest grade that applies:
exogenous— a declaredrederive.jsonproperty manifest (idempotence /round-trip); relyable computes both sides of the relation from the skill's own code
and mutation-tests the result against vacuity, so the author never votes on the
expected value
self_spec— the author's own committed oracle (shipped test suite > documentedI/O examples in SKILL.md/README > paired example fixtures), re-run deterministically
with per-tool
REPRODUCES/CONTRADICTS/UNJUDGEABLE_*cold_golden— when an LLM key is set, a code-blind model infers goldens fromSKILL.md alone (it never sees source) and a mechanical compare grades them;
it abstains unless the docs pin exact behavior, passes are mutation-tested, and a
divergence is reported as unconfirmed, never as an accusation
non_rederivable— nothing checkable: an honest hole, never a fabricated passEvidence, not policy, in line with the harness's evidence-first invariant. It does
not detect malware or prompt injection and never claims to.
Measured on your public corpus (
clawhub-security-signals,eval_holdout, n=3368):0 skills declare a re-derivation manifest, 15 (0.45%) ship any committed oracle, and
343 (10.2%) have a runnable entrypoint. Running the cold lane over all 343 runnable
skills: 330 abstain (327 because the docs do not pin exact output — the integrity
rules refuse to guess — plus 3 unparseable constructor responses), 2 pass
non-vacuously (mutation kill 25% and 8%), 5 reproduce but are demoted as vacuous,
3 diverge (reported unconfirmed), 3 unjudgeable (every constructed golden errored).
We read that distribution as
the point, not a limitation: the ecosystem's functional-trust bottleneck is
author-committed oracles, and the scanner reports honest floors instead of inflating
coverage. One documented I/O example moves a skill to
self_spec; a one-filemanifest moves it to
exogenous.Execution safety
Grading executes skill code, so the scanner is fail-closed: without an explicit
disposable-host acknowledgement it runs nothing — the
self_speclane reportsUNJUDGEABLE_NO_SANDBOXper tool, and the exogenous/cold lanes record an explicitno-ack degrade reason. The adapter passes
--allow-host-execonly in Docker sandboxmode; with
--sandbox off, operators opt in viaRELYABLE_SCAN_ALLOW_HOST_EXEC=1.Skill code that does run gets a scrubbed environment allowlist, so an env-dumping
skill cannot exfiltrate a forwarded LLM key into the evidence. Key forwarding itself
is narrowed to an explicit opt-in: only
RELYABLE_-prefixed vars ride the sandboxenv passthrough, never an operator's generic provider keys. No required env vars;
no secret-bearing flags; the payload records LLM-key availability as a presence
boolean only.
Runtime image: unchanged. Per the maintainer's preference to keep the runtime
image lean, the net PR diff leaves
docker/clawscan-runtime/Dockerfilebyte-identicalto
main— relyable is registry-backed but not preinstalled. Operators opt in explicitly:clawscan install relyablefor host mode, or a two-line derived image(recipe in
docs/scanners.md#relyable-and-the-sandbox) passed via--sandbox-imageor a profile's
sandbox.imageto keep Docker-mode execution. Against the stockimage, selecting relyable records an explicit
failedscanner result whose errorpoints at those two paths, and nothing executes.
Changes
internal/runner/relyable_scanner.go— the adapter (snyk-shaped: JSON-on-stdoutwins; non-zero exit with valid JSON →
completed+ error recorded; empty/invalid →failed). Anexecutable file not foundfailure points at the derived-image /clawscan installpaths, since the tool is not preinstalledinternal/runner/scanner_registry.go— registry entry (command-backed, installable;the install plan mirrors the derived-image recipe, including
--with pytest, so ahost install can re-run shipped test suites too).
The cold lane's LLM access is an explicit per-scanner opt-in: only
RELYABLE_-prefixedenv vars are listed for sandbox forwarding, and generic
ANTHROPIC_API_KEY/OPENAI_API_KEYare deliberately NOT auto-forwarded (standalonerelyable-scanhonors them; ClawScan never hands them over implicitly). Defense indepth behind that: relyable executes skill code under a scrubbed environment
allowlist, so even a forwarded key can't be exfiltrated by an env-dumping skill into
the evidence.
internal/runner/relyable_scanner_test.go— 6 tests incl. the sandbox/ack matrix and the missing-executable hintscanner_registry_test.go,cmd/clawscan/main_test.go— roster fixtures updateddocs/scanners.md+README.md— the catalog row (both copies of the Availablescanners table, per the socket-adapter precedent) plus a "Relyable and the sandbox"
section:
clawscan install relyablefor host mode; the derived-image recipe forDocker mode (
--with pytestbecause relyable re-runs an author's shipped test suitevia its own interpreter, and uv tool venvs are isolated)
go test ./...green;gofmt -lclean.Example evidence (excerpt of a real sandbox-mode run, drifted skill)
Produced by this patch's adapter in
--sandbox docker, with relyable installed at apinned ref into a derived image built
FROM ghcr.io/openclaw/clawscan-runtime:latestper the docs recipe and selected via
--sandbox-image— the sandbox is thedisposable-host ack, so the adapter passes
--allow-host-execand the drifted codeactually executes:
{ "schemaVersion": "relyable-scan-v1", "axis": "functional-rederivation", "skills": [{ "skill": "drifted-adder", "grade": "self_spec", "selfSpecTier": "S-B", "verdict": "DIVERGED", "tools": {"drifted-adder:add": "CONTRADICTS"}, "degradeReasons": {"exogenous": "no rederive manifest (spec-ref or property) declared"} }], "honesty": { "unfakeableClaimReservedFor": "exogenous", "selfSpecMeaning": "consistency with the author's own committed spec, not correctness", "securityAxis": "not covered: ... run alongside security scanners" } }On the README's own demo target (Trail of Bits
csv-summarizer@4ffbf946) — runsperformed on this PR's earlier heads; the grading path is unchanged by this revision —
relyable reports
non_rederivable/OUT_OF_SCOPE: the skill commits no checkable oracle (notests, no documented I/O examples), and in Docker sandbox mode with an LLM key present
the cold constructor ABSTAINS — the docs pin no output format, so the integrity rules
refuse to guess and no code is executed for grading. Without the sandbox ack, the
scanner fail-closes to the same honest floor with an explicit no-ack degrade reason
recorded per lane.
Follow-ups we'd propose separately (not in this PR)
relyable, submitted through the documentedproposals/→ SkillTrustBench leaderboard path, so the evidence value is judged onnumbers.
rederive.jsonmanifest convention (spec-refs and more propertykinds beyond idempotence/round-trip) — the corpus's zero-manifests count above is
the demand case, and it dovetails with the capability-manifest direction.
🤖 Generated with Claude Code