Skip to content

docs(security-planning): name the version-pin overrides and the fidelity probe in the security model - #3389

Open
Anshuman Prakash (Anshuman-Prakash) wants to merge 5 commits into
microsoft:mainfrom
Anshuman-Prakash:docs/refresh-security-planning-security-model
Open

Anshuman Prakash (Anshuman-Prakash) wants to merge 5 commits into
microsoft:mainfrom
Anshuman-Prakash:docs/refresh-security-planning-security-model

Conversation

@Anshuman-Prakash

@Anshuman-Prakash Anshuman Prakash (Anshuman-Prakash) commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

Revalidates the security-planning skill's SECURITY.md against the scripts it describes, fixes the places where it had fallen behind them, and refreshes ms.date.

The version pin has two operator overrides the model did not mention. B1 Tampering said the runtime "rejects mismatches rather than proceeding with an unverified binary". evaluate_version_policy in validate_tm7_with_tmt.py returns allowed as soon as diagnostic_override is set, before it compares anything, so an executable whose version metadata is unreadable (None) is accepted too. --pinned-version replaces the version the policy compares against, but discover_tmt_application still prefers a candidate at DEFAULT_PINNED_VERSION when it selects among trusted executables. The section now says so, and adds the two facts that bound the exception:

  • The Authenticode publisher check is not affected. discover_tmt_application filters candidates through is_trusted_tmt_executable before any version is compared.
  • manifest.json records both choices as required_tmt_version and diagnostic_override, in the validation and the feedback-loop paths. feedback-manifest.json records pinned_tmt_version only, so an override is not visible there.

Components omitted the PowerShell fidelity probe. G-SPF-2 already describes the risk of scripts/Deserialize-Tm7.ps1 loading a TMT assembly in-process, but the script was not in the component list. It is now described as what it is: standalone (only the test suite and an operator invoke it, not the Python harness), with its own assembly discovery and no version pin, re-launched under the 32-bit Windows PowerShell host, loading each signature-checked assembly with Assembly.LoadFrom and calling the tool serializer's ReadObject.

The agent review request was missing. assets/schemas/ holds three contracts, not two. The overlay and feedback-manifest contracts are enforced at runtime by validate_layout_overlay and validate_feedback_manifest; tm7-agent-review-request.schema.json is only checked by the test suite. A feedback-loop run writes agent-review-request.json only when it stops as automated-ready-pending-human, repeated-defect-no-improvement or max-iterations with surface metrics captured. Its text goes through the evidence redactor, but it hands the reviewer paths to screenshots whose pixels are never redacted.

Registry rows synchronized. The intro, Security Posture Overview and Data Flow in SECURITY.md, and the security-planning rows in docs/security/security-model.md and docs/security/README.md, now name the fidelity probe; the repo-wide row also names the version-pin overrides as a residual gap. I left ms.date on those two docs pages alone, since I changed one row in each and did not revalidate the rest of either page.

What I checked and left alone because it still holds:

Claim Source
Pinned version 7.3.51110.1 DEFAULT_PINNED_VERSION
Discovery from absolute installation roots, deterministic selection, no mtime fallback discover_tmt_application
Emitted overlays stay approval_state: pending validate_tm7_with_tmt.py, tm7_visual_feedback.py
A non-pending input overlay is rejected _resolve_layout_overlay in generate_tm7.py, which calls validate_layout_overlay in tm7_visual_feedback.py
Workspace deletion only inside a harness-marked directory WORKSPACE_OWNER_MARKER, prepare_owned_workspace
No network egress no HTTP client or socket import in scripts/; urllib.parse is used for URL splitting only
10 open residual gaps the Enterprise Readiness Gaps table has 10 rows

I did not re-derive the likelihood and impact ratings; those are judgments, not facts I can check against code.

Related Issue(s)

Closes #3370

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Testing

Read-through against scripts/validate_tm7_with_tmt.py, scripts/tm7_visual_feedback.py, scripts/generate_tm7.py, scripts/Deserialize-Tm7.ps1, tests/test_validate_tm7_with_tmt.py, SKILL.md and references/tm7-generation.md at main. No code changed.

There is no pwsh on this machine, so I ran the Node-based gates directly at their pinned versions on the three changed files:

Gate Result
cspell@10.4.0 with the repo config and the spell-check glob 0 issues
markdown-table-formatter@1.7.0 (lint:tables) no formatting applied to any of the three files
markdownlint-cli2@0.24.0 (lint:md) on docs/security/*.md 0 issues; .github/skills/** is ignored by .markdownlint-cli2.jsonc

Not run: npm run validate:local as a whole, lint:md-links and lint:frontmatter, which are pwsh scripts. The change adds no links, and the only frontmatter edit is ms.date on SECURITY.md. Help verifying those three would be welcome.

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)
  • Tests added for new functionality (if applicable)

AI Artifact Contributions

  • Used hve-builder review mode to review contribution
  • Addressed all actionable findings from the hve-builder review
  • Verified contribution follows common standards and type-specific requirements

Required Local Checks

The following local-safe validation commands must pass before merging:

  • Local validation aggregate: npm run validate:local (needs pwsh; partial, see Testing)
  • Documentation validation (if docs changed): npm run validate:docs (not run)
  • Spell checking: npm run spell-check (run as cspell@10.4.0 on the changed files)
  • Link validation: npm run lint:md-links (needs pwsh; no links added)

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues (none added)
  • Security-related scripts follow the principle of least privilege (no scripts changed)

🤖 Generated with Claude Code

…ity probe in the security model

Revalidated SECURITY.md against the scripts and bumped ms.date.

- B1 Tampering said the runtime rejects a version mismatch. It does, unless
  the operator passes --pinned-version or --diagnostic-override; both are
  recorded in the manifest and neither relaxes the Authenticode check.
- Components now lists scripts/Deserialize-Tm7.ps1, which G-SPF-2 already
  describes, the agent review request schema, and agent-review-request.json.

Closes microsoft#3370

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@jkim323 Jamie Kim (jkim323) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for improving the security model documentation, Anshuman Prakash (@Anshuman-Prakash)! Auditing security-planning/SECURITY.md against the scripts and surfacing Deserialize-Tm7.ps1, tm7-agent-review-request.schema.json, agent-review-request.json, and the --pinned-version / --diagnostic-override flags makes the threat model much clearer.

After reviewing the update against the scripts, schemas, and repository conventions, we have a few suggested adjustments before merge:

  • Clarify in Bucket B1 > Tampering (SECURITY.md:142, wrapped under 500 characters) that discover_tmt_application still prefers DEFAULT_PINNED_VERSION during discovery, --diagnostic-override also accepts unavailable (None) version metadata across %LOCALAPPDATA%\Apps\2.0, and required_tmt_version / diagnostic_override are recorded in manifest.json (feedback-manifest.json records pinned_tmt_version only).
  • Tighten Components items 4-6 (SECURITY.md:54-56) to note Deserialize-Tm7.ps1's standalone unpinned 32-bit invocation and LoadFrom / ReadObject behavior, distinguish runtime-enforced schemas from test-checked tm7-agent-review-request.schema.json, and mention feedback-manifest.json plus the conditional stop-state gate and unredacted screenshot handoff for agent-review-request.json.
  • Synchronize the security-planning row in docs/security/security-model.md#skill-security-models and docs/security/README.md#skill-security-models (alongside SECURITY.md's intro, overview, and Data Flow) and refresh ms.date on your final edit.
  • Restore ## Checklist and the canonical ## Security Considerations items from .github/pull_request_template.md, run npm run validate:local, npm run spell-check, and npm run lint:md-links when a pwsh + Node environment is available (or let us know if you'd like help verifying them), and align the PR description's manifest and generate_tm7.py overlay-source notes.

Please feel free to comment if you have questions about any of these suggestions, and we're happy to discuss further.

- B1 Tampering: discovery still prefers DEFAULT_PINNED_VERSION, the
  diagnostic override also accepts unreadable version metadata, and
  only manifest.json records the override
- Components 4-6: the fidelity probe is standalone, unpinned and
  32-bit; one schema is test-checked rather than runtime-enforced;
  feedback-manifest.json and the agent review request gate are named
- Sync the intro, posture overview, data flow and the two
  skill-security-model registry rows

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@Anshuman-Prakash

Copy link
Copy Markdown
Contributor Author

Thanks Jamie Kim (@jkim323), all four are in 830e0b5. I re-read each point against the scripts before writing it down.

B1 Tampering. Split into three bullets, each under 500 characters. It now says that discover_tmt_application still prefers DEFAULT_PINNED_VERSION when selecting among trusted candidates, that --diagnostic-override returns allowed before any comparison and so also accepts unreadable (None) version metadata, and that manifest.json records required_tmt_version and diagnostic_override while feedback-manifest.json records pinned_tmt_version only.

Components 4-6. Item 4 describes the probe as standalone, with its own discovery and no version pin, re-launched under the 32-bit host, using LoadFrom and ReadObject. My earlier "from the discovered installation" was wrong: it does not use the harness's discovery at all. Item 5 separates the two runtime-enforced contracts (validate_layout_overlay, validate_feedback_manifest) from tm7-agent-review-request.schema.json, which only tests/test_validate_tm7_with_tmt.py checks. Item 6 names feedback-manifest.json and the stop-state gate on agent-review-request.json, and says that its text is redacted but the screenshots it points to are not.

Sync. The intro, posture overview and Data Flow in SECURITY.md and the security-planning rows in docs/security/security-model.md and docs/security/README.md now name the probe. ms.date on SECURITY.md is today's. I did not bump it on the two docs/security pages, since I changed one row in each without revalidating the rest. Say if you would rather I did.

PR description. Restored ## Checklist and the canonical ## Security Considerations, corrected the manifest note, and moved the non-pending overlay rejection to its real source (_resolve_layout_overlay in generate_tm7.py).

Gates. No pwsh here, so I ran the Node ones at their pinned versions on the changed files: cspell@10.4.0 0 issues, markdown-table-formatter@1.7.0 no changes, markdownlint-cli2@0.24.0 0 issues on the two docs pages. lint:md-links and lint:frontmatter are pwsh scripts I could not run, so I would appreciate help verifying those.

@jkim323

Copy link
Copy Markdown
Contributor

Thank you for addressing the feedback Anshuman Prakash (Anshuman Prakash (@Anshuman-Prakash)). Can you please resolve the merge conflict please? Happy to approve once that is buttoned up!

…ty-planning-security-model

# Conflicts:
#	.github/skills/project-planning/security-planning/SECURITY.md
@Anshuman-Prakash

Copy link
Copy Markdown
Contributor Author

Jamie Kim (@jkim323) conflict resolved in 28f9fd0. It was only the ms.date line in security-planning/SECURITY.md: #3466 bumped it to 2026-11-21 on main, so I merged main and kept that date. No other change to the diff.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Update stale documentation - .github/skills/project-planning/security-planning/SECURITY.md

3 participants