Skip to content

Commit 9e5ce12

Browse files
Your NameCopilot
andcommitted
docs: propagate constitution v1.11.0 guidance
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent ee1f9e3 commit 9e5ce12

9 files changed

Lines changed: 509 additions & 55 deletions

File tree

.github/copilot-instructions.md

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ Diese Regeln gelten für alle Repositories in diesem Workspace. Projektspezifisc
177177
- Änderungen an einer Level-2-Runtime, Toolchain oder Statistik-Basis müssen `constitution.md`, `.specify/memory/constitution.md` und betroffene KI-Agenten-Dateien gemeinsam prüfen.
178178

179179
*The central `constitution.md` contains the binding Level-2 Project Environment Registry. Spec-Kit plans and Copilot work in Level-2 projects must use the matching registry row as binding context for runtime, build/test, A11Y, statistics, and agent surfaces. Changes to Level-2 runtime, toolchain, or statistics baselines require a joint review of `constitution.md`, `.specify/memory/constitution.md`, and affected AI-agent files.*
180-
181180
## Memory-Safe Languages (MSL) / Speichersichere Sprachen
182181

183182
- Level-2-Projekte SOLLEN eine speichersichere Sprache (Memory-Safe Language, MSL) als primäre Laufzeit verwenden, wenn die Zielplattform es erlaubt.
@@ -189,7 +188,6 @@ Diese Regeln gelten für alle Repositories in diesem Workspace. Projektspezifisc
189188
- Änderungen an dieser Empfehlung erfordern ein gemeinsames Update in `constitution.md`, `.specify/memory/constitution.md`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` und `.github/copilot-instructions.md`.
190189

191190
*Level-2 projects SHOULD use a memory-safe language (MSL) as their primary runtime when the target platform allows. Authoritative rules: `constitution.md`, Principle XI. MSL short list: Rust, Swift, C#/F#, Java/Kotlin/Scala, Go, Dart, Python, Ruby, JavaScript/TypeScript, Haskell, OCaml, Erlang/Elixir, Ada/SPARK. Non-MSL languages (C, C++, Assembly, `cc65`, Zig pre-1.0, …) require a documented justification in the Level-2 `constitution.md`. In non-MSL repositories (e.g. `C64Projects/cc65`), surface the documented justification in plans and tasks. `speckit.constitution` and `speckit.specify` SHOULD emit a non-blocking advisory warning when the primary language is not an MSL — tracked as a separate tooling task. Changes to this recommendation require a joint update across `constitution.md`, `.specify/memory/constitution.md`, and all four agent guidance files.*
192-
193191
## Sichere Code-Erzeugung / Secure Code Generation (ISO 27001/27002 A.8.28)
194192

195193
- KI-generierter Code MUSS den etablierten Secure-Coding-Best-Practices der Zielsprache und des Frameworks folgen. LLMs erzeugen nicht zuverlässig sicheren Code; explizite Durchsetzung ist erforderlich.
@@ -207,7 +205,6 @@ Diese Regeln gelten für alle Repositories in diesem Workspace. Projektspezifisc
207205
- Änderungen an dieser Regel erfordern ein gemeinsames Update in `constitution.md`, `.specify/memory/constitution.md`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` und `.github/copilot-instructions.md`.
208206

209207
*AI-generated code MUST follow the secure-coding best practices of the target language and framework. Authoritative rules: `constitution.md`, Principle XII. Language-specific short rules: C/C89 — bounds checking, no `gets()`, CERT C; C#/.NET — parameterised queries, output encoding, anti-forgery tokens, Microsoft Secure Coding Guidelines; SQL — parameterised statements only; Bash — quoted variables, no `eval` on untrusted input, `--` sentinel; PowerShell — `Set-StrictMode`, no `Invoke-Expression` on untrusted input. Cryptography: use current algorithms (AES-256, SHA-256+, Ed25519); deprecated (MD5, SHA-1 for signatures, DES, RC4) only with explicit risk acknowledgement. Error handling must not expose internals. Dependencies must have no known critical CVEs. Code reviews must include a security perspective for input handling, auth, crypto, and I/O. Changes require a joint update across `constitution.md`, `.specify/memory/constitution.md`, and all four agent guidance files.*
210-
211208
## Sichere Software-Architektur / Secure Software Architecture (ISO 27001/27002 A.8.27)
212209

213210
- KI-generierte und menschlich geschriebene Software-Architektur MUSS etablierten sicheren Architekturprinzipien folgen. Sicherer Code (Prinzip XII) ohne sichere Architektur reicht nicht aus — beide Ebenen müssen zusammenwirken.
@@ -224,7 +221,6 @@ Diese Regeln gelten für alle Repositories in diesem Workspace. Projektspezifisc
224221
- Änderungen an dieser Regel erfordern ein gemeinsames Update in `constitution.md`, `.specify/memory/constitution.md`, `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` und `.github/copilot-instructions.md`.
225222

226223
*AI-generated and human-written software architecture MUST follow secure-architecture principles. Authoritative rules: `constitution.md`, Principle XIII. Core principles: trust boundaries (validate all input at system boundaries), defense in depth (at least two independent security layers), least privilege (minimum required permissions), fail-safe defaults (deny by default), attack surface reduction (disable unused features), separation of concerns (auth/logging/validation as cross-cutting concerns), secure configuration (secrets in secret stores, never in code or Git), supply-chain security (verified registries, lock files, no known-vulnerable dependencies). Principles XII + XIII together form the complete secure-development approach: XII = tactical code-level security, XIII = strategic architecture-level security. Changes require a joint update across `constitution.md`, `.specify/memory/constitution.md`, and all four agent guidance files.*
227-
228224
## Sicherheitsdokumentation / Security Documentation (XII/XIII Extensions)
229225

230226
- Jedes Level-2-Projekt MUSS die folgenden Sicherheitsdokumente pflegen, basierend auf den Templates in `.specify/templates/`:
@@ -238,7 +234,25 @@ Diese Regeln gelten für alle Repositories in diesem Workspace. Projektspezifisc
238234

239235
*Every Level-2 project MUST maintain security documents based on templates in `.specify/templates/`: threat model (STRIDE), S-ADRs, arc42 Section 8 security concepts, security checklist, dependency audit, and security quality scenarios (SHOULD). Project-specific instances live in `docs/security/`; S-ADRs in `docs/security/adr/`. See `constitution.md`, Principles XII and XIII for authoritative requirements.*
240236

241-
<!-- SPECKIT START -->
242-
For additional context about technologies to be used, project structure,
243-
shell commands, and other important information, read the current plan
244-
<!-- SPECKIT END -->
237+
## Sicherheitsstandards & Anwendbarkeit / Security Standards & Applicability
238+
239+
- Vor jeder Level-2-Aufgabe die anwendbaren Sicherheitsstandards aus `constitution.md`, Prinzipien XIV-XVIII bestimmen und explizit benennen.
240+
- `NIST SSDF` und `CWE Top 25` gelten immer für Level-2-Arbeit.
241+
- `OWASP ASVS` gilt für Web-, API-, HTTP- und authentifizierte Dienste; der gewählte ASVS-Level muss benannt werden.
242+
- `SBOM` gilt für releasefähige oder verteilbare Artefakte; `VEX`, wenn bekannte Schwachstellen in ausgelieferten oder geprüften Komponenten bewertet werden müssen.
243+
- `SLSA` gilt als Soll-Vorgabe für CI/CD- oder veröffentlichte Artefakte; `Zero Trust` ist für verteilte, servicebasierte, cloudnahe oder remote-verwaltete Systeme explizit zu prüfen.
244+
- `CAPEC` soll in Bedrohungsmodellen für die risikoreichsten Angriffswege verwendet werden; `OWASP SAMM` soll für langlebige Projekte/Workspaces in Verbesserungspläne einfließen.
245+
- `OWASP Cheat Sheet Series`, `OWASP Proactive Controls` und bei öffentlichen OSS-Repositories oder kritischen Abhängigkeiten `OpenSSF Scorecard` sind als ergänzende Referenzen zu berücksichtigen.
246+
- Nichtanwendbarkeit immer als `N/A` mit kurzer Begründung dokumentieren; keine stillschweigende Auslassung.
247+
248+
*At the start of every Level-2 task, determine and name the applicable security standards from `constitution.md`, Principles XIV-XVIII. `NIST SSDF` and `CWE Top 25` always apply. `OWASP ASVS` applies to web/API/HTTP/auth-bearing services; `SBOM` applies to releasable or distributable artefacts; `VEX` applies when known vulnerabilities in shipped/evaluated components need a disposition statement. `SLSA` is the target model for CI/CD and published artefacts; `Zero Trust` must be explicitly evaluated for distributed, service-based, cloud, or remotely managed systems. `CAPEC`, `OWASP SAMM`, `OWASP Cheat Sheet Series`, `OWASP Proactive Controls`, and `OpenSSF Scorecard` are supporting references where relevant. Record non-applicability as `N/A` with justification rather than omitting it silently.*
249+
250+
## Agentischer Security-Workflow / Agentic Security Workflow
251+
252+
- In `spec.md`, `plan.md` und `tasks.md` die anwendbaren Standards samt Evidenzpfad festhalten.
253+
- Bei Bedrohungsmodellen `STRIDE` als Basis und bei risikoreichen Flows zusätzlich relevante `CAPEC`-Patterns verwenden.
254+
- Bei Web/API-Features den `ASVS`-Level und den Verifikationsumfang in `docs/security/` oder gleichwertiger Projektdokumentation ablegen.
255+
- Bei Release-/Artefakt-Arbeit `SBOM`, `VEX`, Provenance/SLSA-Nachweise und gegebenenfalls `OpenSSF Scorecard` in Release- oder Sicherheitsdokumentation einplanen.
256+
- Bei Architekturänderungen `Zero Trust`-Anwendbarkeit und bei langlebigen Projekten `SAMM`-Folgeaktionen prüfen.
257+
258+
*Capture the applicable standards and the evidence path in `spec.md`, `plan.md`, and `tasks.md`. Use `STRIDE` as the base for threat modeling and add relevant `CAPEC` patterns for the highest-risk flows. For web/API work, record the chosen `ASVS` level and verification scope in `docs/security/` or equivalent project documentation. For release and artefact work, plan `SBOM`, `VEX`, provenance/SLSA evidence, and `OpenSSF Scorecard` review where applicable. For architectural changes, evaluate `Zero Trust`; for long-lived projects, consider `OWASP SAMM` follow-up actions.*

.specify/memory/constitution.md

Lines changed: 156 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
<!--
22
Sync Impact Report
3-
Version change: 1.8.0 -> 1.9.0
3+
Version change: 1.10.0 -> 1.11.0
44
Modified principles:
55
- None (purely additive)
66
Added sections:
7-
- XIII. Secure Software Architecture (ISO 27001/27002 A.8.27)
7+
- XIV. Secure Development Standards & Applicability Matrix
8+
- XV. Secure SDLC & Verification Standards
9+
- XVI. Supply-Chain Transparency & Build Integrity
10+
- XVII. Threat Modeling & Attack Pattern Coverage
11+
- XVIII. Zero Trust Applicability & Security Program Maturity
812
Removed sections:
913
- None
1014
Templates requiring updates:
@@ -21,7 +25,7 @@ Follow-up TODOs:
2125
- None
2226
-->
2327

24-
# Constitution v1.10.0
28+
# Constitution v1.11.0
2529

2630
# home-baseline Constitution
2731

@@ -480,6 +484,154 @@ Mandatory security documentation (Principle XIII extensions):
480484
project-specific instances are maintained in `docs/security/`.
481485
- S-ADRs are stored as individual files in `docs/security/adr/`.
482486

487+
### XIV. Secure Development Standards & Applicability Matrix
488+
489+
The following standards matrix defines which secure-development and
490+
software-architecture standards are mandatory, recommended, or dependent on
491+
the project type. Every Level-2 feature, plan, task list, review, and release
492+
MUST use this matrix to determine which standards apply.
493+
494+
| Standard / guide | Priority | Applies when | Minimum expectation |
495+
|---|---|---|---|
496+
| NIST SSDF (SP 800-218) | MUST | All Level-2 projects | Secure SDLC work covers prepare, protect, produce, and respond practices |
497+
| CWE Top 25 | MUST | All Level-2 projects | Relevant weaknesses are checked during design, implementation, review, and remediation |
498+
| OWASP ASVS | MUST | Web, API, HTTP, or authentication-bearing services | Select and document an ASVS level and verification scope |
499+
| SBOM | MUST | Release-capable or distributable artefacts | Generate machine-readable component inventory per release |
500+
| VEX | MUST | Known vulnerabilities in shipped or evaluated components | Record whether the project is affected, not affected, mitigated, or under investigation |
501+
| SLSA | SHOULD | CI/CD-built or published artefacts | Target build provenance and integrity controls; at least L1 where feasible |
502+
| OWASP SAMM | SHOULD | Long-lived Level-1 and Level-2 workspaces/projects | Periodic self-assessment with prioritized improvement actions |
503+
| CAPEC | SHOULD | Threat modeling of material attack paths | Reference relevant attack patterns for high-risk flows and abuse cases |
504+
| NIST Zero Trust (SP 800-207) | Project-type-dependent | Distributed, service-based, cloud, remote-managed, or multi-device systems | Explicit applicability decision with controls or justified N/A |
505+
| OWASP Cheat Sheet Series / Proactive Controls | SHOULD | All developer-facing projects | Use as day-to-day implementation guidance below the constitution |
506+
| OpenSSF Scorecard | Project-type-dependent | Public OSS repositories or high-impact external dependencies | Review repository/dependency security posture before adoption or release |
507+
508+
Mandatory rules:
509+
- Every Level-2 feature specification, plan, task list, PR, and release note
510+
MUST identify the applicable entries from this matrix and mark all other
511+
ambiguous entries as `N/A` with a short justification. Silent omission is
512+
not allowed.
513+
- `NIST SSDF` and `CWE Top 25` are never `N/A` for Level-2 work.
514+
- Where a standard applies, the implementation evidence MUST be reflected in
515+
the relevant artefacts: `spec.md`, `plan.md`, `tasks.md`, `docs/security/`,
516+
S-ADRs, release assets, or CI/CD configuration as appropriate.
517+
518+
**Rationale**: Secure-development standards are often partially remembered and
519+
selectively applied. A binding applicability matrix keeps teams, agents, and
520+
future templates aligned on what is always required, what is recommended, and
521+
what depends on project shape rather than personal preference.
522+
523+
### XV. Secure SDLC & Verification Standards
524+
525+
Level-2 projects MUST integrate modern secure-development and verification
526+
standards into the full software lifecycle, not only into final code review.
527+
528+
Mandatory rules:
529+
- All Level-2 projects MUST align their secure-development lifecycle with
530+
`NIST SP 800-218` (Secure Software Development Framework, SSDF). Security
531+
work MUST cover preparation, source/build protection, secure production of
532+
software, and vulnerability response/improvement.
533+
- All Level-2 projects MUST use the current `CWE Top 25` as a root-cause and
534+
prioritization lens for architecture, implementation, review checklists, and
535+
remediation planning. When a relevant Top-25 weakness applies, the chosen
536+
mitigations SHOULD be named in the checklist, threat model, ADR, or PR.
537+
- Web, API, HTTP, and authentication-bearing services MUST select an `OWASP
538+
ASVS` verification level:
539+
- `ASVS Level 1` for simple or internal web applications with limited risk.
540+
- `ASVS Level 2` for authenticated, multi-user, privileged, internet-facing,
541+
or data-bearing services.
542+
- `ASVS Level 3` only when the project has explicit high-assurance,
543+
high-impact, or regulatory security requirements.
544+
- Web/API projects MUST record the selected ASVS level and verification scope
545+
in `docs/security/` (for example as an ASVS verification matrix or
546+
equivalent repository-local format).
547+
- `OWASP Cheat Sheet Series` and `OWASP Proactive Controls` SHOULD be used as
548+
day-to-day implementation guidance wherever language/framework standards do
549+
not already provide stricter or more specific rules.
550+
551+
**Rationale**: SSDF provides the process frame, CWE Top 25 provides defect
552+
prioritization, ASVS provides application verification depth, and OWASP cheat
553+
sheets provide tactical implementation help. Together they reduce the gap
554+
between abstract policy and day-to-day engineering decisions.
555+
556+
### XVI. Supply-Chain Transparency & Build Integrity
557+
558+
Secure development MUST include transparency about what is shipped and how it
559+
was produced.
560+
561+
Mandatory rules:
562+
- Every release-capable or distributable Level-2 project MUST generate a
563+
machine-readable `SBOM` for each released artefact set. The SBOM MAY be
564+
stored as a release asset and/or mirrored in `docs/security/`.
565+
- When a released or evaluated component has a known vulnerability that is
566+
relevant to consumers or reviewers, the project MUST publish or record a
567+
`VEX`-style status statement indicating whether the product is affected,
568+
not affected, mitigated, or still under investigation.
569+
- Projects with CI/CD-built or published artefacts SHOULD target `SLSA`
570+
controls for build integrity and provenance. At minimum, scripted/automated
571+
builds and provenance evidence SHOULD exist where tooling makes this
572+
practical; publicly consumed artefacts SHOULD aim for `SLSA L2` or better
573+
over time.
574+
- Public OSS repositories and the adoption of high-impact external
575+
dependencies SHOULD consider `OpenSSF Scorecard` findings (or an equivalent
576+
source of repository security posture evidence) before release or adoption.
577+
- Dependency, SBOM, VEX, provenance, and Scorecard evidence MUST feed into the
578+
repository's dependency audit and release review process.
579+
580+
**Rationale**: A project can follow secure coding rules and still ship opaque
581+
or tampered artefacts. SBOM, VEX, SLSA, and Scorecard address transparency,
582+
integrity, and supplier trustworthiness across the software supply chain.
583+
584+
### XVII. Threat Modeling & Attack Pattern Coverage
585+
586+
Threat modeling MUST describe both what the system values and how it can be
587+
attacked.
588+
589+
Mandatory rules:
590+
- Every Level-2 threat model MUST use `STRIDE` as the base categorization
591+
scheme, as already required by Principle XIII.
592+
- Threat models SHOULD reference relevant `CAPEC` attack patterns for the
593+
highest-risk trust boundaries, abuse cases, or externally reachable flows.
594+
The goal is not exhaustive mapping, but explicit coverage of realistic
595+
attacker techniques.
596+
- Threat models MUST be updated when authentication, authorization,
597+
privilege boundaries, deployment topology, externally reachable endpoints,
598+
sensitive data flows, or third-party integrations materially change.
599+
- Security-relevant mitigations and residual risks identified through STRIDE
600+
or CAPEC analysis SHOULD be reflected in S-ADRs, checklists, and tasks.
601+
602+
**Rationale**: STRIDE is strong for systematic coverage of threat categories;
603+
CAPEC complements it by adding attacker behavior and attack-pattern language.
604+
Using both helps avoid sterile threat models that classify risks but fail to
605+
anticipate realistic exploitation paths.
606+
607+
### XVIII. Zero Trust Applicability & Security Program Maturity
608+
609+
Secure architecture is not static; it must account for modern distributed
610+
access patterns and continuously improve over time.
611+
612+
Mandatory rules:
613+
- Distributed, service-based, cloud, remote-managed, multi-device, or
614+
identity-federated systems MUST explicitly evaluate the applicability of
615+
`NIST SP 800-207` (Zero Trust Architecture). The architecture documentation
616+
MUST record either the relevant zero-trust controls or a justified `N/A`
617+
decision.
618+
- Where zero-trust principles apply, systems MUST NOT rely on implicit trust
619+
based solely on network location. User, workload, and device access SHOULD
620+
be authenticated and authorized before access to protected resources, and
621+
policy decisions SHOULD be observable in logging or audit evidence.
622+
- Long-lived Level-1 workspaces and Level-2 projects SHOULD perform periodic
623+
`OWASP SAMM` self-assessments and maintain a short, prioritized improvement
624+
backlog or assessment note in `docs/security/` or equivalent governance
625+
documentation.
626+
- Findings from incidents, audits, dependency reviews, and SAMM assessments
627+
SHOULD feed back into templates, checklists, security docs, and AI-agent
628+
guidance files so improvements become structural rather than one-off fixes.
629+
630+
**Rationale**: Zero Trust addresses the realities of remote access, services,
631+
and cloud deployment; SAMM addresses the maturity of the development program
632+
itself. Together they keep security architecture and security process moving
633+
forward instead of freezing at a one-time baseline.
634+
483635
## Level-2 Project Environment Registry / Level-2-Projektumgebungsregister
484636

485637
This registry consolidates the constitution-relevant Level-2 project facts
@@ -570,7 +722,7 @@ allowed path.
570722
`.github/copilot-instructions.md` for per-agent operational guidance. This
571723
constitution is the authoritative policy layer above all agent-specific files.
572724

573-
**Version**: 1.10.0 | **Ratified**: 2026-03-31 | **Last Amended**: 2026-04-24
725+
**Version**: 1.11.0 | **Ratified**: 2026-03-31 | **Last Amended**: 2026-04-24
574726

575727
<!-- EN: constitution.md placeholder
576728
[DE-Zusammenfassung: constitution.md beschreibt die Prinzipien und Standards für alle home-baseline Workspaces.]

0 commit comments

Comments
 (0)