T09 · Insecure Skill Coding Practices
- Location
scripts/atlas-call.mjs:65- Finding
Atlas credentials and bearer tokens can be transmitted to an arbitrary or plaintext origin
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This MongoDB Atlas skill is coherent, but it needs Review because it can use powerful Atlas credentials while sending them to a configurable API host and caching tokens in plaintext.
Install only if you are comfortable giving the skill Atlas Admin API authority through your service account. Use a least-privilege service account, leave ATLAS_API_BASE_URL unset or set it only to https://cloud.mongodb.com, review dry-runs before any state-changing call, and treat the local token cache as sensitive credential material.
scripts/atlas-call.mjs:65Atlas credentials and bearer tokens can be transmitted to an arbitrary or plaintext origin
scripts/atlas-call.mjs:49OAuth bearer token is persisted in plaintext without explicit restrictive permissions
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
very document URL.","type":"string"},"oktaIdpId":{"description":"Legacy 20-hexadecimal digit string that identifies the identity provider.","pattern":"^([a-f0-9]{20})$","type":"string"},"pemFileInfo":{"$ref":"#/components/schemas/PemFileInfo"},"protocol":{"description":"String enum that indicates the protocol of the identity provider. Either SAML or OIDC.","enum":["SAML","OIDC"],"type":"string"},"requestBinding":{"description":"SAML Authentication Request Protocol HTTP method binding (POST or REDIRECT) that Federated Authentication uses to send the authentication request.","enum":["HTTP-POST","HTTP-REDIRECT"],"type":"string"},"responseSignatureAlgorithm":{"description":"Signature algorithm that Federated Authentication uses to encrypt the identity provider signature.","enum":["SHA-1","SHA-256"],"type":"string"},"slug":{"description":"Custom SSO Url for the identity provider.","type":"string"},"ssoDebugEnabled":{"description":"Flag that indicates whether the identity provider has SSO de
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
}
// Get access token (with caching)
async function getAccessToken() {
const clientId = process.env.ATLAS_CLIENT_ID;
const clientSecret = process.env.ATLAS_CLIENT_SECRET;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
}
// Get access token (with caching)
async function getAccessToken() {
const clientId = process.env.ATLAS_CLIENT_ID;
const clientSecret = process.env.ATLAS_CLIENT_SECRET;
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
}
}
// Get access token (with caching)
async function getAccessToken() {
const clientId = process.env.ATLAS_CLIENT_ID;
const clientSecret = process.env.ATLAS_CLIENT_SECRET;
The skill declares the ability to use environment-provided credentials and make live network/API calls, but it does not define any explicit tool scope such as permissions or allowed-tools. That creates a trust gap where an agent may expose or use sensitive Atlas credentials and perform external actions without clear, enforceable boundaries, increasing the risk of unintended destructive API operations.
The script includes a built-in bypass for the safety interlock on destructive operations via the --yes flag, allowing POST/PUT/DELETE/PATCH requests to execute non-interactively. In an agent skill context, this materially increases the chance of unintended or autonomous modification/deletion of Atlas resources if an upstream component or prompt induces use of the flag.
-p, --params <json> Query parameters (JSON string)
-f, --file <path> Read request body from JSON file
--dry-run Show what would be called without making the request
--yes Skip confirmation for risky operations (NOT RECOMMENDED)
Environment:
ATLAS_CLIENT_ID Service Account Client ID (required)
This OpenAPI document repeatedly embeds documentation URLs with the /zh-cn/ locale, which hard-codes a specific language experience for users consuming the referenced docs. Because the file does not offer an alternative locale or indicate user opt-in, this is a natural-language locale policy issue rather than a code-security issue.
Detected: suspicious.env_credential_access, suspicious.potential_exfiltration