A C++ header-only HTTP/HTTPS server and client library
This report presents the forensic synthetic code analysis of yhirose/cpp-httplib, a C++ project with 16,789 GitHub stars. SynthScan v2.0 examined 75,720 lines of code across 237 source files, recording 387 pattern matches distributed across 6 syntactic categories. The overall adjusted score of 5.6 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 387 distinct pattern matches across 6 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | httplib.h | 1 | // | COMMENT |
| LOW | httplib.h | 21 | /* | COMMENT |
| LOW | httplib.h | 41 | #ifndef CPPHTTPLIB_CONNECTION_TIMEOUT_USECOND | COMMENT |
| LOW | httplib.h | 61 | #ifndef CPPHTTPLIB_CLIENT_READ_TIMEOUT_SECOND | COMMENT |
| LOW | httplib.h | 81 | #ifndef CPPHTTPLIB_EXPECT_100_THRESHOLD | COMMENT |
| LOW | httplib.h | 101 | #ifndef CPPHTTPLIB_IDLE_INTERVAL_USECOND | COMMENT |
| LOW | httplib.h | 121 | #ifndef CPPHTTPLIB_REDIRECT_MAX_COUNT | COMMENT |
| LOW | httplib.h | 141 | #endif | COMMENT |
| LOW | httplib.h | 161 | #endif | COMMENT |
| LOW | httplib.h | 181 | #endif | COMMENT |
| LOW | httplib.h | 201 | COMMENT | |
| LOW | httplib.h | 221 | COMMENT | |
| LOW | httplib.h | 241 | #endif //_CRT_SECURE_NO_WARNINGS | COMMENT |
| LOW | httplib.h | 261 | #define S_ISREG(m) (((m) & S_IFREG) == S_IFREG) | COMMENT |
| LOW | httplib.h | 281 | #endif | COMMENT |
| LOW | httplib.h | 301 | #define NI_MAXHOST 1025 | COMMENT |
| LOW | httplib.h | 321 | #ifndef INVALID_SOCKET | COMMENT |
| LOW | httplib.h | 341 | #include <fcntl.h> | COMMENT |
| LOW | httplib.h | 361 | #include <unordered_set> | COMMENT |
| LOW | httplib.h | 381 | #if defined(CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN) && \ | COMMENT |
| LOW | httplib.h | 401 | COMMENT | |
| LOW | httplib.h | 421 | #endif | COMMENT |
| LOW | httplib.h | 441 | #elif OPENSSL_VERSION_NUMBER < 0x30000000L | COMMENT |
| LOW | httplib.h | 461 | #include <mbedtls/ctr_drbg.h> | COMMENT |
| LOW | httplib.h | 481 | // 4.x), so version-specific 3.x-only code must check V3 && !V4. | COMMENT |
| LOW | httplib.h | 501 | #define WOLFSSL_GEN_DNS 2 | COMMENT |
| LOW | httplib.h | 521 | #ifdef CPPHTTPLIB_USE_CERTS_FROM_MACOSX_KEYCHAIN | COMMENT |
| LOW | httplib.h | 741 | // | COMMENT |
| LOW | httplib.h | 1001 | NotExtended_510 = 510, | COMMENT |
| LOW | httplib.h | 2261 | // process_request() wraps only routing() in a try/catch. Content providers, | COMMENT |
| LOW | httplib.h | 7061 | // of resources. The listening socket is still usable, so back off briefly and | COMMENT |
| LOW | httplib.h | 8241 | COMMENT | |
| LOW | httplib.h | 9861 | COMMENT | |
| LOW | httplib.h | 10161 | time_t read_timeout_sec_; | COMMENT |
| LOW | httplib.h | 10621 | } | COMMENT |
| LOW | httplib.h | 13681 | COMMENT | |
| LOW | httplib.h | 14081 | detail::split(x_forwarded_for.data(), | COMMENT |
| LOW | httplib.h | 15581 | return false; | COMMENT |
| LOW | httplib.h | 19581 | std::string hostname; // For client: set via set_sni | COMMENT |
| LOW | benchmark/ab.sh | 1 | #!/usr/bin/env bash | COMMENT |
| LOW | benchmark/ab.sh | 21 | # SSLSocketStream instead of SocketStream. | COMMENT |
| LOW | benchmark/crow/crow_all.h | 961 | #endif | COMMENT |
| LOW | benchmark/crow/crow_all.h | 981 | #include <boost/asio.hpp> | COMMENT |
| LOW | benchmark/crow/crow_all.h | 1321 | }; | COMMENT |
| LOW | benchmark/crow/crow_all.h | 1401 | #include <string> | COMMENT |
| LOW | benchmark/crow/crow_all.h | 6241 | #undef CROW_CALLBACK_NOTIFY | COMMENT |
| LOW | benchmark/crow/crow_all.h | 6261 | #undef CROW_IS_MARK | COMMENT |
| LOW | benchmark/crow/crow_all.h | 6281 | #endif | COMMENT |
| LOW | benchmark/crow/crow_all.h | 7381 | if (base.back() != '\\' && base.back() != '/') { base += '/'; } | COMMENT |
| LOW | benchmark/crow/crow_all.h | 7401 | utility::sanitize_filename(filename_sanitized); | COMMENT |
| LOW | benchmark/crow/crow_all.h | 8001 | return string.substr(1, string.length() - 2); | COMMENT |
| LOW | benchmark/crow/crow_all.h | 8421 | // Any middleware requires following 3 members: | COMMENT |
| LOW | benchmark/crow/crow_all.h | 8701 | #include <memory> | COMMENT |
| LOW | benchmark/crow/crow_all.h | 9581 | COMMENT | |
| LOW | benchmark/crow/crow_all.h | 10061 | COMMENT | |
| LOW | benchmark/crow/crow_all.h | 10461 | // | COMMENT |
| LOW | benchmark/crow/crow_all.h | 12481 | void get_found_bp(const std::vector<size_t> &bp_i, | COMMENT |
| LOW | benchmark/crow/crow_all.h | 13041 | #include <chrono> | COMMENT |
| LOW | benchmark/cpp-httplib/main.cpp | 1 | #include "httplib.h" | COMMENT |
| LOW | test/run_issue_2431_repro.sh | 1 | #!/usr/bin/env bash | COMMENT |
| 283 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs-util/llm-app/test_book.sh | 4 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 9 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 24 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 26 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 40 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 42 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 157 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 159 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 216 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 218 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 282 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 284 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 338 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 340 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 451 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 453 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 539 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_book.sh | 541 | # ============================================================================= | COMMENT |
| MEDIUM | docs-util/llm-app/test_webui.cpp | 13 | // ─── Test framework (minimal) ──────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/test_webui.cpp | 58 | // ─── Helpers ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/test_webui.cpp | 262 | // ─── Main ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | docs-util/llm-app/webdriver.h | 24 | // ─── Errors ────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | docs-util/llm-app/webdriver.h | 31 | // ─── Forward declarations ──────────────────────────────────── | COMMENT |
| MEDIUM⚡ | docs-util/llm-app/webdriver.h | 35 | // ─── Element ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/webdriver.h | 107 | // ─── Session ───────────────────────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/webdriver.h | 163 | // ─── Navigation ────────────────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/webdriver.h | 187 | // ─── Find elements ────────────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/webdriver.h | 221 | // ─── Wait ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/webdriver.h | 252 | // ─── Execute script ───────────────────────────────────── | COMMENT |
| MEDIUM | docs-util/llm-app/webdriver.h | 267 | // ─── Page source ──────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | httplib.h | 15318 | // Cross-host/scheme redirect - create new client with robust setup | COMMENT |
| MEDIUM | httplib.h | 15323 | // New method for robust redirect client creation | COMMENT |
| MEDIUM | httplib.h | 15385 | // Setup client with robust configuration | COMMENT |
| MEDIUM | httplib.h | 15393 | // New method for robust client setup (based on basic_manual_redirect.cpp | COMMENT |
| MEDIUM | benchmark/ab.sh | 9 | # --path selects the workload. The harness serves: | COMMENT |
| MEDIUM | benchmark/ab.sh | 128 | # The harness source always comes from the invoking worktree, so both refs run | COMMENT |
| MEDIUM | benchmark/ab.sh | 129 | # an identical workload and a ref that predates a harness change stays | COMMENT |
| MEDIUM | test/gtest/include/gtest/gtest-death-test.h | 152 | // This implementation is *not* meant to be as highly tuned or robust | COMMENT |
| MEDIUM | test/gtest/include/gtest/gtest-death-test.h | 224 | // In practice, this can be used to test functions that utilize the | COMMENT |
| MEDIUM | .github/workflows/test.yaml | 315 | # Bound the whole job in case anything in the test harness hangs | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | split.py | 12 | CODE | |
| LOW | generate_module.py | 10 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | benchmark/crow/crow_all.h | 385 | // TODO: implement sorting of the qs_kv array; for now ensure it's not compiled | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test/run_issue_2431_repro.sh | 16 | # Usage: | COMMENT |