feat(plh): validate plugin.json skills:-array entries (CA-PLH-016)
PLH now validates each entry of a plugin.json `skills` field (string|array):
every entry must resolve to an existing directory inside the plugin root.
One finding per bad entry (medium, plugin-hygiene), problem ∈ {non-string,
escapes-root, not-found, not-a-directory}. Mirrors `claude plugin validate`.
String|array normalized so a non-string top-level value is caught too.
Verifiseringsplikt: the plan's "CC suggests the parent directory" error text
is NOT in the primary docs — dropped. Only the four primary-source-verified
conditions are asserted (escape backed by the path-traversal rule).
Tests +3 (941->944). Scanner count unchanged (13). --json/--raw byte-stable.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ter3E2JSi1Khgmuf2kady8
This commit is contained in:
parent
9b63125f6a
commit
76d5eda101
9 changed files with 189 additions and 2 deletions
6
tests/fixtures/plugin-skills-array/.claude-plugin/plugin.json
vendored
Normal file
6
tests/fixtures/plugin-skills-array/.claude-plugin/plugin.json
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"name": "skills-array-plugin",
|
||||
"description": "Fixture: plugin.json skills: array entry validation (CA-PLH-016)",
|
||||
"version": "1.0.0",
|
||||
"skills": ["./valid-skill/", "./a-file.md", "./missing-dir/", "../escape", 42]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue