T09 · Insecure Skill Coding Practices
- Location
SKILL.md:185- Finding
Plaintext API Key Disclosure Through Troubleshooting Command
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:185
Vulnerability Type: Plaintext sensitive credential exposure
Risk Level: MediumComplete Code Snippet:
sh echo $MATON_API_KEYTechnical Analysis
The troubleshooting command prints the complete
MATON_API_KEYbearer credential to standard output. Because terminal output may be retained in shell transcripts, CI/CD logs, agent tool results, screen recordings, or support records, this instruction can unintentionally disclose a reusable authentication secret.The project contains no hardcoded key; exploitation requires a user or agent to execute this command while the environment variable contains a valid credential and for an unauthorized party to gain access to the resulting output.
Attack Path
- A user configures a valid Maton API key in the
MATON_API_KEYenvironment variable. - During troubleshooting, the user or an automated agent follows the documented instruction and runs
echo $MATON_API_KEY. - The complete credential is written to a terminal, execution transcript, CI log, or agent output.
- That output is retained, shared, or accessed by an unauthorized party.
- The party extracts the bearer token and supplies it in the
Authorizationheader to Maton gateway or connection-management endpoints. - Until the key is revoked or expires, the party can perform operations permitted by the key and its associated OAuth connections.
Impact Assessment
A disclosed key may allow unauthorized access to Maton APIs and connected Monday.com data within the credential's effective permissions. Based on the documented operations, potential scope includes reading users, workspaces, boards, and items; creating or changing boards, groups, columns, and items; deleting boards or items; and viewing, creating, selecting, or deleting OAuth connections. Actual privileges remain constrained by the Maton key, associated OAuth connection, and granted ...[truncated 19 chars]
- A user configures a valid Maton API key in the
- Remediation
View remediation
Remediation Suggestions
Remove the command that prints the secret. Replace it with a presence check that does not reveal the value:
sh if [ -n "${MATON_API_KEY:-}" ]; then echo "MATON_API_KEY is configured" else echo "MATON_API_KEY is not configured" fiAdditionally:
- Explicitly instruct users never to print, paste, commit, or include API keys in logs and support tickets.
- Configure CI systems and agent runtimes to mask
MATON_API_KEYin captured output. - Store the key in an approved secret manager rather than plaintext configuration files.
- Apply least-privilege scopes to the key and connected OAuth account.
- Revoke and rotate any key that may already have appeared in logs or shared transcripts.
- Establish retention and access controls for terminal, CI, and agent execution logs.
