T09 · Insecure Skill Coding Practices
- Location
SKILL.md:15- Finding
Craft API Capability Persisted in Plaintext Shell Configuration
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 15-17
Vulnerability Type: Plaintext storage of a sensitive API capability
Risk Level: MediumVulnerable Code Snippet
bash 3. Set env var: `export CRAFT_API_URL='https://connect.craft.do/links/YOUR_LINK/api/v1'` Add to shell profile for persistence.Technical Analysis
The documentation directs users to place a Craft Connect API URL in a persistent shell profile. The link may function as a bearer capability: possession of the complete URL can be sufficient to invoke the associated Craft API without separate credentials.
Shell profiles store values as plaintext and may be exposed through account compromise, overly permissive file permissions, backups, diagnostic archives, terminal-sharing workflows, or tools that collect shell configuration. Exporting the value also propagates it to child processes, unnecessarily increasing the number of processes that can access the credential.
This finding is limited to the insecure credential-handling instruction. The actual
scripts/craftimplementation is absent from the supplied project and therefore could not be inspected.Attack Path
- A user follows the setup instructions and writes the complete
CRAFT_API_URLvalue into a shell profile. - An attacker or untrusted local process obtains read access to that profile, a backup containing it, or the environment of a process that inherited the exported variable.
- The attacker extracts the Craft Connect URL.
- The attacker sends requests to the Craft API using that URL as the access capability.
- Depending on the permissions assigned to the Craft Connect link, the attacker reads or searches documents and may create, modify, or delete documents, blocks, and tasks.
This path requires access to the stored profile, an inherited process environment, or another artifact containing the URL; the documentation alone does not provide remote access ...[truncated 563 chars]
- A user follows the setup instructions and writes the complete
- Remediation
View remediation
Remediation Suggestions
- Do not recommend storing the complete Craft Connect URL directly in a shell profile.
- Store the URL in the macOS Keychain or another dedicated secret manager and retrieve it only when the CLI runs.
- If an environment variable is unavoidable, inject it only for the individual command rather than exporting it globally to all child processes.
- Ensure any fallback credential file is excluded from version control and backups where appropriate, and restrict its permissions to the owning user, such as mode
0600. - Document how users can revoke and rotate a Craft Connect link after suspected disclosure.
- Advise users to grant the minimum Craft permissions and scope required for their intended operations.
- Avoid printing the full URL in logs, error messages, shell tracing output, command history, or diagnostic reports.
