Back to skill

Security audit

Confidant

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent secret-handoff purpose, but its implementation handles credentials through under-protected local and public flows with unpinned code execution.

Review this carefully before installing. Use it only in a trusted, clean environment; avoid --tunnel unless remote submission is truly needed; do not use the direct --secret, get, or stdout flows for real credentials; and prefer pinned, reviewed dependencies instead of floating npm or npx execution.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
Findings (4)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/request-secret.sh:102
Finding

Unauthenticated Local Service Can Hijack Secret Collection

Content
View full analysis
/dev/null 2>&1 } if server_running; then : # Server already running else ``` ```bash REQUEST_OUTPUT=$(curl -sf -X POST "http://localhost:${PORT}/requests" \ -H "Content-Type: application/json" \ -d "$REQUEST_BODY" 2>&1) || { emit_error "Failed to create request via API" "REQUEST_FAILED" \ "Server may not be ready. curl output: ${REQUEST_OUTPUT:-empty}" exit 4 } LOCAL_URL=$(echo "$REQUEST_OUTPUT" | jq -r '.url // empty' 2>/dev/null || echo "") REQUEST_ID=$(echo "$REQUEST_OUTPUT" | jq -r '.id // empty' 2>/dev/null || echo "") REQUEST_HASH=$(echo "$REQUEST_OUTPUT" | jq -r '.hash // empty' 2>/dev/null || echo "") ``` ```bash POLL_ARGS=(--poll "$REQUEST_ID" --api-url "http://localhost:${PORT}") if [[ -n "$SERVICE" ]]; then POLL_ARGS+=(--service "$SERVICE") fi if [[ -n "$SAVE_PATH" ]]; then POLL_ARGS+=(--save "$SAVE_PATH") fi if [[ -n "$ENV_VAR" ]]; then POLL_ARGS+=(--env "$ENV_VAR") fi $JSON_OUTPUT && POLL_ARGS+=(--json) confidant_cmd request "${POLL_ARGS[@]}" ``` ### Technical Analysis The script treats any process responding successfully to `http://localhost:${PORT}/health` as a legitimate Confidant server. It does not authenticate the service, verify the server process owner or executable, use a per-run token, or validate that the returned request URL belongs to an expected origin. The response-controlled `.url`, `.id`, and `.hash` fields are subsequently trusted. In particular, the URL is displayed as the credential-submission form that the agent must share with the user. A malicious local service can therefore impersonate Confidant and substitute an attacker-controlled form. Using localhost does not establish service identity. Any ...[truncated 1420 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/request-secret.sh:182
Finding

Predictable Shared Temporary Files Permit Tunnel URL Poisoning

Content
View full analysis
/dev/null | head -1 || echo "") if [[ -n "$lt_pid" ]]; then # localtunnel doesn't have an API — check if we saved the URL if [[ -f "/tmp/confidant-lt-url-${PORT}" ]]; then local lt_url lt_url=$(cat "/tmp/confidant-lt-url-${PORT}") if [[ -n "$lt_url" ]]; then PUBLIC_URL="${LOCAL_URL/http:\/\/localhost:${PORT}/${lt_url}}" TUNNEL_PROVIDER="localtunnel" return 0 fi fi fi ``` ```bash LT_LOG="/tmp/confidant-lt-log-${PORT}" # Use global lt if available, otherwise npx if command -v lt &>/dev/null; then lt --port "$PORT" > "$LT_LOG" 2>&1 & else npx --yes localtunnel --port "$PORT" > "$LT_LOG" 2>&1 & fi LT_PID=$! STARTED_TUNNEL=true # Wait for localtunnel to output the URL elapsed=0 while [[ $elapsed -lt $TIMEOUT ]]; do sleep 1 elapsed=$((elapsed + 1)) lt_url=$(grep -oE 'https://[^[:space:]]+' "$LT_LOG" 2>/dev/null | head -1 || echo "") if [[ -n "$lt_url" ]]; then echo "$lt_url" > "/tmp/confidant-lt-url-${PORT}" PUBLIC_URL="${LOCAL_URL/http:\/\/localhost:${PORT}/${lt_url}}" TUNNEL_PROVIDER="localtunnel" break fi done ``` ### Technical Analysis The tunnel URL and log are stored under predictable names in the shared `/tmp` directory. The script does not verify file ownership, permissions, file type, or whether a symbolic link is involved. It also uses `pgrep -f` against a broad command-line pattern as evidence that a legitimate localtunnel process exists. A local attacker can create the expected state file with an arbitrary HTTPS origin and run a process whose command line matches the `pgrep` expression. The script then substitutes the attacker- ...[truncated 1826 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/setup.sh:24
Finding

Unpinned NPM Packages Are Installed and Executed Automatically

Content
View full analysis
/dev/null; then echo "✅ confidant already installed: $(confidant --version 2>/dev/null || echo 'version unknown')" else echo "📦 Installing Confidant CLI globally..." npm install -g @aiconnect/confidant fi # --- Install localtunnel (idempotent) --- if command -v lt &>/dev/null; then echo "✅ localtunnel already installed: $(lt --version 2>/dev/null || echo 'version unknown')" else echo "📦 Installing localtunnel globally (for --tunnel support)..." npm install -g localtunnel fi ``` ```bash confidant_cmd() { if command -v confidant &>/dev/null; then confidant "$@" else npx --yes @aiconnect/confidant "$@" fi } ``` ```bash if command -v lt &>/dev/null; then lt --port "$PORT" > "$LT_LOG" 2>&1 & else npx --yes localtunnel --port "$PORT" > "$LT_LOG" 2>&1 & fi ``` ### Technical Analysis The package names are resolved without exact versions, a lockfile, pinned integrity hashes, or provenance verification. Both `npm install -g` and `npx --yes` may retrieve the latest package version and execute package lifecycle or runtime code. The effective code executed by the Skill can consequently change after this project has been reviewed. The `npx --yes` fallback removes an interactive approval boundary and can download and execute code during an ordinary credential workflow. This is especially sensitive because `@aiconnect/confidant` directly handles secrets and `localtunnel` exposes the local credential form to a public network endpoint. Global installation also modifies the wider runtime environment instead of containing dependencies within the Skill. ### Attack Path 1. An NPM account, package release process, transitive dependen ...[truncated 1072 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/request-secret.sh:198
Finding

Credential Submission Is Exposed Through an Unauthenticated Public Tunnel

Content
View full analysis
/dev/null; then lt --port "$PORT" > "$LT_LOG" 2>&1 & else npx --yes localtunnel --port "$PORT" > "$LT_LOG" 2>&1 & fi LT_PID=$! STARTED_TUNNEL=true # Wait for localtunnel to output the URL elapsed=0 while [[ $elapsed -lt $TIMEOUT ]]; do sleep 1 elapsed=$((elapsed + 1)) lt_url=$(grep -oE 'https://[^[:space:]]+' "$LT_LOG" 2>/dev/null | head -1 || echo "") if [[ -n "$lt_url" ]]; then echo "$lt_url" > "/tmp/confidant-lt-url-${PORT}" PUBLIC_URL="${LOCAL_URL/http:\/\/localhost:${PORT}/${lt_url}}" TUNNEL_PROVIDER="localtunnel" break fi done if [[ -z "$PUBLIC_URL" ]]; then if $JSON_OUTPUT; then echo "{\"error\":\"localtunnel failed to capture a URL\",\"code\":\"TUNNEL_FAILED\",\"hint\":\"Check localtunnel logs at ${LT_LOG}\"}" >&2 else echo "Warning: localtunnel failed to start. Using local URL only." >&2 fi fi fi ``` ### Technical Analysis When `--tunnel` is selected, the script exposes the local credential-submission server through an accountless third-party tunnel. The implementation does not add recipient authentication, tunnel-level access control, hostname pinning, or an independently verifiable end-to-end encryption layer. The generated URL therefore functions as a bearer capability: anyone who obtains it can reach the submission page. The confidentiality and integrity of the credential exchange depend on the tunnel package, tunnel provider, generated URL secrecy, and the security of the local web application. Public tun ...[truncated 1614 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a secure secret handoff mechanism, but it also instructs global package installation and system modification via npm. In a secret-handling context, adding global tooling and dependencies materially expands trust requirements and attack surface beyond simple credential setup.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is presented as a secure secret handoff mechanism, but it also instructs global package installation and system modification via npm. In a secret-handling context, adding global tooling and dependencies materially expands trust requirements and attack surface beyond simple credential setup.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 47)May include surrounding context.

md
> **`{skill}`** is the absolute path to the directory containing this `SKILL.md` file. Agents can resolve it at runtime:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

md
> **`{skill}`** is the absolute path to the directory containing this `SKILL.md` file. Agents can resolve it at runtime:

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

Passing a secret as a command-line argument exposes it to shell history, process listings, telemetry, and possibly job-control logs. Because this skill is specifically for safe credential handling, documenting --secret "<value>" is especially dangerous and contradicts the stated goal of preventing exposure.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation repeatedly says agents must not retrieve secrets directly, yet the advanced section advertises confidant get <secret-id> and related direct retrieval flows. This contradiction can normalize bypassing the human-in-the-loop protections and enables agents to access secret material programmatically, undermining the stated security model.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script can automatically start a public tunnel to a local secret intake service and only emits a mild warning if tunnel setup fails, not a strong consent gate before exposure. In the context of collecting API keys, passwords, and tokens, publishing the endpoint externally materially expands attack surface and could allow unintended parties to access the request URL or probe the local service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares shell and network-capable behavior but does not define an explicit tool scope or allowed-tools boundary. For a secret-handling skill, this weakens containment and makes it easier for an agent runtime to grant broader-than-necessary execution powers, increasing the blast radius if the skill or dependencies behave unexpectedly.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 69)May include surrounding context.

md
- ✅ Detects existing tunnels (ngrok or localtunnel)
- ✅ Returns the URL to share with the user
- ✅ Polls until the secret is submitted
- ✅ Saves to `~/.config/openai/api_key` (chmod 600) and exits

**If the user is remote** (not on the same network), add `--tunnel`:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 221)May include surrounding context.

md
- ✅ Detects existing tunnels (ngrok or localtunnel)
- ✅ Returns the URL to share with the user
- ✅ Polls until the secret is submitted
- ✅ Saves to `~/.config/openai/api_key` (chmod 600) and exits

**If the user is remote** (not on the same network), add `--tunnel`:

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation says that without --service or --save, the secret is printed to stdout, but it does not strongly warn that stdout may be logged by agent frameworks, terminals, CI systems, or transcripts. In this context, printing secrets defeats the core promise of avoiding chat/history exposure and can lead to inadvertent credential leakage.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · SKILL.md (reported line 167)May include surrounding context.

md
## Rules for Agents

1. **NEVER ask users to paste secrets in chat** — always use this skill
2. **NEVER reveal received secrets in chat** — not even partially
3. **NEVER `curl` the Confidant API directly** — use the scripts
4. **NEVER kill an existing server** to start a new one

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 203)May include surrounding context.

text
User: Can you set up my OpenAI key?
Agent: I'll create a secure link for you to submit your API key safely.
       [runs: request-secret.sh --label "OpenAI API Key" --service openai --tunnel]
Agent: Here's your secure link — open it in your browser and paste your key:
       🔐 https://gentle-pig-42.loca.lt/requests/abc123

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding

Referencing npx localtunnel without a pinned version allows whatever version is current at execution time to be fetched and run. In a workflow that transports secrets over a public tunnel, a compromised or breaking upstream release could intercept data, alter tunnel behavior, or execute unexpected code.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Documenting confidant fill "<url>" --secret "<value>" introduces agent-to-agent secret submission even though the skill is supposed to collect secrets from humans through a browser flow. That broadens the threat model, makes automated secret injection possible, and can be abused to bypass user awareness or provenance checks.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding

Using npx @aiconnect/confidant without version pinning creates a supply-chain risk in the core secret-collection path. Because this tool is entrusted with receiving, polling for, and saving credentials, an unpinned package update could directly expose or mishandle secrets.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

The script's fallback path auto-installs and executes an npm package via npx without pinning a version, so execution depends on whatever the registry serves at runtime. In a secret-handling workflow, this creates a software supply-chain risk where a compromised package, hijacked dependency, or malicious new release could intercept credentials or run arbitrary code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script silently auto-installs and executes npm packages if the expected binaries are absent, using --yes to suppress confirmation. In a credential-setup skill, this is especially dangerous because users may believe they are only starting a local helper while the script is actually downloading and running remote code with access to secrets and filesystem locations.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
99% confidence
Finding

npx --yes @aiconnect/confidant fetches and executes the latest package version with no version pinning or trust verification. Because this tool is used to collect and save secrets, a malicious or compromised package could directly exfiltrate submitted credentials or alter where they are stored.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/request-secret.sh (reported line 139)May include surrounding context.

sh
REQUEST_BODY=$(jq -n --arg lbl "$LABEL" '{"expiresIn": 86400, "label": $lbl}')

REQUEST_OUTPUT=$(curl -sf -X POST "http://localhost:${PORT}/requests" \
  -H "Content-Type: application/json" \
  -d "$REQUEST_BODY" 2>&1) || {
  emit_error "Failed to create request via API" "REQUEST_FAILED" \

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

npx --yes localtunnel auto-installs and runs an unpinned package that exposes the local secret-collection service to the public internet. A compromised package or unexpected upstream change could expose collected secrets, weaken transport assumptions, or execute arbitrary code on the host.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The setup script installs localtunnel globally, adding external network tunneling capability to a skill whose stated purpose is secure secret handoff and credential setup. That broadens the attack surface and can enable data exposure or covert remote access patterns that are not necessary for handling credentials safely.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Provisioning localtunnel is not justified by the declared functionality of collecting and storing secrets, and it introduces a capability to expose local services externally. In the context of a credential-handling skill, unnecessary tunneling is especially concerning because it creates additional paths for sensitive data leakage or misuse.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.