Back to skill

Security audit

AI Product Launch Monitor

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it advertises, but it needs review because it can fetch and screenshot unvalidated URLs from feeds and then asks agents to read reports containing untrusted web content.

Install only if you are comfortable with the skill making broad outbound web requests and rendering feed-provided pages from the machine running the agent. Prefer trusted feed lists, use --no-screenshots for untrusted feeds, avoid running it in environments with access to internal services or cloud metadata, and treat all generated reports, JSON, screenshots, and links as untrusted web data.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/monitor.py:262
Finding
Unrestricted Feed and Entry URLs Enable Server-Side Request Forgery<![CDATA[ ## Vulnerability Details **File Location**: `scripts/monitor.py:71-78`, `scripts/monitor.py:87-100`, `scripts/monitor.py:246-269`, and `scripts/monitor.py:420-422` **Vulnerability Type**: Server-Side Request Forgery through unvalidated feed and article URLs **Risk Level**: High ### Vulnerable Code ```python for url in feed_urls: if verbose: print(f"[RSS] Fetching {url} …", file=sys.stderr) try: resp = requests.get(url, timeout=10, headers={"User-Agent": "AI-Launch-Monitor/1.0"}) resp.raise_for_status() feed = feedparser.parse(resp.content) ``` The resulting feed entry URLs are accepted without validation: ```python for entry in feed.entries: published = _entry_date(entry) if published and published < cutoff: continue title = entry.get("title", "") summary = entry.get("summary", entry.get("description", "")) link = entry.get("link", "") if not (title and link): continue is_launch = bool(LAUNCH_KEYWORDS.search(title + " " + summary)) entries.append({ "title": _clean(title), "link": link, "summary": _clean(summary)[:500], "published": published.isoformat() if published else None, "source": feed.feed.get("title", urlparse(url).netloc), "is_launch_signal": is_launch, }) ``` Those untrusted URLs are subsequently opened in Chromium: ```python with sync_playwright() as p: browser = p.chromium.launch(headless=True, args=["--no-sandbox"]) context = browser.new_context(viewport={"width": 1280, "height": 800}) page = context.new_page() for launch in launches: url = launch["link"] fname = hashlib.md5(url.encode()).hexdigest()[:10] + ".png" fpath = shot_dir / fname try: page.goto(url, timeout=20000, wait_until="domcontentloaded") page.wait_for_timeout(2000) page.screenshot(path=str(fpath), full_page=False) launch["screenshot"] ...[truncated 3636 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create a single URL-validation function and apply it before every feed fetch and browser navigation. 2. Permit only `https` URLs unless an explicit, documented exception is required. 3. Reject URLs containing embedded credentials and reject non-web schemes such as `file`, `data`, `javascript`, and `ftp`. 4. Resolve the destination hostname and reject every resolved loopback, private, link-local, multicast, unspecified, and reserved IP address, for both IPv4 and IPv6. 5. Disable automatic redirects or validate every redirect target before following it. Validate the final connected destination as well as the original URL. 6. Mitigate DNS rebinding by binding validation to the actual connection destination or enforcing network-layer egress controls. 7. Consider an allowlist of approved feed domains. If arbitrary public feeds are required, clearly warn users that they expand the network trust boundary. 8. Run browser traffic in an isolated environment with no access to the host network, private subnets, cloud metadata addresses, or sensitive local services. 9. Remove `--no-sandbox`. If the deployment environment cannot run Chromium's sandbox, isolate the entire browser in a hardened, unprivileged container instead. 10. Limit the number of redirects, response size, request duration, and total pages visited to reduce denial-of-service exposure. 11. Add security tests covering loopback addresses, private IPv4 and IPv6 ranges, encoded IP representations, redirects to private hosts, and DNS rebinding scenarios. ]]>

T01 · Skill Instruction Hijacking

Warning
Location
scripts/monitor.py:356
Finding
Attacker-Controlled Feed Content Is Exposed to the Agent as Trusted Report Text<![CDATA[ ## Vulnerability Details **File Location**: `scripts/monitor.py:87-100`, `scripts/monitor.py:356-375`, and `SKILL.md:94-99` **Vulnerability Type**: Indirect prompt injection through generated reports **Risk Level**: Medium ### Vulnerable Code Untrusted RSS fields are collected with only basic HTML-tag removal: ```python title = entry.get("title", "") summary = entry.get("summary", entry.get("description", "")) link = entry.get("link", "") if not (title and link): continue is_launch = bool(LAUNCH_KEYWORDS.search(title + " " + summary)) entries.append({ "title": _clean(title), "link": link, "summary": _clean(summary)[:500], "published": published.isoformat() if published else None, "source": feed.feed.get("title", urlparse(url).netloc), "is_launch_signal": is_launch, }) ``` The content is inserted directly into a Markdown report: ```python lines += ["", "## 📋 All Entries", ""] for l in launches: shot = f" \n 📸 Screenshot: `{l['screenshot']}`" if l.get("screenshot") else "" cats = ", ".join(l.get("categories", [])) lines.append(f"### {l['title']}") lines.append(f"- **Source:** {l['source']}") lines.append(f"- **Link:** {l['link']}") lines.append(f"- **Published:** {l.get('published', 'N/A')}") lines.append(f"- **Categories:** {cats}") lines.append(f"- **Trend Score:** {l['trend_score']}") lines.append(f"- **Summary:** {l['summary'][:300]}") if l.get("search_results"): lines.append(f"- **Related:**") for r in l["search_results"][:3]: lines.append(f" - [{r['title']}]({r['url']})") if shot: lines.append(shot) lines.append("") ``` The Skill documentation then instructs an Agent to consume those artifacts: ```markdown ## Agent Integration When using this skill in an agent workflow: 1. Run the script with `--output` pointing to a temp or workspace directory 2. Read `report.md` for a summary to present to the user 3. Parse `launches.json ...[truncated 3175 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Update `SKILL.md` to state explicitly that all feed, search-result, webpage, report, JSON, and screenshot content is untrusted data and must never be followed as instructions. 2. Require the consuming Agent to use report contents only for extraction and summarization. Prohibit tool calls, configuration changes, secret disclosure, or policy changes based solely on fetched text. 3. Place externally sourced fields in a clearly delimited data-only structure before presenting them to an Agent. 4. Prefer parsing `launches.json` with a fixed schema over supplying the complete Markdown report as free-form prompt content. 5. Escape Markdown control characters in all externally sourced fields, including titles, summaries, source names, and result titles and URLs. 6. Validate field types, enforce conservative length limits, remove control characters, and reject malformed URLs. 7. Keep trusted analysis instructions in a separate system or developer-level message rather than adjacent to untrusted report text. 8. Require explicit user confirmation before performing any consequential action suggested by report content. 9. Add tests containing common indirect prompt-injection phrases and Markdown heading/link manipulation to verify that they remain inert data. 10. Clearly label generated sections, for example: `BEGIN UNTRUSTED RSS CONTENT` and `END UNTRUSTED RSS CONTENT`, while retaining higher-priority instructions that content within those delimiters must not be obeyed. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (5)

Tainted flow: 'api_key' from os.environ.get (line 146, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Content
def _brave_search(query, api_key):
    import requests
    try:
        resp = requests.get(
            "https://api.search.brave.com/res/v1/web/search",
            params={"q": query, "count": 5},
            headers={"Accept": "application/json", "X-Subscription-Token": api_key},
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill advertises an end-to-end pipeline that performs network access, reads environment variables, and writes reports/screenshots to disk, but it does not declare any explicit tool scope such as permissions or allowed-tools. That mismatch can cause an agent platform to invoke the skill without clear least-privilege boundaries, increasing the risk of unintended outbound requests, secret exposure through env access, or uncontrolled file creation in the workspace.

External Transmission

Medium
Category
Data Exfiltration
Content
import requests
    try:
        resp = requests.get(
            "https://api.search.brave.com/res/v1/web/search",
            params={"q": query, "count": 5},
            headers={"Accept": "application/json", "X-Subscription-Token": api_key},
            timeout=15,
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
import requests
    from bs4 import BeautifulSoup
    try:
        resp = requests.post(
            "https://html.duckduckgo.com/html/",
            data={"q": query},
            headers={"User-Agent": "Mozilla/5.0"},
Confidence
70% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Low
Confidence
86% confidence
Finding
The script silently consumes BRAVE_API_KEY from the environment to access a third-party service, but the user-facing usage text does not clearly disclose that a credential may be used or sent externally. In agent/skill contexts, undisclosed use of ambient credentials can surprise operators and create governance or data-handling risk even when the destination is legitimate.

Static analysis

No suspicious patterns detected.