fix(nanoclaw): make legacy package non-installable - #308
Conversation
| if (!safety.safe) { | ||
| // Return the advisory evidence to the host installer or operator. | ||
| await showSecurityWarning(safety.advisories); | ||
| if (await getUserConfirmation()) { | ||
| await installSkill(userRequestedSkill); | ||
| } | ||
| return { recommendation: 'do-not-install', safety }; | ||
| } |
There was a problem hiding this comment.
Invalid recommendation label
recommendation: 'do-not-install' doesn't match the documented recommendation enum in skills/clawsec-nanoclaw/docs/SKILL_SIGNING.md, so the example diverges from the published contract — should we switch it to block or update the enum everywhere if a new label is intended?
Want Baz to fix this for you? Activate Fixer
Other fix methods
Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
skills/clawsec-nanoclaw/SKILL.md around lines 107-111, in the “Pre-Installation
Advisory Review” example logic that returns { recommendation: 'do-not-install', safety
} when !safety.safe, fix the inconsistent recommendation label. Verify the published
contract in skills/clawsec-nanoclaw/docs/SKILL_SIGNING.md (enum values “install” |
“block”) and change the example to use the correct rejection value (likely
recommendation: 'block') so the example matches the documented schema and surrounding
terminology. If the intent is to introduce 'do-not-install' as a new enum value, update
the docs enum everywhere it’s defined and keep the example + schema consistent.
There was a problem hiding this comment.
Commit 09b72d3 addressed this comment by deleting the example containing the invalid do-not-install recommendation label.
| const skillJson = JSON.parse(read('skill.json')); | ||
| const skill = read('SKILL.md'); | ||
| const readme = read('README.md'); | ||
| const install = read('INSTALL.md'); | ||
| const signing = read('docs/SKILL_SIGNING.md'); | ||
| const integrity = read('docs/INTEGRITY.md'); | ||
| const changelog = read('CHANGELOG.md'); | ||
| const signatureTool = read('mcp-tools/signature-verification.ts'); | ||
| const advisoryTool = read('mcp-tools/advisory-tools.ts'); |
There was a problem hiding this comment.
False-confidence contract test
nanoclaw-v1-compatibility.test.mjs only reads mcp-tools/signature-verification.ts and mcp-tools/advisory-tools.ts as text and matches prose strings, so runtime recommendation drift from clawsec_verify_skill_package can slip through without failing the suite — should we exercise the MCP tools or assert the JSON recommendation fields too?
Want Baz to fix this for you? Activate Fixer You can also update your AI coding guidelines based on this comment by apply pr to [branch name]
Other fix methods
Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
skills/clawsec-nanoclaw/test/nanoclaw-v1-compatibility.test.mjs around lines 19-27, the
test defines `signatureTool` and `advisoryTool` by reading the MCP tool TypeScript files
as plain text via `read('mcp-tools/...ts')`. Refactor this so the test actually
imports/instantiates the real MCP tool modules and runs the relevant
verification/advisory functions (or whatever exported entrypoints exist) with stable
test inputs, then asserts against the runtime output (e.g., the returned
`recommendation`/fields) instead of regex-matching the source text; update the related
assertions that currently target those strings (around lines ~68-77) to validate the
tool’s output matches the compatibility expectations. This ensures recommendation
drift at runtime can’t slip by as long as the prose regexes still match.
Summary
clawsec-nanoclaw0.0.11 as a historical, runtime-unverified NanoClaw v1-era recordinstallable: false, assert no supported NanoClaw version range, and explicitly reject NanoClaw v2 compatibilityWhy
The existing package described pre-v2 NanoClaw surfaces as current and could be read as usable on NanoClaw v2. We do not have runtime acceptance evidence for a supported NanoClaw adapter. Shipping the old executable payload would therefore be misleading and unsafe.
This PR preserves the historical record without presenting it as an installable skill. A future NanoClaw v2 adapter must be a separately tested release with a pinned compatibility range and apply, update, resume, removal, and rollback evidence.
Scope
skills/clawsec-nanoclaw/**installable: falserelease-policy enforcementRemote acceptance
The exact combined working tree was archived, copied with
scp, and tested in a fresh quarantine ondavida@20.14.133.241before these commits were pushed./tmp/clawsec-nanoclaw-cleanup.RRDtmAnpm ci: 422 packages, zero reported vulnerabilitiesskills/clawsec-nanoclaw/test/*.test.mjstest passed, including 8/8 hardening testspython3 utils/validate_skill.py skills/clawsec-nanoclawpassedscripts/test-skill-*.mjstest passed, including 19 hostile-archive casesbash -n scripts/release-skill.shpassednpx tsc --noEmitpassednpm run buildpassed and generated 115 wiki exportsfalsefrom the installability contract--require-publicationrejected the exact skill as expectedNo local test or build is used as acceptance evidence.
Release boundary
This PR is draft-only. Do not merge, tag, create a GitHub Release, or publish to ClawHub or another skill store as part of this work.