Back to skill

Security audit

bark-push

Security checks for vulnerabilities and agentic risk

Overview

This Bark notification skill is mostly purpose-aligned, but it quietly reads a parent USER.md file for a Bark key and sends notification content and the key to an external service with limited disclosure.

Install only if you are comfortable with the skill reading a Bark key from the environment and, if absent, from a parent USER.md file. Avoid sending sensitive content in notification messages, and prefer a version that removes the USER.md fallback or clearly scopes and documents any file-based secret source.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
push.js:12
Finding

Undocumented Access to an External User Configuration File

Content
View full analysis
{ https.get(fullUrl, (res) => { ``` ### Technical Analysis When the `BARK_KEY` environment variable is absent, the Skill constructs a path two directories above its own installation directory and reads the entire `USER.md` file. This crosses the Skill's local directory boundary and accesses user or agent configuration that is not required to be stored within the Skill. The behavior is not disclosed in `SKILL.md`, which states that the key is read from the `BARK_KEY` environment variable when omitted. Although the current implementation only extracts text matching a Bark key pattern, `fs.readFileSync` first loads the complete external file into the process. This violates least-privilege principles and increases the exposure of unrelated information contained in that file. The extracted key is then placed in the path component of an HTTPS URL sent to `api.day.app`. HTTPS protects the request in transit, but URL paths may still be visible to the destination service and may be retained by application, proxy, monitoring, or diagnostic logs. ### Attack Path 1. A user or agent invokes `push.js` without defining the `BARK_KEY` environment variable. 2. `getBarkKey()` resolves `../../USER.md` relative to ...[truncated 1553 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior does not fully match the actual capability set: the finding indicates secret retrieval from environment and local USER.md, nonstandard CLI-triggered execution, and hard process exit behavior. This mismatch is dangerous because reviewers and users may approve a simple notification skill while it actually reads local files/secrets and behaves outside the declared interface, undermining trust and enabling covert data access.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill declares code/runtime requirements and appears to access environment variables, but it does not declare any explicit tool scope or permissions boundary. This is dangerous because secrets such as BARK_KEY may be accessed implicitly without clear user visibility or policy enforcement, increasing the chance of unintended secret exposure or over-privileged execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation does not warn that message content is transmitted to an external Bark service. This creates a data-handling risk because users may send sensitive prompts, tokens, or personal data assuming the skill is local-only, resulting in unintended disclosure to a third-party notification endpoint.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill retrieves the Bark credential not only from an explicit environment variable but also by reading and parsing a higher-level local file (USER.md). That expands secret access beyond the stated push-notification function and can cause unintended credential harvesting from unrelated local configuration, especially in an agent ecosystem where skills should use only declared inputs or scoped secrets.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

The skill transmits user-supplied message content and the Bark key to an external service at api.day.app. External transmission is expected for a push skill, but it still creates a real data-exposure boundary: sensitive message content or credentials may be sent off-host, and the credential is embedded in the request path where it may be captured by logs, proxies, or monitoring systems.

Content

Scanner excerpt · push.js (reported line 36)May include surrounding context.

js
process.exit(1);
  }

  const fullUrl = `https://api.day.app/${key}/${encodeURIComponent(title)}/${encodeURIComponent(message)}`;
  
  console.log(`正在从本地配置加载 Key 并推送至 Bark...`);

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The natural-language description and user-facing documentation are entirely in Chinese, which can impose a language constraint on users without opt-in. The policy requires either offering a language/locale choice or clearly documenting and justifying the locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file's user-facing comments and runtime messages are entirely in Chinese, including error and status output such as the configuration error and push-status logs. This imposes a specific language on users without any opt-in or documented locale justification, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.