Skip to content

Add threat model security object - #64

Merged
kreneskyp merged 8 commits into
mainfrom
plat-1543-threat-model-object
Nov 16, 2026
Merged

kreneskyp merged 8 commits into
mainfrom
plat-1543-threat-model-object

Conversation

@kreneskyp

@kreneskyp kreneskyp commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add the threat_model type, method enum, skeleton, schemas, and considers edge.
  • Expand threat.threatens to connection, data sink, and trust boundary targets.
  • Add risk decision fields and schema conditions for decided_by.
  • Require each threat model to include a covers edge.

Review fixes

  • Enforce the required covers relation and test the missing-edge diagnostic.
  • Validate a threatens edge to a registered queue type and assert the disallowed-target diagnostic.
  • Add TestMatrix rows for FR-026 and the touched FR-027 criteria, with test markers bound to each row.

Verification

  • quire 0.46.0 (engine 0.61.0) matrix --scope . --module <security module> --module <spec-artifacts-process module> --format tsv — FR-026-AC-1..7 and AC-9..10 all report tagged; FR-026-AC-8 reports method-without-symbol.
  • quire 0.46.0 validate --scope . --module <security module> --module <spec-artifacts-process module> --strict spec/tests.md — exit 0.
  • locked-build.sh <worktree>/target poetry run pytest tests/test_threat_model.py tests/test_manifest.py --no-cov -q — 65 passed.
  • locked-build.sh <worktree>/target poetry run poe lint — passed (ruff, black, and schema drift check: 59 schemas match).

PLAT-1535 and PLAT-1657 remain dependencies; hold merge until both land. The code lead owns the final aggregate gate.

Final aggregate gate and baseline failure

On PR head dc3c5830917eabae8dbed2c55d10977964b821fb, locked-build.sh <worktree>/target poetry run make test lint completed with 416 passed, 1 deselected, 5 xfailed, and one failure. Ruff, Black, and the schema drift check were not reached because make test stopped at the failing legacy test tests/test_control_mitigates.py::test_control_mitigating_an_asset_is_a_disallowed_edge_target.

The assertion expects (object type 'asset'); Quire 0.61.0 emits whose target type 'asset', object 'asset' while reporting the same disallowed-edge-target. The failing test is unchanged by this PR. It was reproduced on a clean detached origin/main worktree at 8765b73c0cfe1dbc6cbe073dd7640f9e5284595b using the same Quire 0.61.0 CLI and environment. This is a moving-main baseline red, not a regression from this PR. Merge past it and record the baseline failure.

The only Linear dependency for PLAT-1543 is PLAT-1542, now Done. PLAT-1535 is also Done. PLAT-1657 is a downstream ticket blocked by PLAT-1543, so it does not block this merge.

Final-head verification after main integration

On final head a5279069559a62e08daa4424d1fbafc14faf642c, locked-build.sh <worktree>/target poetry run make test lint completed with 428 passed, 1 deselected, 5 xfailed, and only the same legacy test_control_mitigating_an_asset_is_a_disallowed_edge_target failure described above. The two npm-pack tests passed with the npmjs registry, /dev/null user config, and writable task cache; no root-level generated manifest/profile files remained. make lint passed separately on this final head (Ruff, Black, 59 schemas match). The legacy test reproduced on clean main and remains recorded as the only baseline red.

@kreneskyp
kreneskyp requested a review from a team as a code owner November 16, 2026 00:46
@kreneskyp
kreneskyp merged commit a2907b1 into main Nov 16, 2026
3 checks passed
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.

1 participant