Back to skill

Security audit

kalshi-trade

Security checks for vulnerabilities and agentic risk

Overview

This skill is a read-only Kalshi market-data helper that matches its stated purpose and does not show trading, credential use, persistence, or hidden behavior.

Install this only if you are comfortable with the agent making read-only network requests to Kalshi's API and printing returned market data. The skill should not be treated as an order-entry or account-management tool; use a separate reviewed tool for any paper or real trading workflows.

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
88% confidence
Finding

The skill invokes Node-based scripts and documents use of environment variables and external API access, but it declares no explicit tool scope such as permissions or allowed-tools. That mismatch can cause an agent runtime to grant broader-than-necessary capabilities or leave reviewers unable to verify that network and env access are intentional and constrained.

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 62)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_openapi_reader.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_openapi_reader.test.mjs:11

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/kalshi_openapi_reader.mjs:8