Back to skill

Security audit

Fix Broken Links

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it says, but it automatically checks arbitrary URLs from project files and may send complete broken URLs to GitHub Copilot without redaction or a separate confirmation.

Review this carefully before installing in private repositories or CI. Use it only on trusted files, avoid running it where local or cloud metadata services are reachable, and avoid Copilot suggestions for URLs that may contain secrets, signed query strings, customer identifiers, or internal hostnames.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/link-fix.sh.txt:114
Finding

Unrestricted URL Validation Permits Blind SSRF and Sensitive URL Disclosure

Content
View full analysis
/dev/null } ``` The variation logic also constructs and requests alternate destinations, including an HTTPS-to-HTTP downgrade: ```bash find_variation() { local url="$1" scheme rest host path cand scheme="${url%%://*}" rest="${url#*://}" host="${rest%%/*}" if [ "$rest" = "$host" ]; then path=""; else path="/${rest#*/}"; fi local cands=() case "$scheme" in http) cands+=("https://${host}${path}") ;; https) cands+=("http://${host}${path}") ;; esac if [[ "$host" == www.* ]]; then cands+=("${scheme}://${host#www.}${path}") else cands+=("${scheme}://www.${host}${path}") fi if [ -n "$path" ] && [[ "$path" != */ ]] && [[ "${path##*/}" != *.* ]]; then cands+=("${url%/}/") fi for cand in "${cands[@]}"; do [ "$cand" = "$url" ] && continue [ "$(http_status "$cand")" = "200" ] && { printf '%s' "$cand"; return 0; } done return 1 } ``` Extracted URLs are automatically passed to the network request function: ```bash for url in "${urls[@]}"; do status="$(http_status "$url")" [ "$status" = "200" ] && continue printf ' BROKEN (%s) %s\n' "$status" "$url" alts="" [ "$HAVE_PARAMS" = "1" ] && alts="$(suggest_alts "$url" 6)" B_FILE+=("$file"); B_URL+=("$url"); B_STATUS+=("$status"); B_ALT+=("$alts") done ``` #### PowerShell implementation ```powershell function Get-HttpStatus { param([string]$Url) try { $resp = Invoke-WebRequest -Uri $Url -MaximumRedirection 5 -TimeoutSec $TIMEOUT ` -UserAgent $UA -ErrorA ...[truncated 4865 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/link-fix.sh.txt:182
Finding

Broken URLs Are Automatically Disclosed to GitHub Copilot

Content
View full analysis
/dev/null 2>&1 || return 0 prompt="In under $((AGENT_TIMEOUT - 5)) seconds, find up to ${max} working alternative URLs for the broken link ${url}. Hierarchically consider 1. Path and/or page spelling; 2. web.archive.org/wayback; 3. Redirects using redirect destination; 4. The context of the link's text; in order to resolve. Output only the URLs. One per line, and no: prose, numbering, markdown, backticks, special characters, post formatting." # FIX_BROKEN_LINKS_AGENT marks the child run so a re-entrant hook exits early. out="$(FIX_BROKEN_LINKS_AGENT=1 $AGENT_RUN copilot -p "$prompt" \ -s --no-color --model "$AGENT_MODEL" --available-tools 2>/dev/null)" # If copilot errored, timed out, or produced nothing, offer no alternatives. [ $? -eq 0 ] && [ -n "$out" ] || return 0 printf '%s\n' "$out" \ | grep -oiE 'https?://[^][:space:]"'\''<>)]+' \ | sed -E 's/[.,;:]+$//' \ | awk -v bad="$url" 'tolower($0) != tolower(bad) && !seen[tolower($0)]++' \ | head -n "$max" } ``` #### PowerShell implementation ```powershell function Get-AgentAlts { param([string]$Url,[int]$Max) if (-not (Get-Command copilot -ErrorAction SilentlyContinue)) { return @() } $snappy = $AGENT_TIMEOUT - 5 $prompt = "In under $snappy seconds, find up to $Max working alternative URLs for the broken link $Url. Hierarchically consider 1. Path and/or page spelling; 2. web.archive.org/wayback; 3. Redirects using redirect destination; 4. The context of the link's text; in order to resol ...[truncated 4244 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill explicitly instructs users to run shell and PowerShell scripts, but the manifest declares no tool scope or allowed-tools restrictions. That creates a least-privilege gap: an agent may invoke shell capabilities more broadly than intended, and because the skill processes repository files and optionally calls external networked tools, the missing scope increases the chance of unsafe execution or unintended command use.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill goes beyond local broken-link scanning by delegating URL discovery to an external Copilot agent and explicitly asking it to consider Wayback/archive and contextual alternatives. This expands the trust boundary: file-derived URLs are sent to another model/process, and its unverified suggestions can drive automated or semi-automated edits, creating a supply-chain style integrity risk and possible data leakage about repository contents or targets being edited.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The comments state there are 'no web fetches' or 'archive lookups on our side,' but the prompt instructs the downstream agent to use Wayback/archive resolution and broader contextual discovery. That mismatch is dangerous because it can mislead reviewers and users about the skill's actual behavior and privacy/security posture, reducing informed consent around external data sharing and non-deterministic link replacement.

Content

No source excerpt is available for this finding.