Back to skill

Security audit

Bark Push

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Bark notification helper, but it needs review because it can send user content to a third-party service and has avoidable credential-handling and shell payload-safety issues.

Review this before installing if you will use it from automated workflows or with sensitive task data. Prefer explicit user confirmation before each send, do not put secrets or private records in notification text, avoid printing or passing the Bark key on the command line, and prefer the Node implementation or a JSON-safe shell rewrite for untrusted notification content.

Vulnerability Patterns
  • 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
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/bark-send.sh:108
Finding

Bark Device Key Exposed Through Command-Line Arguments and Troubleshooting Output

Content
View full analysis
&1) ``` The documentation also recommends printing the credential directly: ```bash 1. 检查 BARK_KEY 是否正确: `echo $BARK_KEY` ``` ### Technical Analysis The Bark device key acts as an authorization credential because anyone possessing it can submit push notifications for the associated Bark device. The shell implementation places this key inside `FULL_URL`, which is passed to `curl` as a command-line argument. While `curl` is running, local users or monitoring software with sufficient process visibility may be able to inspect the URL through process listings, process telemetry, shell tracing, audit logs, or debugging tools. Supplying the key through `-k` creates an additional exposure because the key is already present in the shell script's own process arguments. The troubleshooting documentation compounds the issue by recommending `echo $BARK_KEY`, which can disclose the key through terminal recording, shell-session capture, CI logs, support transcripts, or screen sharing. The request uses HTTPS, so this finding does not imply that the key is transmitted in plaintext over the network. The exposure occurs locally and in operational logs. ### Attack Path 1. A user invokes the shell script with `BARK_KEY` configured or supplies the key through `-k`. 2. The script embeds the key in `https://api.day.app/${DEVICE_KEY}`. 3. The complete URL is passed as an argument to the `curl` process. 4. A local observer, process-monitoring agent, or log collector captures ...[truncated 829 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/bark-send.sh:140
Finding

Unsafe JSON Construction Allows Payload Field Injection

Content
View full analysis
Remediation
View remediation
&2 exit 1 fi JSON_PAYLOAD=$( jq -n \ --arg title "$TITLE" \ --arg body "$BODY" \ --arg subtitle "$SUBTITLE" \ --arg sound "$SOUND" \ --arg url "$URL" \ --arg group "$GROUP" \ --arg level "$LEVEL" \ --arg image "$IMAGE" \ --arg badge "$BADGE" \ '{ title: $title, body: $body } + (if $subtitle != "" then {subtitle: $subtitle} else {} end) + (if $sound != "" then {sound: $sound} else {} end) + (if $badge != "" then {badge: ($badge | tonumber)} else {} end) + (if $url != "" then {url: $url} else {} end) + (if $group != "" then {group: $group} else {} end) + (if $level != "" then {level: $level} else {} end) + (if $image != "" then {image: $image} else {} end)' ) ``` 4. Remove the separately assembled `QUERY_PARAMS` unless it is required. It duplicates fields already present in the JSON body and is also assembled without URL encoding. 5. Add regression tests covering quotation marks, backslashes, Unicode, multiline content, empty optional values, invalid badge values, and ...[truncated 33 chars]
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (15)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill documents use of environment variables and shell commands but does not declare any tool scope or allowed-tools boundary. In an agent environment, missing explicit permissions can cause the skill to be invoked with broader-than-intended capabilities, increasing the chance of unauthorized shell execution or secret access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad and map to common language like 'send a notification' or 'push to phone,' which makes accidental or overly permissive invocation more likely. In an agent setting, that can cause unintended transmission of user content to the external Bark service without a sufficiently specific user request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documentation instructs sending notification content to the Bark API but does not clearly warn that titles, bodies, URLs, and related metadata will leave the local environment and be transmitted to a third party. This creates a real risk of users or downstream agents exfiltrating sensitive information without informed consent.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

Referencing the Bark API endpoint establishes that the skill depends on an external network service and will transmit data outside the local trust boundary. In this context, the danger is not the endpoint string itself but the undocumented data flow and potential for sensitive notification content to be sent externally.

Content

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

md
### 1. 环境变量配置

Bark API endpoint: `https://api.day.app/{device_key}`

Device key 可以从以下环境变量读取 (按优先级):
1. `BARK_KEY`

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

This section explicitly shows using curl to send notification payloads to the external Bark endpoint, meaning arbitrary message content can be transmitted off-system. In the context of an agent skill, that is a genuine data-exfiltration channel if user data, secrets, or task outputs are inserted into the notification body.

Content

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

-t "提醒" -b "时间到了" -s alarm

text

### 方式三:直接使用 curl

```bash
# 简单推送

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

The example curl command embeds the device key in a URL and sends content directly to Bark, creating a straightforward outbound channel. Besides external transmission, placing secrets in command lines and URLs can expose them through shell history, logs, or process listings in some environments.

Content

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

bash
# 简单推送
curl "https://api.day.app/$BARK_KEY/标题/内容"

# 带参数
curl -X POST "https://api.day.app/$BARK_KEY" \

External Transmission

Medium
Category
Data Exfiltration
Confidence
98% confidence
Finding

The POST example sends structured notification data, including title, body, and metadata, to a third-party API over the network. This is a valid skill function, but without explicit guardrails it becomes a convenient exfiltration path for sensitive task data in an agent workflow.

Content

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

md
curl "https://api.day.app/$BARK_KEY/标题/内容"

# 带参数
curl -X POST "https://api.day.app/$BARK_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "标题",

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/bark-send.js (reported line 156)May include surrounding context.

js
if (options.image) payload.image = options.image;

// Build API URL
const apiUrl = new URL(`https://api.day.app/${options.key}`);

// Send request
const postData = JSON.stringify(payload);

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

The hardcoded remote endpoint shows that the skill is designed to send data to api.day.app, an external service outside the local trust boundary. While expected for push notifications, this is still security-relevant because an agent can use the skill to export potentially sensitive information to a user-controlled device or third-party infrastructure.

Content

Scanner excerpt · scripts/bark-send.sh (reported line 117)May include surrounding context.

sh
fi

# Build request URL
API_URL="https://api.day.app/${DEVICE_KEY}"

# Build query string
QUERY_PARAMS=""

External Transmission

Medium
Category
Data Exfiltration
Confidence
89% confidence
Finding

The script transmits user-supplied title, body, URL, image, group, subtitle, and the device key to an external third-party service via curl. In the context of an agent skill, this creates an exfiltration channel: sensitive prompts, secrets, or internal data could be pushed off-system to a remote iPhone without strong validation, consent, or content restrictions.

Content

Scanner excerpt · scripts/bark-send.sh (reported line 174)May include surrounding context.

sh
fi

# Send request
RESPONSE=$(curl -s -X POST "$FULL_URL" \
    -H 'Content-Type: application/json' \
    -d "$JSON_PAYLOAD" 2>&1)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

Large parts of the operational instructions are written in Chinese, while the top-level metadata and description are in English. This creates a language-policy issue because the skill effectively assumes a specific language without telling the user or offering an alternative.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code file contains user-facing natural-language strings such as "Click跳转URL" and example titles/bodies entirely in Chinese, but it does not indicate that the skill is region-specific or offer an alternate language/localization choice. That can conflict with language/locale policy expectations for general-purpose skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The help text mixes English with Chinese-only user-facing examples such as "Click跳转URL", "标题", "内容", and "提醒". This creates a natural-language locale bias in the skill's interface and documentation without stating that the tool is intended only for Chinese-speaking users or offering an opt-in language choice.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified with a caret range (^1.6.0), which allows installation of newer minor/patch releases without explicit review or lockstep control. In a security-sensitive automation skill that sends outbound network requests, this weakens supply-chain reproducibility and can silently introduce vulnerable or malicious dependency updates.

Content

Scanner excerpt · scripts/package.json (reported line 10)May include surrounding context.

json
"send": "node bark-send.js"
  },
  "dependencies": {
    "axios": "^1.6.0"
  }
}

Unverifiable Dependency: axios has 16 known advisory(ies) (CVE-2026-44494 (axios Vulnerable to Full Man-in-the-Middle via Prototype Pollution Gadget in `co); CVE-2026-44495 (axios Vulnerable to Credential Theft and Response Hijacking via Prototype Pollut); CVE-2025-62718 (Axios has a NO_PROXY Hostname Normalization Bypass that Leads to SSRF) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
79% confidence
Finding

axios has multiple known advisories, and because the manifest uses a version range rather than an exact reviewed release, it is not possible to verify from this file alone whether the installed version is affected. In this skill, axios is likely used to send push notifications over the network, so dependency flaws could affect request integrity, proxy handling, or SSRF-related behavior depending on how the library is used elsewhere.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.