Scan Report
20 /100
siyuan-notes-skill
思源笔记工具——搜索、阅读、编辑、组织用户的笔记
A legitimate SiYuan Notes management tool with solid security posture. Minor doc-to-code gaps exist (undeclared filesystem writes for caching, undeclared credential environment variable access) but no malicious behavior, exfiltration, or exploitation was found.
Safe to install
Consider documenting the filesystem:WRITE capability (for read-guard cache) and network:READ (GitHub version check) in SKILL.md. The codebase is trustworthy for use.
Findings 3 items
| Severity | Finding | Location |
|---|---|---|
| Low | Filesystem write capability not declared Doc Mismatch | index.js:322 |
| Low | Credential environment variables not declared Doc Mismatch | index.js:96 |
| Low | package.json has zero dependencies declared Supply Chain | package.json:1 |
| Resource | Declared | Inferred | Status | Evidence |
|---|---|---|---|---|
| Shell | WRITE | WRITE | ✓ Aligned | SKILL.md:allowed-tools:"Bash"; index.js:10 execSync for hardcoded git commands |
| Network | NONE | READ | ✓ Aligned | index.js:733 fetchJson() calls api.github.com for version-check; index.js:790 fe… |
| Filesystem | NONE | WRITE | ✓ Aligned | index.js:107 READ_GUARD_CACHE_FILE path; index.js:322-341 fs.writeFileSync for .… |
| Environment | NONE | READ | ✓ Aligned | index.js:94-101 reads SIYUAN_API_TOKEN, SIYUAN_BASIC_AUTH_PASS; used only for lo… |
| Filesystem | READ | READ | ✓ Aligned | index.js:55-85 loads .env via fs.readFileSync; index.js:645 reads package.json |
3 findings
Medium External URL 外部 URL
https://claude.com/claude-code README.md:5 Medium External URL 外部 URL
https://b3log.org/siyuan/ README.md:5 Medium External URL 外部 URL
http://127.0.0.1:6806 README.md:38 File Tree
14 files · 225.2 KB · 7034 lines JavaScript 5f · 4853L
Markdown 8f · 2153L
JSON 1f · 28L
├─
▾
docs
│ ├─
command-reference.md
Markdown
│ ├─
Command-Reference.md
Markdown
│ ├─
Error-Recovery.md
Markdown
│ ├─
pmf-spec.md
Markdown
│ ├─
sql-reference.md
Markdown
│ └─
SQL-Reference.md
Markdown
├─
▾
lib
│ ├─
pmf-utils.js
JavaScript
│ └─
query-services.js
JavaScript
├─
cli.js
JavaScript
├─
format-utils.js
JavaScript
├─
index.js
JavaScript
├─
package.json
JSON
├─
README.md
Markdown
└─
SKILL.md
Markdown
Dependencies 1 items
| Package | Version | Source | Known Vulns | Notes |
|---|---|---|---|---|
none | N/A | none | No | Zero external dependencies; uses only Node.js built-in modules (fs, path, https, child_process) |
Security Positives
✓ No obfuscation, base64-decode-execute, or eval patterns found
✓ No credential exfiltration or data theft
✓ No reverse shell, C2, or remote code execution
✓ execSync is limited to hardcoded git commands with no user input reaching the shell
✓ Credentials stay local — API token used only for local SiYuan server authentication
✓ Basic Auth password is Base64-encoded in header only, never transmitted outside local process
✓ No hidden functionality: all code paths traced back to documented operations
✓ GitHub network calls are restricted to version-check command, clearly described in SKILL.md
✓ No sensitive file access (no ~/.ssh, ~/.aws, .env outside skill dir)
✓ Read-guard cache is a legitimate safety mechanism (optimistic locking)
✓ SQL queries use string escaping for SQLite (standard pattern for this tool type)