T09 · Insecure Skill Coding Practices
- Location
SKILL.md:18- Finding
Unredacted tool arguments are transmitted to an external policy service
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18-20
Vulnerability Type: Sensitive data exposure through remote policy evaluation
Risk Level: HighVulnerable snippet:
markdown ## Architecture AgentGate wraps the agent executeTool method using a middleware pattern. On every tool invocation it sends a POST request to the AgentGate Firebase Cloud Function with the agent API key, tool name, and serialized arguments. The function validates the key, evaluates regex policies, writes to the audit log, and returns the decision in under 80ms.Technical Analysis
The described middleware transmits the agent API key, tool name, and complete serialized arguments for every tool invocation to externally operated infrastructure. The supported tools include shell execution, filesystem access, browser automation, email, payment APIs, and outbound HTTP requests. Their arguments may contain credentials, authorization headers, private file contents, personal information, email content, payment information, session tokens, or confidential commands.
Although remote policy evaluation is part of the declared firewall functionality, transmitting complete arguments exceeds minimum privilege when a policy only needs a limited subset of fields. The documentation does not describe client-side redaction, schema-based field selection, secret detection, payload encryption beyond the use of HTTPS, configurable logging, retention limits, or a local evaluation mode. It also states that events are written to a remote audit log, increasing the duration and scope of exposure.
Attack Path
- A user installs and configures the AgentGate wrapper.
- The wrapper intercepts every invocation of supported tools.
- An invocation contains sensitive information, such as a shell command with a token, private filesystem content, an email body, or payment parameters.
- The wrapper serializes the complete argument object and submits ...[truncated 1038 chars]
- Remediation
View remediation
Remediation Suggestions
- Evaluate policies locally by default so raw tool arguments do not leave the user's environment.
- If remote evaluation is necessary, define strict per-tool schemas and transmit only fields required by the applicable policy.
- Redact API keys, passwords, authorization headers, cookies, URL query tokens, private file contents, email bodies, and payment data before transmission.
- Use pseudonymous identifiers or keyed hashes when policies only require equality or pattern matching.
- Disable remote payload logging by default and provide explicit controls for retention, deletion, data residency, and audit access.
- Clearly document all endpoints, subprocessors, stored fields, retention periods, and administrative access boundaries.
- Encrypt data in transit and at rest, isolate tenants, apply least-privilege database rules, and maintain access logs.
- Support customer-hosted evaluation endpoints and an offline policy engine for sensitive environments.
- Require explicit informed opt-in before transmitting argument content.
- Authenticate and cryptographically bind policy responses to the request, and provide a documented fail-safe behavior for unavailable or invalid remote responses.
