microsoft/power-platform-skills / plugins/power-pages/skills/manage-headers
manage-headers
VerifiedInspects and configures the security headers a Power Pages site sends to browsers — Content Security Policy, frame and clickjacking protection, cross-origin sharing, cookie behavior, and related site settings. Identifies gaps and walks the user through fixes. Use when the user wants to review headers, fix CSP errors, allow embedding in another site, control cross-origin access, harden cookie settings, or asks "are my browser settings safe?", "fix my CSP", "set up CORS" — even if they only mention a specific header name without saying "security headers".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 11.9 KB |
| references/commands.md | markdown | 2.6 KB |
| references/headers-reference.md | markdown | 9.6 KB |
| scripts/transform-headers.js | script | 3.9 KB |
references/commands.md
View on GitHub# Manage Headers — Commands
## Table of contents
- [`create-site-setting.js` (shared)](#create-site-settingjs-shared)
- [`transform-headers.js`](#transform-headersjs)
---
## `create-site-setting.js` (shared)
Use the shared script to create new `HTTP/*` site-setting YAML files:
```bash
node "${PLUGIN_ROOT}/scripts/create-site-setting.js" --projectRoot "<project-root>" --name "<setting-name>" --value "<value>" --description "<description>"
```
The script generates a UUID, checks for duplicates, and writes the YAML file to `.powerpages-site/site-settings/`.
To update an existing setting, use the `Edit` tool directly on the YAML file — do not use this script (it rejects duplicates).
### Exit codes
| Code | Meaning |
|------|---------|
| `0` | Success — new YAML file created. |
| `1` | Failure — duplicate setting, missing args, or write error. |
The script validates inputs and exits with a descriptive error if arguments are missing or the setting already exists.
---
## `transform-headers.js`
Reads every `HTTP/*` site-setting YAML in `.powerpages-site/site-settings/` and emits the unified findings shape used by the consolidated security review. Read-only — does not modify any file.
### Usage
```bash
node "${PLUGIN_ROOT}/skills/manage-headers/scripts/transform-headers.js" --projectRoot "<project-root>" [--annotations "<path>"]
```
### Parameters
| Flag | Required | Description |
|------|----------|-------------|
| `--projectRoot` | Yes | Power Pages project root (the folder that contains `.powerpages-site/`). |
| `--annotations` | No | Path to an agent-written annotations JSON file. Shape: `{ "headers": { "HTTP/<HeaderName>": { "description": "...", "fix": "..." } } }`. Used to add plain-language descriptions and optional fixes to the emitted findings. |
### Response (stdout)
```json
{ "status": "ok", "findings": [ ], "details": {} }
```
…or, when `.powerpages-site/site-settings/` is absent:
```json
{ "status": "missing-settings", "findings": [], "details": {} }
```
Each finding has the inventory shape `{ id, title, details, fix? }` — no `severity` and no `tag` (the section is informational; the orchestrator does not roll these up into severity totals, and the header name already appears as the `title`). `details` contains the agent-supplied description (when annotations were passed) followed by the current value. `fix` is present only when the annotations file supplied one for that header.
### Exit codes
| Code | Meaning |
|------|---------|
| `0` | Success (also returns `missing-settings` when `.powerpages-site/site-settings/` is absent). |
| `1` | Invocation error (missing `--projectRoot`). |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |