扫描报告
25 /100
imap-idle-watcher
Real-time email monitoring using IMAP IDLE with systemd service integration and user-defined command triggers
A legitimate IMAP IDLE email watcher that requires explicit user configuration; shell command execution is not explicitly declared in SKILL.md and uses plaintext credential storage, but no malicious behavior or hidden exfiltration is present.
可以安装
Declare shell:WRITE in SKILL.md capabilities. Consider encrypting stored credentials or using a secrets manager instead of plaintext env files at /etc/. Review subprocess.run(shell=True) usage — prefer shell=False with argument lists where possible.
安全发现 5 项
| 严重性 | 安全发现 | 位置 |
|---|---|---|
| 中危 | Shell execution capability not declared 文档欺骗 | SKILL.md:1 |
| 低危 | Plaintext app password storage in /etc/ 凭证窃取 | scripts/setup_service.sh:185 |
| 低危 | subprocess.run with shell=True for user-supplied commands 代码执行 | scripts/imap_idle_daemon.py:161 |
| 低危 | Fake --preflight-only flag silently ignored 文档欺骗 | scripts/imap_idle_daemon.py:1 |
| 提示 | Inline Python test embeds credentials via string interpolation 代码执行 | scripts/setup_service.sh:148 |
| 资源类型 | 声明权限 | 推断权限 | 状态 | 证据 |
|---|---|---|---|---|
| 文件系统 | WRITE | WRITE | ✓ 一致 | SKILL.md (implicit) / setup_service.sh writes /etc/{service}.env and systemd uni… |
| 网络访问 | READ | READ | ✓ 一致 | IMAP4_SSL connections to IMAP servers (imap.gmail.com etc.) |
| 命令执行 | NONE | WRITE | ✗ 越权 | imap_idle_daemon.py:161 subprocess.run(ON_NEW_MAIL_CMD, shell=True) — not declar… |
| 环境变量 | NONE | READ | ✓ 一致 | Daemon reads IMAP_ACCOUNT, IMAP_PASSWORD, ON_NEW_MAIL_CMD, FILTER_* from os.envi… |
8 项发现
中危 外部 URL 外部 URL
https://myaccount.google.com/apppasswords references/gmail.md:8 中危 外部 URL 外部 URL
https://myaccount.google.com/signinoptions/two-step-verification references/gmail.md:15 中危 外部 URL 外部 URL
https://account.live.com/proofs/AppPassword references/outlook.md:5 中危 外部 URL 外部 URL
https://account.live.com/proofs/manage/additional references/outlook.md:10 中危 外部 URL 外部 URL
https://login.yahoo.com/account/security/app-passwords references/yahoo.md:5 中危 外部 URL 外部 URL
https://my-webhook.com/notify scripts/setup_service.sh:148 提示 邮箱 邮箱地址
[email protected] SKILL.md:31 提示 邮箱 邮箱地址
[email protected] references/troubleshooting.md:35 目录结构
7 文件 · 30.1 KB · 932 行 Shell 1f · 347L
Python 1f · 327L
Markdown 5f · 258L
├─
▾
references
│ ├─
gmail.md
Markdown
│ ├─
outlook.md
Markdown
│ ├─
troubleshooting.md
Markdown
│ └─
yahoo.md
Markdown
├─
▾
scripts
│ ├─
imap_idle_daemon.py
Python
│ └─
setup_service.sh
Shell
└─
SKILL.md
Markdown
依赖分析 4 项
| 包名 | 版本 | 来源 | 已知漏洞 | 备注 |
|---|---|---|---|---|
imaplib | stdlib | Python standard library | 否 | No third-party dependencies |
email | stdlib | Python standard library | 否 | No third-party dependencies |
ssl | stdlib | Python standard library | 否 | No third-party dependencies |
subprocess | stdlib | Python standard library | 否 | Used for ON_NEW_MAIL_CMD execution |
安全亮点
✓ No network exfiltration or C2 communication detected
✓ No credential harvesting or theft — passwords used only for IMAP authentication
✓ No obfuscation, base64-encoded payloads, or anti-analysis techniques
✓ No suspicious filesystem access (no ~/.ssh, ~/.aws, .env scanning)
✓ No supply chain risks — only standard library Python imports used
✓ App passwords (not OAuth tokens) are scoped to Mail only, limiting blast radius
✓ SSL/TLS enforced for all IMAP connections via ssl.create_default_context()
✓ Debounce mechanism prevents command flooding
✓ IDLE capability is verified before daemon starts (preflight check)
✓ Systemd service uses Restart=always with exponential backoff reconnect