T09 · Insecure Skill Coding Practices
- Location
scripts/video_quick_gen.py:67- Finding
Hard-Coded Bearer Token Distributed in Source Code
- Content
View full analysis
Vulnerability Details
File Location:
scripts/video_quick_gen.py, lines 67–72
Vulnerability Type: Hard-coded authentication secret
Risk Level: HighVulnerable Code
python DEFAULT_TOKEN = "atk_ajhhuxTyHciMIxZQ_vt_boqVeG_zTr4Ix9REWuVBXSc" def _get_token(base_url: str) -> Tuple[Optional[str], Optional[str]]: token = os.getenv("DASHBOARD_TOKEN") or DEFAULT_TOKEN if token: return token, "env:DASHBOARD_TOKEN"Technical Analysis
The source code contains a static, reusable bearer token and automatically uses it whenever
DASHBOARD_TOKENis absent. The accompanyingSKILL.mdalso describes authentication as a built-in token requiring no configuration.Embedding credentials in a distributable Skill package violates secret-management and least-privilege principles. Any user or process with read access to the package can recover the token without executing the Skill. The token is subsequently placed in an HTTP
Authorizationheader and used to access the dashboard video API.The token's current validity and exact server-side authorization scope were not verified during this static audit. Nevertheless, it has the form and use of an operational access token and must be treated as compromised.
Attack Path
- An attacker obtains or reads the Skill package.
- The attacker opens
scripts/video_quick_gen.pyand extractsDEFAULT_TOKEN. - The attacker sends requests to the dashboard API with:
http Authorization: Bearer atk_ajhhuxTyHciMIxZQ_vt_boqVeG_zTr4Ix9REWuVBXSc - The API processes requests under the identity and permissions assigned to that token.
- The attacker can continue using the credential until it expires or is revoked.
Impact Assessment
Successful exploitation may allow unauthorized creation and monitoring of video-generation tasks, consumption of service quotas, abuse of account resources, and access to any additional API oper ...[truncated 279 chars]
- Remediation
View remediation
Remediation Suggestions
- Revoke and rotate the exposed token immediately.
- Remove the token from the current source, release artifacts, examples, documentation, and version-control history.
- Require authentication through a protected environment variable, operating-system credential store, or managed secret service.
- Fail closed when no credential is configured rather than falling back to an embedded token.
- Issue short-lived, per-user or per-installation credentials instead of a shared token.
- Restrict tokens to the minimum API operations and quotas required for video generation.
- Add automated secret scanning to development and release pipelines.
- Audit server logs for prior use of the exposed credential and investigate unexpected tasks, source addresses, or resource consumption.
