standards-mapping — правило для Claude Code
Правило standards-mapping связывает компоненты архитектуры со стандартами OWASP, NIST, CIS и облачными фреймворками при формировании планов безопасности в Claude Code.
MIT ★ 1 627 обновлён 2026-10-25
.github/instructions/standards-mapping.instructions.mdЧто делает standards-mapping
Правило регламентирует третью фазу планирования безопасности в каталогах .copilot-tracking/security-plans/**. Базовые стандарты вроде OWASP, NIST 800-53, OWASP LLM Top 10 и NIST AI RMF загружаются из постоянных файлов навыка security-planning. При обнаружении специализированных областей агент привлекает отдельные навыки, например owasp-agentic, owasp-infrastructure или owasp-cicd.
Облачные и быстро меняющиеся спецификации делегируются динамическому поиску через rpi-research. Сюда входят Microsoft WAF, CAF, PCI-DSS, SOC 2, HIPAA, FedRAMP, S2C2F, SLSA, сервисные контроли MCSB, а также CIS Controls из-за лицензионных ограничений на распространение текста.
Если инструмент rpi-research недоступен, правило запрещает выдумывать требования из обучающей выборки: сопоставление останавливается. Итоговый блок по каждому компоненту фиксирует перечень стандартов с обоснованием, выводы по WAF/CAF и выявленные пробелы в мерах защиты.
Какие задачи решает
- сопоставить компоненты системы с контролями OWASP и NIST
- запустить сбор требований по PCI-DSS, HIPAA или FedRAMP через rpi-research
- зафиксировать пробелы между текущей архитектурой и нормативами безопасности
- проверить цепочку поставок и пайплайны по уровням S2C2F и SLSA
Примеры запросов агенту
- Сопоставь сервис аутентификации со стандартами безопасности OWASP и NIST
- Сформируй блок standards mapping для базы данных в плане безопасности
- Проверь пайплайн сборки на соответствие уровням SLSA
Как установить standards-mapping
Вручную: положить файлы
.github/instructions/standards-mapping.instructions.mdПоле applyTo задаёт, к каким файлам применять
Вручную: положить файлы
.claude/rules/standards-mapping.mdПоле paths во frontmatter ограничивает файлы: applyTo из источника → paths
AGENTS.md
Codex читает AGENTS.md: вставьте текст правила туда
Вручную: положить файлы
.cursor/rules/standards-mapping.mdcВо frontmatter: description, globs, alwaysApply. applyTo из источника → globs, иначе правило само не подключится
Вручную: положить файлы
.devin/rules/standards-mapping.mdВручную: положить файлы
.clinerules/standards-mapping.mdПо шагам, с командами для каждой платформы: AGENTS.md и CLAUDE.md: что это, кто читает и какой выбрать
Вопросы о standards-mapping
Как установить standards-mapping в Claude Code?
Сохраните файл правила по пути .claude/rules/standards-mapping.md в корне проекта. Правило применяется к путям .copilot-tracking/security-plans/**.
Что делает standards-mapping?
Оно направляет агента при составлении матриц соответствия стандартам безопасности, разделяя базовые спецификации (OWASP, NIST) и динамически запрашиваемые нормативы (WAF, CAF, PCI-DSS).
Почему стандарты CIS и WAF запрашиваются через rpi-research, а не вшиты в правило?
WAF быстро обновляется под облачные сервисы, а условия лицензии CIS запрещают прямое распространение текста фреймворка, поэтому агент запрашивает их во время работы.
Исходный текст
standards-mapping.instructions.md · MIT
---
description: "OWASP and NIST security standards references with rpi-research activation for CIS, WAF, CAF, and other runtime lookups"
applyTo: '**/.copilot-tracking/security-plans/**'
---
# Standards Mapping
Frequently-used security standards are referenced from the durable skill material during Phase 3 of the security planning workflow. Specialized cloud frameworks (WAF and CAF) activate `rpi-research` at runtime instead of duplicating large, version-sensitive content.
At least one standard from each applicable framework should map to every component in the security plan. The Security Planner's Skill Reference Contract loads the durable standards references (`standards-cross-reference.md` and `nist-control-families.md` from the `security-planning` skill) via a mandatory `read_file` on Phase 3 entry, so the OWASP, NIST, and AI RMF mapping tables are not restated here. This instruction file stays orchestration-focused and defers the versioned standard tables to the skill loaded by that contract.
## Research Activation
Microsoft Well-Architected Framework (WAF) and Cloud Adoption Framework (CAF) lookups activate `rpi-research` at runtime. These frameworks evolve frequently and contain extensive cloud-specific guidance best retrieved on demand.
The following standards are also delegated for runtime lookup due to version sensitivity, domain specificity, or rapid evolution:
| Standard | Rationale for Delegation |
|---------------------------------------------------|------------------------------------------------------------|
| WAF / CAF | Cloud-specific, frequently updated, extensive content |
| MCSB per-service control mappings | Azure-specific, frequently updated per-service baselines |
| PCI-DSS | Domain-specific, version-dependent compliance requirements |
| S2C2F (Secure Supply Chain Consumption Framework) | Emerging standard, evolving maturity levels |
| SLSA (Supply Chain Levels for Software Artifacts) | Version-dependent build integrity requirements |
| SOC 2 | Audit-framework specific, organization-dependent scope |
| HIPAA | Regulated domain, requires current interpretation |
| FedRAMP | Government-specific, dynamic control baselines |
| CIS Critical Security Controls | License terms prohibit redistribution; use runtime lookup |
Do NOT delegate OWASP, NIST 800-53, OWASP LLM Top 10, or NIST AI RMF lookups. Those standards are covered by the durable skill references listed above.
### Conditional Standards Skills
When buckets or AI components from Phases 1–2 match, prefer the matching specialized security skill over a runtime delegation:
* AI/ML components → `owasp-agentic`, and `owasp-mcp` when MCP tooling is used (alongside the always-loaded `owasp-llm`)
* `infrastructure` bucket → `owasp-infrastructure`
* Azure cloud resources → `mcsb` (stable MCSB control-domain taxonomy and crosswalk; delegate volatile per-service control lookups)
* `build` / `devops-platform-ops` buckets → `owasp-cicd`, `supply-chain-security`
* Cross-cutting GS overlay → `secure-by-design`
These skills are loaded by the Security Planner's Conditional Skill Map. Activate `rpi-research` only for standards with no matching skill (WAF, CAF, PCI-DSS, and the others listed above) and for the volatile per-service layer of MCSB.
### When to Activate Research
* User requests WAF or CAF alignment for a component.
* Phase 3 identifies cloud-specific controls that require runtime research beyond the baseline standards references.
* Compliance requirements demand cloud framework mapping beyond the current baseline standards references.
* Supply chain security analysis requires S2C2F or SLSA level mapping.
* Regulatory context requires PCI-DSS, HIPAA, SOC 2, or FedRAMP mapping.
### Activation Inputs
Provide `rpi-research` with the specific framework topic and mapping purpose; security authors, reviewers, control owners, and downstream consumers as the audience and intended use; explicit mapping questions and evidence criteria; component, bucket, technology, cloud, source, version, jurisdiction, and date scope plus non-goals; risk, licensing, privacy, deadline, phase-gate, and write-boundary constraints; supplied component, bucket, state, standards, control, and user evidence; requested outputs; and output mode (`analysis` or `comparison`).
Explicitly identify `.copilot-tracking/security-plans/{project-slug}/` as a trusted alternate evidence root.
Read the completed primary research artifact and synthesize applicable Standards Coverage, Findings, and Recommendations into the component mapping. Treat `Blocked` and `Needs clarification` as unresolved evidence, not permission to infer a mapping. If `rpi-research` or a required lookup capability is unavailable, inform the user and stop the dependent mapping rather than synthesizing standards from training data. The skill decides whether independent questions warrant parallel research.
### Query Templates
Use these templates when defining questions for `rpi-research`:
* WAF/CAF: "Map {component} to WAF {pillar} and CAF {area} controls for {technology stack} on {cloud platform}."
* MCSB: "Identify MCSB controls applicable to {component} of type {resource type} in {Azure service}."
* PCI-DSS: "Map {component} handling {data classification} to PCI-DSS v{version} requirements."
* S2C2F: "Evaluate {component} dependency consumption against S2C2F maturity levels."
* SLSA: "Assess {component} build pipeline against SLSA v{version} level requirements."
* SOC 2: "Map {component} to SOC 2 Trust Services Criteria relevant to {trust principle}."
* HIPAA: "Identify HIPAA Security Rule requirements for {component} handling {PHI context}."
* FedRAMP: "Map {component} to FedRAMP {impact level} baseline controls."
Research evidence stays under the active Security Planner's mirrored `research/` structure. Read the returned primary artifact and incorporate applicable findings into the component's standards mapping under the WAF/CAF Findings section.
## Mapping Output Format
For each component, produce the standards mapping block defined in the skill reference and adapt it to the current component context.
```markdown
### {Component Name} ({Bucket})
**Applicable Standards:**
- OWASP: {items with justification}
- NIST: {families with justification}
- CIS: {researched, include primary-artifact evidence or N/A}
**WAF/CAF Findings:** {delegated RPI evidence or N/A}
**Gap Analysis:** {identified gaps between current controls and standard requirements}
```
Include justification for each mapped standard, explaining why the control is relevant to the specific component. Flag gaps where a standard should apply based on the cross-reference table but no corresponding control exists in the current architecture.
© microsoft · MIT · microsoft/hve-core