C & C++ Code Hygiene

Compiler diagnostic, ownership, bounds, concurrency, and lifetime hygiene.

Choose a focused C & C++ recipe

This collection contains 5 bounded C & C++ workflows. Choose the recipe whose objective matches the repository evidence instead of combining unrelated cleanup into one run.

How to use this collection

Read the repository’s configured runtime, compiler, framework, analyzer, and test commands before selecting a workflow. Start in audit mode, record file and symbol evidence, and authorize a fix only after the candidate scope is reviewable. Preserve supported versions, public behavior, and existing tool configuration.

If the evidence is a named CVE, scanner finding, exposed secret, authorization flaw, or injection path, use the focused vulnerability-remediation playbook instead of a code-hygiene recipe. Stop when the safe result requires an owner decision about architecture, compatibility, production data, or deployment state.

Full recipe list

C and C++ compiler warning and suppression debt

development

C and C++ compiler warning and suppression debt: Resolve portable compiler diagnostics without blanket flags or pragmas.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienec-cppccppcompilerwarnings

C and C++ ownership, RAII, and resource lifecycle

development

C and C++ ownership, RAII, and resource lifecycle: Make memory, file, socket, lock, and handle ownership explicit.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienec-cppccppownershipraii

C and C++ bounds, integer, and undefined-behavior hygiene

development

C and C++ bounds, integer, and undefined-behavior hygiene: Remove unchecked bounds, lossy arithmetic, lifetime, and undefined-behavior hazards.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienec-cppccppboundsintegersundefined-behavior

C and C++ atomic, lock, and thread lifecycle

development

C and C++ atomic, lock, and thread lifecycle: Remove data races, lock-order hazards, and detached thread lifetimes.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienec-cppccppatomicslocksthreads

C and C++ const, span, view, and lifetime hygiene

development

C and C++ const, span, view, and lifetime hygiene: Make mutation and non-owning view lifetimes explicit.

author security-recipes.ai contributorsteam Security EngineeringTested withgpt-5-codexupdated 2026-08-21
code-hygienec-cppccppconstspanstring-viewlifetimes