Skip to content

security: verify and improve parsing-and-validation.md #294

Closed

Description

@homer6

Turn the imported docs/security/parsing-and-validation.md (parsing untrusted input, ambiguity, injection, bounded work) into a verified page.

  • Check every claim against a primary source (vendor docs, cppreference, CERT, OWASP, papers); fix or remove what doesn't hold, and say so in the PR.
  • Cite the Core Guidelines rule IDs and SEI CERT rule IDs (IDs and links only; don't copy CERT text).
  • Replace or add examples of our own, compile-checked, and tests in tests/security/ where a claim can be checked.
  • Link the safety foundations (docs/guidelines/safety.md, the docs/examples/ pages) instead of repeating them.
  • Positive framing: what makes C++ code secure.

Specific: from_chars full-consumption, format strings (runtime_format), regex ReDoS, nesting limits; tested parser example (also the fuzz target).

Part of #286. PR into dev-0.5, from a feature branch in its own worktree.

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. homer6 commented on Nov 3, 2026

    @homer6
    OwnerAuthor

    Delivered in #321.

    What changed

    • docs/security/parsing-and-validation.md: verified rewrite (pipeline, from_chars with full-consumption and domain checks, ambiguity rules with a duplicate-field example, format strings as a compile-fail example, runtime_format only for trusted strings, bounded nesting, std::regex cautions with GCC bug 86164).
    • tests/security/parsing-and-validation_test.cpp: 5 tests.
    • docs/security/README.md: status → verified.

    Why

    • CERT ERR62-CPP/FIO30-C checked against SEI's lists; the regex claim against GCC Bugzilla 86164 (fixed in GCC 16); format-string behaviour compiled on GCC 15 and Clang 22.

    Still open

    • Nothing for this page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

securityv0.5.0 security work

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions