Back to skill

Security audit

Azure Content Understanding Layout

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but it can upload documents and send an Azure API key to endpoints that are not validated by the skill.

Review before installing. Use only with a trusted HTTPS Azure Content Understanding endpoint, avoid sensitive documents unless you intend to upload them to Azure, use a narrowly scoped/rotatable key, and be aware the current script does not validate the configured endpoint or polling URL before sending the key.

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

Error
Location
scripts/analyze.mjs:54
Finding

API Key and Document Disclosure Through Unvalidated Network Destinations

Content
View full analysis
= "2025-11-01" ? { inputs: [{ url: source.url }] } : { url: source.url }; res = await fetch(analyzeUrl, { method: "POST", headers: { "Content-Type": "application/json", "Ocp-Apim-Subscription-Key": apiKey, }, body: JSON.stringify(body), }); } else { // Binary data from stdin res = await fetch(analyzeUrl, { method: "POST", headers: { "Content-Type": "application/octet-stream", "Ocp-Apim-Subscription-Key": apiKey, }, body: source.data, }); } if (res.status !== 202) { const text = await res.text(); console.error(`Submit failed (${res.status}): ${text}`); exit(1); } const operationLocation = res.headers.get("operation-location"); const body = await res.json(); return { operationLocation, id: body.id }; } async function pollResult(operationLocation, apiKey) { for (let i = 0; i < MAX_POLL_ATTEMPTS; i++) { await sleep(POLL_INTERVAL_MS); const res = await fetch(operationLocation, { headers: { "Ocp-Apim-Subscription-Key": apiKey }, }); const data = await res.json(); if (data.status === "Succeeded") return data; if (data.status === "Failed") { console.error("Analysis failed:", JSON.stringify(data, null, 2)); exit(1); } process.stderr.write("."); } console.error("\nTimeout w ...[truncated 4089 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

md
node scripts/analyze.mjs --url "https://example.com/document.pdf"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 43)May include surrounding context.

md
node scripts/analyze.mjs --url "https://example.com/document.pdf"

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

md
node scripts/analyze.mjs --url "https://example.com/document.pdf"

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documents clear network interaction with an external Azure API, but it does not declare any tool scope such as permissions or allowed-tools. This creates a governance gap: an agent may invoke a network-capable skill without explicit policy constraints, increasing the chance of unintended outbound requests and data exfiltration through misconfiguration or misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description contains broad triggers such as extracting text from documents, converting PDFs/images to markdown, OCR, layout analysis, and table extraction. Overly general invocation language can cause the skill to be selected in situations where sensitive files are present, increasing the likelihood of unreviewed transmission of document contents to the external Azure service.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The skill explicitly instructs sending document URLs and potentially uploaded file contents to an external Azure endpoint using an API key. External transmission is the core function of the skill, but it remains security-relevant because users may unknowingly submit sensitive documents, and URL-based analysis can also expose internal or private resources if inputs are not constrained.

Content

Scanner excerpt · SKILL.md (reported line 60)May include surrounding context.

bash
# Submit analysis (preview API)
curl -s -X POST "$AZURE_CU_ENDPOINT/contentunderstanding/analyzers/prebuilt-layout:analyze?api-version=2025-05-01-preview" \
  -H "Ocp-Apim-Subscription-Key: $AZURE_CU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/doc.pdf"}'

Static analysis

No suspicious patterns detected.