Back to skill

Security audit

The Fed Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Fed and macroeconomic analysis aid with bounded network use, but users should treat its market guidance and bundled demo script cautiously.

Install only if you want an agent to fetch news URLs and produce macro/market analysis. Treat outputs as analytical commentary, not financial advice, and do not rely on scripts/analyze.js for real article analysis because it is a placeholder demo. Use trusted URLs and be cautious running the script directly with arbitrary input.

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
scripts/analyze.js:51
Finding
Terminal Escape-Sequence Injection Through an Untrusted URL Argument<![CDATA[ ## Vulnerability Details **File Location**: `scripts/analyze.js`, lines 3 and 51 **Vulnerability Type**: Untrusted terminal output / terminal escape-sequence injection **Risk Level**: Medium ### Vulnerable Code ```js const url = process.argv[2]; // Get URL from command line arguments ``` The untrusted value is passed to `analyzeNews` and subsequently printed without validation or sanitization: ```js console.log(`Simulated analysis for: ${articleUrl}`); ``` ### Technical Analysis The command-line argument is attacker-controlled and is written verbatim to an ANSI-capable terminal. The program does not validate that the argument is a legitimate HTTP or HTTPS URL, nor does it remove terminal control characters before displaying it. An attacker can provide an argument containing embedded C0, C1, ESC, CSI, or OSC control sequences. When the value is printed, a compatible terminal may interpret these bytes as terminal commands instead of displaying them as ordinary text. Potential operations depend on the terminal emulator and its security configuration, but may include: - Altering colors, cursor location, or terminal state. - Clearing or rewriting visible terminal output. - Forging prompts, status messages, or audit results. - Creating misleading hyperlinks. - Attempting OSC-based clipboard modification where supported. - Concealing part of the supplied URL or subsequent output. The script intentionally emits ANSI formatting elsewhere, demonstrating that its expected output environment may interpret terminal escape sequences. ### Attack Path 1. An attacker prepares a URL-like command-line value containing embedded terminal control sequences. 2. The attacker persuades a user or automated workflow to invoke the analyzer with that value, for example: ```bash node scripts/analyze.js "$ATTACKER_CONTROLLED_VALUE" ``` 3. Line 3 stores the complete untrusted argument without validation. 4. The argument is passed into `analyzeNews`. 5. Line 5 ...[truncated 1182 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse and validate the input before use, accepting only absolute `http:` and `https:` URLs: ```js function validateArticleUrl(value) { let parsed; try { parsed = new URL(value); } catch { throw new Error("The supplied value is not a valid URL."); } if (!["http:", "https:"].includes(parsed.protocol)) { throw new Error("Only HTTP and HTTPS URLs are supported."); } return parsed.href; } ``` 2. Reject terminal control characters before parsing or displaying the value: ```js function rejectControlCharacters(value) { if (/[\x00-\x1F\x7F-\x9F]/u.test(value)) { throw new Error("The URL contains prohibited control characters."); } return value; } ``` 3. Use the validated, normalized URL throughout the program: ```js const rawUrl = process.argv[2]; if (!rawUrl) { console.error("Error: Please provide a URL to analyze."); process.exit(1); } let safeUrl; try { safeUrl = validateArticleUrl(rejectControlCharacters(rawUrl)); } catch (error) { console.error(`Error: ${error.message}`); process.exit(1); } analyzeNews(safeUrl); ``` 4. If arbitrary text must ever be displayed, encode non-printable characters into visible escaped notation rather than emitting the original bytes. 5. Apply the same sanitization to error messages and any future article-derived fields before writing them to interactive terminals or logs. 6. Add regression tests containing ESC, CSI, OSC, carriage-return, newline, backspace, and delete characters to verify that unsafe input is rejected or safely escaped. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (6)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
Read `references/frameworks.md` for detailed analytical models when complex macroeconomic situations require deeper assessment.

## Output Guidelines

- **Be decisive** — provide clear probabilities, not vague ranges
- **Anchor to frameworks** — cite specific indicators from the loaded models
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill explicitly instructs use of `web_fetch` on a user-provided URL, but the manifest declares no tool scope or allowed-tools restrictions. That creates an authorization and review gap: consumers cannot easily tell the skill performs network access, and platforms cannot enforce least-privilege boundaries for this skill.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The trigger description is very broad and overlaps with common news and macroeconomic discussions, making accidental invocation more likely in unrelated contexts. Over-broad routing increases the chance this skill fetches external content or influences outputs when a narrower, safer skill would have been more appropriate.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The workflow states the skill will fetch a supplied news URL, but the user-facing description does not clearly warn that external content will be retrieved. This reduces informed consent and increases the risk of users unintentionally causing remote fetches to untrusted domains, which is especially relevant in a URL-driven skill.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The script claims to analyze news from a supplied URL, but it never fetches or processes the article and instead returns fabricated placeholder output. This is dangerous because users may rely on the result as if it were evidence-based macroeconomic analysis, leading to misinformation and potentially poor financial or policy decisions.

Description-Behavior Mismatch

Medium
Confidence
99% confidence
Finding
The skill metadata advertises sophisticated Fed, inflation, and monetary-policy analysis, but the implementation only emits canned text regardless of input. In the context of a financial-analysis skill, this mismatch is especially risky because it can create false trust in non-existent analysis and mislead downstream users or agents acting on market-sensitive information.

Static analysis

No suspicious patterns detected.