T09 · Insecure Skill Coding Practices
- Location
siyuan.js:26- Finding
Generic API Call Bypasses the SELECT-Only SQL Restriction
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is mostly aligned with controlling SiYuan notes, but its broad direct API command weakens the documented safety controls around SQL and writes.
Install only if you are comfortable giving the skill broad SiYuan API authority through SIYUAN_TOKEN. Prefer a local loopback SIYUAN_BASE, avoid pointing it at untrusted or plaintext remote hosts, and treat the generic call command as powerful enough to bypass some documented safety limits.
siyuan.js:26Generic API Call Bypasses the SELECT-Only SQL Restriction
lib/api.js:1API Credential Can Be Transmitted to an Unrestricted Plaintext HTTP Destination
README.md:20Installation Instructions Use Unpinned Remote Components
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The skill explicitly relies on an environment credential (SIYUAN_TOKEN) and direct HTTP access to a local API, but it does not declare any tool scope or allowed-tools constraints. That means an agent platform may grant broader-than-necessary access without clear policy boundaries, increasing the risk of unintended credential use, unauthorized local network calls, or misuse of write-capable operations exposed by the underlying CLI.
This code performs a network POST request and transmits both an authorization token and arbitrary JSON body data, but it does not include any visible user-facing log, confirmation, comment, or docstring explaining that data will be sent to an external service. Under the code-file criteria for missing user warnings, network transmission of user or system data should have some disclosure unless clearly covered elsewhere in the skill description.