T09 · Insecure Skill Coding Practices
- Location
main.py:92- Finding
Passwords May Be Exposed Through Command-Line Arguments and Plaintext HTTP
- Content
View full analysis
Tuple[Any, str]: payload = { "uname": uname, "phone": phone, "pwd": pwd, "email": email, "img": img, } return client.post(USERS_PATH, json=payload), "id_response" ``` ```python # blog_manager/client.py:68-78 raw = (base_url if base_url else os.environ.get(BASE_URL_ENV, "")).strip() url = raw.rstrip("/") if not url: raise BlogConfigError( f"{BASE_URL_ENV} is not set. " f"Export it first, e.g. export {BASE_URL_ENV}=http://host:port" ) if not (url.startswith("http://") or url.startswith("https://")): raise BlogConfigError( f"{BASE_URL_ENV} must start with http:// or https:// (got {url!r})" ) ``` ```python # blog_manager/client.py:88-103 url = f"{self.base_url}{path}" resp = self.session.request( method, url, params=params, json=json, files=files, timeout=self.timeout, ) try: body: Any = resp.json() except ValueError: body = {"raw": resp.text} ``` ### Technical Analysis The `create-user` c ...[truncated 2050 chars]- Remediation
View remediation
