Skip to content

fix: Round 7 slop audit (L1-L20)#31

Merged
b-macker merged 2 commits into
masterfrom
audit/round7-fixes
Jun 14, 2026
Merged

fix: Round 7 slop audit (L1-L20)#31
b-macker merged 2 commits into
masterfrom
audit/round7-fixes

Conversation

@b-macker

Copy link
Copy Markdown
Owner

Summary

  • 6 findings fixed (1 HIGH, 3 MEDIUM, 2 LOW), ~30 false positives eliminated
  • F-1: GovernanceHardError re-throw before catch(...) in agentPipeline + .isInt() guards on 3 .asInt() calls
  • F-2: Audit log write failure reporting with audit_write_failures_ atomic counter (was silent catch(...){})
  • F-3: HTTP response size limit (50MB) via StringWriteContext in package manager (DoS protection)
  • F-4: Path traversal validation on block code_file with canonical() containment check (supply-chain defense)
  • F-5: validateHandle .at().find() with type guards (crash before HMAC check)
  • F-6: shallowCopy() copies exported_structs_ and exported_enums_ (async correctness)

Trend: R4 (12) → R5 (6) → R6 (3) → R7 (6). Uptick reflects deeper scrutiny of previously unaudited areas (package manager, block registry, async env).

Test plan

  • cmake .. && make naab-lang -j4 — 0 errors
  • bash run-all-tests.sh — 396/396 accounted, 0 unexpected failures
  • bash tests/security/test_error_msg_leaks.sh — 738/738 passed
  • bash tests/security/test_govern_json_fuzz.sh — 100/100 passed, 0 crashes

🤖 Generated with Claude Code

Termux User and others added 2 commits June 13, 2026 21:28
Override builtins.__import__ in PythonCExecutor to check govern.json
blocked imports list, catching dynamic imports (__import__("o"+"s"),
importlib) that bypass static source scanning. Closes F-3 from R6 audit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…aversal, audit integrity

6 findings (1 HIGH, 3 MEDIUM, 2 LOW), ~30 false positives eliminated:
- F-1: GovernanceHardError re-throw before catch(...) in agentPipeline + .isInt() guards
- F-2: Audit log write failure reporting with atomic counter (was silent catch(...){})
- F-3: HTTP response size limit (50MB) in package_manager.cpp (DoS protection)
- F-4: Path traversal validation on block code_file (supply-chain defense)
- F-5: validateHandle .at() → .find() with type guards (crash prevention)
- F-6: shallowCopy() copies exported_structs_ and exported_enums_ (async correctness)

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 9413adb into master Jun 14, 2026
20 checks passed
@b-macker b-macker deleted the audit/round7-fixes branch June 14, 2026 10:23
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