T09 · Insecure Skill Coding Practices
- Location
scripts/fetch_vin-query.py:78- Finding
API Credential Exposure Through Query Strings and Command-Line Arguments
- Content
View full analysis
scripts/.env # Option 3: Pass it on every command invocation python3 scripts/fetch_vin-query.py --key yourAPIKey --vin LSVAX60E8K2018698 ``` `SKILL.md:58-63`: ```bash # Query VIN LSVAX60E8K2018698 GET https://apis.tianapi.com/chavin/index?key=YOUR_API_KEY&vincode=LSVAX60E8K2018698 ``` ### Technical Analysis The script inserts the TianAPI credential directly into the request URL as a query parameter. Although the endpoint uses HTTPS and therefore protects the URL during transport against ordinary passive network observers, complete URLs may still be recorded by the API provider, reverse proxies, debugging infrastructure, monitoring systems, exception telemetry, or application logs. The documentation also recommends supplying the API key using the `--key` command-line option. Command-line arguments can be retained in shell history and may be visible to local process-monitoring tools or other users where operating-system process visibility permits it. The direct API example likewise encourages users to place credentials in URLs that may be copied, logged, or retained in tooling history. Transmission of the VIN and an authentication credential to the declared ...[truncated 2074 chars]- Remediation
View remediation
