T08 · Insecure Dependencies
- Location
package-lock.json:22- Finding
Dependencies Are Locked to an Unencrypted Third-Party Package Mirror
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This mail skill appears purpose-aligned, but it needs review because it can read, send, and change email using stored credentials without adequate sending limits or credential protection.
Install only for a tightly controlled mailbox, preferably a dedicated automation account with an app-specific password. Review and patch dependencies, regenerate the lockfile from an HTTPS registry, move secrets out of config.yaml, and add explicit recipient, payload, rate, and confirmation controls before using it with real email accounts.
package-lock.json:22Dependencies Are Locked to an Unencrypted Third-Party Package Mirror
src/mailClient.ts:32Email Sending Lacks the Documented Anti-Abuse and Payload Limits
src/index.ts:12Mailbox Credentials Are Loaded from a Project-Local Plaintext Configuration File
The lockfile includes imapflow-bundled nodemailer 8.0.1, which static analysis identifies as carrying multiple known vulnerabilities including header injection and denial-of-service issues. In a mail-client skill, a vulnerable mail transport/parser library is especially sensitive because it may process attacker-controlled email addresses, headers, and message content.
The project pulls in ip-address 10.1.0 via socks, and the listed advisories indicate parsing inconsistencies and an HTML/XSS issue. In this skill context the XSS vector is less likely unless address data is rendered into HTML, but parser discrepancies can still matter if proxy or network address validation relies on this library.
The lockfile includes js-yaml 4.1.1, which is flagged for multiple CPU-exhaustion issues involving crafted YAML structures. If the skill accepts or loads YAML from user-controlled, remote, or repository-provided input, an attacker could trigger denial of service by supplying pathological YAML documents.
The top-level nodemailer 6.10.1 dependency is a true vulnerability because it is directly used by a mail-client skill and is associated with multiple known issues including CRLF/header injection and resource-consumption problems. This context increases risk: email composition and transport often involve attacker-influenced fields, so exploitation could lead to message/header manipulation, policy bypass, or service disruption.
The resolved js-yaml version is reported as having multiple known advisories, including CPU-exhaustion style parsing issues. In a mail-related skill, YAML processing may be reachable through configuration or content handling paths, so vulnerable parsing can enable denial of service or resource exhaustion if untrusted YAML is ever processed.
The resolved nodemailer version is flagged with numerous known vulnerabilities, including header injection, parser complexity, and content-resolution bypass issues. In a generic mail client skill this package is core functionality, so the context makes the risk more serious because email addresses, headers, attachments, and message content are likely attacker-influenced inputs.
The skill description is written entirely in Chinese and presents the skill as a generic mail client, but it does not indicate that language choice is optional or limited to a Chinese-speaking context. For a generic skill, this creates a locale-policy concern because it implicitly constrains usage to a specific language without user opt-in.
This YAML file contains user-facing natural-language content in Chinese, including comments and account display names, with no indication that the skill supports other languages or that the locale restriction is intentional and justified. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
This manifest contains user-facing natural-language strings such as "阿里云企业邮箱" and "Gmail 个人" along with Chinese-only comments, which indicates a fixed locale choice. The file does not document that the skill is intended only for Chinese-speaking users or provide any language/locale choice, which can violate language/locale policy requirements.
The sendEmail handler performs a potentially impactful external action by transmitting data over email, but this file provides no confirmation prompt, logging, comment, or docstring warning about that behavior. For a code file, outbound communication of user or system data should have some visible disclosure unless such warning is documented elsewhere.
This method sends outbound email, including recipients, subject, body, and attachments, over SMTP, but the code provides no confirmation prompt, visible log/print, or explanatory comment warning that user data will be transmitted. For a code file, network transmission of user data is safety-relevant and should include some form of disclosure unless clearly surfaced elsewhere.
The IMAP helper connects to a remote mail server using account credentials and is used to fetch message metadata and content, but there is no user-facing notice, confirmation, or explanatory comment disclosing this network access to potentially sensitive mailbox data. Accessing remote mailbox contents is privacy-sensitive and should not be silent in code absent other visible warnings.
This method modifies mailbox state by marking messages read/unread and moving messages between folders, but the code includes no confirmation, visible log, or warning comment explaining that it changes remote email state. These actions can affect user data organization and should be disclosed before or during execution.
This file is a JSON manifest-type file, so vague-trigger checks apply. The only descriptive identifier is the broad skill name "generic-mail-client-skill," and the manifest provides no invocation phrases, context limits, or exclusion conditions, making activation scope unspecified and potentially overly broad.
The sendEmail handler invokes the mail client to send email, which is a network action that may transmit user-provided content externally. In this code, there is no confirmation prompt, logging, comment, or docstring warning the user that the skill will send outbound email.
This method sends outbound email, including recipients, subject, body, and attachments, over the network via SMTP. The code contains no confirmation prompt, user-visible log/print, or explanatory comment/docstring warning that user data and attachment contents will be transmitted.
The IMAP helper connects to a mail server using account credentials and is then used by message-listing and message-fetching flows to retrieve mailbox metadata and message content. There is no confirmation prompt, user-visible logging, or descriptive comment/docstring warning that private mailbox data will be accessed over the network.
This method marks messages read/unread and can move messages to another folder, which changes remote mailbox state and may be difficult to undo. The code includes no confirmation, print/log notice, or descriptive warning comment/docstring about these potentially destructive mailbox modifications.
This TypeScript file defines an auth object containing username and password fields for mail account configuration. Because this is a code file handling sensitive credentials and there is no nearby comment, docstring, or other user-facing disclosure explaining the sensitivity or expected handling, it meets the missing-warning criterion for credential access.
The code reads configuration from config.yaml and initializes a mail client with filled-in credentials, as indicated by the error message requesting credentials. Accessing and using credentials is a safety-relevant operation, but this file contains no visible warning, comment, or user-facing disclosure about credential use.
The dependency is specified with a caret range, which allows newer semver-compatible versions to be installed over time. This weakens build reproducibility and can unexpectedly introduce vulnerable or incompatible transitive code if the dependency supply chain changes.
"build": "tsc -p ."
},
"dependencies": {
"imapflow": "^1.0.0",
"js-yaml": "^4.1.0",
"nodemailer": "^6.9.0"
},
The js-yaml dependency uses a caret range, so installs may float to later releases without explicit review. In this file context that is more dangerous because js-yaml is also separately identified as landing on a version with known advisories, increasing the chance of pulling a vulnerable build.
},
"dependencies": {
"imapflow": "^1.0.0",
"js-yaml": "^4.1.0",
"nodemailer": "^6.9.0"
},
"devDependencies": {
The nodemailer dependency is unpinned, allowing semver-compatible releases to be installed automatically. That creates supply-chain and reproducibility risk, and here it is more significant because the resolved version is also flagged as having multiple known vulnerabilities.
"dependencies": {
"imapflow": "^1.0.0",
"js-yaml": "^4.1.0",
"nodemailer": "^6.9.0"
},
"devDependencies": {
"typescript": "^5.0.0",
The TypeScript compiler dependency is unpinned with a caret range, which can lead to non-reproducible builds and unexpected toolchain behavior. As a devDependency this is generally less directly exploitable at runtime, but it still affects build integrity and supply-chain hygiene.
"nodemailer": "^6.9.0"
},
"devDependencies": {
"typescript": "^5.0.0",
"@types/node": "^18.0.0",
"@types/js-yaml": "^4.0.0",
"@types/nodemailer": "^6.4.0"
The @types/node package is unpinned, which may cause inconsistent builds or type-resolution changes across environments. Since it is a development-only typing package, the direct runtime security impact is low, but it still represents weak dependency control.
},
"devDependencies": {
"typescript": "^5.0.0",
"@types/node": "^18.0.0",
"@types/js-yaml": "^4.0.0",
"@types/nodemailer": "^6.4.0"
}