T09 · Insecure Skill Coding Practices
- Location
scripts/minri_dmp_api.py:469- Finding
Credential Exposure Through Command-Line Arguments and Console Output
- Content
View full analysis
", "example": "python minri_dmp_api.py save-credentials G3N3yfBc 2kTgY33CwjPirwS07qRsrd0XbNGBPuqG" }, ensure_ascii=False, indent=2)) sys.exit(1) access_key = sys.argv[2] secret_key = sys.argv[3] credentials_path = save_credentials(access_key, secret_key) print(json.dumps({ "success": True, "message": "Credentials saved and verified successfully", "credentials_path": str(credentials_path), "access_key": access_key, "secret_key_preview": f"{secret_key[:8]}...{secret_key[-4:]}" }, ensure_ascii=False, indent=2)) ``` The credential-testing command also prints fragments of both credentials: ```python print(f" Access Key: {ak[:4]}...{ak[-4:]}") print(f" Secret Key: {sk[:4]}...{sk[-4:]}\n") ``` The Skill documentation directs the Agent to place secrets directly in command arguments: ```bash openclaw config set env.DMP_AK "your_access_key" openclaw config set env.DMP_SK "your_secret_key" openclaw gateway restart ``` It also documents the local command-line credential workflow: ```bash python scripts/minri_dmp_api.py save-credentials ``` ### Technical Analysis Command-line ...[truncated 3410 chars]- Remediation
View remediation
