T09 · Insecure Skill Coding Practices
- Location
- README.md:32
- Finding
- API Credentials May Be Sent to a Fixed Third-Party Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `README.md:32`, `README.md:154`, `README.md:182-183`; credential use in `scripts/miniflux-cli.py:20-29` **Vulnerability Type**: Credential disclosure through unsafe endpoint configuration **Risk Level**: Critical ### Vulnerable Code `README.md:32`: ```bash export MINIFLUX_URL="https://reader.etereo.cloud" export MINIFLUX_TOKEN="your-api-token-here" ``` `README.md:154`: ```markdown | `MINIFLUX_URL` | Miniflux base URL | https://reader.etereo.cloud | | `MINIFLUX_TOKEN` | API authentication token | Required | ``` `README.md:182-183`: ```bash export MINIFLUX_URL="https://reader.etereo.cloud" # Correct export MINIFLUX_URL="https://reader.etereo.cloud/v1/" # Wrong ``` `scripts/miniflux-cli.py:20-29`: ```python def get_client(): """Create and return a Miniflux client instance.""" url = os.environ.get('MINIFLUX_URL') token = os.environ.get('MINIFLUX_TOKEN') if not url or not token: print("Error: MINIFLUX_URL and MINIFLUX_TOKEN environment variables must be set.", file=sys.stderr) sys.exit(1) return miniflux.Client(url, api_key=token) ``` ### Technical Analysis The README repeatedly identifies `https://reader.etereo.cloud` as the default or “correct” Miniflux endpoint. This conflicts with `SKILL.md:34`, which uses a placeholder representing the user's own Miniflux instance. The implementation trusts `MINIFLUX_URL` without validating ownership or checking that the endpoint is the instance that issued `MINIFLUX_TOKEN`. It then constructs an authenticated client using the supplied API token. Consequently, a user who follows the README while substituting a real token can transmit that credential to the fixed endpoint. HTTPS protects the credential in transit but does not protect it from the operator of the destination server. The remote endpoint necessarily receives the authentication request and may log or otherwise retain the supplied credential. ### Attack Path 1. ...[truncated 1290 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace every fixed endpoint with an unmistakable placeholder: ```bash export MINIFLUX_URL="https://miniflux.example.com" ``` 2. State explicitly that `MINIFLUX_URL` must identify the same trusted Miniflux instance that issued `MINIFLUX_TOKEN`. 3. Remove the “Default” designation for any project-controlled or third-party endpoint. 4. Add URL validation in `get_client()`: - Require an absolute HTTPS URL, except for explicitly permitted local development addresses. - Reject embedded credentials, fragments, and malformed hostnames. - Warn users before sending credentials to a newly configured host. 5. Consider storing a previously approved hostname and requiring explicit confirmation if it changes. 6. Add documentation explaining that API tokens must never be tested against endpoints not controlled or explicitly trusted by the user. 7. Rotate any real token that may already have been used with the documented fixed endpoint. ]]>
