Back to skill

Security audit

contract diagram

Security checks for vulnerabilities and agentic risk

Overview

This skill is a diagram viewer, but it launches an unauthenticated local web server and automatically rewrites files, which creates serious review-worthy risk.

Review this carefully before installing. It should not be used on private or important files unless the server is restricted to loopback, write access is removed or put behind explicit confirmation, Markdown is sanitized, and file paths are narrowly allowlisted.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
server.js:20
Finding

Unauthenticated filesystem disclosure and arbitrary file overwrite

Content
View full analysis
{ body += chunk.toString(); }); req.on('end', () => { try { const { path: filePath, content } = JSON.parse(body); const fullPath = path.join(ENGINE_DIR, filePath); // Security: only allow writes within engine directory if (!fullPath.startsWith(ENGINE_DIR)) { res.writeHead(403, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: 'Path outside engine directory' })); return; } fs.writeFileSync(fullPath, content, 'utf8'); res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ success: true })); } catch (error) { res.writeHead(500, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: error.message })); } }); return; } // READ endpoint (GET files) let filePath = parsedUrl.pathname === '/' ? '/index.html' : parsedUrl.pathname; filePath = path.join(ENGINE_DIR, filePath); const ext = path.extname(filePath); const contentType = mimeTypes[ext] || 'application/octet-stream'; fs.read ...[truncated 2628 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
index.html:144
Finding

Destructive permission check truncates the selected Markdown file

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
index.html:274
Finding

Stored browser script execution through unsanitized Markdown and frontmatter

Content
View full analysis
${key}${value}'; for (const [key, value] of Object.entries(frontmatter)) { frontmatterHTML += ``; } frontmatterHTML += ''; } // Parse markdown to HTML const html = marked.parse(processedMarkdown); container.innerHTML = frontmatterHTML + html; ``` ### Technical Analysis Both frontmatter values and rendered Markdown are assigned to `innerHTML` without sanitization. Frontmatter values are directly interpolated into HTML, while the Markdown renderer can preserve raw HTML contained in the source document. Marked is a parser and does not provide HTML sanitization. An attacker-controlled document can therefore supply active HTML, including event-handler attributes, that executes in the viewer's origin. A representative payload is an image element with an error handler. Once running under `http://localhost:8080`, the payload can invoke the same-origin `/write` endpoint without cross-origin restrictions. This turns document rendering into a stored code-execution channel in the user's browser and composes directly with the unauthenticated filesystem-write endpoint. ### Attack Path 1. An attacker creates or modifies a Markdown contract containing malicious raw HTML or a malicious frontmatter value. 2. The victim opens that document with the Contract Diagram Viewer. 3. `marked.parse` produces HTML, or the frontmatter loop directly constructs HTML containing the payload. 4. The viewer assigns the result to `container.innerHTML`. 5. The browser interprets the injected element and executes its event handler or other active content. 6. The script sen ...[truncated 761 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
server.js:34
Finding

Unbounded request-body buffering permits denial of service

Content
View full analysis
{ body += chunk.toString(); }); req.on('end', () => { ``` ### Technical Analysis The write endpoint appends every incoming request chunk to an in-memory string. It enforces neither a maximum body size nor a request timeout. Because the endpoint is unauthenticated, any reachable client can send a very large body or maintain multiple slow uploads. Repeated string concatenation increases memory consumption and may also impose significant copying and garbage-collection overhead. The process can eventually become unresponsive or terminate due to memory exhaustion. ### Attack Path 1. The Skill starts the Node.js HTTP service on port 8080. 2. A reachable attacker opens one or more connections to `POST /write`. 3. The attacker sends a very large request body, or continuously streams data without ending the request. 4. Each chunk is converted to a string and appended to `body`. 5. Process memory and CPU usage increase until the viewer becomes unavailable or the Node.js process is terminated. 6. The attacker can repeat the request whenever the service is restarted. ### Impact Assessment Successful exploitation causes denial of service for the Contract Diagram Viewer. It can interrupt active editing, prevent diagram access, and potentially contribute to data loss if termination occurs during a synchronous file write. The effect is primarily on the Node.js process, but severe memory pressure may also degrade other applications running under the same operating-system environment. ]]>
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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (33)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the underlying server can serve arbitrary local files and write files via POST /write, that is a significant capability not disclosed by the skill description. Undocumented local file read/write over HTTP can expose sensitive data or enable unintended file modification, especially if the server binds beyond strict localhost or lacks path restrictions.

Content

No source excerpt is available for this finding.

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 · index.html (reported line 51)May include surrounding context.

html
</head>
<body>
    <main class="container markdown-body">
        <!-- Markdown content renders here -->
    </main>

    <script>

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This viewer automatically rewrites the loaded markdown file by inserting a title, badge, and Mermaid init block, which exceeds the stated purpose of rendering a diagram. Because the target path is user-controlled via the md query parameter, opening the page can silently modify arbitrary accessible markdown files and corrupt source content or workflow state without user consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The page performs automatic file modification through /write with no user confirmation, no preview, and no upfront warning. In the context of a viewer skill, silent writes are especially risky because merely visiting or reloading the page can alter project artifacts unexpectedly.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The periodic phase-check loop rewrites the source markdown every few seconds to update badge text based on derived state, creating continuous unsolicited modification of user files. This can overwrite concurrent edits, create noisy churn in version control, and turn a passive viewer into an autonomous file mutator tied to untrusted document content.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill periodically rewrites user markdown to update badges without confirmation, turning background polling into autonomous source edits. This is dangerous because it can repeatedly change files based on transient state, interfere with user edits, and propagate unexpected changes into repositories or downstream automation.

Content

No source excerpt is available for this finding.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · mermaid.min.js (reported line 2)May include surrounding context.

js
ected non-null, but got "+String(e));return e},"assert"),uAe=o(function(e){var r=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return r?r[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(r[1])?null:r[1].toLowerCase():"_relative"},"protocolFromUrl"),ar={contains:tAe,deflt:rAe,escape:oAe,hyphenate:iAe,getBaseElem:MY,isCharacterBox:lAe,protocolFromUrl:uAe},g2={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render e

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill implements a general-purpose local HTTP server that can read arbitrary files under attacker-controlled paths, write files through a POST endpoint, and resolve filesystem paths through /realpath. That exceeds the stated contract-diagram purpose and materially increases abuse potential, especially because a local web service can be reached by other local processes or a browser session.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The write restriction is ineffective because path.join does not prevent traversal such as ../../target, and the startsWith check is performed on the non-canonical joined string rather than a normalized real path. An attacker can use /write to overwrite files outside the engine directory, potentially modifying application files, user configuration, or executable scripts.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill explicitly instructs the agent to start a local HTTP server and open a browser, but the metadata declares no tool scope or permissions. This hidden execution surface matters because users and policy layers cannot accurately understand or constrain the shell and network behavior before use.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill probes backend write capability by sending a POST to /write even though it presents itself as a diagram viewer. This discloses and tests privileged backend behavior without clear user disclosure, and in some implementations may have side effects because the permission check itself exercises a write-capable endpoint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The permission check issues a write-capable POST request without clearly informing the user that a backend mutation-capable endpoint is being contacted. Even if intended as a no-op, this normalizes hidden privileged actions and may trigger side effects depending on backend implementation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code resolves real filesystem paths for arbitrary markdown targets derived from the md URL parameter, which can reveal canonical paths and filenames beyond what a simple viewer needs. That increases information exposure and can help an attacker map the filesystem or refine subsequent unauthorized file access attempts.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · mermaid.min.js (reported line 1113)May include surrounding context.

js
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===oi.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
	The problem is in the <${t.name}> Token Type
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function s1e(t){return it(t,r=>Mi(r)?r.charCodeAt(0):r)}function kF(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Ru(t){return t<Ty?t:ZC[t]}function Get(){if(Tr(ZC)){ZC=new Array(65536);for(let t=0;t<65536;t++)ZC[t]=t>255?255+~~(t/255):t}}var hm,wy,QC,SF,Cet,Det,i1e,Ty,ZC,wF=I(()=>{"use strict";g4();E4();Kt();vy();Xge();jC();hm="PATTERN",wy="defaultMode",QC="modes",SF=typeof new RegExp("(?:)").sticky=="boolean";o(Zge,"analyzeTokenTypes");o(Jge,"validatePatterns");o(wet,"validateRegExpPattern");o(ket,"findMissingPatterns");o(Eet,"findInvalidPatterns");Cet=/[^\\][$]/;o(Aet,"findEndOfInputAnchor");o(_et,"findEmptyMatchRegExps");Det=/[^\\[][\^]|^\^/;o(Ret,"findStartOfInputAnchor");o(Let,"findUnsupportedFlags");o(Net,"findDuplicatePatterns");o(Met,"findInvalidGroupType");o(Iet,"findModesThatDoNotExist");o(Oet,"findUnreachablePatterns");o(Pet,"tryToMatchStrToPattern");o(Bet,"noMetaChar");o(Fet,"usesLookAheadOrBehind");o(Kge,"addStartOfInput");o(Qge,"addStickyFlag");o(e1e,"performRuntimeChecks");o(t1e,"performWarningRuntimeChecks");o(r1e,"cloneEmptyGroups");o(n1e,"isCustomPattern");o($et,"isShortPattern");i1e={test:o(function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};o(a1e,"checkLineBreaksIssues");o(zet,"buildLineBreakIssueMessage");o(s1e,"getCharCodes");o(kF,"addToMapOfArrays");Ty=256,ZC=[];o(Ru,"charCodeToOptimizedIndex");o(Get,"initCharCodeToOptimizedIndexMap")});function Gh(t,e){let r=t.tokenTypeId
...[truncated 26 chars]

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · mermaid.min.js (reported line 1115)May include surrounding context.

js
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===oi.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
	The problem is in the <${t.name}> Token Type
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function s1e(t){return it(t,r=>Mi(r)?r.charCodeAt(0):r)}function kF(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Ru(t){return t<Ty?t:ZC[t]}function Get(){if(Tr(ZC)){ZC=new Array(65536);for(let t=0;t<65536;t++)ZC[t]=t>255?255+~~(t/255):t}}var hm,wy,QC,SF,Cet,Det,i1e,Ty,ZC,wF=I(()=>{"use strict";g4();E4();Kt();vy();Xge();jC();hm="PATTERN",wy="defaultMode",QC="modes",SF=typeof new RegExp("(?:)").sticky=="boolean";o(Zge,"analyzeTokenTypes");o(Jge,"validatePatterns");o(wet,"validateRegExpPattern");o(ket,"findMissingPatterns");o(Eet,"findInvalidPatterns");Cet=/[^\\][$]/;o(Aet,"findEndOfInputAnchor");o(_et,"findEmptyMatchRegExps");Det=/[^\\[][\^]|^\^/;o(Ret,"findStartOfInputAnchor");o(Let,"findUnsupportedFlags");o(Net,"findDuplicatePatterns");o(Met,"findInvalidGroupType");o(Iet,"findModesThatDoNotExist");o(Oet,"findUnreachablePatterns");o(Pet,"tryToMatchStrToPattern");o(Bet,"noMetaChar");o(Fet,"usesLookAheadOrBehind");o(Kge,"addStartOfInput");o(Qge,"addStickyFlag");o(e1e,"performRuntimeChecks");o(t1e,"performWarningRuntimeChecks");o(r1e,"cloneEmptyGroups");o(n1e,"isCustomPattern");o($et,"isShortPattern");i1e={test:o(function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};o(a1e,"checkLineBreaksIssues");o(zet,"buildLineBreakIssueMessage");o(s1e,"getCharCodes");o(kF,"addToMapOfArrays");Ty=256,ZC=[];o(Ru,"charCodeToOptimizedIndex");o(Get,"initCharCodeToOptimizedIndexMap")});function Gh(t,e){let r=t.tokenTypeId
...[truncated 26 chars]

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · mermaid.min.js (reported line 1170)May include surrounding context.

js
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===oi.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
	The problem is in the <${t.name}> Token Type
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function s1e(t){return it(t,r=>Mi(r)?r.charCodeAt(0):r)}function kF(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Ru(t){return t<Ty?t:ZC[t]}function Get(){if(Tr(ZC)){ZC=new Array(65536);for(let t=0;t<65536;t++)ZC[t]=t>255?255+~~(t/255):t}}var hm,wy,QC,SF,Cet,Det,i1e,Ty,ZC,wF=I(()=>{"use strict";g4();E4();Kt();vy();Xge();jC();hm="PATTERN",wy="defaultMode",QC="modes",SF=typeof new RegExp("(?:)").sticky=="boolean";o(Zge,"analyzeTokenTypes");o(Jge,"validatePatterns");o(wet,"validateRegExpPattern");o(ket,"findMissingPatterns");o(Eet,"findInvalidPatterns");Cet=/[^\\][$]/;o(Aet,"findEndOfInputAnchor");o(_et,"findEmptyMatchRegExps");Det=/[^\\[][\^]|^\^/;o(Ret,"findStartOfInputAnchor");o(Let,"findUnsupportedFlags");o(Net,"findDuplicatePatterns");o(Met,"findInvalidGroupType");o(Iet,"findModesThatDoNotExist");o(Oet,"findUnreachablePatterns");o(Pet,"tryToMatchStrToPattern");o(Bet,"noMetaChar");o(Fet,"usesLookAheadOrBehind");o(Kge,"addStartOfInput");o(Qge,"addStickyFlag");o(e1e,"performRuntimeChecks");o(t1e,"performWarningRuntimeChecks");o(r1e,"cloneEmptyGroups");o(n1e,"isCustomPattern");o($et,"isShortPattern");i1e={test:o(function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};o(a1e,"checkLineBreaksIssues");o(zet,"buildLineBreakIssueMessage");o(s1e,"getCharCodes");o(kF,"addToMapOfArrays");Ty=256,ZC=[];o(Ru,"charCodeToOptimizedIndex");o(Get,"initCharCodeToOptimizedIndexMap")});function Gh(t,e){let r=t.tokenTypeId
...[truncated 26 chars]

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · mermaid.min.js (reported line 1176)May include surrounding context.

js
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===oi.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
	The problem is in the <${t.name}> Token Type
	For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function s1e(t){return it(t,r=>Mi(r)?r.charCodeAt(0):r)}function kF(t,e,r){t[e]===void 0?t[e]=[r]:t[e].push(r)}function Ru(t){return t<Ty?t:ZC[t]}function Get(){if(Tr(ZC)){ZC=new Array(65536);for(let t=0;t<65536;t++)ZC[t]=t>255?255+~~(t/255):t}}var hm,wy,QC,SF,Cet,Det,i1e,Ty,ZC,wF=I(()=>{"use strict";g4();E4();Kt();vy();Xge();jC();hm="PATTERN",wy="defaultMode",QC="modes",SF=typeof new RegExp("(?:)").sticky=="boolean";o(Zge,"analyzeTokenTypes");o(Jge,"validatePatterns");o(wet,"validateRegExpPattern");o(ket,"findMissingPatterns");o(Eet,"findInvalidPatterns");Cet=/[^\\][$]/;o(Aet,"findEndOfInputAnchor");o(_et,"findEmptyMatchRegExps");Det=/[^\\[][\^]|^\^/;o(Ret,"findStartOfInputAnchor");o(Let,"findUnsupportedFlags");o(Net,"findDuplicatePatterns");o(Met,"findInvalidGroupType");o(Iet,"findModesThatDoNotExist");o(Oet,"findUnreachablePatterns");o(Pet,"tryToMatchStrToPattern");o(Bet,"noMetaChar");o(Fet,"usesLookAheadOrBehind");o(Kge,"addStartOfInput");o(Qge,"addStickyFlag");o(e1e,"performRuntimeChecks");o(t1e,"performWarningRuntimeChecks");o(r1e,"cloneEmptyGroups");o(n1e,"isCustomPattern");o($et,"isShortPattern");i1e={test:o(function(t){let e=t.length;for(let r=this.lastIndex;r<e;r++){let n=t.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return t.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};o(a1e,"checkLineBreaksIssues");o(zet,"buildLineBreakIssueMessage");o(s1e,"getCharCodes");o(kF,"addToMapOfArrays");Ty=256,ZC=[];o(Ru,"charCodeToOptimizedIndex");o(Get,"initCharCodeToOptimizedIndexMap")});function Gh(t,e){let r=t.tokenTypeId
...[truncated 26 chars]