storyclaw-alpaca-trading
Pass
Audited by Gen Agent Trust Hub on Sep 22, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONCREDENTIALS_UNSAFE
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/aggressive-strategy.jsusesexecSyncto invokescripts/trading.jsvia the shell. While these calls are currently restricted to internal script logic, the use of shell execution primitives increases the potential impact of command injection if stock symbols or other parameters were to incorporate unvalidated user input. - [INDIRECT_PROMPT_INJECTION]: The skill ingests untrusted market data from the Alpaca API (e.g., real-time quotes and historical price bars). This data is processed and presented to the agent, creating a vulnerability surface where maliciously crafted market data (e.g., in asset names or metadata if supported by the provider) could potentially influence the agent's decision-making. This is particularly concerning given the skill's ability to execute financial trades.
- Ingestion points: Market data is fetched in
scripts/trading.jsandscripts/momentum-strategy.jsfromdata.alpaca.markets. - Boundary markers: The script output lacks delimiters or warnings to the agent to distinguish between financial data and instructions.
- Capability inventory: The skill can execute financial trades (
buy,sell), perform system command execution viaexecSync, and write to the local file system (state directory). - Sanitization: There is no sanitization of the external API data before it is logged to the console for the agent's consumption.
- [CREDENTIALS_UNSAFE]: The skill manages sensitive Alpaca API keys and secrets stored in local JSON files within the
credentials/directory or aconfig.jsonfile. While the agent requires these to function, the storage of these secrets in plain text files accessible to the agent context represents a risk of accidental exposure or exfiltration if the agent is compromised.
Audit Metadata