Skip to content

xml to toml transition - #637

Merged
glaslos merged 5 commits into
mainfrom
xml_to_toml
Sep 19, 2026
Merged

glaslos merged 5 commits into
mainfrom
xml_to_toml

Conversation

@glaslos

@glaslos glaslos commented Sep 14, 2026

Copy link
Copy Markdown
Member

Summary

Introduces TOML as a first-class template format (dual-format with XML fallback), with TFTP as the reference migration. Closes the gap between the early xml_to_toml scaffolding and a mergeable slice of #534.

  • Prefer template.toml / <protocol>.toml when present; fall back to XML + XSD otherwise.
  • Default profile: core databus/metadata from template.toml; TFTP is TOML-only (tftp.xml removed).
  • Explicit databus TOML encoding: plain scalars, { value = "..." } (eval), { function = "module.Class" [, params = [...]] }.
  • STIX/TAXII reads protocol listen ports from the template directory (TOML/XML), instead of hardcoded defaults only.
  • Docs/AGENTS.md describe the dual-format contract; schema validates TOML at startup.

Non-goals for this PR: migrating bacnet/modbus/http/etc., proxy TOML, removing XML/XSD, or closing #534.

Test plan

  • uv run pytest conpot/tests/test_toml_templates.py conpot/tests/test_templates.py conpot/tests/test_protocol_startup.py
  • CI green (black, pytest, xmllint)
  • Manual: uv run conpot --template default -f starts with TOML base + TFTP dict path; other protocols still load XML

Follow-ups

Remaining protocol/profile migrations: #638 (under #534).

glaslos and others added 4 commits February 20, 2022 19:12
Resolve the bin/conpot modify/delete conflict by keeping the cli.py
entrypoint from main and porting the TOML template loading into the
refactored startup path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Make TFTP TOML-only, use explicit databus value/function encoding, restore STIX ports from protocol templates, and document the dual-format contract with tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
@glaslos
glaslos merged commit 3cea117 into main Sep 19, 2026
4 checks passed
@glaslos
glaslos deleted the xml_to_toml branch September 19, 2026 19:54
@glaslos glaslos mentioned this pull request Sep 20, 2026
3 tasks
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