T09 · Insecure Skill Coding Practices
- Location
scripts/fetch.py:53- Finding
Credential-Bearing and Sensitive URLs Can Be Disclosed to Third-Party Services
- Content
View full analysis
bool: parsed = urllib.parse.urlparse(url) params = urllib.parse.parse_qsl(parsed.query, keep_blank_values=True) frag = parsed.fragment.lower() for k, v in params: lk = k.lower() lv = (v or '').lower() if lk in SENSITIVE_KEYS: return True if any(s in lk for s in SENSITIVE_KEYS): return True if len(v) > 20 and any(x in lk for x in ['token', 'code', 'sig', 'key', 'auth']): return True if 'bearer' in lv: return True if any(x in frag for x in ['access_token', 'token=', 'session=', 'code=']): return True return False ``` ```python def clean_service_urls(original_url: str): stripped = original_url.replace('https://', '').replace('http://', '') return [ ('jina', f'https://r.jina.ai/http://{stripped}'), ('markdown-new', f'https://markdown.new/{original_url}'), ('defuddle', f'https://defuddle.md/{original_url}'), ] ``` ### Technical Analysis The Skill deliberately sends URLs classified as public to Jina Reader, markdown.new, and defuddle.md. This is consistent with its declared content-cleaning functionality, but the classification does not adequately prevent sensitive information from being transmitted. The sensitive-data check only recognizes a fixed set of query-parameter names and several fragment patterns. It does not reject URL user information such as `https://username:password@example.com/`, and it cannot reliably identify secrets stored under unrecognized parameter names or fragment formats. After classification, `clean_service_urls()` embeds the entire original URL into requests to external services. This includes its query strin ...[truncated 1865 chars]- Remediation
View remediation
