Ci Review

anthropics/claude-plugins-official/plugins/claude-security/skills/ci-review

作者 anthropicsd0d514288960e7a78e1a76e4a3ec694416458726无许可证49K 个星标收录于 2026年11月24日更新于 2026年11月24日仓库今天更新

The scan that the plugin's GitHub Action runs.

精选仅含说明安全DevOps 与云端
AI 生成的概览

为 Claude Security 插件的 GitHub Action 运行无人值守安全扫描,检查拉取请求改动或分支并生成发现报告。

功能
读取插件的探测文件,判断是扫描拉取请求的改动还是整个已检出分支,然后按插件的扫描流程执行且不提出任何问题。它可选择生成建议补丁、复查此前报告的发现、标记报告完成,并派发发现解释器。最后用几句话报告扫描范围、发现数量以及旧发现的处理结果。
适用场景
适用于 Claude Security 插件 GitHub Action 任务中,需要在拉取请求或定时、手动分支运行上无人值守执行扫描的场景。它不用于交互式会话,此类场景下技能会引导用户使用常规扫描命令。
运行要求
需要 Claude Security 插件的探测文件与任务流程、可从仓库根目录读取的 git 检出,以及 Read、Glob、Grep 工具。技能本身不含脚本,但依赖插件的辅助脚本和派发的子代理;已禁用模型调用。

AI 概览如何生成和校验

GitHub Action scan

This door runs unattended in the GitHub Action's job: it scans a pull request's changes or, on any other event (a schedule, a manual run), the checked-out branch, and leaves the report for the job's later steps. Ask no questions at any point. Invoking this skill is the user's "Yes" to the scan's fixed start confirmation, so the scan recipe's step 3 is already answered; and where a recipe would ask, take its "I don't know" default and say what you chose. The scan's effort tier is the effort in the probe's file (step 1). A change_scan_effort of high there is the user's typed --change-scan-effort high.

Git here only reads, typed plainly from the repository root with no -C and nothing set in front of it: the job's environment already carries git's settings, and Claude Code may refuse any other spelling. So wherever a text spells GIT with variables in front or with -C, type the plain form. List files with git ls-files, and read one at a revision with git show <rev>:<path> (not ls-tree). Write nothing through git.

The report directory goes in the folder the probe's file names as reports (step 1), not in the recipes' start folder: wherever this skill or a recipe makes or names the report directory, CLAUDE-SECURITY-<ts> or <report directory>, use the absolute path <reports>/CLAUDE-SECURITY-<ts>. The job shows the report's prose to people, in the review or on the job summary, so write no absolute path of this machine in that prose: name each file from the repository root.

  1. Read the probe. Read .git/claude-security-probe.json. If it is not there, stop with one line: this command is for the Claude Security plugin's GitHub Action; to scan here, type /claude-security. If branch_scan is true, go to step 8. Otherwise, when pull_request.merge_base is a sha, that is the scan's base. If fixes_only is true, the scan is done: its report directory is the one in reports that holds CLAUDE-SECURITY-COMPLETE. Do step 3 on it, then step 7. Skip steps 2, 4, 5 and 6, also where step 3 sends you to step 4.
  2. Scan the changes. Follow the scan-changes recipe [blocked] from "Resolving the range and sizing it" through "Delivery", as a branch's changes with --base <merge_base> when the probe gave one and the recipe's default base order otherwise, with <reports> as the first argument of its step 5's command; skip its sub-menu and its kickoff message. If the range has no changed files, say so in one line and stop. Start no later step until its redactor has finished.
  3. Suggest patches — only if the probe's suggest_patches is true, and no finding's cwe_id or other_cwe_ids holds CWE-798, CWE-259, CWE-321 or CWE-671 (with one, the review shows no finding's text and no fix). Otherwise skip to step 4. If both hold and a finding without older_than_the_change survived, follow the suggest-patches recipe [blocked] from "The patches" (its step 0) to the end of its step 5, on the report you just wrote with the selection all (at a change_scan_effort of high, the ids of the findings without older_than_the_change instead, as in F1,F3: there all takes older flaws too), REPO ROOT from git rev-parse --show-toplevel, and PATCH BASE the full commit id the scan stamped (revision.commit in the stamp); skip its sub-menu, Preconditions and Interview. Run it in an unclean working tree too: the line that write_scan_meta.py prints there, and the scan recipe's rule to make no fix offer, are for a session with a user. Where its --prepare prints units: [], leave the recipe and go to this skill's step 4. Tell each patch-generator and patch-verifier you dispatch, in the revision round too, what this job lets them run. The project's documented test command is worth one try. <reports>/node_modules (spell the path out), where it exists, is this job's own link to the packages installed in the checkout's top folder: packages that a test run finds through it are the project's own, not borrowed, and need no search for where they come from. A refused command is not retried in another spelling or tool. No ad-hoc probe is run (python3 -c, pip, a hand-written harness). They report what could not run and judge by reading. Hold your turn through every agent it dispatches, as its step 4 says; nothing wakes an unattended session that ends its turn.
  4. Re-check what was reported before. Skip this step, and write no file, when the probe's previous_findings is empty or absent, or when the new report's CLAUDE-SECURITY-RESULTS.jsonl has, for every entry, a finding with the entry's claudeSecurityPluginFindingId and line. Otherwise, for each entry with no such finding (one id can have several entries, each on a line of its own): read the file at the entry's path and line in this checkout with the Read tool (not a shell command) and judge whether the reported flaw is gone from there. Then write CLAUDE-SECURITY-PREVIOUS.json into the report directory: a JSON array with one object for each entry that you read, {"claudeSecurityPluginFindingId": "<id>", "line": <the entry's line>, "status": "fixed" | "not_reassessed", "note": "<one sentence>"} — fixed only when you read the code there and the flaw is gone from it, not_reassessed otherwise (you cannot tell, or the flaw is still there — say which in the note).
  5. Mark the report complete. If the scan rendered a report, Write a file named CLAUDE-SECURITY-COMPLETE, holding complete, in the report directory.
  6. Explain the findings of the change. Skip when any finding holds one of step 3's CWE ids. Dispatch one claude-security:finding-explainer for each line of CLAUDE-SECURITY-RESULTS.jsonl that lacks older_than_the_change, at most eight in one message, each with these five lines and nothing else: id: <the line's "id" value, such as F1>, jsonl: <report directory>/CLAUDE-SECURITY-RESULTS.jsonl, line: <the number of the finding's line in that file>, note: <report directory>/patches/<id>.md (note: none if step 3 was skipped), out: <report directory>/explanations/<id>.json. Hold your turn until all of a message's agents have replied, then send the next eight. Retry none and mend no file: where an explanation is absent, the review shows the scan's own text.
  7. Report. In a few sentences: what was scanned, how many findings, which got a suggested fix and which did not when fixes were drafted, and what became of previously reported findings; offer nothing further. Stop here.
  8. Branch scan. Follow the scan-codebase recipe [blocked] from its step 4 through "Delivery" over the whole repository, unscoped, setting focus by its size gauge; skip its sub-menu and kickoff message. Once its redactor has finished, if it rendered a report, write step 5's completion mark. Report in a few sentences: what was scanned, how many findings, and the stamped verification status; offer nothing further.

Environment and Paths (substituted at invocation, use verbatim)

  • SCRIPTS (helper scripts directory) [blocked]
  • REPORT SPEC (the report's Coverage section) [blocked]
  • PATCH SPEC (the patch products contract) [blocked]
  • PATCH REVIEW BRIEF (what a patch's researcher is asked) [blocked]

@${CLAUDE_PLUGIN_ROOT}/skills/claude-security/role.md

来源与署名

来源:anthropics/claude-plugins-official位于plugins/claude-security/skills/ci-review提交d0d5142

许可证: 无许可证

内容归原作者所有。SourceWeft 从公开仓库中收录这些内容。

在 README 中添加徽章

向读者展示该技能已收录于 SourceWeft,徽章链接到本页。

“Listed on SourceWeft”徽章预览
[![Listed on SourceWeft](https://sourceweft.com/badge/skills/gh-anthropics-claude-plugins-official-ci-review-plugins-claude-security-skills-ci-review-b6400edb52914b63.svg)](https://sourceweft.com/skills/gh-anthropics-claude-plugins-official-ci-review-plugins-claude-security-skills-ci-review-b6400edb52914b63?utm_source=readme&utm_medium=badge)

举报或申请下架