fix: Round 7 slop audit (L1-L20)#31
Merged
Merged
Conversation
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>
NAAb Governance Report
All governance checks passed! Generated by NAAb Governance Engine v4.0 |
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.
Summary
GovernanceHardErrorre-throw beforecatch(...)inagentPipeline+.isInt()guards on 3.asInt()callsaudit_write_failures_atomic counter (was silentcatch(...){})StringWriteContextin package manager (DoS protection)code_filewithcanonical()containment check (supply-chain defense)validateHandle.at()→.find()with type guards (crash before HMAC check)shallowCopy()copiesexported_structs_andexported_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 errorsbash run-all-tests.sh— 396/396 accounted, 0 unexpected failuresbash tests/security/test_error_msg_leaks.sh— 738/738 passedbash tests/security/test_govern_json_fuzz.sh— 100/100 passed, 0 crashes🤖 Generated with Claude Code