Safety
Safe C++, tested thoroughly
API Genie is written in C++ for speed and for small, self-contained binaries. That makes careful coding and thorough testing part of the job, not an afterthought.
Modern, strict C++
- The code is written in C++23 and uses its safer building blocks: string views and spans instead of raw pointers and lengths, references instead of pointers where a value can't be missing, and
std::expected-style results where failure is expected. - Every library is compiled with a strict set of compiler warnings on GCC, Clang and MSVC, including shadowing, uninitialized values, pointer arithmetic and lossy conversions.
- Pre- and post-conditions are written down as assertions in the code, and code is required to be exception-safe.
- Third-party C code that API Genie depends on most, such as the JavaScript engine, the spell checker, the URL parser and the JSON parser, was ported to modern C++ rather than linked as it is. The list is on the credits page.
Untrusted input is bounded
API Genie reads files it did not write and, in the mock server, requests from the network. Parsers and validators put limits on how deeply documents and messages may nest, so a hostile or broken file ends in an error message rather than a crash.
Tested on every change
- More than 8,500 unit tests (GoogleTest) in over a thousand test files cover the core libraries.
- Conformance suites: the official JSON Schema Test Suite for drafts 4, 6 and 7, and a code generation suite for 25 targets that builds each generated client and server with the target's own compiler and linter, then runs it against the API Genie mock server, which checks every request and response against the contract.
- Pull requests are built and tested on Linux (GCC) and Windows (MSVC). Before every release, a release gate runs the whole test suite on Linux, Windows and macOS (Clang) and on the WebAssembly build.
- During development, the code is also built with AddressSanitizer and checked withclang-tidy (bug-prone patterns and the Clang static analyzer), and the regular expression engine and the decompressor are fuzzed with libFuzzer under AddressSanitizer and UndefinedBehaviorSanitizer.
Safe defaults
- TLS certificates are verified by default (Mbed TLS 3.6) for every
https://,wss://andmqtts://connection. Turning verification off takes an explicit--insecure. - Telemetry is opt-in: the CLI sends nothing and writes no telemetry file unless you ask it to.
- Few external dependencies, with versions pinned to a fixed vcpkg baseline.
Verifiable releases
- Every download has a SHA-256 checksum, and each release is verified against them after it is published.
- macOS binaries are signed and notarized by Apple.
Found a problem?
Please report security issues privately to contact@apigenie.plrather than in a public issue. Other bugs are welcome on the issue tracker.