feat: v0.5.36 — maximize tests and requirements#56
Merged
Conversation
[P0] security cmd_qualify.c: replace system("rm -rf" QTMP) with
qt_rmdir_recursive() using POSIX opendir/readdir/lstat/unlink/rmdir.
Eliminates CWE-78 OS command injection, MISRA-C Rule 21.8 violation,
and TOCTOU symlink-dereference window at the compile-time-constant
path /tmp/cfusa_qualify_case.
[P1] REQ-HLR004 annotation gap: cmd_trace.c parentId load, parentId
JSON emit, and hlrllrSummary block re-annotated from REQ-HLR001 to
//cfusa:req REQ-HLR004. test_hlr_llr.c test_json_output_has_parent_id
and test_text_output_has_hlrllr_line re-annotated to REQ-HLR004 so
cfusa trace surfaces them as test evidence for REQ-HLR004.
[P1] test_qualify.c: added //cfusa:req and //cfusa:test annotations
to all 5 test functions (REQ-QUAL001, REQ-QUAL002, REQ-QUAL003).
Added #define _POSIX_C_SOURCE 200809L per project style.
[P2] cmd_coverage.c parse_mcdc_json: removed unused obj_start
declaration and (void)obj_start suppression cast.
Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
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.
Audit-driven improvements: test coverage, requirement annotations, spec conformance.
Summary
cmd_qualify.cqt_setup()replacedsystem("rm -rf" QTMP)with a newqt_rmdir_recursive()helper using POSIXopendir/readdir/lstat/unlink/rmdir. Eliminates CWE-78 (OS Command Injection), MISRA-C Rule 21.8, and the TOCTOU symlink-dereference window at the compile-time path/tmp/cfusa_qualify_case.cmd_trace.c: parentId loading, parentId JSON output, andhlrllrSummaryblock re-annotated fromREQ-HLR001to//cfusa:req REQ-HLR004.test_hlr_llr.c:test_json_output_has_parent_idandtest_text_output_has_hlrllr_linere-annotated toREQ-HLR004socfusa tracesurfaces them as evidence for that requirement.cfusa trace; added//cfusa:req///cfusa:testannotations (REQ-QUAL001, REQ-QUAL002, REQ-QUAL003) and#define _POSIX_C_SOURCE 200809L.obj_startdeclaration and(void)obj_startsuppression cast fromcmd_coverage.cparse_mcdc_json().Test plan
cmake --build build— clean build, no warningscmake --build build --target test— 37/37 tests pass