T09 · Insecure Skill Coding Practices
- Location
assets/config.json:3- Finding
Plaintext credentials and unrelated secrets distributed with the Skill
- Content
View full analysis
dict | list: token = str(cfg.get("github_token") or "").strip() if not token: raise RuntimeError("config.json 缺少 github_token") if any(ch in token for ch in ("…", "***")): raise RuntimeError("config.json 中 github_token 看起来已脱敏,无法查询 GitHub API") if org and repo: assert_allowed_github_get(path, org=org, repo=repo, commit=commit) url = "https://api.github.com{}".format(path) headers = { "Accept": "application/vnd.github+json", "Authorization": "Bearer {}".format(token), "X-GitHub-Api-Version": "2022-11-28", } resp = requests.get(url, headers=headers, params=params, timeout=20) ``` ### Technical Analysis The Skill package contains live-looking GitHub, Feishu, and Jenkins credentials in a plaintext JSON file. ...[truncated 2707 chars]- Remediation
View remediation
