T09 · Insecure Skill Coding Practices
- Location
scripts/fetch_data.py:36- Finding
Authentication Token Can Be Sent to an Arbitrary Configurable Endpoint
- Content
View full analysis
", file=sys.stderr) sys.exit(1) set_config("base_url", sys.argv[2]) sys.exit(0) ``` ### Technical Analysis The script supports an undocumented `--set-url` option that stores an arbitrary base URL in the shared configuration file. Subsequent requests retrieve that value without validating its scheme, hostname, port, or destination. The stored authentication token is then unconditionally attached to the request through the `Authorization` header. Consequently, the token is not restricted to the declared service at `https://repilot.51ifind.com/`. An attacker-controlled HTTP or HTTPS server can be configured as the endpoint and receive both the token and the user's search query. Allowing unrestricted endpoints exceeds the minimum privileges required for the declared financial-news search functionality. The Skill only needs to communicate with its documented API host. The implementation also does not enforce HTTPS, so a configured plain-HTTP endpoint can expose the token and query to network observers. Redirect behavior is not explicitly constrained or validated. ...[truncated 1839 chars]- Remediation
View remediation
