Add AG033: irreversible data destruction exposed to the agent (0.15.0) - #17
Merged
Conversation
Detects an agent tool that can wipe an entire datastore or directory tree with no approval step — the 'agent deleted the whole database' failure class. Why it's distinct from AG019 (destructive string) and generic SAST: - Call-based: catches db.drop_all(), redis.flushall(), shutil.rmtree() — which carry no SQL/string literal and so are invisible to string- or grep-based detection. - Agent-context scoped: fires only inside a registered tool function with no approval marker, which is what keeps it zero-false-positive. - Excludes the overloaded bare .drop( (pandas df.drop(columns=...)) by design. Sinks: drop_all, drop_database, drop_collection, flushall/flushdb, shutil.rmtree, os.removedirs, and embedded DROP DATABASE / DROP TABLE / TRUNCATE TABLE. Mapped to MITRE ATT&CK T1485 (Data Destruction) + T1561 (Disk Wipe). Verification: - Ground-truth corpus: 127 cases, precision 1.000 / recall 1.000 (adds 7 AG033 cases incl. pandas-drop, non-tool, and approval-gated negatives). - Real-repo benchmark: 0 findings across all 41 repos (frameworks register no such tool) — zero false positives, as expected; recall proven by the corpus. - 530 tests pass, 100% branch coverage, ruff + mypy clean. Bumps version 0.14.0 -> 0.15.0; adds CHANGELOG.md. Signed-off-by: AutonomyProof <info@autonomyproof.io>
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.
Detects an agent tool that can wipe an entire datastore or directory tree with no approval step — the 'agent deleted the whole database' failure class.
Why it's distinct from AG019 (destructive string) and generic SAST:
Sinks: drop_all, drop_database, drop_collection, flushall/flushdb, shutil.rmtree, os.removedirs, and embedded DROP DATABASE / DROP TABLE / TRUNCATE TABLE. Mapped to MITRE ATT&CK T1485 (Data Destruction) + T1561 (Disk Wipe).
Verification:
Bumps version 0.14.0 -> 0.15.0; adds CHANGELOG.md.