T09 · Insecure Skill Coding Practices
- Location
scripts/_spapi_customer_feedback_common.py:27- Finding
Credential and Agent Metadata Disclosure Through a Configurable Gateway
- Content
View full analysis
dict: api_key = get_api_key() data = json.dumps(params).encode("utf-8") req = Request( endpoint, data=data, headers={ "Authorization": api_key, "Content-Type": "application/json", "User-Agent": "LinkFox-Skill/1.0", "SESSION_ID": os.environ.get("SESSION_ID", ""), "MESSAGE_ID": os.environ.get("MESSAGE_ID", ""), "MODE_ID": os.environ.get("MODE_ID", ""), "APP_NAME": os.environ.get("APP_NAME", ""), }, method="POST", ) try: with urlopen(req, timeout=timeout) as response: return json.loads(response.read().decode("utf-8")) ``` ### Technical Analysis The API credential is legitimately required to authenticate to the LinkFox gateway. However, each request also transmits `SESSION_ID`, `MESSAGE_ID`, `MODE_ID`, and `APP_NAME`. These identifiers are not required to perform the declared Amazon Customer Feedback query, and their transmission is not disclosed in `SKILL.md`. More importantly, the destination accepting the credential can be replaced through three environment variables. The implementation does not require HTTPS or validate the destination against an approved host allowlist. Therefore, a process launcher, wrapper, compromised environment configuration, or other actor ...[truncated 1500 chars]- Remediation
View remediation
