C/C++ trees got only `semgrep --config=auto`, which returned nothing for
firmware code, and a failed semgrep run read as clean code.
- cppcheck (bookworm package) runs on C/C++ trees with the project's include
directories, and its findings carry CWE, file:line and a snippet.
- Our own CRA C rules: unbounded string functions, scanf %s, non-literal
format strings, hard-coded credentials, broken hashes/ciphers and rand()
for keys and nonces, bound to cra-ai-8/13/16/20 in the control map, with
cppcheck's memory-safety CWEs under cra-ai-20.
- Vendor SDK code (STM32Cube Drivers/, CMSIS, *_HAL_Driver, third_party) is
left out of SAST and the run records which directories; the SBOM still
covers it. A customer's own drivers/ and Zephyr's boards/vendor are kept.
- semgrep: --jobs 2; a run with no report becomes a recorded skipped stage;
paths are relative to the tree, and snippets are read from the file
(open-source semgrep only returns "requires login").
- Nightly fixture fw-c-sensor-node: every planted flaw is found, and the
strcpy in the vendored HAL is not.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p