Back to skill

Security audit

pageclaw

Security checks for vulnerabilities and agentic risk

Overview

This page-building skill is mostly coherent, but it needs Review because an included persistence script can write outside its intended folder and setup guidance uses mutable package installs.

Before installing, treat this as a bundle of multiple helper skills, not just one page builder. Review commands before execution, avoid using --persist with untrusted project or page names, inspect generated Markdown/HTML before relying on it as agent context, pin package versions instead of using latest, and install dependencies before placing API keys in the environment.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
skills/ui-ux-pro-max/scripts/design_system.py:504
Finding
Path Traversal Enables Filesystem Writes Outside the Design-System Directory<![CDATA[ ## Vulnerability Details **File Location**: `skills/ui-ux-pro-max/scripts/design_system.py`, lines 504–531 **Vulnerability Type**: Path traversal and unsafe file overwrite **Risk Level**: High ### Vulnerable Code ```python base_dir = Path(output_dir) if output_dir else Path.cwd() # Use project name for project-specific folder project_name = design_system.get("project_name", "default") project_slug = project_name.lower().replace(' ', '-') design_system_dir = base_dir / "design-system" / project_slug pages_dir = design_system_dir / "pages" created_files = [] # Create directories design_system_dir.mkdir(parents=True, exist_ok=True) pages_dir.mkdir(parents=True, exist_ok=True) master_file = design_system_dir / "MASTER.md" # Generate and write MASTER.md master_content = format_master_md(design_system) with open(master_file, 'w', encoding='utf-8') as f: f.write(master_content) created_files.append(str(master_file)) # If page is specified, create page override file with intelligent content if page: page_file = pages_dir / f"{page.lower().replace(' ', '-')}.md" page_content = format_page_override_md(design_system, page, page_query) with open(page_file, 'w', encoding='utf-8') as f: f.write(page_content) created_files.append(str(page_file)) ``` ### Technical Analysis The persistence function uses the CLI-controlled project name, page name, and output directory in filesystem paths without validating or canonicalizing them. Replacing spaces with hyphens is not sufficient sanitization. Values can still contain: - Parent-directory components such as `../` - Absolute path prefixes - Platform-specific path separators - Names that resolve through symbolic links `pathlib` also discards preceding path components when a later component is absolute. Consequently, an absolute `project_slug` or page-derived path can bypass the intended `base_dir/design-system/` location entirely. Both files are opened with mode `w`, so an existing t ...[truncated 1682 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Restrict project and page names to a conservative allowlist, such as: ```python import re SAFE_SLUG = re.compile(r"^[a-z0-9][a-z0-9_-]{0,63}$") def validate_slug(value: str) -> str: slug = value.strip().lower().replace(" ", "-") if not SAFE_SLUG.fullmatch(slug): raise ValueError("Invalid project or page name") return slug ``` 2. Reject absolute paths, `.` and `..` components, path separators, drive prefixes, and null characters. 3. Resolve the approved root and candidate destination, then enforce containment: ```python root = (base_dir / "design-system").resolve() target = (root / project_slug / "MASTER.md").resolve() if not target.is_relative_to(root): raise ValueError("Output path escapes the design-system directory") ``` 4. Apply the same containment check to page files. 5. Detect symbolic-link traversal where the threat model includes untrusted project directories. 6. Avoid silent overwrites. Use exclusive creation mode (`x`) or require explicit confirmation before replacing existing files. 7. Treat `--output-dir` as a privileged option and require explicit user authorization when it resolves outside the current project. 8. Add tests covering absolute paths, nested traversal, Windows drive paths, mixed separators, symbolic links, and overwrite attempts. ]]>

T08 · Insecure Dependencies

Warning
Location
skills/ui-styling/SKILL.md:58
Finding
Mutable Remote Package Is Downloaded and Executed Through npx<![CDATA[ ## Vulnerability Details **File Location**: `skills/ui-styling/SKILL.md`, lines 58–68 **Vulnerability Type**: Unpinned remote dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash npx shadcn@latest init ``` ```bash npx shadcn@latest add button card dialog form ``` ### Technical Analysis The instructions direct the Agent to use `npx` with the mutable `latest` tag. If the package is not already available locally, `npx` retrieves it from the configured package registry and immediately executes its CLI. Because `latest` is not immutable, the code executed during a future skill run may differ from the code reviewed during this audit. No exact version, integrity hash, committed lockfile, or package provenance check is specified. The command is functionally relevant to component setup, but executing a mutable remote package exceeds the minimum safer privilege necessary when a reviewed, exact version could be used instead. ### Attack Path 1. A user invokes the UI styling setup workflow. 2. The Agent executes `npx shadcn@latest`. 3. The package manager resolves the registry’s current `latest` release. 4. The selected package and its dependency graph are downloaded. 5. Package CLI or lifecycle code executes with the invoking user’s permissions. 6. If the upstream package, maintainer account, registry, or dependency graph has been compromised, attacker-controlled code can access the project and other resources available to that user. ### Impact Assessment A compromised dependency could obtain the same privileges as the invoking process, including the ability to: - Read and modify project files - Modify package configuration and generated source files - Read environment variables available to the process - Initiate network connections - Execute additional local commands - Plant code that runs during later build or development operations No evidence shows that the current `shadcn` package is malicious. The vulnerability is the mutable ...[truncated 44 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed version: ```bash npx --yes shadcn@X.Y.Z init npx --yes shadcn@X.Y.Z add button card dialog form ``` 2. Record the selected version and review it before updating. 3. Use a committed lockfile and enforce integrity verification through `npm ci` where practical. 4. Configure an approved registry and package scope policy. 5. Run generation in a sandbox or container with access limited to the target project. 6. Do not expose unrelated secrets or credentials to the package-manager process. 7. Review all generated and modified files before accepting them into the project. 8. Consider installing the pinned CLI as a development dependency first, then invoking the locally locked binary. ]]>

T08 · Insecure Dependencies

Warning
Location
skills/design/SKILL.md:295
Finding
Unpinned Python Dependencies Are Installed While an API Key Is Present in the Environment<![CDATA[ ## Vulnerability Details **File Location**: `skills/design/SKILL.md`, lines 295–296 **Vulnerability Type**: Unpinned dependency installation with sensitive environment exposure **Risk Level**: Medium ### Vulnerable Code ```bash export GEMINI_API_KEY="your-key" # https://aistudio.google.com/apikey pip install google-genai pillow ``` ### Technical Analysis The workflow exports a Gemini API key and then installs `google-genai` and `pillow` without exact versions, hashes, a lockfile, or an isolated environment. Unpinned package names allow dependency resolution to change over time. Depending on available wheels, source distributions, build backends, package-manager behavior, and platform compatibility, package installation can execute build or installation code. The `pip` process inherits the shell environment, including `GEMINI_API_KEY`. A compromised package, dependency, build backend, or package source could therefore access the key during installation. Installing into the active Python environment may also alter unrelated applications or tools. No evidence establishes that the named packages are currently malicious. The risk arises from mutable dependency resolution and unnecessary credential exposure during installation. ### Attack Path 1. A user follows the instructions and exports a valid Gemini API key. 2. The Agent runs the unpinned `pip install` command in the same environment. 3. `pip` resolves current package and transitive-dependency versions from its configured index. 4. A compromised distribution, dependency, or build backend executes during installation. 5. That code inherits the exported API key and the invoking user’s filesystem and network permissions. 6. The code can read or transmit the key, modify the Python environment, or alter project files. ### Impact Assessment A malicious installation payload could potentially: - Read the Gemini API key from the process environment - Consume the user’s API quota or incur charges - A ...[truncated 394 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create and activate an isolated virtual environment before installation. 2. Pin exact, reviewed versions in a requirements file: ```text google-genai==X.Y.Z pillow==A.B.C ``` 3. Generate and verify hashes, then install with: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Maintain a reviewed lockfile that includes all transitive dependencies. 5. Install dependencies before placing the API key in the environment. 6. Scope the key only to the final trusted process, for example: ```bash GEMINI_API_KEY="..." python trusted_script.py ``` 7. Use a restricted API key with minimum necessary permissions, quotas, and billing limits. 8. Prefer a trusted internal package mirror and verify package provenance. 9. Rotate the API key immediately if it may have been exposed to an untrusted installation process. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (123)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description says this skill should transform structured markdown briefs (page-story-*.md) into polished static HTML pages through a full automated build pipeline. The supplied code does something materially different: it loads CSV files from a local data directory, builds BM25 indices, auto-detects a search domain from free-text queries, and returns ranked reference entries from style-guide datasets. There is no markdown reading, file conversion, HTML generation, templating, output writing, or pipeline execution logic. The code’s primary purpose is information retrieval for UI/UX guidance, not page construction. This is a clear description-behavior mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The description claims a broad page-building skill that transforms structured markdown briefs into polished static HTML through a full automated pipeline. This code chunk is specifically a design system generator: it searches across domains like product/style/color/landing/typography, applies reasoning rules, formats the result as ASCII/markdown, and can persist design-system documentation files. While 'design system' is one part of the declared pipeline, the code shown does not perform the core promised behavior of turning markdown briefs into HTML pages, nor does it process page-story files or produce final page implementations. Therefore the actual behavior is materially narrower and different from the declared purpose.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description says this skill should transform a page-story markdown brief into a polished static HTML page through a full automated build pipeline. The supplied code does something materially different: it is a command-line search utility for UI/UX references, with an optional design-system generation mode and file persistence for design-system markdown documents. There is no logic here for reading page-story-*.md files, converting markdown to HTML, implementing a page, or performing a quality pass on generated HTML. While design-system generation could be a supporting part of a page-building workflow, this code chunk’s primary behavior is search/design-system recommendation, not static page construction. Therefore the description does not accurately represent the code.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>

  <!-- ─── Sidebar ─── -->
  <aside class="sidebar">

    <img src="YING.jpg" alt="Ying Xiao" class="avatar">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</svg>
      </a>

      <!-- Google Scholar -->
      <a href="https://scholar.google.com/citations?user=TfdJ-DYAAAAJ&hl=en&oi=ao" aria-label="Google Scholar" class="icon-link">
        <img src="https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/googlescholar.svg"
             alt="" class="social-icon" width="20" height="20">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<div class="layout">

    <!-- ─── Sidebar ─────────────────────────────────────── -->
    <aside class="sidebar" aria-label="Profile and navigation">

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

Hidden Instructions

High
Category
Prompt Injection
Content
</aside>

    <!-- ─── Main Content ──────────────────────────────────── -->
    <main class="main-content" id="main">

      <!-- About Me -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<main>

  <!-- ── Header ──────────────────────────────────────────────── -->
  <header class="page-header">
    <h1>Ying Xiao</h1>
    <p class="page-header__subtitle">PhD Researcher · AI Fairness, Reliability &amp; Software Engineering</p>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<nav aria-label="Social links">
      <ul class="social-nav">

        <!-- Email -->
        <li>
          <a href="mailto:ying.1.xiao@kcl.ac.uk" class="social-link" aria-label="Email Ying Xiao">
            <svg class="social-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</a>
        </li>

        <!-- LinkedIn -->
        <li>
          <a href="https://www.linkedin.com/in/ying-xiao-7b4779147/" target="_blank" rel="noopener" class="social-link" aria-label="LinkedIn profile">
            <img
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<div class="column">

    <!-- Header -->
    <header class="site-header">
      <h1>Ying Xiao</h1>
      <p class="subtitle">PhD Researcher &middot; King's College London &amp; SUSTech</p>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<div class="links-row">

          <!-- Email -->
          <a href="mailto:ying.1.xiao@kcl.ac.uk" class="icon-link" aria-label="Email">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
              <path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</svg>
          </a>

          <!-- LinkedIn -->
          <a href="https://www.linkedin.com/in/ying-xiao-7b4779147/" class="icon-link" aria-label="LinkedIn" target="_blank" rel="noopener">
            <svg viewBox="0 0 24 24" aria-hidden="true" focusable="false">
              <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<div class="page-wrapper">

    <!-- ── Header ── -->
    <header>
      <h1>Ying Xiao</h1>
      <p class="subtitle">PhD Researcher · King's College London &amp; SUSTech</p>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
<div class="page-grid">

    <!-- ── Sidebar ─────────────────────────────────────────────── -->
    <aside class="sidebar">
      <div class="sidebar-name">
        <h1>Ying<br>Xiao</h1>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</svg>
        </a>

        <!-- GitHub -->
        <a href="https://github.com/xy-showing" class="icon-link" aria-label="GitHub profile" target="_blank" rel="noopener noreferrer">
          <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
            <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</svg>
        </a>

        <!-- rednote / 小红书 -->
        <a href="https://www.xiaohongshu.com/user/profile/5e26640700000000010016b0" class="icon-link" aria-label="rednote (小红书) profile" target="_blank" rel="noopener noreferrer">
          <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false">
            <!-- Generic chain/link icon for rednote as fallback -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Hidden Instructions

High
Category
Prompt Injection
Content
</div>
    </aside>

    <!-- ── Main content ─────────────────────────────────────────── -->
    <main class="content" id="main-content">

      <!-- About Me -->
Confidence
70% confidence
Finding
Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Chaining Abuse

High
Category
Tool Misuse
Content
**Ubuntu/Debian:**
```bash
sudo apt update && sudo apt install python3
```

**Windows:**
Confidence
95% confidence
Finding
The chained command combines system update and privileged installation in one step, reducing opportunities for review or intervention before a host-modifying action occurs. In agent workflows, command chaining increases the risk of accidental execution of multiple impactful operations and makes auditing, confirmation, and rollback harder.

Unvalidated Output Injection

High
Category
Output Handling
Content
25,Rendering,SVG Animation Wrapper,svg animation wrapper div,React/Next.js,Wrap SVG in div and animate wrapper for hardware acceleration,Animate div wrapper around SVG,Animate SVG element directly,"<div class='animate-spin'><svg>...</svg></div>","<svg class='animate-spin'>...</svg>",Low
26,Rendering,Content Visibility,content-visibility auto,React/Next.js,Apply content-visibility: auto to defer off-screen rendering,Use content-visibility for long lists,Render all list items immediately,".item { content-visibility: auto; contain-intrinsic-size: 0 80px }","Render 1000 items without optimization",High
27,Rendering,Hoist Static JSX,hoist static jsx element,React/Next.js,Extract static JSX outside components to avoid re-creation,Hoist static elements to module scope,Create static elements inside components,"const skeleton = <div class='animate-pulse' />; function C() { return skeleton }","function C() { return <div class='animate-pulse' /> }",Low
28,Rendering,Hydration No Flicker,hydration mismatch flicker,React/Next.js,Use inline script to set client-only data before hydration,Inject sync script for client-only values,Use useEffect causing flash,"<script dangerouslySetInnerHTML={{ __html: 'el.className = localStorage.theme' }} />","useEffect(() => setTheme(localStorage.theme), []) // flickers",Medium
29,Rendering,Conditional Render,conditional render ternary,React/Next.js,Use ternary instead of && when condition can be 0 or NaN,Use explicit ternary for conditionals,Use && with potentially falsy numbers,"{count > 0 ? <Badge>{count}</Badge> : null}","{count && <Badge>{count}</Badge>} // renders '0'",Low
30,Rendering,Activity Component,activity show hide preserve,React/Next.js,Use Activity component to preserve state/DOM for toggled components,Use Activity for expensive toggle components,Unmount/remount on visibility toggle,"<Activity mode={isOpen ? 'visible' : 'hidden'}><Menu /></Activity>","{isOpen && <Menu />} // loses state",Medium
31,JS Perf,Batch DOM CSS,batch dom cs
...[truncated 25 chars]
Confidence
65% confidence
Finding
Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Unvalidated Output Injection

High
Category
Output Handling
Content
25,Rendering,SVG Animation Wrapper,svg animation wrapper div,React/Next.js,Wrap SVG in div and animate wrapper for hardware acceleration,Animate div wrapper around SVG,Animate SVG element directly,"<div class='animate-spin'><svg>...</svg></div>","<svg class='animate-spin'>...</svg>",Low
26,Rendering,Content Visibility,content-visibility auto,React/Next.js,Apply content-visibility: auto to defer off-screen rendering,Use content-visibility for long lists,Render all list items immediately,".item { content-visibility: auto; contain-intrinsic-size: 0 80px }","Render 1000 items without optimization",High
27,Rendering,Hoist Static JSX,hoist static jsx element,React/Next.js,Extract static JSX outside components to avoid re-creation,Hoist static elements to module scope,Create static elements inside components,"const skeleton = <div class='animate-pulse' />; function C() { return skeleton }","function C() { return <div class='animate-pulse' /> }",Low
28,Rendering,Hydration No Flicker,hydration mismatch flicker,React/Next.js,Use inline script to set client-only data before hydration,Inject sync script for client-only values,Use useEffect causing flash,"<script dangerouslySetInnerHTML={{ __html: 'el.className = localStorage.theme' }} />","useEffect(() => setTheme(localStorage.theme), []) // flickers",Medium
29,Rendering,Conditional Render,conditional render ternary,React/Next.js,Use ternary instead of && when condition can be 0 or NaN,Use explicit ternary for conditionals,Use && with potentially falsy numbers,"{count > 0 ? <Badge>{count}</Badge> : null}","{count && <Badge>{count}</Badge>} // renders '0'",Low
30,Rendering,Activity Component,activity show hide preserve,React/Next.js,Use Activity component to preserve state/DOM for toggled components,Use Activity for expensive toggle components,Unmount/remount on visibility toggle,"<Activity mode={isOpen ? 'visible' : 'hidden'}><Menu /></Activity>","{isOpen && <Menu />} // loses state",Medium
31,JS Perf,Batch DOM CSS,batch dom cs
...[truncated 25 chars]
Confidence
65% confidence
Finding
Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Credential Access

High
Category
Privilege Escalation
Content
34,Middleware,Keep middleware edge-compatible,Middleware runs on Edge runtime,Edge-compatible code only,Node.js APIs in middleware,Edge-compatible auth check,fs.readFile in middleware,High,
35,Environment,Use NEXT_PUBLIC prefix,Client-accessible env vars need prefix,NEXT_PUBLIC_ for client vars,Server vars exposed to client,NEXT_PUBLIC_API_URL,API_SECRET in client code,High,https://nextjs.org/docs/app/building-your-application/configuring/environment-variables
36,Environment,Validate env vars,Check required env vars exist,Validate on startup,Undefined env at runtime,if (!process.env.DATABASE_URL) throw,process.env.DATABASE_URL (might be undefined),High,
37,Environment,Use .env.local for secrets,Local env file for development secrets,.env.local gitignored,Secrets in .env committed,.env.local with secrets,.env with DATABASE_PASSWORD,High,
38,Performance,Analyze bundle size,Use @next/bundle-analyzer,Bundle analyzer in dev,Ship large bundles blindly,ANALYZE=true npm run build,No bundle analysis,Medium,https://nextjs.org/docs/app/building-your-application/optimizing/bundle-analyzer
39,Performance,Use dynamic imports,Code split with next/dynamic,dynamic() for heavy components,Import everything statically,const Chart = dynamic(() => import('./Chart')),import Chart from './Chart',Medium,https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading
40,Performance,Avoid layout shifts,Reserve space for dynamic content,Skeleton loaders aspect ratios,Content popping in,"<Skeleton className=""h-48""/>",No placeholder for async content,High,
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
34,Middleware,Keep middleware edge-compatible,Middleware runs on Edge runtime,Edge-compatible code only,Node.js APIs in middleware,Edge-compatible auth check,fs.readFile in middleware,High,
35,Environment,Use NEXT_PUBLIC prefix,Client-accessible env vars need prefix,NEXT_PUBLIC_ for client vars,Server vars exposed to client,NEXT_PUBLIC_API_URL,API_SECRET in client code,High,https://nextjs.org/docs/app/building-your-application/configuring/environment-variables
36,Environment,Validate env vars,Check required env vars exist,Validate on startup,Undefined env at runtime,if (!process.env.DATABASE_URL) throw,process.env.DATABASE_URL (might be undefined),High,
37,Environment,Use .env.local for secrets,Local env file for development secrets,.env.local gitignored,Secrets in .env committed,.env.local with secrets,.env with DATABASE_PASSWORD,High,
38,Performance,Analyze bundle size,Use @next/bundle-analyzer,Bundle analyzer in dev,Ship large bundles blindly,ANALYZE=true npm run build,No bundle analysis,Medium,https://nextjs.org/docs/app/building-your-application/optimizing/bundle-analyzer
39,Performance,Use dynamic imports,Code split with next/dynamic,dynamic() for heavy components,Import everything statically,const Chart = dynamic(() => import('./Chart')),import Chart from './Chart',Medium,https://nextjs.org/docs/app/building-your-application/optimizing/lazy-loading
40,Performance,Avoid layout shifts,Reserve space for dynamic content,Skeleton loaders aspect ratios,Content popping in,"<Skeleton className=""h-48""/>",No placeholder for async content,High,
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Instruction Override

High
Category
Prompt Injection
Content
21,Layout,Container Width,Web,Content too wide is hard to read,Limit max-width for text content (65-75ch),Let text span full viewport width,max-w-prose or max-w-3xl,Full width paragraphs,Medium
22,Touch,Touch Target Size,Mobile,Small buttons are hard to tap accurately,Minimum 44x44px touch targets,Tiny clickable areas,min-h-[44px] min-w-[44px],w-6 h-6 buttons,High
23,Touch,Touch Spacing,Mobile,Adjacent touch targets need adequate spacing,Minimum 8px gap between touch targets,Tightly packed clickable elements,gap-2 between buttons,gap-0 or gap-1,Medium
24,Touch,Gesture Conflicts,Mobile,Custom gestures can conflict with system,Avoid horizontal swipe on main content,Override system gestures,Vertical scroll primary,Horizontal swipe carousel only,Medium
25,Touch,Tap Delay,Mobile,300ms tap delay feels laggy,Use touch-action CSS or fastclick,Default mobile tap handling,touch-action: manipulation,No touch optimization,Medium
26,Touch,Pull to Refresh,Mobile,Accidental refresh is frustrating,Disable where not needed,Enable by default everywhere,overscroll-behavior: contain,Default overscroll,Low
27,Touch,Haptic Feedback,Mobile,Tactile feedback improves interaction feel,Use for confirmations and important actions,Overuse vibration feedback,navigator.vibrate(10),Vibrate on every tap,Low
Confidence
90% confidence
Finding
This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file’s behavior materially contradicts the declared skill purpose: instead of transforming page-story markdown into static HTML, it implements a generic BM25 search engine over local UI/UX CSV data. In an agent-skill setting, this mismatch is dangerous because the orchestrator or reviewer may trust the manifest while the code performs unrelated logic, creating a hidden capability and undermining security review, least privilege, and user expectations.

Static analysis

No suspicious patterns detected.