6-test-generator
Generates runtime validation test harnesses (C tests, MSAN, Valgrind targets) for confirmed zeroize-audit findings. Produces a Makefile for automated test execution.
Imported description, not reviewed yet
This item came from its original repository and was only scanned automatically; no editor has written an Arabic description for it yet. Read its content yourself before you rely on it. This page is not indexed by search engines until it is reviewed.
Download
Install
After downloading, run the command in a terminal. unzip asks before it replaces any file that is there.
For this project
It goes in: .claude/agents/
mkdir -p .claude/agents && unzip ~/Downloads/zeroize-audit-6-test-generator.zip -d .claude/agentsFor your account on the whole machine
It goes in: ~/.claude/agents/
mkdir -p ~/.claude/agents && unzip ~/Downloads/zeroize-audit-6-test-generator.zip -d ~/.claude/agents
Instructions
6-test-generator
Generate runtime validation test harnesses for confirmed zeroize-audit findings: C test harnesses, MemorySanitizer tests, Valgrind targets, and stack canary tests.
Input
You receive these values from the orchestrator:
| Parameter | Description |
|---|---|
workdir | Run working directory (e.g. /tmp/zeroize-audit-{run_id}/) |
compile_db | Path to compile_commands.json |
config_path | Path to merged config file ({workdir}/merged-config.yaml) |
final_report | Path to {workdir}/report/findings.json |
baseDir | Resolved skill directory containing SKILL.md (for tool paths) |
Process
Step 0 — Load Configuration
Read config_path to load the merged config.
Step 1 — Read Final Report
Load {workdir}/report/findings.json and filter to confirmed findings (confidence = confirmed or likely).
Step 2 — Generate Test Harnesses
For each confirmed finding, generate:
- C test harness: Allocates the sensitive object, calls the function under test, and verifies all bytes are zero at the expected wipe point.
- MemorySanitizer test (
-fsanitize=memory): Detects reads of un-zeroed memory after the wipe point. - Valgrind invocation target: Builds the test without sanitizers for Valgrind leak and memory error detection.
- Stack canary test: For
STACK_RETENTIONfindings, places canary values around the sensitive object and checks for retention after function return.
Step 3 — Generate Makefile
Produce a Makefile in the output directory that:
- Builds all test harnesses with appropriate compiler flags
- Includes sanitizer targets (
test-msan,test-asan) - Includes Valgrind targets (
test-valgrind) - Has a
run-alltarget that executes everything and reports results - Uses compile flags from
compile_commands.jsonwhere applicable
Step 4 — Generate Manifest
Produce test_manifest.json listing all generated tests with:
- Test file path
- Finding ID it validates
- Test type (harness, msan, valgrind, canary)
- Expected behavior
Output
Write all output files to {workdir}/tests/:
| File | Content |
|---|---|
test_*.c | Per-finding test harness files |
Makefile | Build and run targets for all tests |
test_manifest.json | {tests: [{file, finding_id, type, expected_behavior}]} |
notes.md | Summary of tests generated, findings covered, relative paths to all files |
Error Handling
- No confirmed findings: Write empty manifest and note in
notes.md. Not an error. - Missing final report: Fatal — cannot generate tests. Write error to
notes.md. - Always write
test_manifest.jsonandMakefile— even if empty/no-op.
Files
- 6-test-generator.md2.9 KB
- LICENSE20 KB
What the automatic scan found
We scanned the files automatically when they were imported. This is what the scan pointed at. It does not mean the item is harmful, and it does not mean it is safe: read it yourself.
- Needs a lookAllowed tools with no limits
In file plugins/zeroize-audit/agents/6-test-generator.md
Comments (0)
No comments yet. Be the first.
Sign in to comment. Commenting comes at level 1 (Member).