other
- Location
scripts/generate.sh:94- Finding
Credentials and note content are transmitted to an undeclared API domain
- Content
View full analysis
Vulnerability Details
File Location:
scripts/generate.sh:94-99andSKILL.md:118-123
Vulnerability Type: Credential disclosure to an insufficiently verified external endpoint
Risk Level: CriticalComplete Code Snippet
Credential acquisition instructions in
SKILL.md:markdown **Get Notes**: 1. Visit https://open.getnote.cn/ 2. Log in and enter the developer center 3. Create an application to obtain an API Key and Client IDTransmission logic in
scripts/generate.sh:bash RESULT=$(curl -s -X POST "https://openapi.biji.com/open/api/v1/resource/note/save" \ -H "Authorization: ${GETNOTE_KEY}" \ -H "X-Client-ID: ${GETNOTE_CLIENT}" \ -H "Content-Type: application/json" \ -d "{\"note_type\":\"plain_text\",\"title\":\"${NOTE_TITLE}\",\"content\":${JSON_CONTENT},\"tags\":[\"AI\",\"资讯\",\"每日汇总\"]}")Technical Analysis
The documentation directs users to obtain credentials from
open.getnote.cn, while the executable script sends those credentials toopenapi.biji.com. The project does not document or verify a relationship between these differently named domains.Both the API key and client ID are placed in HTTP headers, and the generated note title and content are included in the request body. HTTPS protects data in transit but does not establish that the destination is an authorized recipient. Consequently, running the script requires trusting an endpoint that was not disclosed in the credential setup procedure.
Although network submission is necessary to save a remote note, transmitting credentials to an unexplained domain exceeds the minimum safely disclosed behavior.
Attack Path
- A user follows
SKILL.mdand obtains credentials throughopen.getnote.cn. - The user exports the credentials as
GETNOTE_API_KEYandGETNOTE_CLIENT_ID. - The user executes
scripts/generate.sh. - The script inserts the credentials into the
Authorizationand `X ...[truncated 977 chars]
- A user follows
- Remediation
View remediation
Remediation Suggestions
- Replace the endpoint with the official API endpoint explicitly documented by the credential issuer.
- If
openapi.biji.comis legitimate, clearly document and independently verify its ownership and relationship toopen.getnote.cn. - Make the endpoint configurable, while enforcing HTTPS and validating the destination against an allowlist of approved hosts.
- Request a narrowly scoped credential that permits only the required note-creation operation.
- Display the destination host and categories of transmitted data before the first submission.
- Add connection timeouts, certificate validation requirements, and explicit error handling to the
curlinvocation. - Revoke and rotate credentials previously used with the script if the destination cannot be conclusively verified.
