Back to skill

Security audit

mac-display-control

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent monitor-control guide, but it asks users to run an unverified remote installer and set persistent automation without enough safety guidance.

Review this skill before installing. Do not run the curl-to-bash Homebrew installer as written; use official Homebrew instructions or inspect and verify any installer first. Only create cron jobs if you want recurring display changes, and keep a note of how to list and remove them. Test monitor commands manually before binding them to shortcuts or scheduled jobs, especially factory reset, input switching, power, and color-gain changes.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:73
Finding

Unverified Remote Installer Downloaded and Executed Directly

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:171
Finding

AppleScript Injection Through Unvalidated Brightness Argument

Content
View full analysis
Remediation
View remediation
&2 exit 2 fi /usr/bin/osascript - "$value" <<'APPLESCRIPT' on run argv set requestedBrightness to (item 1 of argv) as real tell application "System Events" set brightness of (first screen of (get every screen)) to requestedBrightness end tell end run APPLESCRIPT ``` - Grant only the macOS Automation or Accessibility permissions that are necessary for the intended display action. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
references/volume.md:26
Finding

Predictable Shared Temporary File Used for Volume State

Content
View full analysis
&1 | grep -o '[0-9]*' | head -1) if [ "$CURRENT" -gt 0 ]; then echo $CURRENT > /tmp/display_last_volume /opt/homebrew/bin/m1ddc set volume 0 else LAST=$(cat /tmp/display_last_volume 2>/dev/null || echo 50) /opt/homebrew/bin/m1ddc set volume $LAST fi ``` ### Technical Analysis The script stores state at the fixed path `/tmp/display_last_volume`. Shared temporary directories are writable by other local users and processes. The script neither creates the file atomically nor verifies its owner, file type, permissions, or contents. A local attacker may pre-create the path, replace it with a symbolic link, or repeatedly modify its contents. The write operation can follow an attacker-selected link where platform protections permit it, while the read operation accepts attacker-controlled data. The unquoted `$LAST` expansion and absence of numeric range validation further weaken the state boundary, although `m1ddc` receives it as command arguments rather than through shell evaluation. ### Attack Path 1. A local attacker predicts the fixed `/tmp/display_last_volume` path. 2. Before the user runs the toggle script, the attacker creates or replaces that path with malicious content or a symbolic link. 3. When the current volume is nonzero, the script writes through the attacker-controlled path. 4. When the current volume is zero, the script reads attacker-controlled content and passes it to `m1ddc`. 5. This may manipulate restored volume state or overwrite another file writable by the invoking user if symbolic-link traversal is possible. ### Impact Assessment The primary impact is local tampering with the remembered display volume. In environments where symbolic-link protections do not prevent the operation, the wri ...[truncated 247 chars]
Remediation
View remediation
&1 | grep -o '[0-9]*' | head -1) if ! [[ "$CURRENT" =~ ^[0-9]+$ ]] || (( CURRENT < 0 || CURRENT > 100 )); then printf 'Unable to obtain a valid display volume\n' >&2 exit 1 fi if (( CURRENT > 0 )); then printf '%s\n' "$CURRENT" > "$state_file" chmod 600 -- "$state_file" /opt/homebrew/bin/m1ddc set volume 0 else LAST=50 if [[ -f "$state_file" && ! -L "$state_file" ]]; then candidate=$(cat -- "$state_file") if [[ "$candidate" =~ ^[0-9]+$ ]] && (( candidate >= 0 && candidate <= 100 )); then LAST="$candidate" fi fi /opt/homebrew/bin/m1ddc set volume "$LAST" fi ``` ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill’s invocation guidance is overly broad, telling the agent to use it whenever a user wants to control nearly any external display setting. Broad triggers can cause the skill to activate in contexts where shell commands, package installation, or automation setup were not explicitly requested, increasing the chance of unnecessary or unsafe operational guidance. In this skill’s context, that matters because later steps include package installation, scripting, and persistent automation changes.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
97% confidence
Finding

The skill recommends executing a remote installation script fetched with curl and piped into a shell. This is dangerous because it runs code obtained over the network without local review, making the user dependent on the integrity of the remote source, transport, and repository state at execution time. In this skill, the risk is amplified because the command is presented as a convenience step during setup, which can normalize unsafe execution patterns.

Content

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

md
> **Homebrew not installed?**
> ```bash
> /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
> ```

---

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The skill explicitly instructs users to edit crontab, introducing session persistence through scheduled jobs. Persistence mechanisms can outlive the immediate task, continue making system changes unattended, and be difficult for less technical users to notice or reverse. Although the scheduled actions here are display-related rather than privilege-escalating, persistence still increases operational and security risk.

Content

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

Use cron to switch display settings automatically at certain times:

bash
crontab -e
text

Unbounded Output

Medium
Category
Output Handling
Confidence
60% confidence
Finding

Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.

Content

Scanner excerpt · references/pow-and-misc.md (reported line 5)May include surrounding context.

Display Power (VCP 0xD6)

Turn the display panel on/off without cutting power to the device.

Apple Silicon (m1ddc)

bash

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill instructs users to create cron-based display-setting changes but does not clearly warn that these jobs will continue running automatically until removed. Persistent automation can surprise users, affect future sessions, and make later troubleshooting harder, especially if settings change at fixed times without obvious attribution. The impact is limited because the actions are local display controls, but the persistence risk is real.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This markdown file includes shell scripts that write display luminance and RGB gain values, changing monitor state directly. Although persistence is mentioned later in the Tips section, the script section itself does not warn users before presenting commands that alter hardware settings and persist across power cycles.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The section instructs changing the display's on-screen display language to English as the example action. This is a natural-language locale preference imposed without offering alternatives or explaining that it should only be done at the user's request.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.