T09 · Insecure Skill Coding Practices
- Location
SKILL.md:36- Finding
API Credential Exposed Through Terminal Output, Plaintext Persistence, and URL Query Parameters
- Content
View full analysis
> "$PROFILE" else echo '' >> "$PROFILE" echo '# Infoxmed VIP QR API password' >> "$PROFILE" echo 'export INFOXMED_VIP_PASSWORD="USER_PROVIDED_PASSWORD"' >> "$PROFILE" fi # Set for current session export INFOXMED_VIP_PASSWORD="USER_PROVIDED_PASSWORD" ``` ```powershell # Set permanently for current user (persists across reboots) [System.Environment]::SetEnvironmentVariable("INFOXMED_VIP_PASSWORD", "USER_PROVIDED_PASSWORD", "User") # Set for current session $env:INFOXMED_VIP_PASSWORD = "USER_PROVIDED_PASSWORD" ``` The credential is then included directly in the request URL: ```bash curl -s -o /tmp/vip_qr_{timestamp}.zip \ "https://api.infox-med.com/system/batchGenerateVipQr?password=${INFOXMED_VIP_PASSWORD}&agent={url_encoded_agent}&count=1&cardName={url_encoded_cardName}&vipCarType={vipCarType}×={times}" \ -H "Origin: https://admin.infox-med.com" \ -H "Referer: https://admin.infox-med.com/" ``` ```powershell Invoke-WebRequest -Uri "https://api.infox-med.com/system/batchGenerateVipQr?pa ...[truncated 3190 chars]- Remediation
View remediation
