Back to skill

Security audit

Slack Print

Security checks for vulnerabilities and agentic risk

Overview

This skill is for Slack-to-printer workflows, but it delegates core behavior to unreviewed external helpers and exposes broader printer controls than its stated purpose needs.

Review before installing. Use only with a trusted local shared helper directory, a minimally scoped Slack token, a dedicated printer, and explicit user confirmation before printing or canceling jobs. Avoid using it on shared printers or channels that may contain sensitive files until the external helpers are bundled or verified and the admin commands are removed or gated.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Error
Location
slack_fetch_and_print.sh:15
Finding
Execution of Unverified Dependencies Outside the Skill Package<![CDATA[ ## Vulnerability Details **File Location**: `slack_fetch_and_print.sh`, lines 15–36 **Vulnerability Type**: Unverified external shell and Python dependencies **Risk Level**: High ### Vulnerable Code ```bash SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" DOWNLOADER="$SCRIPT_DIR/../shared/slack_downloader.py" INBOUND_DIR="${INBOUND_DIR:-$HOME/.openclaw/media/inbound}" PRINTER="${PRINTER:-}" mkdir -p "$INBOUND_DIR" if [ -z "$PRINTER" ]; then echo "Error: set the PRINTER environment variable to specify a printer, e.g.: PRINTER=MyPrinter ./slack_fetch_and_print.sh" echo "Available printers: $(lpstat -a 2>/dev/null | awk '{print $1}' | tr '\n' ' ')" exit 1 fi source "$SCRIPT_DIR/../shared/slack_args.sh" # Download files and collect successful paths DOWNLOADED=() while IFS= read -r line; do echo "$line" if [[ "$line" == SUCCESS:* ]]; then filepath="${line#SUCCESS: }" DOWNLOADED+=("$filepath") fi done < <(python3 "$DOWNLOADER" "${SLACK_ARGS[@]}" "$INBOUND_DIR") ``` ### Technical Analysis The script executes two dependencies located outside the audited Skill package: - `../shared/slack_args.sh` is loaded with `source`, which executes all of its commands in the current shell process. - `../shared/slack_downloader.py` is executed using Python with the invoking user's privileges. Neither dependency is bundled with the audited project, pinned to a known version, validated against a cryptographic digest, or checked for ownership and permissions before execution. The audit therefore cannot verify their network destinations, credential handling, file-selection logic, or other side effects. Using `source` creates a particularly broad trust boundary because the external shell file can modify variables and functions, alter shell behavior, replace commands, read accessible secrets, or directly execute arbitrary commands. The Python dependency can likewise perform any operation available to the invoking user ...[truncated 1958 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Bundle the required downloader and argument-processing implementation inside the reviewed Skill package. 2. Resolve dependency paths beneath the Skill directory and reject paths that escape that directory after canonicalization. 3. Pin dependency versions and validate them using cryptographic hashes or signed release metadata before execution. 4. Verify that dependency files are regular files owned by an expected trusted account and are not writable by untrusted users. 5. Avoid `source` for argument construction. Use a non-executable configuration format or invoke a constrained helper that returns validated structured data. 6. Validate every generated Slack argument against an explicit allowlist before passing it to the downloader. 7. Run network-facing download logic with reduced privileges and restrict outbound access to documented Slack endpoints. 8. Store downloaded files in a private directory with restrictive permissions, validate their type and size, and ensure returned paths remain within that directory before sending them to `lp`. 9. Document the required Slack permissions and use a minimally scoped token that can only read the intended channel and files. ]]>
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (4)

Vague Triggers

Medium
Confidence
94% confidence
Finding
The invocation guidance includes broad phrases like 'print the file from Slack' and similar natural-language variants, which may cause the skill to trigger in ambiguous contexts. Overbroad triggering increases the likelihood of unintended execution, especially when printing is a side-effecting action that can expose sensitive content or waste physical resources.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The skill's stated purpose is printing files uploaded to Slack, but the documentation also instructs the agent to print arbitrary text content and perform general printer operations. That broadens the capability from a narrow file-printing workflow into a more general print/administration interface, increasing the chance of misuse, accidental sensitive-data printing, or abuse of shared printer resources.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
Listing printers, checking queues/status, and canceling jobs are administration functions that are not necessary for printing Slack files. Exposing these commands through a user-invocable skill can enable disruption of other users' print jobs, information disclosure about shared printers and documents, and operational interference beyond the advertised scope.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The script automatically prints every successfully downloaded Slack file with no confirmation, preview, or allowlist checks. Because Slack content is user-controlled and printing is an irreversible physical-world action, a user or attacker who can cause a file to appear in the targeted channel can trigger unwanted printing, wasting paper/ink and potentially causing disclosure of sensitive content on a shared printer.

Static analysis

No suspicious patterns detected.