anthropics / anthropics/claude-code

[DOCS] plugins/README.md still describes security-guidance v1 (wrong hook type, wrong pattern count)

オープン 初心者向け
#89,728 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
area:docs bug documentation
主要言語
Python
スター
145k
フォーク
23.1k
PR マージ指標
PR 指標を取得中

説明

### Documentation Type

Incorrect/outdated documentation

### Documentation Location

https://github.com/anthropics/claude-code/blob/main/plugins/README.md

### Section/Topic

"Plugins in This Directory" table — the security-guidance row

### Current Documentation

| [security-guidance](./security-guidance/) | Security reminder hook that warns about potential security issues when editing files | **Hook:** PreToolUse - Monitors 9 security patterns including command injection, XSS, eval usage, dangerous HTML, pickle deserialization, and os.system calls |

### What's Wrong or Missing?

441892e ("Update security-guidance plugin") rewrote the plugin for v2 but
touched nothing outside plugins/security-guidance/, so the catalog row in
plugins/README.md still describes v1. Three things are wrong:

1. Hook type. The row says PreToolUse. hooks/hooks.json registers
SessionStart, UserPromptSubmit, PostToolUse and Stop — there is no
PreToolUse hook at all.

2. Pattern count. The row says 9. SECURITY_PATTERNS in hooks/patterns.py
has 25 entries.

3. Missing layers. v2 added two review layers the row never mentions: the
Stop-hook LLM diff review, and the agentic reviewer that runs on
`git commit` / `git push` (PostToolUse with matcher Bash, gated by
`if: Bash(git commit:*)` and `if: Bash(git push:*)`).

The plugin's own README (plugins/security-guidance/README.md) is accurate
and already documents all three layers — only the catalog summary drifted.

### Suggested Improvement

Replace the row with one derived from hooks.json and patterns.py:

| [security-guidance](./security-guidance/) | Three-layer security review of Claude-generated code: regex pattern warnings on edits, an LLM review of the diff when Claude finishes a turn, and an agentic reviewer on `git commit`/`git push` | **Hooks:** PostToolUse - Warns on ~25 known-dangerous patterns (command injection, XSS, `eval`, unsafe deserialization, disabled TLS verification, weak crypto) when editing files
PostToolUse[Bash] - Agentic commit/push review that traces data flow across files
Stop - LLM review of the git diff, fed back so Claude can fix findings first
SessionStart - Prepares the Agent SDK environment the reviewers run in |

Notes on the wording:
- The pattern categories come from the actual ruleName values in
patterns.py (child_process_exec, innerHTML_xss, eval_injection,
pickle_deserialization, tls_verification_disabled, aes_ecb_mode, ...).
- "~25" matches the plugin README's own phrasing rather than pinning an
exact number that the next added pattern would invalidate.

I have this as a one-line commit on a fork, if that's easier to pull in
than retyping the table row:
https://github.com/chanmilee-fe/claude-code/commit/d82822b07cd2c66ec2f56acdb3705f3841b8a6ef

(I tried opening a PR first, but the repo restricts PR creation to
collaborators.)

### Impact

Medium - Makes feature difficult to understand

### Additional Context

Two related items found in the same pass — happy to file separately:

- marketplace.json lists security-guidance at version 1.0.0, while
plugins/security-guidance/.claude-plugin/plugin.json says 2.0.0.

- The code-review row in the same table has drifted the same way: it lists
"5 parallel Sonnet agents", but commands/code-review.md launches 4, two of
which are Opus. That plugin's own README additionally documents a 0-100
confidence scoring system with an 80 threshold — including a section on
how to adjust the threshold — that no longer exists in the command file.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Read plugins/README.md alongside plugins/security-guidance/hooks/hooks.json, hooks/patterns.py, and plugins/security-guidance/README.md. Verify the hook names, pattern count, and three review layers against those sources. Done means the security-guidance catalog row accurately describes the current v2 plugin without outdated v1 details.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, python
領域
documentation
issue の種類
ドキュメント
難易度
1/5
見積もり時間
1時間未満
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
88/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。