Skip to content
cadkithome
Menu

Security policy

Security

cadkit treats every drawing as hostile input. How the readers are hardened, how to report a vulnerability privately, and which versions receive fixes.

Every input is untrusted

cadkit parses binary and XML formats (DWG, DGN V7 and V8, DXF and CityGML 2.0) that routinely arrive from third parties, so every file is treated as hostile:

  • Library code must not panic on any input. The workspace lints deny unwrap, expect, panic! and unchecked slice indexing.
  • Every size, count and offset read from a file is checked against ReadOptions::limits (input size, decompressed size, object count, nesting depth, string length, vertex count) before memory is allocated or a loop runs. Recursion is bounded, and XML parsing disables external entities and network resolution.
  • Readers fail only when no useful document can be built; recoverable damage becomes a warning on the document.
  • The readers are pure Rust. unsafe appears only in the binding crates (Python, WebAssembly, C), each block with a written safety argument. The C API catches panics at the boundary and null-checks every pointer.
  • Readers are fuzzed in CI, and public samples are truncated and bit-flipped in tests.

Processing files you did not create

The default limits are generous. For untrusted files, lower them through ReadOptions (Rust) or cadkit_options (C). The Python, WebAssembly and CLI interfaces are gaining limit options and may not expose all of them yet; check their documentation. In every case, run conversions of untrusted files in a sandboxed process with memory and time limits: parsing a format is not a security boundary by itself.

What to include in a report

  • The affected version or commit.
  • A minimal input file, or the code that generates it.
  • What you observed: panic message, memory growth, hang or crash.

You can expect an acknowledgement within a few days and a fix or mitigation plan after triage. Reporters are credited in the changelog unless they prefer to stay anonymous.

Supported versions

While cadkit is before 1.0, only the latest release (currently 0.5.3) and the main branch receive fixes. Upgrade to the latest release before reporting if you can.

Out of scope

  • Vulnerabilities in other software that consumes cadkit output, for example a viewer that renders generated SVG without sanitising text.
  • Denial of service by inputs that are large but within the configured limits.

The policy is maintained in SECURITY.md; this page summarises it.