Skip to content

docs: add .thf file format specification#39

Open
OELD wants to merge 2 commits into
exit-zero-labs:mainfrom
OELD:add-thf-format-spec
Open

docs: add .thf file format specification#39
OELD wants to merge 2 commits into
exit-zero-labs:mainfrom
OELD:add-thf-format-spec

Conversation

@OELD

@OELD OELD commented Apr 5, 2026

Copy link
Copy Markdown

Closes #33

Adds complete schema, example with annotation, and version compatibility notes.

@vercel

vercel Bot commented Apr 5, 2026

Copy link
Copy Markdown

@OELD is attempting to deploy a commit to the Exit Zero Labs Team on Vercel.

A member of the Team first needs to authorize it.

@exitzerolabs-admin

Copy link
Copy Markdown
Contributor

Thanks for picking this up — a canonical .thf spec is worth having, and surfacing it at docs/file-format.md instead of tucked under docs/knowledge/ is probably the right call long-term.

The blocker here is that the schema in this PR doesn't match the actual format. A few examples from the current Rust models and docs/knowledge/file-format.md:

  • version is a string ("1.0"), not a number
  • Top-level keys are elements, data_flows, trust_boundaries — not components, dataFlows, trustBoundary
  • There's a required metadata block (title, author, created/modified) that's missing
  • Threats reference elements/flows by ID (element:, flow:) and have mitigation.status + mitigation.description, not a flat mitigation string
  • Severity is Low | Medium | High (capitalized)
  • The diagrams section and inline layout fields (position, size, viewport) aren't documented

Easiest path forward: pull the schema + example straight from docs/knowledge/file-format.md (that's the source of truth, kept in sync with the serde models), restructure it into a proper spec format if you
want, and either replace the old file or turn it into a pointer. Happy to review once that's in.

@OELD

OELD commented Apr 16, 2026

Copy link
Copy Markdown
Author

Fixed, now using the actual schema from docs/knowledge/. Ready for re‑review.

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.

Add .thf file format specification to docs/

2 participants