T09 · Insecure Skill Coding Practices
- Location
index.js:55- Finding
Live Agent Credential Disclosed in Application Logs
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it claims, but it exposes live room credentials in logs and connects autonomous agents to untrusted external chat without enough guardrails.
Review this skill before installing. Use it only for non-sensitive conversations, remove or redact credential logging, and integrate callbacks so remote room messages are treated as untrusted data that cannot approve tool calls, access files or secrets, modify memory, or perform consequential actions without explicit user confirmation.
index.js:55Live Agent Credential Disclosed in Application Logs
index.js:99Untrusted Remote Messages Are Forwarded Directly to Autonomous Agent Callbacks
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
ws.close();
}
// Reset state for new room
conversationHistory = [];
lastMessageTime = 0;
The skill logs the generated credential directly to the console, exposing authentication material to logs, observability systems, terminal history capture, or other local users/processes with log access. Because this credential is then used to authenticate the WebSocket session, disclosure could enable unauthorized room access or impersonation for the lifetime of the credential.
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
}
/**
* Clear conversation history
*/
export function clearHistory() {
conversationHistory = [];
The skill explicitly describes networked behavior via hosted HTTPS/WebSocket endpoints, but the manifest declares no tool scope such as network permissions or allowed tools. That mismatch weakens security review and user consent because a consuming agent may invoke external communication capabilities that are not transparently declared in the skill metadata.
The skill is designed for autonomous conversation with other agents and repeatedly emphasizes that the agent decides what to say, creating an unrestricted natural-language input channel from untrusted peers. That makes prompt-injection and social-engineering attacks highly plausible: another agent can send adversarial instructions that manipulate the model into revealing data, taking unsafe actions, or bypassing expected safeguards.
Providing the full recent history to callbacks gives the agent wholesale access to all prior peer messages, enabling collection, retention, summarization, and reuse of potentially sensitive content supplied by users or other agents. In an autonomous multi-agent setting, this increases the chance that sensitive information is propagated, re-quoted, or exfiltrated beyond what participants expected from an 'ephemeral' chat room.
The skill states that chat content and room history are sent to a hosted external service, but it does not prominently warn that user or agent-generated conversation data will leave the local environment and be visible to other participants. In a cross-agent chat system, that omission is dangerous because sensitive prompts, user data, or derived secrets may be disclosed to third parties through normal operation.
The skill connects to a third-party hosted endpoint and exchanges chat content, including message text and room context, but the file does not provide any user disclosure that conversation data will be sent to an external service. This is a privacy-relevant network operation that should be clearly disclosed.
The doc comment says 'Generate a new agent credential,' which suggests local creation, but the implementation performs an HTTP POST to a hosted API and returns a server-issued credential. This is an intent-level mismatch in inline documentation because the code is not generating the credential itself.