T09 · Insecure Skill Coding Practices
- Location
scripts/generator.py:137- Finding
Unrestricted Output Path Allows Arbitrary File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This code-generator skill is not malicious, but it can write and overwrite local project files with weak path and input controls, so it should be reviewed before use.
Use this only in a disposable or clearly chosen output directory, review generated files before running them, and avoid untrusted model names, field names, project names, or output paths. Do not rely on its advertised API-client or multi-language features without verifying the actual implementation.
scripts/generator.py:137Unrestricted Output Path Allows Arbitrary File Overwrite
scripts/generator.py:20Unsanitized Identifiers Permit Python Source Injection into Generated Code
The skill advertises code-generation behavior that inherently writes files and may invoke shell-like operations, but it declares no explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where an agent may execute filesystem or command actions without the user being clearly informed of the required capabilities or constrained to a narrow set of tools.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
neckr0ik-code-generator crud User --fields "name,email,created_at"
# Generate an API client
neckr0ik-code-generator api-client --spec https://api.example.com/openapi.json
# Generate tests
neckr0ik-code-generator tests --source ./src --type unit
The description is broadly scoped and can trigger on vague requests to 'generate code' or 'scaffold' without limiting technologies, trust boundaries, or safe-use conditions. In an agent ecosystem, this can cause overbroad invocation and lead the skill to produce high-risk boilerplate such as insecure CRUD endpoints, API clients, or database code in contexts where stronger review or narrower tooling should apply.
The description says the skill generates scaffolds, CRUD, models, tests, and config, but it does not clearly warn that these actions will create directories and write multiple files to disk. This can surprise users and lead to unintended repository modifications, overwrites, or generation in the wrong location.
The api-client command accepts a URL for --spec, but the description does not warn users that the skill may perform outbound network access to fetch remote OpenAPI documents. Unannounced remote fetching can expose metadata, trigger requests to attacker-controlled endpoints, or introduce untrusted input into downstream code generation.
This code creates directories and writes several files into the target output path, which is a safety-relevant filesystem modification. While it prints success messages afterward, there is no prior confirmation prompt and the docstrings/comments do not explicitly warn that running the scaffold command will create or overwrite project files in the specified location.
No suspicious patterns detected.