Skip to content

feat: v0.5.36 — maximize tests and requirements#56

Merged
SoundMatt merged 1 commit into
mainfrom
feat/maximize-tests-reqs-c-fusa
Jul 26, 2026
Merged

feat: v0.5.36 — maximize tests and requirements#56
SoundMatt merged 1 commit into
mainfrom
feat/maximize-tests-reqs-c-fusa

Conversation

@SoundMatt

Copy link
Copy Markdown
Owner

Audit-driven improvements: test coverage, requirement annotations, spec conformance.

Summary

  • [P0] Security fixcmd_qualify.c qt_setup() replaced system("rm -rf" QTMP) with a new qt_rmdir_recursive() helper using POSIX opendir/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.
  • [P1] REQ-HLR004 annotation gapcmd_trace.c: parentId loading, parentId JSON output, 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 evidence for that requirement.
  • [P1] test_qualify.c annotations — all 5 test functions were invisible to cfusa trace; added //cfusa:req / //cfusa:test annotations (REQ-QUAL001, REQ-QUAL002, REQ-QUAL003) and #define _POSIX_C_SOURCE 200809L.
  • [P2] Dead variable — removed unused obj_start declaration and (void)obj_start suppression cast from cmd_coverage.c parse_mcdc_json().
  • Version bumped to v0.5.36.

Test plan

  • cmake --build build — clean build, no warnings
  • cmake --build build --target test — 37/37 tests pass

[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>
@SoundMatt
SoundMatt merged commit b70a9eb into main Jul 26, 2026
10 checks passed
@SoundMatt
SoundMatt deleted the feat/maximize-tests-reqs-c-fusa branch July 26, 2026 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant