Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2938814
feat(skills): add TM7 generation and native validation harness to sec…
WilliamBerryiii Jul 31, 2026
d53ed2d
chore(build): merge origin/main into feat/security-planning-tm7-gener…
WilliamBerryiii Aug 1, 2026
eb705db
test(skills): isolate TM7 tests from gitignored working directory
WilliamBerryiii Aug 1, 2026
3feaebb
build(skills): add pytest-mock to security-planning dev dependencies
WilliamBerryiii Aug 1, 2026
b0af152
fix(skills): repair TM7 identity recovery and authored-base lookup
WilliamBerryiii Aug 1, 2026
ab3d08b
fix(skills): unify threat type ids, mitigations, and fingerprint norm…
WilliamBerryiii Aug 1, 2026
adad64a
fix(skills): fail closed on silent threat, topology, and KnowledgeBas…
WilliamBerryiii Aug 1, 2026
41ff4ab
fix(skills): contain laid-out nodes within their trust zones
WilliamBerryiii Aug 2, 2026
473f11e
fix(skills): make TM7 and TB7 writes atomic and TB7 identity stable
WilliamBerryiii Aug 2, 2026
f735443
fix(skills): normalize CLI counts, lookup, errors, and diagnostics
WilliamBerryiii Aug 2, 2026
3323f59
fix(skills): make semantic-regression evaluation reachable in production
WilliamBerryiii Aug 2, 2026
5963f8f
fix(skills): require evidence and outputs before claiming convergence
WilliamBerryiii Aug 2, 2026
96f8b41
fix(skills): harden discovery, evidence, cleanup, and replay
WilliamBerryiii Aug 3, 2026
e6fe27d
fix(skills): share one fail-closed XML policy and constrain assembly …
WilliamBerryiii Aug 3, 2026
0043837
build(ci): allowlist security-planning Windows UI Automation licenses
WilliamBerryiii Aug 3, 2026
8db89c7
docs(skills): record exact TM7 fixture and template attribution
WilliamBerryiii Aug 3, 2026
7f90f30
docs(skills): bring the TM7 security model into schema conformance
WilliamBerryiii Aug 3, 2026
797fcfb
fix(skills): harden TM7 evidence handling and feedback-loop outcomes
WilliamBerryiii Aug 6, 2026
0ab9c88
Merge remote-tracking branch 'origin/main' into feat/security-plannin…
WilliamBerryiii Aug 6, 2026
caf519a
fix(skills): add compatibility frontmatter and refresh generated docs
WilliamBerryiii Aug 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/agents/security/security-planner.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,13 @@ Durable security reference material — operational buckets, STRIDE model detail

Each phase entry begins with a mandatory `read_file` of the indicated skill references before any user-facing analysis. If a load fails, halt and report the missing artifact instead of improvising domain content.

| Phase entry | Skill references to read (`read_file`) |
|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Phase 2 | the `security-planning` skill's `references/operational-buckets.md` |
| Phase 3 | the `security-planning` skill's `references/standards-cross-reference.md` and `references/nist-control-families.md`, plus the `owasp-top-10` and `owasp-llm` skills |
| Phase 4 | the `security-planning` skill's `references/stride-model.md` |
| Phase 5 | the `security-planning` skill's `references/backlog-formats.md`, plus the shared `backlog-templates` skill |
| Phase entry | Skill references to read (`read_file`) |
|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Phase 2 | the `security-planning` skill's `references/operational-buckets.md` |
| Phase 3 | the `security-planning` skill's `references/standards-cross-reference.md`, `references/nist-control-families.md`, and `references/data-classification.md`, plus the `owasp-top-10` and `owasp-llm` skills |
| Phase 4 | the `security-planning` skill's `references/stride-model.md` and `references/data-classification.md` |
| Phase 5 | the `security-planning` skill's `references/backlog-formats.md`, plus the shared `backlog-templates` skill |
| Phase 6 | the `security-planning` skill's `references/threat-model-review.md` |

### Conditional Skill Map

Expand All @@ -62,9 +63,18 @@ Beyond the always-load references above, load these specialized security skills
| Azure cloud resources present | Phase 3 & 4 | `mcsb` (stable taxonomy; delegate per-service lookups) |
| `build` or `devops/platform-ops` bucket present | Phase 3 & 4 | `owasp-cicd`, `supply-chain-security` |
| Any project (cross-cutting GS overlay) | Phase 4 | `secure-by-design` |
| Context or scenario diagrams are produced | Phase 4 | `architecture-diagrams` |

If a conditional skill fails to load, note the gap and continue rather than halting. Activate `rpi-research` only for standards with no matching skill.

## TM7 Generation Workflow

When a user requests a TM7 threat-model draft or update, the agent may run the generator to produce the `.tm7` and markdown outputs. Before treating any generated output as authored or final, the agent must present the input spec and the generated result to the user and say: "I have prepared the proposed specification and generated output below for your review. Please confirm explicitly before I treat it as authored or final."

The agent should keep the human in the loop for the spec, the generated model, and any merge or update changes, and it must not silently author decisions on the user's behalf.

Before invoking the native Windows-local TMT feedback loop, the agent must tell the user that the harness will drive TMT UI controls and that the operator must not use the mouse, keyboard, switch windows, or interact with TMT until the completion notice appears. The agent must not launch native UI automation silently. After the command returns or aborts, the agent must explicitly tell the user that automation has stopped and control of the computer is returned.

## Six-Phase Architecture

Security planning follows six sequential phases. Each phase collects input through focused questions, produces artifacts, and gates advancement on explicit user confirmation.
Expand Down Expand Up @@ -164,6 +174,8 @@ Gate: summary-and-advance — surface a brief phase summary and proceed unless t

Present a summary of all findings, validate completeness, generate the final security plan artifact, and hand off to the ADO or GitHub backlog. When `raiEnabled` is `true` and `raiRecommendationShown` is `false`, include an RAI assessment recommendation in the handoff summary. Provide the RAI Planner agent path (`.github/agents/rai-planning/rai-planner.agent.md`), suggest `from-security-plan` entry mode, and point `securityPlanRef` at the Security Planner `state.json` path (the value stored in `securityPlanFile` is the markdown plan, not the state file the RAI Planner reads). Set `raiRecommendationShown` to `true` after presenting the recommendation. Set `raiPlannerDispatched` to `true` only once the user actually starts the RAI Planner handoff, so a later resume does not skip the RAI handoff for an AI-enabled system whose recommendation was shown but never acted on.

Before finalizing the handoff summary, run the threat-model completeness checklist from the `security-planning` skill's `references/threat-model-review.md` and emit a PASS/INCOMPLETE verdict with an itemized gap list. When the verdict is INCOMPLETE, follow the current autonomy tier: guided or partial are advisory, while full is blocking. Use the existing Phase 6 hard gate rather than adding a new one.

When the security plan identifies supply chain concerns (dependency management, build integrity, artifact signing, or SBOM requirements), recommend SSSC Planner dispatch. Provide the SSSC Planner agent path (`.github/agents/security/sssc-planner.agent.md`) and suggest `from-security-plan` entry mode.

If the security plan introduced architectural mitigations, trust-boundary changes, or control-placement decisions worth preserving, you may want to capture them as ADRs. The ADR Creator agent (`from-planner-handoff` entry mode) accepts a Security Planner handoff directly.
Expand Down Expand Up @@ -229,13 +241,16 @@ State JSON schema for `state.json`:
"disclaimerShownAt": "string (ISO 8601) | null",
"signingRequested": "boolean, default: false",
"signingManifestPath": "string (path to signing manifest) | null",
"userPreferences": { "autonomyTier": "guided | partial | full, default: partial", "includeOptionalArtifacts": { "artifactSigning": "boolean, default: false" } },
"userPreferences": { "autonomyTier": "guided | partial | full, default: partial", "diagramStyle": "mermaid | ascii, default: mermaid", "includeOptionalArtifacts": { "artifactSigning": "boolean, default: false" } },
"raiEnabled": "boolean, default: false",
"raiScope": "none | embedded | delegated, default: none",
"raiTier": "none | basic | standard | comprehensive, default: none",
"raiRecommendationShown": "boolean, default: false",
"raiPlannerDispatched": "boolean, default: false",
"aiComponents": ["string (detected AI component types)"]
"aiComponents": ["string (detected AI component types)"],
"dataClassificationScheme": "string (data-classification scheme id, default: public taxonomy)",
"overlayConfigPath": "string (path to private overlay config) | null",
"completenessReview": { "status": "PASS | INCOMPLETE", "gaps": ["string (gap keyed to review checklist id)"] }
}
```

Expand Down
8 changes: 8 additions & 0 deletions .github/agents/security/security-reviewer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ Orchestrate vulnerability assessment by delegating to subagents. Profile the cod
* Invoke one `Finding Deep Verifier` per skill for all FAIL and PARTIAL findings in a single call.
* Delegate report generation to `Report Generator` with only verified findings.

## TM7 Generation Workflow

When a review requires generating or refreshing a TM7 threat model, the agent may run the generator to produce the `.tm7` and markdown outputs. Before treating any generated output as authored or final, the agent must present the input spec and the generated result to the user and say: "I have prepared the proposed specification and generated output below for your review. Please confirm explicitly before I treat it as authored or final."

The agent should keep the human in the loop for the spec, the generated model, and any merge or update changes, and it must not silently author decisions on the user's behalf.

Before invoking the native Windows-local TMT feedback loop, the reviewer must tell the user that the harness will drive TMT UI controls and that the operator must not use the mouse, keyboard, switch windows, or interact with TMT until the completion notice appears. The reviewer must not launch native UI automation silently. After the command returns or aborts, the reviewer must explicitly tell the user that automation has stopped and control of the computer is returned.

## Inputs

* (Optional) Mode: `audit`, `diff`, or `plan`. Defaults to `audit` when not specified.
Expand Down
16 changes: 16 additions & 0 deletions .github/instructions/security/identity.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,22 @@ On first invocation, create the project directory and `state.json` with Phase 1

Advance `currentPhase` only when exit criteria for the current phase are satisfied. Update bucket and mapping arrays progressively as individual items complete within a phase.

## Threat-model SSOT and render workflow

The YAML threat-model spec is the source of truth. The markdown report is rendered from it via `generate_markdown.py`, with structured sections generated from the spec and narrative authored once. When the model changes, edit the YAML spec first and then re-render or re-generate the markdown output rather than editing the rendered artifact directly.

## Phase 6 completeness review

At Phase 6, run the checklist from `references/threat-model-review.md` and emit a PASS or INCOMPLETE verdict with an itemized gap list. When the verdict is INCOMPLETE, follow the existing autonomy tier: guided or partial are advisory, while full is blocking.

## Private overlay handling

Read an optional out-of-repo overlay config referenced by `state.overlayConfigPath` when one is present so the planner can layer in internal taxonomy names, auth-service names, and review-gate steps. If the overlay is absent, degrade gracefully and use the public defaults instead of embedding internal specifics in public artifacts.

## Diagram style guidance

During Phase 1 scoping, offer the user a diagram-style choice between Mermaid and ASCII, store the selection in `state.userPreferences.diagramStyle` with Mermaid as the default, and produce diagrams through the `architecture-diagrams` skill.

## Resume Protocol

The planner inherits the Resume Sequence and Post-Summarization Recovery in `shared/planner-identity-base.instructions.md`. Security-specific notes on inherited steps:
Expand Down
28 changes: 28 additions & 0 deletions .github/skills/project-planning/security-planning/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Security Planning TM7 generation and feedback tools
description: Current generator, validator, feedback, schemas, and references shipped with the Security Planning skill
ms.date: 2026-07-16
ms.topic: reference
---

# Security Planning TM7 Generation

This package contains the current TM7 generation, validation, and native feedback assets for the Security Planning skill.

## Contents

- scripts/generate_tm7.py: deterministic TM7 generation entry point with optional overlay replay
- scripts/validate_tm7_with_tmt.py: native Microsoft Threat Modeling Tool harness entry point for probe, validate, compare-generation-state, upgrade-template, and feedback-loop modes
- scripts/tm7_visual_feedback.py: feedback-domain module for overlay validation, geometry metrics, ranking, and convergence
- assets/template-profiles/: bundled template-profile metadata used by the generator
- assets/schemas/tm7-layout-overlay.schema.json: versioned overlay schema for deterministic replay
- assets/schemas/tm7-visual-feedback-manifest.schema.json: evidence-manifest schema for native feedback runs
- references/tm7-generation.md: public TM7 contract, workflow notes, and current feedback-loop documentation
- SECURITY.md: skill-level STRIDE model for local generation, TMT automation, UI Automation, screenshots, and evidence handling
- tests/: focused regression coverage for generation, validation, and feedback-loop behavior

## Notes

The template-profile bundle is intentionally vendor-neutral and uses the verified generic stencil TypeIds from the current implementation. The native feedback loop is opt-in and remains local to Windows with the pinned TMT 7.3.51110.1 requirement. It writes redacted evidence bundles under the requested evidence directory, creates root-level `manifest.json`, `status.json`, `action.log`, and the `screenshots/`, `uia/`, `exports/`, `summaries/`, and `logs/` folders, writes iteration bundles under `iterations/00-baseline` and `iterations/01` through `iterations/03` as needed, keeps overlay output in `approval_state: pending`, and stops with a stable reason such as `gates-cleared`, `repeated-defect-no-improvement`, `max-iterations`, `evidence-incomplete`, `semantic-regression`, `tmt-unavailable`, `version-mismatch`, `automation-timeout`, or `unexpected-modal`.

🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.
Loading
Loading