Back to skill

Security audit

Webpack Config

Security checks for vulnerabilities and agentic risk

Overview

This skill appears intended to generate webpack configuration, but its generator can embed unsafe user-supplied values into executable JavaScript config files.

Review before installing or using this skill in automation. Only pass trusted, simple arguments to the webpack generator, inspect any generated webpack.config.js before running webpack, and avoid using untrusted project metadata or user input to populate --entry, --output, --port, or similar options.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/webpack.sh:11
Finding

Unsanitized Generator Arguments Allow Arbitrary JavaScript Injection

Content
View full analysis
Remediation
View remediation
65535 )); then printf 'Invalid port: %s\n' "$PORT" >&2 exit 1 fi ``` 2. **Serialize string values instead of interpolating them into JavaScript literals.** Use a trusted serializer, such as Node.js `JSON.stringify`, to produce safe JavaScript string literals: ```bash js_string() { node -e 'process.stdout.write(JSON.stringify(process.argv[1]))' "$1" } ENTRY_JS="$(js_string "$ENTRY")" OUTPUT_JS="$(js_string "$OUTPUT")" ``` Then emit the already serialized values without adding manual quotes: ```javascript entry: ${ENTRY_JS}, path: path.resolve(__dirname, ${OUTPUT_JS}), ``` 3. **Use fixed booleans for source-map settings.** Ensure `SOURCEMAP` can only be the literal `true` or `false`, rather than accepting arbitrary expressions. 4. **Validate path arguments.** Reject NUL bytes, newlines, and other control characters. If the intended functionality only permits project-relative paths, reject absolute paths and traversal components such as `..`. 5. **Fail on malformed or unknown arguments.** Do not silently ignore unrecognized options. Verify that every option requiring a value has one before accessing `$2`. 6. **Add adversarial tests.** Test quotes, backslashes, newlines, backticks, `${...}`, commas, braces, and JavaScript expressions in every interpolated option. Generated configuration files should also be parsed in a non-executing validation step to ensure arguments remain data rather than code. ]]>
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The header comment and help text describe a 'Developer workflow automation tool' with commands like init, check, build, test, docs, and clean. However, each command implementation only echoes a message and logs the invocation to a local file, which contradicts the documented implication that these commands actually initialize, check, build, test, generate docs, or clean a project.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shell script emits substantial natural-language content in Chinese, including generated webpack comments and the CLI help text, but does not provide any user opt-in, language selection flag, or justification for a Chinese-only locale. That can violate language/locale policy when users expect skills to be language-neutral or selectable.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language description is presented in both Chinese and English, but the skill does not state how language will be chosen or whether the user can opt into a preferred locale. This can create a locale-policy issue if the skill responds in a language the user did not request.

Content

No source excerpt is available for this finding.