Skip to content

fix: Round 8 slop audit — 14 security findings#32

Merged
b-macker merged 1 commit into
masterfrom
audit/round8-fixes
Jun 14, 2026
Merged

fix: Round 8 slop audit — 14 security findings#32
b-macker merged 1 commit into
masterfrom
audit/round8-fixes

Conversation

@b-macker

Copy link
Copy Markdown
Owner

Summary

  • 2 CRITICAL: Triple-quote Python injection in legacy fallback path (call_dispatch.cpp F-1) — replaced exec('''...''') with Py_CompileString()+PyEval_EvalCode(). fireHook() command injection (governance_reports.cpp F-2) — added shellEscape() for all variable substitutions.
  • 1 CRITICAL (new): codegen_impl.cpp missing GovernanceHardError catch-and-rethrow — HARD blocks were silently swallowed by catch(std::exception&).
  • 3 HIGH: SQLite NULL deref + unchecked ops in block_search_index.cpp (F-3). Agent unchecked dict access in agent_impl.cpp (F-4/F-5). Python importlib.import_module() bypass in python_c_executor.cpp (F-6).
  • 4 MEDIUM: Agent message/handle type guards, range dict .at() guard, VM polyglot .at() guard, package_manager metacharacter blocklist extension.
  • 4 LOW: STUB detector cleanup in llm_patterns.cpp.
  • Deferred: F-7 (vm.cpp ~82 unchecked .asInt()/.asString()) — requires opcode-level classification of compiler type guarantees.

R4→R5→R6→R7→R8 trend: 12→6→3→6→14 (R8 was exhaustive full-codebase sweep with pre-audit deep dive).

Test plan

  • Build: 0 errors
  • run-all-tests.sh: 396/396 accounted, 0 real failures (3 cold-start flakes pass on re-run)
  • test_error_msg_leaks.sh: 738/738 passed
  • test_govern_json_fuzz.sh: 100/100, 0 crashes
  • git diff reviewed — only security fixes, no unintended changes

🤖 Generated with Claude Code

2 CRITICAL: triple-quote Python injection (F-1, V-CD-001), fireHook
command injection (F-2, V-GR-001)
1 CRITICAL (new): codegen GovernanceHardError bypass (V-CG-001)
3 HIGH: SQLite NULL deref + unchecked ops (F-3), agent unchecked dict
access (F-4/F-5), Python importlib bypass (F-6, V-PY-001)
4 MEDIUM: agent msg/handle guards (V-AG-001..004), range dict .at()
guard (V-RT-006), VM polyglot .at() guard (V-VM-001), package_manager
metacharacter blocklist (V-PKG-002)
4 LOW: STUB detector cleanup (V-LN-001)

F-7 (vm.cpp ~82 unchecked .asInt()/.asString()) deferred — requires
opcode-level classification of compiler type guarantees.

Verified: build 0 errors, 396/396 tests, 738/738 leak checks,
100/100 fuzz cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

NAAb Governance Report

Metric Count
Files checked 16
Passed 16
Failed 0

All governance checks passed!

Generated by NAAb Governance Engine v4.0

@b-macker b-macker merged commit 78b90a1 into master Jun 14, 2026
20 checks passed
@b-macker b-macker deleted the audit/round8-fixes branch June 14, 2026 12:53
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