Back to skill

Security audit

Magic Link Bridge

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Supabase magic-link helper, but users should treat generated links as sensitive login secrets and harden URL cleanup/logging.

Install only if you are comfortable handling Supabase magic links as sensitive login credentials. Keep the service-role key strictly server-side, use HTTPS, shorten token lifetimes where possible, avoid logging full URLs, strip auth parameters before analytics or other scripts run, and localize the included alert text for your users.

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/portal-bridge.js:20
Finding

One-Time Authentication Token Exposed in URL Query String

Content
View full analysis
&type=magiclink ``` ```js const u = new URL('https://site/portal/'); u.searchParams.set('token_hash', gen.hashed_token); u.searchParams.set('type', gen.verification_type || 'magiclink'); const magicLink = u.toString(); ``` The portal reads the token from the query string and does not remove it until the asynchronous verification request has settled: ```js var q = new URLSearchParams(window.location.search); // (3) error first — short-circuit and don't try to verify anything. var err = q.get('error_description') || q.get('error') || q.get('error_code'); if (err) { setTimeout(function () { alert('הקישור פג או כבר נוצל. בקש מהסוכן לשלוח קישור חדש.\n\n(' + decodeURIComponent(err) + ')'); }, 300); history.replaceState(null, '', window.location.pathname); return; } // (1) token_hash flow — explicit verifyOtp. var tokenHash = q.get('token_hash'); var type = q.get('type'); if (tokenHash && type) { sb.auth.verifyOtp({ token_hash: tokenHash, type: type }) .then(function (res) { if (res.error) { console.warn('verifyOtp failed:', res.error.message); setTimeout(function () { alert('הקישור פג או כבר נוצל. בקש מהסוכן לשלוח קישור חדש.'); }, 300); } }) .finally(function () { // Strip the one-time token from the URL so a refresh doesn't replay. history.replaceState(null, '', window.location.pathname); }); } ``` ### Technical Analysis Although named `token_hash`, this value is a bearer-like one-time credential accepted by Supabase's `verifyOtp` operation. Possession ...[truncated 2951 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The description says the skill generates Supabase magic links that target a custom subpath and works around redirect rewriting by Supabase. The supplied code does not generate links or interact with Supabase configuration at all. Instead, it is a safety-net browser redirect placed on the homepage that forwards users to /portal/ when auth-related query/hash parameters are present. While this behavior is related to the same user problem domain and supports the broader flow, the primary purpose and capability differ materially from the declared description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill recommends distributing magic links containing token material via WhatsApp, SMS, or email without clearly warning that possession of the link may allow account access until the token is redeemed or expires. Users or implementers may forward, log, preview, or expose these URLs through messaging apps, browser history, analytics, or support tooling, increasing the chance of unintended account takeover.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file contains user-visible alert text only in Hebrew, which imposes a specific language on users without any opt-in or fallback. Under the policy, locale or language must not be forced unless the skill clearly offers a choice or is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.