T09 · Insecure Skill Coding Practices
- Location
scripts/common.sh:23- Finding
Authentication Secret and Blog Data Transmitted Over Plaintext HTTP
- Content
View full analysis
Vulnerability Details
File Location:
scripts/env_guard.sh:16-17,scripts/common.sh:23-32
Vulnerability Type: Cleartext transmission of sensitive information
Risk Level: HighComplete Code Snippet
bash AIM_APPLY_URL="http://192.168.25.10:30775/aim-skills" AEP_BASE_URL_FIXED="http://aep.vemic.com/aim_mentaassistant_2024"bash local url="${AEP_BASE_URL}${path}" local timeout="${AEP_TIMEOUT:-600}" echo ">>> AEP sync request -> ${url}" >&2 curl -s -N --noproxy '*' --max-time "${timeout}" -X POST "${url}" \ -H "Content-Type: application/json" \ -H "X-AEP-CONSUMER-SECRET: ${AEP_CONSUMER_SECRET}" \ -d "${body}"Technical Analysis
The AEP endpoint is hardcoded with the
http://scheme. The request includes the user'saim-secret-keyin theX-AEP-CONSUMER-SECRETheader and sends the complete blog request body over the same unencrypted connection.HTTP provides neither confidentiality nor authenticated server identity. Any party capable of observing or modifying traffic between the host and the endpoint—including a local-network attacker, compromised gateway, malicious DNS resolver, or upstream network operator—can capture the authentication secret and submitted content. An active attacker can also alter the SSE response consumed by the scripts.
The explicit
--noproxy '*'option bypasses configured HTTP proxies, including potentially mandatory organizational security proxies. It does not protect the connection from interception and may circumvent expected egress inspection.Attack Path
- A user places a valid
aim-secret-keyin the skill's.envfile. - The user or agent invokes
scripts/seo_agent.shorscripts/blog_to_word.py. ensure_aep_envexports the key asAEP_CONSUMER_SECRET.run_skill_syncconnects to the hardcoded AEP endpoint over plaintext HTTP.- The key is transmitted in an HTTP header, while the ...[truncated 989 chars]
- A user places a valid
- Remediation
View remediation
Remediation Suggestions
- Replace the endpoint with an
https://URL and reject non-HTTPS endpoint configurations. - Configure
curlto fail on TLS and HTTP errors, for example with--fail-with-body --show-error. - Do not disable certificate verification. Where appropriate, pin the organization's CA or server public key.
- Remove
--noproxy '*'unless direct routing is an explicitly reviewed requirement. Use a narrowly scopedNO_PROXYconfiguration for approved internal hosts instead. - Rotate all keys that may previously have traversed an untrusted network over HTTP.
- Prefer short-lived, narrowly scoped credentials over reusable static secrets.
- Ensure authentication failures and malformed responses cause a fail-closed result rather than proceeding with generated output.
- Serve the registration URL over HTTPS as well, and avoid directing users to plaintext credential-related services.
- Replace the endpoint with an
