Skip to content

Add AG036-AG039: persistence, package-install, IAM escalation, world-writable (0.18.0) - #22

Merged
autonomyproof merged 2 commits into
mainfrom
feat/rules-batch-7
Aug 18, 2026
Merged

Add AG036-AG039: persistence, package-install, IAM escalation, world-writable (0.18.0)#22
autonomyproof merged 2 commits into
mainfrom
feat/rules-batch-7

Conversation

@autonomyproof

Copy link
Copy Markdown
Owner

What this changes

Checklist

  • Commits are signed off (git commit -s) — required by CI (DCO)
  • pytest passes (100% branch coverage is enforced)
  • ruff check . and ruff format --check . pass
  • mypy passes

If this adds or changes a detection rule

  • Added a positive test (the rule fires) and a negative test (it does not)
  • Added a positive and negative case to benchmark/corpus.yaml
  • Ran python benchmark/run.py and confirmed no new false positives on the real-repo corpus
  • Registered the rule in rules/registry.py and added standards mappings

…(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>
@autonomyproof
autonomyproof merged commit 66a4fc3 into main Aug 18, 2026
8 checks passed
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