Back to skill

Security audit

privileged-operations

Security checks for vulnerabilities and agentic risk

Overview

This skill is a safety guide for visible, narrowly scoped Linux privilege elevation, not a hidden installer or execution payload.

Install only if you want the agent to follow structured guidance for Linux tasks that may need root. You should still review any proposed privileged command before approving the visible authentication prompt, especially for package changes, protected file edits, service changes, or destructive operations.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (29)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

sh
curl ... | pkexec sh
curl ... | sudo sh

If upstream documentation says the whole installer must run as root:

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

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

sh
curl ... | pkexec sh
curl ... | sudo sh

If upstream documentation says the whole installer must run as root:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
---
name: privileged-operations
description: Safely perform Linux tasks that may require root privileges. Keep work unprivileged by default. When root is genuinely required, make the exact privileged action and reason visible to the user, then elevate only that narrow operation through an interactive authentication path the user can see and control. Prefer pkexec on graphical desktops; use sudo or doas only when their prompt is genuinely visible to the user. Never ask for, capture, pipe, cache, or automate a user's password, and never silently fall back to hidden or broad root execution.
---

# Privileged Operations

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
---
name: privileged-operations
description: Safely perform Linux tasks that may require root privileges. Keep work unprivileged by default. When root is genuinely required, make the exact privileged action and reason visible to the user, then elevate only that narrow operation through an interactive authentication path the user can see and control. Prefer pkexec on graphical desktops; use sudo or doas only when their prompt is genuinely visible to the user. Never ask for, capture, pipe, cache, or automate a user's password, and never silently fall back to hidden or broad root execution.
---

# Privileged Operations

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
60% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
---
name: privileged-operations
description: Safely perform Linux tasks that may require root privileges. Keep work unprivileged by default. When root is genuinely required, make the exact privileged action and reason visible to the user, then elevate only that narrow operation through an interactive authentication path the user can see and control. Prefer pkexec on graphical desktops; use sudo or doas only when their prompt is genuinely visible to the user. Never ask for, capture, pipe, cache, or automate a user's password, and never silently fall back to hidden or broad root execution.
---

# Privileged Operations

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
---
name: privileged-operations
description: Safely perform Linux tasks that may require root privileges. Keep work unprivileged by default. When root is genuinely required, make the exact privileged action and reason visible to the user, then elevate only that narrow operation through an interactive authentication path the user can see and control. Prefer pkexec on graphical desktops; use sudo or doas only when their prompt is genuinely visible to the user. Never ask for, capture, pipe, cache, or automate a user's password, and never silently fall back to hidden or broad root execution.
---

# Privileged Operations

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
---
name: privileged-operations
description: Safely perform Linux tasks that may require root privileges. Keep work unprivileged by default. When root is genuinely required, make the exact privileged action and reason visible to the user, then elevate only that narrow operation through an interactive authentication path the user can see and control. Prefer pkexec on graphical desktops; use sudo or doas only when their prompt is genuinely visible to the user. Never ask for, capture, pipe, cache, or automate a user's password, and never silently fall back to hidden or broad root execution.
---

# Privileged Operations

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
---
name: privileged-operations
description: Safely perform Linux tasks that may require root privileges. Keep work unprivileged by default. When root is genuinely required, make the exact privileged action and reason visible to the user, then elevate only that narrow operation through an interactive authentication path the user can see and control. Prefer pkexec on graphical desktops; use sudo or doas only when their prompt is genuinely visible to the user. Never ask for, capture, pipe, cache, or automate a user's password, and never silently fall back to hidden or broad root execution.
---

# Privileged Operations

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

When a graphical polkit authentication agent is available, prefer:

sh
pkexec <program> <arguments...>

This keeps the authentication step separate from the agent and normally gives the user a desktop approval/password dialog.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

md
- ask the user to send their password in chat;
- read, store, log, echo, or capture a password;
- pipe a password to an elevation tool;
- use `sudo -S`;
- use `sshpass` or equivalent password automation for local root elevation;
- put a password in a command, script, environment variable, or temporary file;
- create passwordless privilege rules merely to avoid prompts;

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
75% confidence
Finding

The example pkexec /usr/bin/rm -- "$file" is presented as a quoting best practice, but in a privilege-focused skill it still normalizes privileged deletion driven by a variable rather than a concrete path. If an agent applies this pattern without strong validation of $file, symlink checks, path canonicalization, and target allowlisting, it could delete unintended protected files.

Content

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

Quote paths and variables, and use -- before path operands where supported:

sh
pkexec /usr/bin/rm -- "$file"

Do not trust a project-local executable merely because its name resembles a system program.