T09 · Insecure Skill Coding Practices
- Location
SKILL.md:30- Finding
JWT Token Exposure Through Command-Line Arguments
- Content
View full analysis
"$CONFIG" ``` ### Technical Analysis The documented configuration interface requires the JWT token to be supplied as a command-line argument. Command-line secrets can be exposed through: - Shell history files. - Process-listing utilities while the command is running. - Process auditing and monitoring systems. - Diagnostic logs that capture executed commands. Passing the token to `jq` with `--arg` does not remove this risk because the token is also included in the `jq` process arguments. Applying file mode `600` to the resulting configuration file only protects the stored copy; it does not protect the earlier command-line exposure. ### Attack Path 1. A user follows the documented configuration procedure and provides the JWT token as a command-line argument. 2. The shell may persist the complete command, including the token, in its history. 3. While configuration is running, the token may also appear in the script or `jq` process arguments. 4. A local attacker, monitoring process, or user with access to the relevant history or audit data obtains the token. 5. The attacker combines the JWT with the associated device identifier and authenticates to the upload service as the victim. ### Impact Assessment Successful exploitation could disclose the user's upload-service JWT. An attacker could then impersonate the affected user within the authorization scope granted by that token, including submitting files or accessing other API capabilities permitted by the service. This issue does not directly provide operating-system privilege escalation. Exploitation generally requires local access to process informa ...[truncated 138 chars]- Remediation
View remediation
