Back to skill

Security audit

macos-security-scan

Security checks for vulnerabilities and agentic risk

Overview

This skill performs a local macOS security check and saves a local report; its sensitive reads and optional sudo use are purpose-aligned and disclosed.

Install this only if you are comfortable with a local scanner inventorying sensitive Mac security details and saving them to ~/Desktop/security_report.md. Use the sudo mode only when you want deeper read access, and avoid sharing the generated report publicly because it can reveal private system and app information.

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
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes shell execution and writes a report file to the user's Desktop, but it does not declare a clear, restrictive tool scope such as allowed tools or explicit write boundaries. That makes the actual execution capability broader than the metadata communicates, increasing the risk of unintended command execution or file writes if the script or invocation is changed later.

Content

No source excerpt is available for this finding.

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 16)May include surrounding context.

md
compatibility:
  os: macOS 12 (Monterey) or later
  tools: bash, python3 (built-in on macOS)
  permissions: Standard user account (some checks need sudo for full results)
---

# macOS Security Scan Skill

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 38)May include surrounding context.

md
compatibility:
  os: macOS 12 (Monterey) or later
  tools: bash, python3 (built-in on macOS)
  permissions: Standard user account (some checks need sudo for full results)
---

# macOS Security Scan Skill

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 39)May include surrounding context.

md
compatibility:
  os: macOS 12 (Monterey) or later
  tools: bash, python3 (built-in on macOS)
  permissions: Standard user account (some checks need sudo for full results)
---

# macOS Security Scan Skill

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 · scripts/scan.py (reported line 282)May include surrounding context.

python
compatibility:
  os: macOS 12 (Monterey) or later
  tools: bash, python3 (built-in on macOS)
  permissions: Standard user account (some checks need sudo for full results)
---

# macOS Security Scan Skill

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 · scripts/scan.py (reported line 395)May include surrounding context.

python
compatibility:
  os: macOS 12 (Monterey) or later
  tools: bash, python3 (built-in on macOS)
  permissions: Standard user account (some checks need sudo for full results)
---

# macOS Security Scan Skill

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 · scripts/scan.py (reported line 451)May include surrounding context.

python
compatibility:
  os: macOS 12 (Monterey) or later
  tools: bash, python3 (built-in on macOS)
  permissions: Standard user account (some checks need sudo for full results)
---

# macOS Security Scan Skill

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
50% confidence
Finding

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

Content

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

md
compatibility:
  os: macOS 12 (Monterey) or later
  tools: bash, python3 (built-in on macOS)
  permissions: Standard user account (some checks need sudo for full results)
---

# macOS Security Scan Skill

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script claims to be read-only, but it writes a detailed security report to disk by default. That report can contain sensitive hostnames, process names, login items, network connections, privacy permissions, and installed software, creating a local confidentiality risk and violating user expectations.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation says the script never modifies the system, but the code creates parent directories and writes a report file. While not destructive, this is still a filesystem modification and is especially problematic in a security-scanning tool where users may rely on strict non-modification guarantees.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/scan.py (reported line 16)May include surrounding context.

python
import json
import os
import platform
import plistlib
import re
import socket
import subprocess

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/scan.py (reported line 163)May include surrounding context.

python
import json
import os
import platform
import plistlib
import re
import socket
import subprocess

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/scan.py (reported line 165)May include surrounding context.

python
import json
import os
import platform
import plistlib
import re
import socket
import subprocess

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/scan.py (reported line 166)May include surrounding context.

python
import json
import os
import platform
import plistlib
import re
import socket
import subprocess

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/scan.py (reported line 171)May include surrounding context.

python
import json
import os
import platform
import plistlib
import re
import socket
import subprocess

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/scan.py (reported line 177)May include surrounding context.

python
import json
import os
import platform
import plistlib
import re
import socket
import subprocess

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/scan.py (reported line 74)May include surrounding context.

python
if use_sudo:
        cmd = ["sudo", "-n"] + cmd
    try:
        r = subprocess.run(
            cmd, capture_output=True, text=True, timeout=timeout
        )
        return r.stdout.strip(), r.stderr.strip(), r.returncode

Session Persistence

Medium
Category
Rogue Agent
Confidence
75% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/scan.py (reported line 190)May include surrounding context.

python
icon = "🚨" if suspicious else "  "
            lines.append(f"  {icon} `{item['label']}`{run_label}")
            lines.append(f"       Program: `{item['program']}`")
            lines.append(f"       Plist:   `{item['path']}`")
    return "\n".join(lines)

Static analysis

No suspicious patterns detected.