T08 · Insecure Dependencies
- Location
references/container-deployment.md:14- Finding
Dependencies Installed Through an Unencrypted Custom npm Registry
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This documentation-only skill is not malicious, but its copyable deployment guidance includes unsafe production patterns that could expose or weaken systems if followed as written.
Install only if you treat this as rough internal documentation and review every deployment/configuration snippet before use. Do not copy the Dockerfile or Kubernetes examples as production templates without replacing chmod 777, using a trusted HTTPS npm registry, removing sshd/crond from the app container, moving database credentials to Secrets or a secret manager, and restricting CORS to known origins.
references/container-deployment.md:14Dependencies Installed Through an Unencrypted Custom npm Registry
references/container-deployment.md:12World-Writable Application and Data Directories Enable Code Tampering
references/container-deployment.md:30Unnecessary SSH and Cron Daemons Expand the Privileged Container Attack Surface
references/container-deployment.md:222Database Credentials Are Placed in a Kubernetes ConfigMap
references/config-management.md:178Wildcard CORS Is Enabled by Default for API Requests
Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
export function loadEnvConfig(): void {
const nodeEnv = process.env.NODE_ENV || 'development';
// 开发环境:使用 .env 文件
if (nodeEnv === 'development') {
const envFile = '.env.develop';
const envPath = path.resolve(process.cwd(), envFile);
This command combines directory creation with a dangerous permission change, normalizing unsafe filesystem permissions as part of the build. In deployment guidance, that is security-relevant because operators may copy it verbatim, resulting in writable locations that facilitate tampering or privilege abuse within the container.
ARG DIR="/home/export/App"
# 创建必要的目录
RUN mkdir -p /export/Data && chmod 777 /export/Data && mkdir -p /home/export/App
RUN node -v && npm -v && npm config set registry=http://registry.m.jd.com
The use of chained shell commands here hides a risky chmod 777 inside a broader setup line, making unsafe behavior easier to overlook during review. While chaining itself is not inherently vulnerable, in this context it contributes to insecure deployment practices by obscuring a high-risk permission change.
ARG DIR="/home/export/App"
# 创建必要的目录
RUN mkdir -p /export/Data && chmod 777 /export/Data && mkdir -p /home/export/App
RUN node -v && npm -v && npm config set registry=http://registry.m.jd.com
The skill name, description, and document content are entirely in Chinese, which can amount to a language/locale policy constraint when no opt-in or alternative language option is provided. The file does not state that the skill is region-specific or that users may choose another language.
The entire skill file is written in Chinese and does not provide any language-selection option or indicate that the skill is intentionally limited to Chinese-speaking users or a China-specific compliance context. Under the policy, a forced language/locale without opt-in is a natural-language policy violation.
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
# 环境配置
NODE_ENV=development
# 服务器配置
PORT=3000
The document explicitly says sensitive information must not be hardcoded, yet the production JSON example includes literal database credentials such as DB_USERNAME and DB_PASSWORD. Even if presented as an example, operators commonly copy documentation verbatim into real deployments, which can lead to credential exposure, secret reuse, and insecure configuration practices.
Setting /export/Data to mode 777 makes it world-readable and world-writable inside the container, allowing any process to alter application data. In a compromised container or multi-process context, this enables tampering, persistence, and abuse of shared writable paths.
ARG DIR="/home/export/App"
# 创建必要的目录
RUN mkdir -p /export/Data && chmod 777 /export/Data && mkdir -p /home/export/App
RUN node -v && npm -v && npm config set registry=http://registry.m.jd.com
Granting mode 777 to the application directory makes the full codebase writable by any user or process in the container. That weakens code integrity and can allow runtime modification of scripts or application files if any foothold is gained.
WORKDIR ${DIR}
COPY . ${DIR}
RUN chmod 777 /home/export/App/ && npm install
# 添加版本管理和部署脚本执行权限
RUN chmod +x /home/export/App/scripts/*.sh && chmod +x /home/export/App/start.sh
The container entrypoint starts sshd and crond inside the application container, expanding the attack surface well beyond a typical Node.js service. Running multiple long-lived system services in one app container increases remote access opportunities, complicates hardening, and violates least-functionality/container best practices.
This markdown file documents scripts that overwrite version.json and copy artifacts, and later instructs users to run docker build, docker push, and kubectl apply. The guide provides operational steps but does not warn that these actions modify local files and deploy changes to a live container/Kubernetes environment, which can affect user data or system integrity.
The entire markdown document is written in Chinese and does not indicate that the skill is region-specific or that other language options are available. Under the policy rule for language or locale constraints, this can be a natural-language policy violation because it imposes a specific language without user opt-in.
L140-L141 明确声明敏感配置应使用环境变量且密码等敏感信息不硬编码,但紧随其后的配置文件结构示例在同一文档中直接给出了 DB_USERNAME 和 DB_PASSWORD 字段及明文值。这不是单纯信息缺失,而是文档中的安全意图与示例内容存在直接张力,容易误导使用者照此落地。
The file title and all guidance are written exclusively in Chinese, which indicates a language-specific constraint in the skill documentation. Under the policy, forcing a specific language without user opt-in or a documented regional justification is a natural-language policy concern.
The file's headings, instructions, and operational guidance are all presented in Chinese, and there is no indication that the skill is intentionally limited to Chinese-speaking users or a China-specific deployment context. Per the policy, forcing a specific language without user opt-in is a natural-language policy concern.
Line L008 states '切换到root用户', which asserts a concrete execution step, but the shown Dockerfile fragment contains no USER instruction or equivalent command that actually switches users. This is an active contradiction between inline documentation and the code example, not merely missing detail.
No suspicious patterns detected.