Skip to content

security: verify and improve error-handling.md #296

Closed

Description

@homer6

Turn the imported docs/security/error-handling.md (fail-closed behaviour) 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: Cite E.*, I.5–I.9; expected/exception boundaries; tests that a failed authorization leaves a defined state.

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 #323.

    What changed

    • docs/security/error-handling.md: verified rewrite (fail closed with a bad/good authorization, [[nodiscard]] with a bad warns example, strong guarantee via build-then-swap, RAII, exception boundaries, -fno-exceptions caution, stop on broken invariants).
    • tests/security/error-handling_test.cpp: 4 tests.
    • docs/security/README.md: status → verified.

    Why

    • CERT ERR33-C, ERR50/51/55/56/57/58/61-CPP checked against SEI's lists; E.* titles against the pinned edition; OWASP headings checked; the nodiscard warning checked 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