Back to skill

Security audit

autodesk-clean-uninstall

Security checks for vulnerabilities and agentic risk

Overview

This skill is an Autodesk cleanup helper, but it can perform broad, irreversible Windows file and registry deletion with insufficient safeguards.

Review carefully before installing or running. Use only on a backed-up Windows system where you intend a full Autodesk removal, avoid the -Auto option, inspect every deletion target manually, and do not run elevated unless you understand the exact files and registry keys that will be removed.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:723
Finding
Unvalidated Parent Directory Discovery Enables Recursive Deletion of Unrelated Data<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 723–757 **Vulnerability Type**: Unvalidated destructive file-system operation **Risk Level**: High ### Vulnerable Code ```powershell # Phase 1: Environment scan Write-Host "[Phase 1] Environment scan..." -ForegroundColor Yellow $installed = Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*" | Where-Object { $_.DisplayName -match "autocad|autodesk" } foreach ($app in $installed) { if ($app.InstallLocation -and (Test-Path $app.InstallLocation)) { $global:autodeskDirs += $app.InstallLocation $global:autodeskDirs += Split-Path $app.InstallLocation -Parent } } @("$env:SystemDrive\Autodesk","${env:ProgramFiles}\Autodesk","$env:ProgramData\Autodesk", "$env:LOCALAPPDATA\Autodesk","$env:APPDATA\Autodesk") | ForEach-Object { if (Test-Path $_) { $global:autodeskDirs += $_ } } # Phase 2: Terminate processes Write-Host "[Phase 2] Terminate processes..." -ForegroundColor Yellow $procs = Get-Process | Where-Object { $_.ProcessName -match "autocad|autodesk|fusion|eagle" } if (@($procs).Count -gt 0 -and (Confirm-Action "Terminate $($procs.Count) processes?")) { $procs | Stop-Process -Force } # Phase 3: Stop services Write-Host "[Phase 3] Stop services..." -ForegroundColor Yellow $services = Get-Service | Where-Object { $_.DisplayName -match "autodesk|autocad|adsv" } if (@($services).Count -gt 0 -and (Confirm-Action "Stop $($services.Count) services?")) { $services | Stop-Service -Force -ErrorAction SilentlyContinue } # Phase 4: Delete directories Write-Host "[Phase 4] Delete directories..." -ForegroundColor Yellow $toDelete = $global:autodeskDirs | Sort-Object -Unique | Where-Object { Test-Path $_ } if (@($toDelete).Count -gt 0 -and (Confirm-Action "Delete $($toDelete.Count) directories?")) { foreach ($dir in $toDelete) { try { Remove-Item $dir -Recurse -Force -ErrorAction Stop Write-Host " [OK] ...[truncated 2353 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not automatically add the parent of `InstallLocation` to the deletion list. 2. Canonicalize every path with a trusted path-resolution API before evaluating or deleting it. 3. Maintain an explicit allowlist of Autodesk-owned roots and require each deletion target to be a descendant of an approved root. 4. Explicitly reject drive roots, user-profile roots, `Program Files`, `Program Files (x86)`, `ProgramData`, Windows directories, and other shared locations. 5. Validate directory ownership using multiple signals rather than relying only on a registry display-name match. 6. Detect and reject symbolic links, junctions, mount points, and other reparse points that could redirect recursive deletion. 7. Present every canonical path—not only the number of paths—for explicit confirmation. 8. Add a dry-run mode and create a deletion log before making changes. 9. Abort on validation errors rather than globally suppressing errors. 10. Prefer the vendor's supported uninstaller and remove only known residual directories afterward. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:779
Finding
File Association Keys Are Deleted Without Verifying Autodesk Ownership<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 779–783 **Vulnerability Type**: Overbroad registry deletion **Risk Level**: Medium ### Vulnerable Code ```powershell foreach ($ext in @('.dwg','.dwt','.dxf')) { if (Test-Path "HKCU:\SOFTWARE\Classes\$ext") { Remove-Item "HKCU:\SOFTWARE\Classes\$ext" -Force -ErrorAction SilentlyContinue } } ``` A similar deletion is present in the staged registry-cleanup implementation at lines 611–616. ### Technical Analysis The one-click cleanup script deletes the current user's `.dwg`, `.dwt`, and `.dxf` registry keys whenever they exist. It does not check whether the default value or registered handler belongs to AutoCAD or Autodesk. These extensions can legitimately be owned by another CAD application. Consequently, the cleanup can remove unrelated per-user file associations outside its declared Autodesk scope. This is inconsistent with the earlier display logic, which inspects association values before describing them as Autodesk-related. Global error suppression also hides deletion failures and makes it harder to determine the resulting registry state. ### Attack Path 1. A user has `.dwg`, `.dwt`, or `.dxf` associated with a non-Autodesk CAD application. 2. The user runs the one-click cleanup script. 3. The script tests only whether each extension key exists. 4. It deletes each existing key without validating the current handler. 5. Windows loses the user's legitimate file association, requiring manual repair or application re-registration. ### Impact Assessment The issue affects the current user's registry hive and can disrupt file-opening behavior for CAD files. It may remove associations configured by unrelated software, produce incorrect application-selection prompts, or require repair or reinstallation of the legitimate handler. The code acts with the current user's privileges and does not directly obtain elevated access. Its scope is normally limited to `HKCU`, but the ...[truncated 104 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Read the extension key's default value and resolve its ProgID before deletion. 2. Delete an association only when the ProgID or handler is conclusively owned by Autodesk. 3. Preserve associations belonging to other CAD applications. 4. Export affected registry keys before changing them and provide a documented rollback procedure. 5. Prefer removing only Autodesk-specific values or handlers instead of deleting the entire extension key. 6. Display the current handler and request per-association confirmation. 7. Remove blanket `SilentlyContinue` behavior and report whether each registry operation succeeded. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:706
Finding
Auto Mode Bypasses All Safety Confirmations for Destructive Operations<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 706–716 **Vulnerability Type**: Unsafe confirmation bypass **Risk Level**: Medium ### Vulnerable Code ```powershell param([switch]$Auto) $ErrorActionPreference = 'SilentlyContinue' $global:autodeskDirs = @() function Confirm-Action { param($Message) if ($Auto) { return $true } $result = Read-Host "$Message (Y/N)" return ($result -eq 'Y' -or $result -eq 'y') } ``` ### Technical Analysis Supplying `-Auto` causes every call to `Confirm-Action` to return true. This bypass applies to process termination, service stopping, recursive directory deletion, and registry cleanup. Automated execution is not inherently a vulnerability, but here it removes the principal safety control protecting irreversible operations. The risk is amplified by the unvalidated deletion-target discovery described above. The script also suppresses errors globally, reducing visibility into partial or unexpected execution. ### Attack Path 1. The script is invoked with the `-Auto` switch, either intentionally, through copied instructions, or by an automation wrapper. 2. `Confirm-Action` returns true without presenting individual targets for approval. 3. Matching processes are forcibly terminated and services are forcibly stopped. 4. Discovered directories are recursively deleted. 5. Autodesk-related registry keys and file-association keys are removed without further interaction. 6. If discovery data is malformed or overbroad, the destructive operations proceed without a final human validation opportunity. ### Impact Assessment The bypass permits unattended execution of all destructive functionality with the invoking process's privileges. Under an administrator account, this includes system-wide application directories, services, and `HKLM` registry data. It can therefore amplify accidental deletion, malicious registry manipulation, and operational disruption. The switch does not elevate privileges it ...[truncated 164 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove `-Auto` for destructive operations, or limit it to non-destructive scanning and reporting. 2. Require an explicit confirmation after displaying every canonical deletion and registry target. 3. For unattended use, require a pre-generated manifest containing exact approved targets and verify its integrity before execution. 4. Reject automated deletion of high-risk or shared directories regardless of command-line options. 5. Separate scanning and deletion into distinct invocations so users can review a persisted plan. 6. Require an additional explicit flag for each destructive category, such as file deletion, service stopping, and registry cleanup. 7. Use least privilege and request elevation only for narrowly scoped operations that require it. 8. Replace global error suppression with structured exception handling and auditable logs. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (4)

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill advertises step-by-step confirmation for dangerous actions, but the one-click script exposes an `-Auto` mode that suppresses those confirmations and proceeds with process termination, service stopping, file deletion, and registry cleanup. In an agent or automation context, this enables unattended destructive execution and increases the risk of accidental or overly broad system modification.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
There is a documented safety mismatch: the prose promises confirmation for each dangerous action, but the implementation includes an automatic mode that skips confirmations entirely. This is dangerous because users or calling agents may rely on the documentation's safety guarantees while the actual behavior permits silent destructive cleanup.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
---

## Step 1: Environment Scan (No Confirmation Required)

### Purpose
Before executing cleanup, comprehensively scan the system to **obtain actual installation paths from the registry** (not limited to standard Autodesk directories), and list all items to be cleaned. Ensures transparency before cleanup to avoid omissions.
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Scope Creep

Low
Category
Excessive Agency
Content
## Step 1: Environment Scan (No Confirmation Required)

### Purpose
Before executing cleanup, comprehensively scan the system to **obtain actual installation paths from the registry** (not limited to standard Autodesk directories), and list all items to be cleaned. Ensures transparency before cleanup to avoid omissions.

### Intelligent Discovery Logic
- Standard directories: `C:\Autodesk`, `C:\Program Files\Autodesk`, etc.
Confidence
84% confidence
Finding
The skill intentionally broadens cleanup beyond fixed Autodesk paths by harvesting installation locations from the registry and then deleting both those locations and their parent directories. That expansion can capture non-standard or shared directories, making accidental deletion of unrelated files more likely, especially when combined with unattended execution.

Static analysis

No suspicious patterns detected.