T09 · Insecure Skill Coding Practices
- Location
common/callback.md:160- Finding
Sensitive Tool Arguments Logged Without Redaction
- Content
View full analysis
Vulnerability Details
File Location:
common/callback.md:160-163
Vulnerability Type: Sensitive data exposure through application logs
Risk Level: MediumVulnerable Code
go func onBeforeTool(ctx tool.Context, t tool.Tool, args map[string]any) (map[string]any, error) { log.Printf("[Callback] BeforeTool triggered for tool %q in agent %q.", t.Name(), ctx.AgentName()) log.Printf("[Callback] Original args: %v", args)Technical Analysis
The example callback serializes the complete tool argument map into application logs without field filtering, redaction, or sensitivity classification. Tool arguments may contain API keys, authorization tokens, passwords, personal information, private prompts, or confidential business data.
Because this Skill supplies templates intended for generated VeADK-Go applications, developers may copy this pattern into deployed agents. Logs commonly have broader access, longer retention periods, and more downstream integrations than the source request. Consequently, a secret that is appropriately protected while in transit may be exposed to log files, monitoring platforms, support personnel, or compromised logging accounts.
Attack Path
- An application is generated using the documented
BeforeToolCallbackpattern. - A user, model, or integrated workflow invokes a tool with confidential values in its arguments.
- The callback executes before the tool and formats the entire
argsmap using%v. - The logging subsystem writes those values to local or centralized logs.
- An actor with log-reading access retrieves and reuses exposed credentials or confidential data.
Exploitation requires the generated application to retain this example logging behavior and the attacker to obtain access to its logs or downstream telemetry.
Impact Assessment
This issue does not directly grant new operating-system privileges. Its scope depends on the values passed to tools and access represented by expo ...[truncated 285 chars]
- An application is generated using the documented
- Remediation
View remediation
Remediation Suggestions
- Remove full argument logging from the default example.
- Log only non-sensitive operational metadata, such as tool name, request identifier, duration, and success or failure status.
- If diagnostic payload logging is required, use an explicit allowlist of fields rather than a denylist.
- Recursively redact common sensitive keys, including
authorization,api_key,token,secret,password,cookie, andcredential. - Ensure redaction covers nested maps, arrays, headers, and structured objects.
- Disable payload-level logging in production and apply least-privilege access controls, short retention periods, and encryption to log storage.
- Add automated tests that verify representative secrets cannot appear in emitted log records.
