T09 · Insecure Skill Coding Practices
- Location
- SKILL.md:76
- Finding
- Bearer Credentials Are Exposed Through Application Logs## Vulnerability Details **File Location**: `SKILL.md:76-83` and `SKILL.md:203-210` **Vulnerability Type**: Sensitive credential exposure through logging **Risk Level**: High ### Vulnerable Code ```typescript const client = new Oblien({ clientId: process.env.OBLIEN_CLIENT_ID!, clientSecret: process.env.OBLIEN_CLIENT_SECRET!, }); const access = await client.workspaces.apiAccess.enable('ws_a1b2c3d4'); console.log(access.token); // Gateway JWT (eyJhbG...) console.log(access.enabled); // true ``` ```typescript const raw = await client.workspaces.apiAccess.rawToken('ws_target'); console.log(raw.token); // "a1b2c3d4e5f6..." console.log(raw.ip); // "10.0.1.42" console.log(raw.port); // 9990 ``` ### Technical Analysis The documented examples print complete bearer credentials to standard output. Standard output is commonly retained in CI logs, terminal recordings, agent transcripts, centralized logging systems, and observability platforms. These systems may have broader access controls and longer retention periods than a dedicated secret store. Both credentials grant access to an API that supports unrestricted file operations, command execution, and interactive terminal sessions inside a root-access workspace. The raw connection token presents elevated exposure because the documentation states that it remains valid until rotated. Printing the associated private IP and port alongside the token also provides all connection details required for an attacker with network access. Although these are documentation examples rather than automatically executed code, users copying the examples would reproduce the insecure behavior. ### Attack Path 1. A user copies the documented example into an application, automation script, or CI job. 2. The application requests a gateway JWT or raw workspace connection token. 3. The complete bearer credential is written to standard output. 4. A CI user, logging-system us ...[truncated 1026 chars]
- Remediation
- ## Remediation Suggestions - Remove every example that prints complete gateway JWTs, raw tokens, client secrets, or other bearer credentials. - Replace token logging with non-sensitive status information: ```typescript const access = await client.workspaces.apiAccess.enable('ws_a1b2c3d4'); console.log(`Internal API enabled: ${access.enabled}`); ``` - If correlation is required, log only a non-reversible fingerprint or a short redacted suffix, and document that even partial token output should be minimized. - Keep credentials in a dedicated secret manager or protected in-memory variable. - Configure CI and observability systems to redact authorization headers and known token formats. - Restrict access to build logs and agent transcripts, and define short retention periods. - Prefer short-lived, narrowly scoped credentials over tokens that remain valid until rotation. - Rotate any credential that may already have appeared in logs. - Add an explicit documentation warning that tokens must never be printed, persisted in logs, committed to source control, or included in diagnostic reports.
