Back to skill

Security audit

Macvital

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Mac health monitor, but it can invoke sudo automatically for temperature collection without a clearly separated opt-in path.

Review this skill before installing. It appears intended for local Mac diagnostics and does not show exfiltration, destructive behavior, remote payloads, or persistence, but users should be comfortable with a monitoring script that runs shell commands and may attempt sudo for temperature data. Prefer using non-temperature status/check modes unless elevated temperature collection is explicitly desired.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (9)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill invokes shell commands (python3 scripts/macvital.py ...) but does not declare any permissions or allowed-tools scope. That creates an authorization gap where an agent or platform may execute shell-capable behavior without an explicit, reviewable tool boundary, increasing the risk of unintended command execution or overbroad access.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
78% confidence
Finding

The documentation explicitly instructs use of sudo to run the temperature command, which elevates execution to root. Even if intended for legitimate hardware monitoring, encouraging privileged execution increases the blast radius if the script is modified, its path is hijacked, or an agent runs it in an unsafe context.

Content

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

md
# Temperature only (more accurate with sudo)
python3 scripts/macvital.py temp
sudo python3 scripts/macvital.py temp

# Exit code check (for scripting: 0=ok, 1=warn, 2=critical)
python3 scripts/macvital.py check

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
90% confidence
Finding

The helper executes string commands with shell=True, which is dangerous because any future caller that passes untrusted input will gain shell injection capabilities. In this file, get_disk(path='/') already interpolates a parameter into a shell command, so the pattern is not merely theoretical and creates a real command-injection sink if path becomes user- or agent-controlled.

Content

Scanner excerpt · scripts/macvital.py (reported line 37)May include surrounding context.

python
def run(cmd, timeout=10):
    try:
        r = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout, shell=isinstance(cmd, str))
        return r.stdout.strip()
    except Exception:
        return ''

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

python
def get_temps():
    """Get thermal info. Die temps need sudo; pressure state is always available."""
    temps = {}

    # Thermal pressure state (no sudo needed) via notarization

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/macvital.py (reported line 139)May include surrounding context.

python
"""Get thermal info. Die temps need sudo; pressure state is always available."""
    temps = {}

    # Thermal pressure state (no sudo needed) via notarization
    try:
        # macOS thermal pressure: 0=nominal, 1=fair, 2=serious, 3=critical
        ioreg_out = run(

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/macvital.py (reported line 294)May include surrounding context.

python
"""Get thermal info. Die temps need sudo; pressure state is always available."""
    temps = {}

    # Thermal pressure state (no sudo needed) via notarization
    try:
        # macOS thermal pressure: 0=nominal, 1=fair, 2=serious, 3=critical
        ioreg_out = run(

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

This line executes sudo powermetrics directly from the skill, causing an implicit privileged action during routine telemetry collection. Even if command injection is not present in this exact call, automatically invoking sudo is risky in agent workflows because it can expand privileges unexpectedly and alter trust assumptions for a simple monitoring tool.

Content

Scanner excerpt · scripts/macvital.py (reported line 155)May include surrounding context.

python
pass

    # Try powermetrics for actual die temps (requires sudo)
    pm_out = run('sudo powermetrics -n 1 -i 500 --samplers cpu_power 2>/dev/null', timeout=8)
    if pm_out:
        cpu_match = re.search(r'CPU die temperature:\s+([\d.]+)', pm_out)
        gpu_match = re.search(r'GPU die temperature:\s+([\d.]+)', pm_out)

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill automatically attempts to invoke sudo powermetrics during a general health check, which expands its privilege boundary beyond the stated quick diagnostic purpose. In an agent setting, unexpected privileged execution can trigger password prompts, fail unpredictably, or normalize running monitoring tools with elevated rights, increasing operational and security risk.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The code comment suggests sudo is merely an external requirement, but the implementation proactively runs a sudo command itself. This mismatch is dangerous because it can mislead reviewers and downstream agents about the actual privilege behavior of the skill, reducing transparency around elevated operations.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.