security-sensitive-change
Use when touching authentication, authorization, sessions, uploads, exports, import parsing, secrets, database access, dependencies, or a deployment/trust boundary.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4
- Forks
- 2
01 前言 Front Matter
- name
- security-sensitive-change
- license
- MIT
- description
- Use when touching authentication, authorization, sessions, uploads, exports, import parsing, secrets, database access, dependencies, or a deployment/trust boundary.
02 资源文件 1
- 参考文档references/trust-boundaries.md2.7 KB
03 SKILL.md 正文
Security-sensitive change
Outcome: the change has a negative test, its ASVS/MASVS row is current, and any
moved trust boundary is written down. Read docs/security/asvs-l2.md,
docs/security/masvs-l1.md and the trust-boundaries reference
before editing.
Prerequisites: the security checklist is a living contract — a security-sensitive PR updates every row it touches in the same commit. If the change cannot point at a row, it does not yet know what it is changing.
Steps
- Identify the attacker-controlled input and the boundary it crosses (HTTP, upload, import, outbound sync, template, log, secret store).
- Write the negative test first: missing/foreign
user_id, bad token, expired session, path traversal, SSRF target, formula injection, oversized input. - Enforce ownership at the data-access boundary (query-scoped by
user_idorContact.VCardUID), not only in the handler. - Keep sensitivity filtering in the query for every leaving copy; the three full-fidelity exceptions are policy, not leaks.
- Update the ASVS/MASVS row and citation. If the trust boundary moved, update the threat model; if a new persistent copy of user data exists, update the retention lifecycle and PII inventory.
- Run
citecheck(citations) anddocscheck(links/structure) when docs moved. - Never add
os/execto a server or request path; tooling is the scoped exception indocs/security/asvs-l2.mdP12.
DoD
cd backend && go test ./middleware/... ./routes/...
cd backend && go run ./cmd/citecheck
cd backend && go run ./cmd/docscheck
Report any check you could not run; never imply it passed.
Stop and ask
- The change weakens an ownership check, a sensitivity filter or a CSRF/auth control without a corresponding reviewed row.
- A secret would be logged, exported, committed or passed to an untrusted host.
- A new dependency or executable path crosses the supply-chain boundary.
- The threat model would need a new trust boundary and no ADR covers it.
Canonical detail: docs/security/asvs-l2.md, docs/security/masvs-l1.md,
docs/security/threat-model.md, docs/security/data-retention-lifecycle.md.
04 同仓库更多 Skills
valid
Use when exercising a well-formed skill fixture in the agent-context tests.
unregistered-dod
Use when a fixture must carry a DoD command no Suite registers.
orphan-reference
Use when a fixture must exercise an unlinked reference file.
missing-reference
Use when a fixture must link to a reference file that does not exist.
missing-description
暂无简介
long-reference
Use when a fixture must exceed the reference line maximum.