Back to skill

Security audit

جاك العلم

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Saudi personal-shopper workflow, but its generated HTML reports can include unescaped web-sourced content and under-disclosed external requests, so users should review it carefully before installing.

Install only if you are comfortable with a Saudi-focused shopping assistant that writes local HTML reports. Before using it for real purchases, require generated report content to be HTML-escaped, purchase URLs to be validated as HTTPS on expected store domains, screenshot paths to be checked with resolved path containment, and external font/image requests to be removed or clearly disclosed.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
references/html-template.md:230
Finding

Unescaped Untrusted Data Can Inject Active Content into Generated HTML Reports

Content
View full analysis
ر.س
ليش هذا الأفضل لك؟
⚖️ التنازل:
اشتري الآن ← ``` The associated rendering instructions state: ```text 2. For each ranked product: if `screenshot_path` exists, read the file and base64-encode it. 3. Generate HTML using the template from html-template.md exactly 4. Save to `shopping-reports/{date}-{query_slug}.html` ``` The template customization instructions additionally require direct substitution: ```text When generating the report, replace all `` with actual data ``` ### Technical Analysis The report renderer inserts product names, prices, descriptions, coupon information, recommendation text, and URLs into HTML contexts. Much of this data originates from untrusted retailer pages, search results, review sites, or user input. No instruction requires: - HTML entity encoding for text nodes. - Attribute encoding for URLs. - Validation of URL schemes. - Rejection of event-handler attributes or active markup. - Sanitization through an allowlist-based HTML sanitizer. - A Content Security Policy restricting script execution. HTML text and attribute contexts require different escaping rules. Directly inserting an attacker-controlled value into `href` could permit a `javascript:` URI. Inserting unescaped data into a text placeholder could terminate the intended element and introduce arbitrary HTML, such as an image with an event handler. The existing rule that product links should point to verified stor ...[truncated 1735 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:567
Finding

Screenshot Directory Validation Is Vulnerable to Prefix and Symlink Bypass

Content
View full analysis
Remediation
View remediation
= 5_000_000: return None return base64.b64encode(resolved.read_bytes()).decode("ascii") except (OSError, RuntimeError, ValueError): return None ``` ]]>

T09 · Insecure Skill Coding Practices

Note
Location
references/html-template.md:16
Finding

Generated Reports Automatically Contact Undeclared Google Font Services

Content
View full analysis
``` The same external-resource requirement appears in `references/brand-guideline.md`, lines 13-15. ### Technical Analysis Every generated report includes preconnection and stylesheet references to Google Fonts. When a user opens the report, the browser can automatically contact `fonts.googleapis.com` and `fonts.gstatic.com`. This behavior conflicts with the template's statements that the report has no external dependencies and works offline. It also falls outside the network-domain allowlist documented in `SKILL.md`, although that allowlist directly governs sub-agent fetches rather than subsequent browser behavior. The requests are not needed for the report's core shopping functionality because the template already defines system fallback fonts. ### Attack Path 1. The Renderer generates an HTML report from the template. 2. The report retains the Google Fonts `preconnect` and stylesheet tags. 3. The user opens the report. 4. The browser automatically resolves and contacts Google-controlled domains. 5. Request metadata is exposed to those third parties without an explicit user action or report warning. ### Impact Assessment The third-party requests may disclose: - The viewer's IP address. - Browser and network metadata. - Report access timing. - Potential referrer information, depending on the browser and viewing environment. This is a privacy and containment issue rather than an agent compromise. It does not provide access to local credentials, system files, or agent tools. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/html-template.md (reported line 248)May include surrounding context.

md
<div class="header">
  <h1>جاك العلم 🔍</h1>
  <p class="subtitle">Personal Shopper Report</p>
  <p class="subtitle"><!-- DATE --></p>
</div>

<!-- REPEAT THIS BLOCK FOR EACH ITEM -->

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/html-template.md (reported line 278)May include surrounding context.

md
<!-- NEAR-PRO CARD -->
  <div class="card near-pro">
    <span class="card-badge">🔵 قريب من الاحتراف — Near-Pro</span>
    <!-- <img class="product-img" src="IMAGE_URL" alt="PRODUCT"> -->
    <h3><!-- PRODUCT NAME --></h3>
    <div class="price"><!-- PRICE --> ر.س</div>
    <div class="kill-doubt">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/html-template.md (reported line 296)May include surrounding context.

md
<!-- NEAR-PRO CARD -->
  <div class="card near-pro">
    <span class="card-badge">🔵 قريب من الاحتراف — Near-Pro</span>
    <!-- <img class="product-img" src="IMAGE_URL" alt="PRODUCT"> -->
    <h3><!-- PRODUCT NAME --></h3>
    <div class="price"><!-- PRICE --> ر.س</div>
    <div class="kill-doubt">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/html-template.md (reported line 278)May include surrounding context.

md
<!-- NEAR-PRO CARD -->
  <div class="card near-pro">
    <span class="card-badge">🔵 قريب من lلlحترlف — Near-Pro</span>
    <!-- <img class="product-img" src="IMAGE_URL" alt="PRODUCT"> -->
    <h3><!-- PRODUCT NAME --></h3>
    <div class="price"><!-- PRICE --> ر.س</div>
    <div class="kill-doubt">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/html-template.md (reported line 296)May include surrounding context.

md
<!-- NEAR-PRO CARD -->
  <div class="card near-pro">
    <span class="card-badge">🔵 قريب من lلlحترlف — Near-Pro</span>
    <!-- <img class="product-img" src="IMAGE_URL" alt="PRODUCT"> -->
    <h3><!-- PRODUCT NAME --></h3>
    <div class="price"><!-- PRICE --> ر.س</div>
    <div class="kill-doubt">

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/html-template.md (reported line 315)May include surrounding context.

md
<details>
    <summary>📊 تحليل القرار (ADR Summary)</summary>
    <div class="content">
      <p><strong>التحليل:</strong> <!-- ANALYZE SECTION --></p>
      <p><strong>القرار:</strong> <!-- DECIDE SECTION --></p>
      <p><strong>التوصية:</strong> <!-- RECOMMEND SECTION --></p>
    </div>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/html-template.md (reported line 315)May include surrounding context.

md
<details>
    <summary>📊 تحليل lلقرlر (ADR Summary)</summary>
    <div class="content">
      <p><strong>lلتحليل:</strong> <!-- ANALYZE SECTION --></p>
      <p><strong>lلقرlر:</strong> <!-- DECIDE SECTION --></p>
      <p><strong>lلتوصية:</strong> <!-- RECOMMEND SECTION --></p>
    </div>

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger is broad enough to intercept many ordinary shopping-related queries, causing the skill to activate in cases where a simpler direct answer would be safer and more appropriate. Over-broad invocation expands attack surface by increasing unnecessary web access, sub-agent spawning, and file generation on benign user requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill hard-codes locale: ar-SA, region: Riyadh, Saudi Arabia, currency: SAR, and Arabic HTML output without checking user preference or location. This can lead to misleading recommendations, incorrect pricing/availability assumptions, and inappropriate sharing of localized output when the user's actual context differs.

Content

No source excerpt is available for this finding.

Scope Creep

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The security section declares file-write permission only for shopping-reports/ and file-read for references/ plus shopping-reports/screenshots/. Later instructions explicitly require agents to save screenshots to shopping-reports/screenshots/... and even create that folder if it does not exist. Because the screenshots path is treated as a distinct writable location in the implementation guidance but is not explicitly declared in file-write permissions, the code/documented behavior exceeds the stated write scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instruction "الأسلوب: نجدي طبيعي للتوصيات وفصحى خفيفة للتحليل" forces outputs into a specific regional dialect and register. This is a natural-language locale policy concern because it does not offer the user an alternative language or style choice, and no region-specific justification is provided in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The instruction explicitly tells the agent to search in other languages, which imposes a language/locale behavior without asking whether the user wants multilingual sourcing or can evaluate non-English material. The file does not provide an opt-in mechanism or a clear region-specific justification for this language constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML template hard-codes lang="ar" dir="rtl", and the notes later state that Arabic is the default. This imposes a specific language/locale on every generated report without any documented opt-in or user choice, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The natural-language instruction says 'Arabic is the default,' which establishes a fixed locale policy for generated reports. Because no alternative language choice or opt-in mechanism is provided, this is a policy concern under the language/locale rule.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The template documentation states there are no external dependencies, but the HTML includes Google Fonts loaded from external domains. This creates unannounced outbound requests when the report is opened, leaking metadata such as IP address/user agent and breaking offline assumptions, which is especially problematic for a file intended to be saved and shared.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill instructs the agent to generate, save, and send an HTML file as the primary output without warning that the file may contain active links and externally loaded resources. This can surprise users and increase phishing/privacy risk because recipients may open a local HTML file that behaves differently from plain text output.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.