Back to skill

Security audit

kalshi trades

Security checks for vulnerabilities and agentic risk

Overview

This skill is a read-only Kalshi market lookup helper that queries public API endpoints and does not trade, persist, or handle credentials.

Install this if you want a command-line helper for read-only Kalshi market data. Be aware that invoking it contacts the configured Kalshi API host, and changing KALSHI_BASE_URL would redirect those requests to another server.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill invokes Node scripts that require network access and may read environment variables, but it declares no explicit tool scope such as permissions or allowed-tools. Even though the documented intent is read-only market scouting, the missing scope weakens containment and allows broader runtime capabilities than the metadata communicates, increasing the chance of misuse or unsafe composition with other skills.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 65)May include surrounding context.

md
* Read-only endpoints only.
 */

const BASE_URL = process.env.KALSHI_BASE_URL || "https://api.elections.kalshi.com/trade-api/v2";

function parseArgs(argv) {
  const out = { _: [] };

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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/kalshi-trades.mjs (reported line 8)May include surrounding context.

js
* Read-only endpoints only.
 */

const BASE_URL = process.env.KALSHI_BASE_URL || "https://api.elections.kalshi.com/trade-api/v2";

function parseArgs(argv) {
  const out = { _: [] };

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests/kalshi-trades.test.mjs:11

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/kalshi-trades.mjs:8