Skip to content

security: verify and improve bounds.md #291

Closed

Description

@homer6

Turn the imported docs/security/bounds.md (bounds checks at trust boundaries) 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 Bounds., SL.con., CERT CTR rules; .at() vs hardened []; invalidation by callbacks; a bad run OOB demo.

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

    What changed

    • docs/security/bounds.md: verified rewrite (carry the extent, check before access with an overflow-proof payload check, unchecked-index and callback-invalidation bad run examples caught by ASan, at() vs explicit checks, release-build checks, hardening as safety net), Core Guidelines and CERT IDs.
    • tests/security/bounds_test.cpp: 5 tests.
    • docs/security/README.md: status → verified.

    Why

    • CERT IDs checked against SEI's lists; hardening coverage against libc++'s hardening docs; examples run under ASan+UBSan on 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