T09 · Insecure Skill Coding Practices
- Location
SKILL.md:183- Finding
Permission assessment invokes potentially state-changing tools without dry-run enforcement
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 183-200
Vulnerability Type: Unsafe authorization probing through mutating API calls
Risk Level: HighVulnerable Code
python def probe_tool_access(self) -> dict: """Test which tool categories this agent can access.""" accessible = {} for category, tools in self.TOOL_CATEGORIES.items(): category_tools = [] for tool in tools: try: # Dry-run with minimal input to test access self._execute(tool, {"agent_id": self.agent_id}) category_tools.append(tool) except requests.exceptions.HTTPError as e: if e.response.status_code == 403: pass # No access -- expected for restricted tools elif e.response.status_code in (400, 422): category_tools.append(tool) # Accessible but bad input # 5xx = service issue, not a permission problem accessible[category] = category_tools return accessibleTechnical Analysis
The method attempts to discover tool permissions by invoking every tool through the ordinary execution endpoint. The associated tool catalog includes mutating and financially sensitive operations such as
deposit,create_wallet,create_escrow,release_escrow,send_message, andresolve_dispute.The comment labels these requests as dry runs, but neither the request nor
_execute()supplies a dry-run flag. There is also no evidence of a server-enforced simulation mode. The code assumes that minimal input will always produce a validation error before side effects occur. That assumption is unsafe because some endpoints may acceptagent_idas sufficient input, apply defaults, partially mutate state before validation, or change their validation requirements in a later API version.This permission assessment therefore exceeds the minimum read-only privileges necessary to inve ...[truncated 1595 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace active probing with a dedicated read-only authorization or capability-introspection endpoint.
- Never invoke financial, identity-write, messaging, dispute-resolution, key-management, or other mutating tools to determine whether access exists.
- If the platform supports simulation, require an explicit server-enforced dry-run flag and verify that every probed endpoint guarantees transactional rollback.
- Maintain an allowlist of demonstrably read-only tools if introspection is unavailable.
- Use a dedicated sandbox account and a minimally scoped assessment credential rather than a production or administrative key.
- Require explicit operator confirmation before any active probe and clearly list every endpoint that will be contacted.
- Add automated tests that fail if a mutating tool is added to the probe allowlist.
- Treat ambiguous responses, timeouts, and server errors as an unknown permission state rather than evidence that access is available.
