T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
Bearer API Key Exposed Through Process Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a coherent AIFS cloud-storage helper, but it gives agents broad remote read, write, patch, and delete capability without enough user-control guidance.
Review before installing. Use this only when you intentionally want files sent to AIFS.space, avoid sensitive content, prefer least-privilege keys instead of admin keys, and confirm the target path/account before any write, patch, overwrite, or delete operation.
SKILL.md:34Bearer API Key Exposed Through Process Command-Line Arguments
SKILL.md:139Unsafe JSON Construction Using Remotely Stored File Content
The invocation text uses broad triggers such as 'persisting notes, documents, or data to the cloud' and 'cloud file storage,' which can match many common user intents and cause the skill to activate when the user did not explicitly ask to use AIFS. In this context, unintended activation is risky because the skill's core behavior is external transmission and remote file manipulation.
The skill instructs the agent to store, read, patch, and delete cloud-hosted files, but it does not require prominent user-facing confirmation that data will leave the local environment, persist remotely, and may be modified or deleted. The brief note 'Not to be used for any sensitive content' is insufficient because users may still unknowingly trigger external storage or destructive actions for ordinary requests.
This example sends authenticated requests to an external cloud storage service and demonstrates listing remote files. Even though the intent is functional documentation, it normalizes transferring metadata and interacting with third-party storage without embedding consent, minimization, or trust-boundary warnings, which increases the chance of unauthorized disclosure of user file names and structure.
curl -H "Authorization: Bearer $AIFS_API_KEY" https://aifs.space/api/files
Returns: {"files": [{"path": "notes/todo.txt", "size": 1024, "modifiedAt": "..."}]}
This example explicitly uploads session notes to a third-party service, creating a clear external transmission and persistence path for potentially sensitive conversational data. In skill context this is more dangerous because 'session notes' can easily contain private user information, and the example lacks mandatory sanitization, consent, retention, or confirmation controls.
# Save
curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
-d "{\"path\":\"sessions/$(date +%Y-%m-%d).md\",\"content\":\"# Session Notes\\n...\"}" \
https://aifs.space/api/write
This pattern reads existing remote content and writes back an appended log entry, which can exfiltrate accumulated content and overwrite cloud data in one workflow. In context it is riskier than a simple write because it encourages bulk retrieval plus retransmission of prior log contents, increasing exposure and the chance of unintended modification if the wrong file or account is targeted.
EXISTING=$(curl -s -H "Authorization: Bearer $KEY" "https://aifs.space/api/read?path=log.txt" | jq -r .content)
curl -X POST -H "Authorization: Bearer $KEY" -H "Content-Type: application/json"
-d "{"path":"log.txt","content":"$EXISTING\n$(date): New entry"}"
https://aifs.space/api/write
No suspicious patterns detected.