Skip to content

fix(harness-config): stop auditing nested skills inside ~/.claude/plugins - #15413

Merged
kyle-sexton merged 2 commits into
mainfrom
chore/harness-config-cc-2.1.321-2.1.322
Nov 11, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
chore/harness-config-cc-2.1.321-2.1.322

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

No related issue: Claude Code 2.1.321-2.1.322 changelog ingest (owner-approved Q108)

Summary

Claude Code 2.1.321 (item 2.1.321-098) stopped loading .claude/skills folders inside ~/.claude/plugins. /harness-config:audit-permission-grants still treated them as loadable nested skills and flagged their allowed-tools.

Fix

  • permission-rule-check.sh: a .claude/skills/<name>/SKILL.md nested below the scan root and under ${CLAUDE_CONFIG_DIR:-~/.claude}/plugins/ is counted as non-loadable and not audited. The scan root's own .claude/skills/ stays audited, because a session started there (such as a marketplace checkout) loads them as project skills. A plugin's own skills/<name>/SKILL.md there is still audited. The comment names the remaining gap: a session that adds a nested folder with --add-dir would still load it, and the exclusion count shows it.
  • reference/criteria.md: the recheck pointer cites the anchored changelog entry and skills section, is stamped 2026-11-11, and states the exception in our own words.
  • Test case 6f2: scan roots at the plugin version directory (the root's own skill is audited, the nested one is excluded) and at plugins/ (both are excluded), a CLAUDE_CONFIG_DIR variant, and a control that audits the same tree outside the plugins directory.
  • Changelog fragment under .changes/harness-config/.

Verification

  • permission-rule-check.test.sh: 447/451 pass. The 4 failures (one linked-worktree check, three subdirectory-start checks) fail the same way on unmodified origin/main on the authoring machine.
  • shellcheck clean; scripts/check-vocabulary.py clean.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr

Claude Code 2.1.321 (item 2.1.321-098) stopped loading `.claude/skills`
folders inside ~/.claude/plugins. audit-permission-grants still treated
them as loadable nested skills and flagged their allowed-tools.

The loadability model now excludes a nested `.claude/skills/<name>/SKILL.md`
whose path lies under ${CLAUDE_CONFIG_DIR:-~/.claude}/plugins/ and counts it
as non-loadable. A plugin's own skills/<name>/SKILL.md there is still
audited. The config-root resolution moves above the frontmatter loop so
the loadability check can use it. criteria.md re-stamps its recheck
pointer and names the exception.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T18:18:10.500813Z 9e74142 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 69af9a95ba8f49e667ae299b8a6a4289d7469b79: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #15413 (incremental, 9e74142 → 69af9a9)

I found no security issues in this push. This was an incremental review. I read every hunk of the 4 files changed since 9e741427, and the full diff only for context. None of the 4 files matches a TRUSTED PATHS: glob or any trust control (trusted-trigger, lane token, kill switch, token broker, merge holds). The push changes no plugin manifest, so no manifest lines apply. Because the prior-findings file says blocking only: yes, I would have reported only CRITICAL and IMPORTANT findings; there were none of either.

What changed since the last review

  • The exclusion is narrower. In frontmatter_is_loadable, a new early return 0 keeps the scan root's own .claude/skills/<name>/SKILL.md audited when the scan root is inside the user plugins directory (permission-rule-check.sh#L656). Only .claude/skills/ folders nested below the scan root are still excluded and counted.
  • Docs and changelog. The script comment, criteria.md and the changelog fragment now describe that rule. The recheck pointer now cites the docs changelog anchor.
  • Tests. Test 6f2 adds a deeper nested skill (vendor/x/.claude/skills/deep). It checks that the root's own skill is audited when the scan root is the plugin version directory, and that both skills are excluded when the scan root is plugins/.

Security reasoning

  • Direction of the change. The change makes the advisory audit report more than the previous head did. More frontmatter is audited and nothing new is hidden, so it fails toward reporting.
  • Path matching. rel is computed as ${1#"$ROOT"/} (L652), so .claude/skills/* matches only at the scan root. A deeper path cannot match that prefix and slip past the under_user_plugins check. The real-path comparison at L641–L644 is unchanged.
  • Instruction-surface lens. The push removes, narrows or softens no standing instruction, hook allowlist or block list. The criteria.md edit restates the loadability model to match the code.
  • Out of scope. The audit gates no merge. No token, secret, trusted actor, credentialed lane or billing surface is involved.

No embedded instructions were found in the PR context. Prior findings: the only entry is the previous lane summary, which reported no findings, so nothing carries over.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude-review: 2 inline finding(s) on 9e741427648993fe76c351f3bd79beb3f91844bf; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 69af9a95ba8f49e667ae299b8a6a4289d7469b79: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): PR #15413, 9e741427 → 69af9a95

I found no blocking problems in this push.

I read every hunk of the 4 files in the incremental list: the changelog fragment, reference/criteria.md, permission-rule-check.sh and permission-rule-check.test.sh. I also read the surrounding frontmatter_is_loadable / under_user_plugins code at head for context. This lane already reviewed an earlier head (blocking only: yes), so I reported only blocking findings and left out advisory ones.

What changed.

  • Root-level skills are audited again. frontmatter_is_loadable now returns loadable for a scan-root-level .claude/skills/<name>/SKILL.md (that is, rel == .claude/skills/*) before the user-plugins exclusion runs (permission-rule-check.sh#L656). Only .claude/skills/ folders nested below the scan root inside <config root>/plugins/ are now excluded. This fixes the earlier advisory about project skills at the scan root.
  • Wording and pointer. The script comment and criteria.md now state the decision in our own words and point at the anchored changelog entry (changelog#2-1-321) and the skills nested-discovery section, each with an as-of date and a recheck trigger. This fixes the earlier advisory about restated upstream detail and an unanchored pointer.
  • Tests. Case 6f2 adds a deeper vendor/x/.claude/skills/deep fixture. I checked the expected counts against the head logic:
    • Scan rooted at the plugin version directory: inner is audited and deep is excluded, so the count is 1.
    • Scan rooted at plugins/: both are excluded, so the count is 2. The plugin's own skills/deploy stays audited through the manifest check.
    • The CLAUDE_CONFIG_DIR variant and the control tree outside the plugins directory still assert the right side.

Settled threads. Both earlier threads were resolved by the owner, with a stated fix in 69af9a95, and are marked lines changed since resolution: no. I did not raise them again.

Closing issue. None: the PR is a changelog ingest (owner-approved Q108), so there are no acceptance criteria to check.

Verification. The PR reports 447/451 tests passing, with 4 failures said to also fail on main, plus clean shellcheck and vocabulary checks. All of that is the author's claim and I have not verified it: this lane has no shell.

Plugin manifests. No plugin.json or marketplace.json changed. The fragment's bump: patch still fits.

Spend. None.

I found no embedded instructions in the PR context, settled-threads or prior-findings files.

The user-plugins exclusion also dropped the scan root's own
`.claude/skills/`. When the scan root is the session's project, such as
a marketplace checkout under ~/.claude/plugins, those load as project
skills. Only `.claude/skills/` folders nested below the scan root are now
excluded. Test case 6f2 covers both shapes.

The script comment and criteria.md state the decision in our own words
and point at the anchored changelog and skills sections with an as-of
date and recheck trigger, without restating the version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VQb9Pz6CBRwjqpnFDbP9Rr
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 2731119 Nov 11, 2026
67 checks passed
@kyle-sexton
kyle-sexton deleted the chore/harness-config-cc-2.1.321-2.1.322 branch November 11, 2026 19:43
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant