Repository navigation
Conversation
One page per section of the owner's report "Security Practices for Modern C++", nearly as written; each page links its verification issue. The report's premise that C++ is not memory-safe is left out, and the README separates security from safety. Related to #287
Check each claim against primary sources and our toolchains, add the page conventions, and test the feature-test macros, the integer comparison example and libstdc++'s unoptimized-only assertions default. P4433R0 turned out to be about the failed C++26 DIS ballot, so the page now says contracts and library hardening are unsettled. Related to #288
A /cpp-security entry point for the security section: threat model first, the page table, the review checklist with an attack-first finding format, hardening a build for the actual toolchain and confirming it, and planning the verification. It reads each page's imported/verified status and treats imported claims as leads. Related to #312
Related to #291
Related to #292
Related to #300
feat(skills): add the cpp-security skill
docs(security): verify the threat-modeling page
docs(security): verify the ownership-and-lifetime page
docs(security): verify the bounds page
docs(security): verify the integers page
docs(security): verify the object-representation page
docs(security): verify the parsing-and-validation page
docs(security): verify the concurrency page
docs(security): verify the error-handling page
GCC 14.2's libstdc++ has no C++ <stdckdint.h>, so __has_include finds GCC's C header, whose ckd_add casts to _Bool and doesn't compile as C++. Both FreeBSD jobs (GCC 14.2) failed on integers_test.cpp. libstdc++ defines the macro from 14.4, 15.3 and 16 (checked); the page records what was measured. Related to #369
…layout With libc++'s standard string layout the size byte that user.size() reads sat inside Ping's int, so ASan saw an in-bounds read and the bad run block failed on every Linux and Intel-macOS libc++ job. Ping now has no data members, so Login's string lies wholly past the end of the real object on libstdc++ and both libc++ layouts. Related to #370
The hardened presets build at -O2, where GCC on x86-64 expands std::rint inline as the rounded magnitude with the sign copied back; rint(-2.5) under FE_UPWARD gave -3. -frounding-math, GCC's documented flag for code that changes the rounding mode, keeps it correct. The cfenv page's Gotchas record the finding. Related to #371
docs(security): bounds bad-run example reads through a pointer
docs(claude): quote the attribution footer without link syntax
fix(fuzz): rename the parse_port corpus file nul to embedded-nul
docs(security): gate ckd_add on __cpp_lib_stdckdint_h, not __has_include
docs(security): make the bad-downcast example caught on every string layout
test(numerics): build cfenv_test with -frounding-math on GCC
Every platform workflow and all.yml take a jobs input, a regex searched for in each job's name. Each workflow's jobs are listed in .github/ci/<workflow>.json, and a plan job (tools/ci/plan.py) turns the matching entries into each job's matrix, so jobs that don't match never start. A fix-up run can start only the jobs that failed, on the fixed commit, instead of re-running every job of their workflows. check_workflows.py checks that each workflow and its job list agree. collect_results.py supersedes per job name, so a fix-up run replaces only the jobs it ran, and the workflow table links every run a workflow's jobs come from. The GCC 16 ASan job gets its own name; it shared one with the plain GCC 16 job. Related to #376
ci: select which jobs a workflow run starts
The clang-tidy job failed on six prctl calls in deployment_test.cpp's Linux-only tests: prctl is a variadic C system call with no typed alternative. On libstdc++ 15 (Ubuntu 26.04), hardening_test.cpp's library-hardened branch is compiled and its two macros are flagged too; they must stay macros (tested by #if, and GTEST_SKIP must return from the test body). Both are kept with NOLINT blocks and the reason. Related to #378
…lang In the Clang 22 hardened build (-O2), Clang moved 1.0 / x past fetestexcept, so HoldAndUpdateEnv saw FE_DIVBYZERO. The page's example has #pragma STDC FENV_ACCESS ON; the test now has it too, at block scope for Clang, like the test's other uses. Related to #379
/sdl makes C4996 an error, and C4996 deprecates standard C functions the tests check (fopen, gmtime, strncpy, sscanf...) in favour of Annex K's _s versions, so the hardened MSVC build failed with 38 errors. Defining _CRT_SECURE_NO_WARNINGS silences only that warning; /sdl's runtime checks and other errors stay. hardening.md says so. Related to #380
test(security): mark the intentional clang-tidy macro and vararg uses
test(numerics): FENV_ACCESS in the cfenv test's quiet_reciprocal on Clang
build(harden): define _CRT_SECURE_NO_WARNINGS with MSVC's /sdl
libc++ 18 checks formattability with its own context type, so a format() that takes only std::format_context made std::format reject Secret: tests/security/deployment_test.cpp didn't build in the Clang 18 libc++ job. A templated format works everywhere; the page says why. Related to #384
attributes_test.cpp calls its own [[deprecated]] old_api() on purpose and silenced the warning with #pragma GCC diagnostic only, which MSVC ignores. Under /sdl the deprecation warning C4996 is an error, so the hardened MSVC build still failed after #383. MSVC now gets #pragma warning(disable: 4996) around the call. Related to #380
docs(security): template the Secret formatter's format on the context
test(language): silence the deliberate deprecated call on MSVC too
docs/releases/v0.5.0.md with the local counts and the per-platform table of the three release runs (41657155620, 41689101415, 41707574171); project VERSION 0.5.0 (release_notes_exist); docs/platform-support.md, the toolchain pages, the README table and badges regenerated from those runs and the local runs at 86f6c76; the runs archived; docs/platform-support/notes.md re-derived claim by claim against the results. Related to #363
release: v0.5.0 notes, version, platform report and support notes
4 tasks done
Owner
Author
|
Merged into Checked: base Done after the merge: tag |
This was referenced Nov 4, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release v0.5.0: the security release. Notes:
docs/releases/v0.5.0.md.Tracking: #363 (this release), #286 (the security epic).
What it includes
docs/security/: how to write C++ that holds up against an attacker. It covers threat modeling, ownership and lifetime, bounds, integers, object representation, parsing and validation, concurrency, error handling, cryptography and secrets, filesystem and processes, resource limits, hardening, verification, the supply chain, deployment and policy. Every page was checked against primary sources and our compilers, and its checkable claims have tests (docs(security): verify the threat-modeling page #316–docs(security): verify the resource-limits page #326, docs(security): verify the hardening page #330, docs(security): verify the verification page; close two corpus gaps #333, docs(security): verify the deployment page #335, docs(security): verify the policy page; map each rule to its check #336, docs(security): verify the supply-chain page (salvaged from #334) #358).cpp-securityskill (feat(skills): add the cpp-security skill #315), and security review inmodern-cppandcpp-guidelines, with evals (feat(skills): security review in modern-cpp and cpp-guidelines, with evals #346).jobsinput that starts only the jobs whose names match, so a fix-up run re-runs just the failed jobs (ci: select which jobs a workflow run starts #377).Known issues
Verification
all.ymlondev. Each job counts from the newest run that ran it.3c85772: every job.3835b98: the 43 jobs that failed.86f6c76: the last 4.86f6c76:devis now81cc1d3. The only change since86f6c76is release: v0.5.0 notes, version, platform report and support notes #388 (docs, the README and theproject(VERSION)line), so nothing was re-run.After the merge
v0.5.0on the merge commit.