Skip to content

feat(python): add static detection rules for un-gated AI agent tool execution and excessive agency - #4039

Open
AAH20 wants to merge 1 commit into
semgrep:developfrom
AAH20:feat/ai-agent-action-gate-rules
Open

feat(python): add static detection rules for un-gated AI agent tool execution and excessive agency#4039
AAH20 wants to merge 1 commit into
semgrep:developfrom
AAH20:feat/ai-agent-action-gate-rules

Conversation

@AAH20

@AAH20 AAH20 commented Aug 17, 2026

Copy link
Copy Markdown

Summary

Adds static detection rules for un-gated AI agent tool execution and excessive agency (OWASP-LLM06) under python/langchain/security/ai-agent-action-gate.yaml.

Problem Solved

As engineering teams build agentic workflows across LangChain, CrewAI, AutoGen, and LlamaIndex, developers frequently pass raw LLM/agent output strings directly into mutating execution sinks (subprocess.run, os.system, cursor.execute, requests.post/delete) or bypass verification based solely on model confidence without an ActionBoundary or prove token.

This rule pack flags:

  1. un-gated-agent-tool-execution: Identifies unconstrained execution of shell commands, database queries, and state-modifying HTTP calls from agent outputs without an ActionBoundary.
  2. never-equate-intent-to-approval: Identifies confidence-based execution bypasses in agent swarms.

Testing & Validation

  • Added python/langchain/security/ai-agent-action-gate.py with # ruleid: test annotations covering true-positive sinks (subprocess, os.system, cursor execute, requests.delete) and true-negative guarded patterns (action_boundary.guard).

Upstream & Commercial Context

Maintained by A2Z SOC for AI runtime governance and AppSec compliance audit readiness.

For teams building AI agents requiring static analysis audits, AI safety reviews, or ISO 42001 / SOC 2 readiness sprints:

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants