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<![CDATA[ ## Vulnerability Details **File Location**: `server.js:20-81` **Vulnerability Type**: Missing authorization and improper path validation **Risk Level**: Critical ### Vulnerable Code ```javascript // REALPATH endpoint (GET /realpath?path=...) if (req.method === 'GET' && parsedUrl.pathname === '/realpath') { try { const filePath = parsedUrl.query.path; const fullPath = path.join(ENGINE_DIR, filePath); const realPath = fs.realpathSync(fullPath); const basename = path.basename(realPath); res.writeHead(200, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ basename })); } catch (error) { res.writeHead(500, { 'Content-Type': 'application/json' }); res.end(JSON.stringify({ error: error.message })); } return; } // WRITE endpoint (POST /write) if (req.method === 'POST' && parsedUrl.pathname === '/write') { let body = ''; req.on('data', chunk => { 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
<![CDATA[ ## Remediation Suggestions 1. Bind the service explicitly to `127.0.0.1` or a Unix-domain socket. 2. Generate a cryptographically random authorization token for every launch and require it on all privileged endpoints. 3. Reject requests with untrusted `Origin` or `Host` headers and implement CSRF protection. 4. Remove the generic file-read and file-write APIs. Use an explicit allowlist containing only the selected Markdown document. 5. Canonicalize both the allowed root and requested target before access. Use `path.resolve`, `fs.realpath`, and `path.relative` rather than string-prefix comparisons. 6. Reject a target when the relative path is absolute, equals `..`, or begins with `..${path.sep}`. 7. Reject symbolic links or open files using platform protections that prevent symlink following where available. 8. Prevent the document-editing endpoint from writing engine code, HTML, JavaScript, shell scripts, or files outside a dedicated content directory. 9. Perform intended updates atomically using a temporary file, validation, backup, and rename. 10. Run the service under a dedicated low-privilege account with filesystem access limited to the selected document. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
index.html:144
Finding
Destructive permission check truncates the selected Markdown file<![CDATA[ ## Vulnerability Details **File Location**: `index.html:144-156` **Vulnerability Type**: Destructive file operation disguised as a permission check **Risk Level**: High ### Vulnerable Code ```javascript // Check file write permissions and show SIGNOFF banner async function checkAndShowSignoffBanner(mdPath) { try { // Test write access with empty write (no actual change) const testResponse = await fetch('/write', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ path: mdPath, content: '' }) }); const canWrite = testResponse.ok; ``` The receiving endpoint performs the following operation in `server.js:50`: ```javascript fs.writeFileSync(fullPath, content, 'utf8'); ``` ### Technical Analysis The comment claims that the request tests write access with “no actual change.” In reality, `fs.writeFileSync` with an empty string opens the target for writing and truncates its existing contents to zero bytes. The function is reached from the diagram-claiming workflow when the detected phase is `Ready to approve`. Consequently, a normal viewer action can erase the selected contract file without a warning, backup, confirmation, or rollback mechanism. ### Attack Path 1. A Markdown document without an existing generated title is opened in the viewer. 2. The document's Mermaid class state is detected as `Ready to approve`. 3. The viewer first claims or updates the document. 4. `checkAndShowSignoffBanner(mdPath)` sends the target path to `/write` with an empty `content` value. 5. The server executes `fs.writeFileSync` and replaces the document contents with an empty string. 6. Hot reload subsequently observes an empty document, while the original contract data has already been lost. ### Impact Assessment The selected Markdown contract can be destroyed in its entirety. Any notes, decisions, diagrams, or embedded project requirements stored ...[truncated 247 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the empty-content write operation immediately. 2. Test access on the server with `fs.accessSync(target, fs.constants.W_OK)` when only a permission indication is needed. 3. If directory-level write capability must be tested, create a random temporary file in the target directory using exclusive creation, close it, and delete it. Never modify the target document. 4. Before any intentional document update, create a recoverable backup or retain the previous content. 5. Write updates to a temporary file and atomically rename it only after validation succeeds. 6. Require explicit user confirmation before the first modification to a selected document. 7. Return a dedicated permission-check response rather than inferring writability from a destructive write request. 8. Add regression tests asserting that permission checks leave the target's contents, size, timestamps, and checksum unchanged. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
index.html:274
Finding
Stored browser script execution through unsanitized Markdown and frontmatter<![CDATA[ ## Vulnerability Details **File Location**: `index.html:274-310` **Vulnerability Type**: Stored cross-site scripting through unsafe HTML rendering **Risk Level**: High ### Vulnerable Code ```javascript // Render frontmatter table (if exists) let frontmatterHTML = ''; if (frontmatter) { frontmatterHTML = '<table class="frontmatter-table"><tbody>'; for (const [key, value] of Object.entries(frontmatter)) { frontmatterHTML += `<tr><th>${key}</th><td>${value}</td></tr>`; } frontmatterHTML += '</tbody></table>'; } // 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
<![CDATA[ ## Remediation Suggestions 1. Configure the Markdown renderer to reject or escape raw HTML. 2. Sanitize the generated HTML with a maintained sanitizer before assigning it to the DOM. 3. Configure the sanitizer to remove scripts, event-handler attributes, dangerous URL schemes, embedded frames, active SVG, forms, and other executable content. 4. Build the frontmatter table with DOM APIs and assign keys and values through `textContent`; do not interpolate them into HTML strings. 5. Apply a restrictive Content Security Policy, including a nonce-based `script-src`, no `unsafe-inline`, `object-src 'none'`, and tightly restricted `connect-src`, `img-src`, and `frame-src`. 6. Separate document rendering from file modification by serving them from different origins and requiring authenticated, narrowly scoped write requests. 7. Validate Mermaid input and retain Mermaid's strict security mode. 8. Add security tests using event-handler payloads, raw script tags, dangerous links, malformed SVG, and hostile frontmatter. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
server.js:34
Finding
Unbounded request-body buffering permits denial of service<![CDATA[ ## Vulnerability Details **File Location**: `server.js:34-37` **Vulnerability Type**: Unrestricted memory allocation from an HTTP request **Risk Level**: Medium ### Vulnerable Code ```javascript // WRITE endpoint (POST /write) if (req.method === 'POST' && parsedUrl.pathname === '/write') { let body = ''; req.on('data', chunk => { 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
<![CDATA[ ## Remediation Suggestions 1. Define a small maximum request size appropriate for Markdown documents. 2. Track received bytes during the `data` event and return HTTP 413 when the limit is exceeded. 3. Destroy or drain the connection immediately after rejecting an oversized request. 4. Validate `Content-Length` when present, while retaining streaming byte-count enforcement because that header is not trustworthy. 5. Configure `requestTimeout`, `headersTimeout`, and keep-alive limits. 6. Limit concurrent write requests and consider per-client rate limiting. 7. Parse the request using a bounded streaming parser rather than unrestricted string concatenation. 8. Authenticate the endpoint and bind the service to loopback to reduce exposure. ]]>
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.

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.

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.

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.

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.

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.

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.

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.

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.

Hidden Instructions

High
Category
Prompt Injection
Content
</head>
<body>
    <main class="container markdown-body">
        <!-- Markdown content renders here -->
    </main>

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

Description-Behavior Mismatch

High
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.

Missing User Warnings

High
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.

Description-Behavior Mismatch

High
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.

Missing User Warnings

High
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.

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
Content
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
Confidence
80% confidence
Finding
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Description-Behavior Mismatch

High
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.

Intent-Code Divergence

High
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.

Lp3

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.

Context-Inappropriate Capability

Medium
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.

Missing User Warnings

Medium
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.

Context-Inappropriate Capability

Medium
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.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
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]
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.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
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]
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.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
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]
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.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
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]
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.

Static analysis

No suspicious patterns detected.