Back to skill

Security audit

Sportfolio.Market

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent and purpose-aligned, but its login examples could expose a user API token through shell history or process logs.

Review the token-handling instructions before installing. Use this skill only with a user-scoped, revocable Sportfolio token, avoid pasting live tokens into commands that may be saved in shell history or logs, and prefer an interactive prompt or other non-logged credential mechanism if the CLI supports it. Confirm any staged gameplay action manually before execution.

Vulnerability Patterns
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:53
Finding
User API Token Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md:53`, `SKILL.md:60`, and `SKILL.md:66` **Vulnerability Type**: Credential exposure through command-line arguments **Risk Level**: Medium ### Vulnerable Code ```bash npm run cli -- auth login --token <your-token> --base-url https://www.sportfolio.market ``` ```bash npm run cli -- auth login --token <your-token> --base-url http://127.0.0.1:5000 ``` ```bash node packages/sportfolio-cli/bin/sportfolio.mjs auth login --token <your-token> --base-url https://www.sportfolio.market ``` ### Technical Analysis The documented authentication workflow instructs users to place a user API token directly in a command-line argument. Sensitive command-line arguments may be retained in shell history, terminal-session logs, command auditing systems, or diagnostic output. Depending on the operating system and process configuration, they may also be temporarily visible through process-inspection interfaces while the command is running. This practice conflicts with the instruction at `SKILL.md:23` to avoid placing tokens in shell history or logs. The placeholder itself is not a hardcoded secret, but users following the examples would replace it with a live bearer token. ### Attack Path 1. A user creates a user-scoped Sportfolio API token. 2. The user follows one of the documented commands and substitutes the live token for `<your-token>`. 3. The shell records the command in history, or another local monitoring or diagnostic mechanism captures the process arguments. 4. An attacker with access to the affected local account, history files, terminal logs, process telemetry, or command-auditing records extracts the token. 5. The attacker submits the token to the documented Sportfolio MCP endpoint or uses it through the repository-local CLI. 6. The attacker accesses capabilities available within the compromised user's account boundary, including immediate reads and any exposed account operations. Gameplay mutations remain subject ...[truncated 1001 chars]
Remediation
## Remediation Suggestions 1. Replace the `--token` examples with an interactive authentication command that reads the token from a hidden, non-echoing prompt. 2. Add support for reading the token from standard input or a protected credential store, ensuring that the value is never printed or logged. 3. If environment-variable authentication is supported, document it only as a secondary option and warn that environment variables can also leak through child processes, diagnostics, crash reports, or misconfigured telemetry. 4. Ensure the CLI redacts authorization headers and token values from normal output, errors, debug logs, exception traces, and telemetry. 5. Store persistent credentials using operating-system credential facilities or a configuration file with restrictive permissions rather than plaintext command history. 6. Document token revocation and rotation steps for users who previously entered tokens directly on the command line. 7. Add automated documentation checks that reject examples containing sensitive options such as `--token <value>`. A safer interface would resemble: ```bash npm run cli -- auth login --base-url https://www.sportfolio.market # The CLI then obtains the token through a hidden interactive prompt. ```
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.