Back to skill

Security audit

ia-pinescript

Security checks for vulnerabilities and agentic risk

Overview

This skill provides Pine Script coding guidance and does not show hidden execution, data access, persistence, or unsafe behavior.

This appears safe to install for Pine Script assistance. Users should still treat generated trading strategies as untrusted code and verify current TradingView behavior, compilation, and backtest assumptions before relying on them.

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
  • 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
Findings (2)

Hidden Instructions

High
Category
Prompt Injection
Content
Out of scope:
- Acting as the runtime instructions themselves (those live in `SKILL.md`).
- Trigger phrasings already covered by adjacent `ia-*` skills (`validate-plugin` flags >70% description overlap as DUPLICATE_TRIGGER).
- <!-- to fill in: domain-specific exclusions when the skill drifts -->

## Trigger Context
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Skill Enumeration

Medium
Category
Agent Snooping
Content
- Observed behavior: skill injected because regex `tradingview|...` matched bare "tradingview" in the prompt; agent then loaded ia-simplifying-code and ia-code-review (correct skills), wasting the injection
- Skill delta:
  - `plugins/whetstone/hooks/skill-patterns.sh:65`: tightened regex so bare `tradingview` no longer matches; required Pine-context qualifier within 30 chars (`tradingview.{0,30}(pine|indicator|strategy|chart|script)`); added symmetric `\bstrategy\b.{0,20}(pine|trading.?view)` clause
  - `plugins/whetstone/skills/ia-pinescript/SKILL.md:4-7`: rewrote description to scope triggers to `.pine` files or TradingView Pine indicators/strategies (drops standalone "TradingView", "indicators", "strategies", "backtesting" as triggers)
  - `distillery/tests/fixtures/triggers/ia-pinescript.jsonl`: added two negative-case fixtures from the actual misfire prompts
- Anonymization: redacted nothing; both prompts were generic infrastructure audits with no sensitive content
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Static analysis

No suspicious patterns detected.