Back to skill

Security audit

彩票开奖核对推送

Security checks for vulnerabilities and agentic risk

Overview

The scanners report a lottery-checking skill that sends notifications through Bark and has risks around privacy claims, credential handling, and suggested scheduled runs, so its verdict is suspicious.

Treat this as a review decision rather than a finding of malicious intent. Before installing, consider whether you are comfortable sending notification data and a device key through Bark, whether the privacy statement accurately describes that, and whether optional scheduled runs and the reported credential exposure risks are acceptable. The skillspector scan was partial because two local references could not be resolved, so evidence is incomplete.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (9)

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · README.md (reported line 12)May include surrounding context.

md
**本技能的推送只走 Bark 一个通道**,不接微信、不接 Server酱。使用前你需要:

1. 装 Bark App —— iPhone 在 App Store 搜「Bark」;安卓可用 Bark 官方安卓版或兼容服务;
2. 拿到自己的 device_key —— 打开 Bark 首页,推送地址形如 `https://api.day.app/AbCdEf12/`,中间那段就是;
3. 把它放进环境变量 `BARK_DEVICE_KEY`,或写进 `~/.lottery/config.json`。

没有 Bark 也能用:`--dry-run` 只在本机打印核对结果,不推送。要收到手机通知则必须配置 key,缺 key 时脚本会直接报错退出。

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · SKILL.md (reported line 55)May include surrounding context.

python3 scripts/lottery_check.py

text

`device_key` 在 Bark App 首页的推送地址里(`https://api.day.app/XXXXXXXX/`)。多注守号用 `;` 分隔,如 `"03 04 11 12 13 28 + 01; 01 02 03 04 05 06 + 07"`。

## 参数

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 39)May include surrounding context.

每天自动跑

bash
# crontab -e
30 22 * * * BARK_DEVICE_KEY=你的Key /usr/bin/python3 /path/to/lottery_check.py >> ~/.lottery/run.log 2>&1

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The privacy statement incorrectly claims results do not pass through third-party servers, despite sending notifications through api.day.app.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The assertion that results pass through no third-party servers is misleading because the documented notification destination is the externally hosted api.day.app service. Users could authorize transmission of their chosen numbers and winnings under an incorrect privacy assumption; HTTPS does not hide the payload from the receiving service.

Content

No source excerpt is available for this finding.

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 · SKILL.md (reported line 24)May include surrounding context.

md
| 你需要准备 | 说明 |
|---|---|
| Bark App | iPhone 在 App Store 搜「Bark」安装;安卓可用 Bark 官方安卓版或自建兼容服务。装好打开首页即可看到推送地址 |
| device_key | 推送地址形如 `https://api.day.app/AbCdEf12/`,中间的 `AbCdEf12` 就是你的 device_key。每人一个,互不影响 |
| 网络 | 只往 `api.day.app` 发一条 HTTPS 请求,结果不经过任何第三方服务器 |

没有 Bark 也能跑:加 `--dry-run` 只在本机打印核对结果,不推送。**但要收到手机通知,必须先有 Bark 和自己的 device_key。** 缺少 key 时脚本直接报错退出,不会静默失败。

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

python
import urllib.request

# ===== 固定配置(版式与通道已定稿,勿改)=====
BARK_URL = "https://api.day.app/push"
LINK = "https://bark.day.app"
WJ = "\u2060"
DEFAULT_GROUP = "彩票"

Push-error logging can expose the Bark device key despite the explicit promise that logs are always redacted.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

If subprocess.run raises TimeoutExpired, its string representation includes the command arguments, including the JSON device key. The catch block returns that exception text and callers print it, potentially persisting the credential in cron logs despite the promise of redaction; curl's shorter timeout reduces but does not eliminate this failure path.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
97% confidence
Finding

The subprocess uses an argument list without a shell, so this is not shell-command injection. However, the complete JSON payload, including the Bark device key, is passed as a curl command-line argument, exposing it to process inspection by principals permitted to read those arguments.

Content

Scanner excerpt · scripts/lottery_check.py (reported line 252)May include surrounding context.

python
data = json.dumps(payload, ensure_ascii=False)
    try:
        p = subprocess.run(["curl", "-sS", "--max-time", "20", "-X", "POST",
                            BARK_URL, "-H", "Content-Type: application/json",
                            "-d", data], capture_output=True, text=True, timeout=30)
        out = p.stdout.strip()