[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699VTKDE5VRJY3ES5NM1P5B":3,"skill-same:01M699VTKDE5VRJY3ES5NM1P5B":83},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":59,"ownerHtmlUrl":60,"ownerBlogUrl":61,"ownerDescription":62,"updatedAt":63,"install":64,"resources":76},"01M699VTKDE5VRJY3ES5NM1P5B","security-review",null,"Runs a guided, end-to-end security review of a Power Pages site and consolidates every finding into one HTML report covering source code and dependencies, the live site, browser headers, firewall, authentication, and role-based permissions. Use when the user wants a full security review, a release-readiness check before publishing, a code-and-config check during development, live site monitoring, or asks open-ended questions like \"review my site security\", \"is my site safe to ship\", \"do a security check\", \"monitor my site\" — even if they do not name the individual checks.","microsoft\u002Fpower-platform-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699JVYJFB75D9JM70BN4H0Q",1149,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"security","security review","review","firewall","natural-language","live","full","security check","power","write","read","html report","open","ship","monitoring","permissions","release","authentication","power pages","config","safe","2026-11-10 10:12:30",false,"---\nname: security-review\ndescription: >-\n  Runs a guided, end-to-end security review of a Power Pages site and\n  consolidates every finding into one HTML report covering source code\n  and dependencies, the live site, browser headers, firewall,\n  authentication, and role-based permissions. Use when the user wants a\n  full security review, a release-readiness check before publishing, a\n  code-and-config check during development, live site monitoring, or\n  asks open-ended questions like \"review my site security\", \"is my site\n  safe to ship\", \"do a security check\", \"monitor my site\" — even if they\n  do not name the individual checks.\nuser-invocable: true\nargument-hint: \"[optional natural-language hint about the goal]\"\nallowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Skill, Agent\nmodel: opus\n---\n\n> **Plugin check**: Run `node \"${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-version.js\"` — if it outputs a message, show it to the user before proceeding.\n\n# Review Security\n\nGuide the user through a full security review of their Power Pages site. Runs the matching focused skills and assembles every finding into a single HTML report.\n\nThe skill never asks the user technical questions. The conversation stays in plain language.\n\n**Initial request:** $ARGUMENTS\n\n## Workflow\n\nThe skill has six phases. Phases 2–5 each map to one conversation beat with the user; phases 1 and 6 are silent setup and cleanup. See `references\u002Fflow.md` for the rationale behind each beat.\n\n| Phase | What happens | User-facing beat |\n|-------|--------------|------------------|\n| 1 — Prerequisites | Locate project, set up working folders | (silent setup) |\n| 2 — Scope | Capture goal — one question, three answers, plain language | Ask the goal |\n| 3 — Skills | Run the matching skills, surface progress | Scan in progress |\n| 4 — Report | Build the consolidated report — totals + per-section findings | Results summary + Findings |\n| 5 — Present | Present results, offer remediation follow-ups | Next steps and guidance |\n| 6 — Cleanup | Remove temporary files | (silent cleanup) |\n\n## Task Tracking\n\nCreate tasks in three groups. Mark each `in_progress` when starting, `completed` when done.\n\n**Group 1 — create at the start of prerequisites:**\n\n| Task subject | activeForm |\n|--------------|------------|\n| Check prerequisites | Checking prerequisites |\n\nOnly this one task. Do not create any other tasks until prerequisites complete.\n\n**Group 2 — create after prerequisites complete:**\n\n| Task subject | activeForm |\n|--------------|------------|\n| Capture goal | Capturing goal |\n\n**Group 3 — create after the goal is captured:**\n\n| Task subject | activeForm |\n|--------------|------------|\n| Run skills | Running checks |\n| Build the report | Building the report |\n| Present findings | Presenting findings |\n| Clean up | Cleaning up |\n\n---\n\n## 1. Prerequisites\n\n### 1.1 Locate the project\n\nUse `Glob` to find `**\u002Fpowerpages.config.json`. If none is found, tell the user the site needs to be created first with `\u002Fcreate-site`, then stop.\n\nFor the `monitor` and `release` goals (any goal that delegates to `scan-site` or `manage-firewall`), also confirm that `.powerpages-site\u002Fwebsite.yml` exists. If it does not, the site has not been deployed yet — tell the user (in plain language) the site needs to be deployed once before a live security review can run, recommend `\u002Fdeploy-site`, then stop. Do **not** try to identify the site by name or URL — different sites can share the same name.\n\nFor the `code-config` goal, the deploy check is not required: source code, dependencies, authentication, web roles, and table permissions are read from local files alone.\n\n### 1.2 Prepare a temporary working folder\n\nCreate a fresh working directory: `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F`. The folder holds JSON data files emitted by each skill in **review mode**. The folder is removed in the cleanup step.\n\nIf the folder already exists from a previous interrupted run, delete its contents (not the folder itself) before continuing.\n\n### 1.3 Determine the docs output path\n\nThe final HTML always lives at `\u003CPROJECT_ROOT>\u002Fdocs\u002Fsecurity-review-\u003CYYYY-MM-DD-HHMMSS>.html` using the local timestamp at the start of the run (e.g. `security-review-2026-05-14-053805.html`). Always include the timestamp — do not use a bare `security-review.html` name. This keeps each run's report distinct.\n\n---\n\n## 2. Capture goal\n\n### 2.1 Ask the goal\n\n\u003C!-- gate: security-review:2.1.goal | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · security-review:2.1.goal):** Capture the review goal — choice branches into one of three sub-skill sets (`code-config` \u002F `release` \u002F `monitor`).\n>\n> **Trigger:** Phase 2.1 entry, unless `$ARGUMENTS` already answers it.\n> **Why we ask:** Auto-picking `release` runs ALL sub-skills (slow; possibly hits scan\u002Ffirewall endpoints unnecessarily); auto-picking the wrong goal mis-scopes the review.\n> **Cancel leaves:** Nothing — no sub-skills invoked yet.\n\nAsk the user with a single `AskUserQuestion` call. If the user's initial request already answers it, skip and continue.\n\n**Question — What to review?**\n\n| Label | Description |\n|-------|-------------|\n| Code & config | Check source code, dependencies, authentication, web roles, and table permissions. Works on local files only. |\n| Release readiness | Full review before publishing — checks everything. (Recommended) |\n| Deployed site | Check the live site for issues. Requires deployment. |\n\nGoal mapping (internal):\n\n| Label | Goal id | Skills |\n|-------|---------|------------|\n| Code & config | `code-config` | scan-code, audit-permissions, setup-auth (read-only) |\n| Release readiness | `release` | scan-code, scan-site, manage-headers, manage-firewall, audit-permissions, setup-auth (read-only) |\n| Deployed site | `monitor` | scan-site |\n\n### 2.2 Capture the chosen skill set\n\nBuild a `selectedSkills` list based on the answer. Always include the read-only check of `setup-auth` for the `code-config` and `release` goals (it consists of reading existing YAML, not running the skill itself — see § 3.2 below). This is the **Access & Data Security Validation** component.\n\n---\n\n## 3. Run the matching skills\n\nSpawn each selected skill as a background subagent via the `Agent` tool. Each subagent invokes its skill with the argument `--review \u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F`. Each skill handles its own authentication, error reporting, and progress.\n\n### 3.1 Skill invocation via subagents\n\nSkills run as **parallel subagents** using the `Agent` tool.\n\n**Default — launch every Agent-eligible skill in one parallel batch.** Spawn all selected subagents in a single message with multiple `Agent` tool calls so they start concurrently. Each subagent runs with `run_in_background: true`. The Agent-eligible set is `scan-code`, `scan-site`, `manage-headers`, `manage-firewall` — these all support `--review` mode. `scan-site` (server-side scan, several minutes) and `scan-code` (local static analysis + dependency scan, up to minutes on large projects) are the slowest; the others typically finish within seconds.\n\n**Fallback — staggered launch.** If the harness rejects a parallel-batch call for any reason, launch `scan-code` and `scan-site` first (the long-running ones) and then the remaining skills in a follow-up message. This is a tool-affordance fallback, not the preferred path.\n\n**Inline checks (run while subagents work).** `audit-permissions` and `setup-auth` do not support `--review` and MUST NOT be launched via `Agent` — handle them inline as described in § 3.2.\n\nWait for all subagents to complete before proceeding to the report-building step.\n\n### 3.1.1 Subagent prompt pattern\n\nEach subagent receives a self-contained prompt that includes:\n\n1. The skill to invoke and the `--review` argument with the temp directory path\n2. The project root path so the skill can locate site files\n3. Any scope\u002Fdepth parameters captured in the scope capture step\n\nExample subagent call:\n\n```\nAgent({\n  description: \"Run scan-site\",\n  prompt: \"Invoke the skill `scan-site` with argument `--review \u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F`. The Power Pages project root is \u003CPROJECT_ROOT>. \u003Cany additional scope parameters>. Write the **transform script stdout verbatim** to \u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fscan-site.json. Do NOT synthesize, augment, or re-classify the findings. If the skill fails, write { \\\"status\\\": \\\"skipped\\\", \\\"reason\\\": \\\"\u003Cplain-language reason>\\\" } instead.\",\n  run_in_background: true\n})\n```\n\n**Verbatim rule:** the subagent's output JSON must contain only the findings emitted by the skill's transform script. The orchestrator must not append findings, rewrite titles, add severity, or otherwise editorialize.\n\n### 3.1.2 Expected output\n\nAfter all subagents complete, expect JSON files at `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F\u003Cskill-name>.json`. Each file has the shape `{ status, findings, details? }` produced by the skill's transform script:\n\n```text\n\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F\n├── scan-code.json           (when invoked)\n├── scan-site.json\n├── manage-headers.json\n├── manage-firewall.json\n└── audit-permissions.json   (when invoked)\n```\n\nIf a skill's subagent fails or is skipped, write a placeholder file with shape `{ \"status\": \"skipped\", \"reason\": \"\u003Cplain-language reason>\" }`. The report-building step renders this as a single non-severity finding for that section (no `severity` field, to stay consistent with § 3.1.3).\n\n### 3.1.3 Severity policy\n\nOnly findings that come from a tool that genuinely outputs severity may carry a `severity` field:\n\n| Section | Source | Severity allowed? |\n|---------|--------|-------------------|\n| `scan-code` | opengrep, trivy | Yes |\n| `scan-site` | deep-scan (ZAP) | Yes |\n| `manage-headers` | `transform-headers.js` (inventory) | **No** |\n| `manage-firewall` | `transform-firewall.js` (inventory) | **No** |\n| `audit-permissions` | Web roles & table permissions audit | **No** |\n| `setup-auth` | Site settings & auth-related source code audit | **No** |\n\nFor inventory sections, do **not** add `severity` to findings — not even `info`. The subagent and orchestrator must write the transform output **verbatim** without inserting opinionated severity-bearing findings. The `tag` field is **also** off-limits as a severity workaround: it is reserved for short mechanical identifiers from tools (e.g. ZAP rule ids, CWE codes) and MUST NOT carry severity-equivalent strings (`critical`, `warning`, `info`), since the report template renders it as a visible chip next to the title.\n\n### 3.1.4 Annotations policy (plain-language text)\n\nThe transform scripts for `manage-firewall` and `manage-headers` produce only structured raw data — they do **not** hardcode plain-language descriptions. The subagent must generate an annotations JSON file and pass it to the transform via `--annotations`. The annotations supply:\n\n- Plain-language description per rule \u002F per header\n- Optional suggested fix when a genuine issue is present\n\nSee each skill's `SKILL.md` § 5.1 for the annotation file shape. The agent's job is to write accurate, terse descriptions based on the raw data — not to invent severities or fabricate issues.\n\n### 3.2 Skills without `--review` mode\n\n`audit-permissions` and `setup-auth` do not support `--review`. Handle them inline (not as background subagents):\n\n- **audit-permissions** — invoke via the `Skill` tool (not `Agent`). The skill audits **both web roles and table permissions** — capture both in its output. After it completes, read its output and write `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Faudit-permissions.json` in the unified `{ status, findings, details? }` shape (mapping each audit finding into the common finding fields: `id`, `title`, `location`, `details`, `fix`).\n- **setup-auth** — do not invoke as a skill. Instead, read `.powerpages-site\u002Fsite-settings\u002F` YAML files directly and check for:\n  - identity provider configured? (`Authentication\u002FOpenIdConnect\u002F*\u002FAuthority`)\n  - profile redirect disabled? (`Authentication\u002FRegistration\u002FProfileRedirectEnabled = false`)\n  - cookie SameSite setting? (`HTTP\u002FSameSite\u002FDefault`)\n\nWrite the resulting findings to `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fsetup-auth.json` in the same format.\n\n**Field policy for both sections** — these are inventory sections, not tool-output severities (see § 3.1.3):\n\n- **Do NOT include a `severity` field** on any finding.\n- **Do NOT include a `tag` field.** The `tag` field is reserved for short mechanical identifiers from tools (`HTTP\u002FX-Frame-Options`, ZAP rule id `10055`, CWE codes). It MUST NOT carry severity-equivalent strings (`critical`, `warning`, `info`) — the report template renders `tag` as a visible chip next to the title, so stashing LLM-judged severity there would visually re-introduce the severity bucketing this section explicitly forbids.\n\n### 3.3 Status updates\n\nTell the user that all checks are running in parallel. As each subagent completes, give a short progress line (e.g., \"Code check finished — 2 important issues, 4 smaller ones.\"). Avoid technical jargon. Do not narrate skill internal steps. Once all subagents have finished, confirm that all checks are complete before moving to the report-building step.\n\n---\n\n## 4. Build the consolidated report\n\n### 4.1 Consolidate\n\nWrite up to four plain-language next-step recommendations as a JSON string array to `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fnext-steps.json`. Compose a 2–4 sentence plain-language `summary` of the overall state.\n\n```bash\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fbuild-review-data.js\" \\\n  --reportName \"Security Review\" \\\n  --inputDir \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F\" \\\n  --siteName \"\u003CSITE_NAME>\" \\\n  --goalLabel \"\u003CGOAL_LABEL>\" \\\n  --scopeLabel \"\u003CSCOPE_LABEL>\" \\\n  --summary \"\u003CSUMMARY_TEXT>\" \\\n  --nextStepsFile \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fnext-steps.json\" \\\n  --output \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fsecurity-review-data.json\"\n```\n\n### 4.2 Render the master HTML\n\n```bash\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Frender-review.js\" \\\n  --output \"\u003CDOCS_PATH>\" \\\n  --data \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fsecurity-review-data.json\"\n```\n\n---\n\n## 5. Present and follow-ups\n\n### 5.1 Open in browser\n\nOpen `\u003CDOCS_PATH>` in the user's default browser.\n\n### 5.2 Record skill usage\n\n> Reference: `${PLUGIN_ROOT}\u002Freferences\u002Fskill-tracking-reference.md`\n>\n> Use `--skillName \"SecurityReview\"`.\n\n### 5.3 In-chat summary\n\n\u003C!-- gate: security-review:5.3.next-action | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · security-review:5.3.next-action):** Post-report next-action prompt — *\"Walk me through the fixes \u002F Re-run the review \u002F Done for now\"*. Drives whether remediation skills get invoked.\n>\n> **Trigger:** Phase 5.1 wrote the HTML report.\n> **Why we ask:** Auto-invoking remediation skills (`\u002Fmanage-headers`, `\u002Fmanage-firewall`, `\u002Faudit-permissions`) without the user reading the report; auto-re-running the review wastes time on a still-fresh result.\n> **Cancel leaves:** Nothing — the HTML report at `docs\u002Fsecurity-review-\u003Cts>.html` is the final artifact regardless.\n\nShow a short plain-language summary in the chat: counts of critical \u002F warning \u002F info findings, where the report lives. Then offer the next action with `AskUserQuestion`:\n\n| Question | Options |\n|----------|---------|\n| What would you like to do next? | Walk me through the fixes; Re-run the review; Done for now |\n\nIf the user picks \"walk me through\", group critical findings by section and offer the matching focused skill for each (`\u002Fmanage-headers`, `\u002Fmanage-firewall`, `\u002Faudit-permissions`, etc.).\n\nIf the user picks \"re-run\", invoke this skill again with the same goal and scope.\n\n---\n\n## 6. Clean up\n\nDelete the entire `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F` folder. The final HTML, located in `docs\u002F`, must remain. Confirm to the user that temporary files have been removed.\n\nIf the cleanup fails (file lock, permission), warn the user and continue — the report is already written and the temp folder can be removed manually later.\n\n---\n\n## Constraints\n\n- **Plain language with users** — never lead with technical terms.\n- **Parallel subagent delegation** — every selected skill runs as a parallel subagent via the `Agent` tool, launched in a single message. Perform the inline read-only `setup-auth` check while subagents work. Use the staggered launch (§ 3.1 fallback) only if the harness rejects the parallel-batch call.\n- **Single consolidated HTML** — never produce per-skill HTML reports during this run. Skills run in `--review` mode.\n- **Same look and feel** — rendering goes through the shared template at `${PLUGIN_ROOT}\u002Fscripts\u002Flib\u002Ftemplates\u002Fsecurity-review-report.html` via `scripts\u002Frender-review.js`. Do not author per-skill HTML or duplicate the template; the generated report must match the existing audit-permissions report visually.\n- **Cleanup is mandatory** — the cleanup step is not optional. Failing to clean up is treated as a non-fatal warning, but the skill always tries.\n- **Never run destructive sub-actions automatically** — skills that propose changes (e.g., editing site settings, deleting WAF rules) must operate in read-only `--review` mode during this orchestration. Apply changes only via the explicit \"walk me through fixes\" follow-up, after the user picks an action.\n\n## References\n\n- `references\u002Fflow.md` — rationale and example phrasing for the conversation beats in phases 2–5\n","> **Plugin check**: Run `node \"${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-version.js\"` — if it outputs a message, show it to the user before proceeding.\n\n# Review Security\n\nGuide the user through a full security review of their Power Pages site. Runs the matching focused skills and assembles every finding into a single HTML report.\n\nThe skill never asks the user technical questions. The conversation stays in plain language.\n\n**Initial request:** $ARGUMENTS\n\n## Workflow\n\nThe skill has six phases. Phases 2–5 each map to one conversation beat with the user; phases 1 and 6 are silent setup and cleanup. See `references\u002Fflow.md` for the rationale behind each beat.\n\n| Phase | What happens | User-facing beat |\n|-------|--------------|------------------|\n| 1 — Prerequisites | Locate project, set up working folders | (silent setup) |\n| 2 — Scope | Capture goal — one question, three answers, plain language | Ask the goal |\n| 3 — Skills | Run the matching skills, surface progress | Scan in progress |\n| 4 — Report | Build the consolidated report — totals + per-section findings | Results summary + Findings |\n| 5 — Present | Present results, offer remediation follow-ups | Next steps and guidance |\n| 6 — Cleanup | Remove temporary files | (silent cleanup) |\n\n## Task Tracking\n\nCreate tasks in three groups. Mark each `in_progress` when starting, `completed` when done.\n\n**Group 1 — create at the start of prerequisites:**\n\n| Task subject | activeForm |\n|--------------|------------|\n| Check prerequisites | Checking prerequisites |\n\nOnly this one task. Do not create any other tasks until prerequisites complete.\n\n**Group 2 — create after prerequisites complete:**\n\n| Task subject | activeForm |\n|--------------|------------|\n| Capture goal | Capturing goal |\n\n**Group 3 — create after the goal is captured:**\n\n| Task subject | activeForm |\n|--------------|------------|\n| Run skills | Running checks |\n| Build the report | Building the report |\n| Present findings | Presenting findings |\n| Clean up | Cleaning up |\n\n---\n\n## 1. Prerequisites\n\n### 1.1 Locate the project\n\nUse `Glob` to find `**\u002Fpowerpages.config.json`. If none is found, tell the user the site needs to be created first with `\u002Fcreate-site`, then stop.\n\nFor the `monitor` and `release` goals (any goal that delegates to `scan-site` or `manage-firewall`), also confirm that `.powerpages-site\u002Fwebsite.yml` exists. If it does not, the site has not been deployed yet — tell the user (in plain language) the site needs to be deployed once before a live security review can run, recommend `\u002Fdeploy-site`, then stop. Do **not** try to identify the site by name or URL — different sites can share the same name.\n\nFor the `code-config` goal, the deploy check is not required: source code, dependencies, authentication, web roles, and table permissions are read from local files alone.\n\n### 1.2 Prepare a temporary working folder\n\nCreate a fresh working directory: `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F`. The folder holds JSON data files emitted by each skill in **review mode**. The folder is removed in the cleanup step.\n\nIf the folder already exists from a previous interrupted run, delete its contents (not the folder itself) before continuing.\n\n### 1.3 Determine the docs output path\n\nThe final HTML always lives at `\u003CPROJECT_ROOT>\u002Fdocs\u002Fsecurity-review-\u003CYYYY-MM-DD-HHMMSS>.html` using the local timestamp at the start of the run (e.g. `security-review-2026-05-14-053805.html`). Always include the timestamp — do not use a bare `security-review.html` name. This keeps each run's report distinct.\n\n---\n\n## 2. Capture goal\n\n### 2.1 Ask the goal\n\n\u003C!-- gate: security-review:2.1.goal | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · security-review:2.1.goal):** Capture the review goal — choice branches into one of three sub-skill sets (`code-config` \u002F `release` \u002F `monitor`).\n>\n> **Trigger:** Phase 2.1 entry, unless `$ARGUMENTS` already answers it.\n> **Why we ask:** Auto-picking `release` runs ALL sub-skills (slow; possibly hits scan\u002Ffirewall endpoints unnecessarily); auto-picking the wrong goal mis-scopes the review.\n> **Cancel leaves:** Nothing — no sub-skills invoked yet.\n\nAsk the user with a single `AskUserQuestion` call. If the user's initial request already answers it, skip and continue.\n\n**Question — What to review?**\n\n| Label | Description |\n|-------|-------------|\n| Code & config | Check source code, dependencies, authentication, web roles, and table permissions. Works on local files only. |\n| Release readiness | Full review before publishing — checks everything. (Recommended) |\n| Deployed site | Check the live site for issues. Requires deployment. |\n\nGoal mapping (internal):\n\n| Label | Goal id | Skills |\n|-------|---------|------------|\n| Code & config | `code-config` | scan-code, audit-permissions, setup-auth (read-only) |\n| Release readiness | `release` | scan-code, scan-site, manage-headers, manage-firewall, audit-permissions, setup-auth (read-only) |\n| Deployed site | `monitor` | scan-site |\n\n### 2.2 Capture the chosen skill set\n\nBuild a `selectedSkills` list based on the answer. Always include the read-only check of `setup-auth` for the `code-config` and `release` goals (it consists of reading existing YAML, not running the skill itself — see § 3.2 below). This is the **Access & Data Security Validation** component.\n\n---\n\n## 3. Run the matching skills\n\nSpawn each selected skill as a background subagent via the `Agent` tool. Each subagent invokes its skill with the argument `--review \u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F`. Each skill handles its own authentication, error reporting, and progress.\n\n### 3.1 Skill invocation via subagents\n\nSkills run as **parallel subagents** using the `Agent` tool.\n\n**Default — launch every Agent-eligible skill in one parallel batch.** Spawn all selected subagents in a single message with multiple `Agent` tool calls so they start concurrently. Each subagent runs with `run_in_background: true`. The Agent-eligible set is `scan-code`, `scan-site`, `manage-headers`, `manage-firewall` — these all support `--review` mode. `scan-site` (server-side scan, several minutes) and `scan-code` (local static analysis + dependency scan, up to minutes on large projects) are the slowest; the others typically finish within seconds.\n\n**Fallback — staggered launch.** If the harness rejects a parallel-batch call for any reason, launch `scan-code` and `scan-site` first (the long-running ones) and then the remaining skills in a follow-up message. This is a tool-affordance fallback, not the preferred path.\n\n**Inline checks (run while subagents work).** `audit-permissions` and `setup-auth` do not support `--review` and MUST NOT be launched via `Agent` — handle them inline as described in § 3.2.\n\nWait for all subagents to complete before proceeding to the report-building step.\n\n### 3.1.1 Subagent prompt pattern\n\nEach subagent receives a self-contained prompt that includes:\n\n1. The skill to invoke and the `--review` argument with the temp directory path\n2. The project root path so the skill can locate site files\n3. Any scope\u002Fdepth parameters captured in the scope capture step\n\nExample subagent call:\n\n```\nAgent({\n  description: \"Run scan-site\",\n  prompt: \"Invoke the skill `scan-site` with argument `--review \u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F`. The Power Pages project root is \u003CPROJECT_ROOT>. \u003Cany additional scope parameters>. Write the **transform script stdout verbatim** to \u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fscan-site.json. Do NOT synthesize, augment, or re-classify the findings. If the skill fails, write { \\\"status\\\": \\\"skipped\\\", \\\"reason\\\": \\\"\u003Cplain-language reason>\\\" } instead.\",\n  run_in_background: true\n})\n```\n\n**Verbatim rule:** the subagent's output JSON must contain only the findings emitted by the skill's transform script. The orchestrator must not append findings, rewrite titles, add severity, or otherwise editorialize.\n\n### 3.1.2 Expected output\n\nAfter all subagents complete, expect JSON files at `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F\u003Cskill-name>.json`. Each file has the shape `{ status, findings, details? }` produced by the skill's transform script:\n\n```text\n\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F\n├── scan-code.json           (when invoked)\n├── scan-site.json\n├── manage-headers.json\n├── manage-firewall.json\n└── audit-permissions.json   (when invoked)\n```\n\nIf a skill's subagent fails or is skipped, write a placeholder file with shape `{ \"status\": \"skipped\", \"reason\": \"\u003Cplain-language reason>\" }`. The report-building step renders this as a single non-severity finding for that section (no `severity` field, to stay consistent with § 3.1.3).\n\n### 3.1.3 Severity policy\n\nOnly findings that come from a tool that genuinely outputs severity may carry a `severity` field:\n\n| Section | Source | Severity allowed? |\n|---------|--------|-------------------|\n| `scan-code` | opengrep, trivy | Yes |\n| `scan-site` | deep-scan (ZAP) | Yes |\n| `manage-headers` | `transform-headers.js` (inventory) | **No** |\n| `manage-firewall` | `transform-firewall.js` (inventory) | **No** |\n| `audit-permissions` | Web roles & table permissions audit | **No** |\n| `setup-auth` | Site settings & auth-related source code audit | **No** |\n\nFor inventory sections, do **not** add `severity` to findings — not even `info`. The subagent and orchestrator must write the transform output **verbatim** without inserting opinionated severity-bearing findings. The `tag` field is **also** off-limits as a severity workaround: it is reserved for short mechanical identifiers from tools (e.g. ZAP rule ids, CWE codes) and MUST NOT carry severity-equivalent strings (`critical`, `warning`, `info`), since the report template renders it as a visible chip next to the title.\n\n### 3.1.4 Annotations policy (plain-language text)\n\nThe transform scripts for `manage-firewall` and `manage-headers` produce only structured raw data — they do **not** hardcode plain-language descriptions. The subagent must generate an annotations JSON file and pass it to the transform via `--annotations`. The annotations supply:\n\n- Plain-language description per rule \u002F per header\n- Optional suggested fix when a genuine issue is present\n\nSee each skill's `SKILL.md` § 5.1 for the annotation file shape. The agent's job is to write accurate, terse descriptions based on the raw data — not to invent severities or fabricate issues.\n\n### 3.2 Skills without `--review` mode\n\n`audit-permissions` and `setup-auth` do not support `--review`. Handle them inline (not as background subagents):\n\n- **audit-permissions** — invoke via the `Skill` tool (not `Agent`). The skill audits **both web roles and table permissions** — capture both in its output. After it completes, read its output and write `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Faudit-permissions.json` in the unified `{ status, findings, details? }` shape (mapping each audit finding into the common finding fields: `id`, `title`, `location`, `details`, `fix`).\n- **setup-auth** — do not invoke as a skill. Instead, read `.powerpages-site\u002Fsite-settings\u002F` YAML files directly and check for:\n  - identity provider configured? (`Authentication\u002FOpenIdConnect\u002F*\u002FAuthority`)\n  - profile redirect disabled? (`Authentication\u002FRegistration\u002FProfileRedirectEnabled = false`)\n  - cookie SameSite setting? (`HTTP\u002FSameSite\u002FDefault`)\n\nWrite the resulting findings to `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fsetup-auth.json` in the same format.\n\n**Field policy for both sections** — these are inventory sections, not tool-output severities (see § 3.1.3):\n\n- **Do NOT include a `severity` field** on any finding.\n- **Do NOT include a `tag` field.** The `tag` field is reserved for short mechanical identifiers from tools (`HTTP\u002FX-Frame-Options`, ZAP rule id `10055`, CWE codes). It MUST NOT carry severity-equivalent strings (`critical`, `warning`, `info`) — the report template renders `tag` as a visible chip next to the title, so stashing LLM-judged severity there would visually re-introduce the severity bucketing this section explicitly forbids.\n\n### 3.3 Status updates\n\nTell the user that all checks are running in parallel. As each subagent completes, give a short progress line (e.g., \"Code check finished — 2 important issues, 4 smaller ones.\"). Avoid technical jargon. Do not narrate skill internal steps. Once all subagents have finished, confirm that all checks are complete before moving to the report-building step.\n\n---\n\n## 4. Build the consolidated report\n\n### 4.1 Consolidate\n\nWrite up to four plain-language next-step recommendations as a JSON string array to `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fnext-steps.json`. Compose a 2–4 sentence plain-language `summary` of the overall state.\n\n```bash\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fbuild-review-data.js\" \\\n  --reportName \"Security Review\" \\\n  --inputDir \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F\" \\\n  --siteName \"\u003CSITE_NAME>\" \\\n  --goalLabel \"\u003CGOAL_LABEL>\" \\\n  --scopeLabel \"\u003CSCOPE_LABEL>\" \\\n  --summary \"\u003CSUMMARY_TEXT>\" \\\n  --nextStepsFile \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fnext-steps.json\" \\\n  --output \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fsecurity-review-data.json\"\n```\n\n### 4.2 Render the master HTML\n\n```bash\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Frender-review.js\" \\\n  --output \"\u003CDOCS_PATH>\" \\\n  --data \"\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002Fsecurity-review-data.json\"\n```\n\n---\n\n## 5. Present and follow-ups\n\n### 5.1 Open in browser\n\nOpen `\u003CDOCS_PATH>` in the user's default browser.\n\n### 5.2 Record skill usage\n\n> Reference: `${PLUGIN_ROOT}\u002Freferences\u002Fskill-tracking-reference.md`\n>\n> Use `--skillName \"SecurityReview\"`.\n\n### 5.3 In-chat summary\n\n\u003C!-- gate: security-review:5.3.next-action | category=plan | cancel-leaves=nothing -->\n\n> ? **Gate (plan · security-review:5.3.next-action):** Post-report next-action prompt — *\"Walk me through the fixes \u002F Re-run the review \u002F Done for now\"*. Drives whether remediation skills get invoked.\n>\n> **Trigger:** Phase 5.1 wrote the HTML report.\n> **Why we ask:** Auto-invoking remediation skills (`\u002Fmanage-headers`, `\u002Fmanage-firewall`, `\u002Faudit-permissions`) without the user reading the report; auto-re-running the review wastes time on a still-fresh result.\n> **Cancel leaves:** Nothing — the HTML report at `docs\u002Fsecurity-review-\u003Cts>.html` is the final artifact regardless.\n\nShow a short plain-language summary in the chat: counts of critical \u002F warning \u002F info findings, where the report lives. Then offer the next action with `AskUserQuestion`:\n\n| Question | Options |\n|----------|---------|\n| What would you like to do next? | Walk me through the fixes; Re-run the review; Done for now |\n\nIf the user picks \"walk me through\", group critical findings by section and offer the matching focused skill for each (`\u002Fmanage-headers`, `\u002Fmanage-firewall`, `\u002Faudit-permissions`, etc.).\n\nIf the user picks \"re-run\", invoke this skill again with the same goal and scope.\n\n---\n\n## 6. Clean up\n\nDelete the entire `\u003CSYSTEM_TEMP>\u002Fsecurity-review\u002F` folder. The final HTML, located in `docs\u002F`, must remain. Confirm to the user that temporary files have been removed.\n\nIf the cleanup fails (file lock, permission), warn the user and continue — the report is already written and the temp folder can be removed manually later.\n\n---\n\n## Constraints\n\n- **Plain language with users** — never lead with technical terms.\n- **Parallel subagent delegation** — every selected skill runs as a parallel subagent via the `Agent` tool, launched in a single message. Perform the inline read-only `setup-auth` check while subagents work. Use the staggered launch (§ 3.1 fallback) only if the harness rejects the parallel-batch call.\n- **Single consolidated HTML** — never produce per-skill HTML reports during this run. Skills run in `--review` mode.\n- **Same look and feel** — rendering goes through the shared template at `${PLUGIN_ROOT}\u002Fscripts\u002Flib\u002Ftemplates\u002Fsecurity-review-report.html` via `scripts\u002Frender-review.js`. Do not author per-skill HTML or duplicate the template; the generated report must match the existing audit-permissions report visually.\n- **Cleanup is mandatory** — the cleanup step is not optional. Failing to clean up is treated as a non-fatal warning, but the skill always tries.\n- **Never run destructive sub-actions automatically** — skills that propose changes (e.g., editing site settings, deleting WAF rules) must operate in read-only `--review` mode during this orchestration. Apply changes only via the explicit \"walk me through fixes\" follow-up, after the user picks an action.\n\n## References\n\n- `references\u002Fflow.md` — rationale and example phrasing for the conversation beats in phases 2–5\n",{"name":5,"model":50,"description":7,"allowed-tools":51,"argument-hint":52,"user-invocable":53},"opus","Read, Write, Bash, Glob, Grep, AskUserQuestion, TaskCreate, TaskUpdate, TaskList, Skill, Agent","[optional natural-language hint about the goal]",true,"main","0a55a88fa2855404029d1e5450faf92878baf763","plugins\u002Fpower-pages\u002Fskills\u002Fsecurity-review",232,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills","https:\u002F\u002Fmicrosoft.github.io\u002Fpower-platform-skills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 21:46:39",{"source":8,"skillName":5,"commands":65,"prompt":75,"zipAvailable":53},[66,69,72],{"tool":67,"command":68},"npx","npx skills add microsoft\u002Fpower-platform-skills --skill security-review",{"tool":70,"command":71},"bunx","bunx skills add microsoft\u002Fpower-platform-skills --skill security-review",{"tool":73,"command":74},"pnpm","pnpm dlx skills add microsoft\u002Fpower-platform-skills --skill security-review","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[77],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fflow.md","REFERENCE","参考文档",3751,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fsecurity-review\u002Freferences\u002Fflow.md",[84,92,112,135,153,167],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":91},"01M78JN2BFRRV1J54Q6WKZQ08D","compare-site-configurations","Compare Power Pages site configurations between two environments, such as dev, test and production, or between a local download and the live site, and explain which differences change site behavior. Use when a site works in one environment but not another (for example, works in dev but fails in test), to check configuration drift before promoting or deploying, or to see what changed between two sites. Produces a shareable HTML report and a JSON file that VS Code can import.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fcompare-site-configurations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":45},"01M699WVHX0XN59EPBTTPEKYPG","setup","Use when Process Intelligence needs building, explicit cloud\u002Faccount\u002Fenvironment configuration, sign-in, connection diagnostics, or recovery from an authentication error.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fsetup\u002FSKILL.md",[],[94,99,100,101,102,103,104,105,41,106,107,108,109,110,34,111],"configuration","diagnostics","error","environment","cloud","when","connection","use","Bash","recovery","process","sign","intelligence",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":123,"publishedAt":45},"01M699WSR9EX55YY1WD9J22FEG","report-issue","Use when the user wants a Process Intelligence bug-report draft or support summary for a failed operation.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Freport-issue\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[124,125,126,127,106,104,128,129,109,130,111,131,132,133,134],"issue","report","report issue","bug-report","operation","draft","bug","summary","user","for","support",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":45},"01M699WR26YQ9Q21KE6MJF5B2G","investigate-process","Use when a broad Process Mining business question, observed pattern or competing explanation needs investigation across analytical perspectives.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Finvestigate-process\u002FSKILL.md",[],[142,109,143,144,106,145,146,104,147,148,149,34,150,151,152],"investigate","investigate process","question","process mining","business","across","perspectives","mining","pattern","investigation","analytical",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":45},"01M699WP9SDG5ZR12P8VYNXKTN","derive-metric","Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fderive-metric\u002FSKILL.md",[],[160,161,162,163,164,165,106,104,166,34],"metric","derive metric","missing","formula","custom","reuse","saved",{"skillNo":168,"name":169,"nameZh":6,"description":170,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":171,"categories":172,"keywords":173,"publishedAt":45},"01M699WMG5R8P6SMTDAS1TKF9E","compare-cohorts","Use when comparing process cohorts, departments, periods or before-and-after results under matched definitions.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fcompare-cohorts\u002FSKILL.md",[],[174,175,106,104,176,109,34],"compare","compare cohorts","results"]