Add AG036-AG039: persistence, package-install, IAM escalation, world-writable (0.18.0) - #22
Merged
Merged
Conversation
…(0.17.0)
Two more on-thesis checks for a tricked agent turning a one-shot injection into durable
access or code execution. Both use a new _iter_marker_action_tools spine: fire only when a
sensitive string marker AND a real action co-occur inside an unguarded (approval-free) tool.
AG036 — Persistence-sensitive file write exposed to the agent:
writes to SSH authorized_keys, crontab, /etc/sudoers, shell rc files, systemd units, etc.
(open('w'/'a'), Path.write_text/bytes, os.symlink/link/shutil.copy/move, or a shell exec).
MITRE T1098 + T1547.
AG037 — Runtime package installation exposed to the agent:
a shell executor running pip/npm/uv/poetry install — arbitrary package == code execution.
MITRE T1059 + T1195.
Refactored the tool-scope/approval logic into _iter_unguarded_tools (AG033/034/035 reuse it,
behavior unchanged).
Verification:
- Ground-truth corpus: 143 cases, precision 1.000 / recall 1.000 (adds 7 AG036/AG037 cases,
incl. read-only, ordinary-write, help-text, and non-tool negatives).
- Real-repo benchmark: 0 findings for each across 39 repos — zero false positives.
- 572 tests, 100% branch coverage, ruff + ruff format + mypy all clean.
Bumps 0.16.0 -> 0.17.0; updates CHANGELOG + README catalogue.
Signed-off-by: AutonomyProof <info@autonomyproof.io>
…0.18.0) Two more tool-scoped, approval-suppressed checks on the shared spine. AG038 — IAM/privilege escalation exposed to the agent: create_access_key, create_login_profile, put_user_policy, attach_role_policy, add_user_to_group, update_assume_role_policy, put_bucket_policy, set_iam_policy, etc. MITRE T1098 + T1078. AG039 — World-writable permission grant exposed to the agent: chmod that sets the other-write bit (0o777/0o666), via os.chmod or Path.chmod, with a constant mode. Dynamic modes and safe modes (0o644) do not fire. MITRE T1222. Verification: - Ground-truth corpus: 150 cases, precision 1.000 / recall 1.000. - Real-repo benchmark: 0 findings for each across the repo set — zero false positives. - 592 tests, 100% branch coverage, ruff + ruff format + mypy all clean. Stacked on the AG036/AG037 branch; bumps to 0.18.0. This branch carries AG036-AG039. 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.
What this changes
Checklist
git commit -s) — required by CI (DCO)pytestpasses (100% branch coverage is enforced)ruff check .andruff format --check .passmypypassesIf this adds or changes a detection rule
benchmark/corpus.yamlpython benchmark/run.pyand confirmed no new false positives on the real-repo corpusrules/registry.pyand added standards mappings