security-and-hardening
Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. The non-negotiable security MUSTs live in `.agents/rules/security-baseline.md`; this skill shows how to apply them, with the project's surfacing and validation-response process.
- License 许可
- MIT
- 所属仓库
- dsj1984/mandrel
- 最近更新
- 2026-11-13
- Stars
- ★ 7
- Forks
- 1
01 前言 Front Matter
- name
- security-and-hardening
- description
- Hardens code against vulnerabilities. Use when handling user input, authentication, data storage, or external integrations. The non-negotiable security MUSTs live in `.agents/rules/security-baseline.md`; this skill shows how to apply them, with the project's surfacing and validation-response process.
02 资源文件 2
- 参考文档reference.md2.3 KB
- 参考文档resources/implementation-playbook.md18.6 KB
03 SKILL.md 正文
Security and Hardening
Policy Capsule
- The non-negotiable security MUSTs — input validation, authentication, authorization, output/rendering, data-leakage & logging, transport & headers, secrets, dependency hygiene, and forbidden practices — live in
.agents/rules/security-baseline.md; that rule is the SSOT and wins on conflict. Read it for the what; this skill is the how and the process. - Do not restate a baseline MUST here or work around one in code — open a PR against the rule instead. The baseline is inviolable (
instructions.md§ 1.K); no skill relaxes it. - Surface security-expanding changes — new auth flows, new PII categories, new external integrations, CORS / rate-limit changes, file uploads, elevated permissions — under a "Security surface" section in the PR body and on the ticket, label the change
risk::high, and link the relevant baseline MUST. - Surfacing documents the surface; it does not pause execution.
agent::blockedis the only runtime pause label, reserved for unrecoverable blockers — never for "this change is sensitive." - For validation-error responses (status code and envelope), cite
.agents/rules/api-conventions.md— validation failures return 400VALIDATION_ERRORin the canonical envelope. Do not carry a divergent inline status here. - Open a
reference.mdsection only when the task actually engages it (index below).
The MUSTs themselves are the SSOT in
security-baseline.md. When the rule and
this skill diverge, the rule wins.
Long-form reference — read on demand
The capsule above is the contract and the whole always-read surface of this
skill. The project-specific process material behind it lives in the on-demand
sibling reference.md, matching the split the always-on rules
use (rules/git-conventions.md ⇄
git-conventions-reference.md).
Activating this skill costs the capsule; open a section below only when the
task engages it.
04 同仓库更多 Skills
no-capsule-skill
Fixture without a Policy Capsule section.
qa-harness
Conventions for agent-driven QA driving — the one driving-conventions reference behind both `/qa-run` (the known-scenario sweep through a real browser) and `/qa-explore` (agent-led exploratory driving). Use when instrumenting a live surface — covers navigation-first execution, per-surface console and network capture, design-token visual checks, the `F#` finding shape, per-environment resolution, and static driving as the documented interim. The run procedures live in `.agents/workflows/qa-run.md` and `.agents/workflows/qa-explore.md`; this skill is the conventions reference they lean on.
playwright
Robust E2E browser testing with Playwright. Use when writing browser-driven tests — leverage auto-waiting (no `waitForTimeout`), prefer user-visible locators (`getByRole`, `getByText`, `getByLabel`) over CSS/XPath, reuse `storageState` for auth, and enable trace-on-first-retry for CI debugging. Also carries the `data-testid` contract a UI change states in its acceptance criteria.
playwright-bdd
Wires Gherkin `.feature` files to Playwright via the `playwright-bdd` library. Use when running BDD scenarios on a Playwright runtime — pairs with the `gherkin-authoring` skill (scenario prose) and the `playwright` skill (browser conventions). Drives execution by tag expression with trace-first debugging and Playwright-native sharding.
gherkin-authoring
Authors `.feature` files that stay business-readable, translate cleanly from PRD acceptance criteria, and reuse a shared step-definition library. Use when writing or editing scenarios — the SSOT enforcement rules live in `.agents/rules/gherkin-standards.md`; this skill shows authors how to apply them.
idea-refinement
Refines ideas iteratively. Refine ideas through structured divergent and convergent thinking. Use "idea-refine" or "ideate" to trigger.