T09 · Insecure Skill Coding Practices
- Location
scripts/_shared.mjs:108- Finding
Process-Wide TLS Certificate Verification Disabled for Authoritative Legal Downloads
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a disclosed Kazakhstan tax helper, but its scripts can read or overwrite broader local files and can update legal data through insecure downloads.
Install only if you are comfortable treating it as a local legal-text helper, not a professional tax authority. Do not let untrusted prompts choose --file, --out, --html, or --insecure arguments; keep file paths inside the skill's data directory, prefer manually saved and verified HTML from adilet.zan.kz, and verify important tax answers against official sources before acting on them.
scripts/_shared.mjs:108Process-Wide TLS Certificate Verification Disabled for Authoritative Legal Downloads
scripts/search.js:187Arbitrary Readable Local Files Can Be Searched and Disclosed Through Standard Output
scripts/fetch.js:32Caller-Controlled Output Path Allows Overwriting Arbitrary Writable Files
The documented maintenance features fetch remote content, update on-disk corpora, and modify version metadata, which materially differs from the declared purpose of answering tax questions. In context, this is dangerous because users or orchestration logic may invoke the skill expecting safe retrieval while it can perform side effects and ingest untrusted remote data.
The documented maintenance features fetch remote content, update on-disk corpora, and modify version metadata, which materially differs from the declared purpose of answering tax questions. In context, this is dangerous because users or orchestration logic may invoke the skill expecting safe retrieval while it can perform side effects and ingest untrusted remote data.
Instruction-capable artifact exceeds whole-file semantic analysis limits
Instruction-capable artifact exceeds whole-file semantic analysis limits
Instruction-capable artifact exceeds whole-file semantic analysis limits
Instruction-capable artifact exceeds whole-file semantic analysis limits
The file explicitly states the tax code has lost force and is outdated, while the skill metadata claims to use the current edition. In a tax assistant, this is dangerous because users may receive incorrect legal guidance, rates, filing obligations, or compliance advice, causing financial loss, reporting errors, or regulatory violations.
The --file parameter is resolved relative to the workspace CWD and passed directly to readFileSync with only an existence check, allowing the skill to read arbitrary files from the workspace. In an agent setting, this can expose unrelated sensitive data such as secrets, prompts, source code, or user documents, far beyond the tax-assistant purpose.
Suspicious Unicode normalization or mixed-script content
The trigger scope claims applicability to 'any tax question', but the actual corpus is limited to the tax code and a few related laws. Overbroad routing can send unrelated or high-stakes tax/compliance questions to a tool that may respond from an incomplete corpus, potentially causing incorrect advice or unnecessary execution of its auxiliary workflows.
The file states that language is determined automatically from the request content and that explicit language selection is unnecessary. This imposes a locale/language behavior without user opt-in, which can mis-handle bilingual or preference-sensitive users and fits the language-policy violation category.
Suspicious Unicode normalization or mixed-script content
SQP-3 applies to all file types and covers natural-language policy violations such as forcing a specific language without user opt-in. This file presents all content only in Kazakh and does not indicate that the skill is region-specific or that users can choose another language.
Suspicious Unicode normalization or mixed-script content
The entire skill content is presented exclusively in Russian, and there is no surrounding instruction offering users a language or locale choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified.
Suspicious Unicode normalization or mixed-script content
Suspicious Unicode normalization or mixed-script content
The skill description promises Russian and Kazakh support, but this file is entirely Russian and offers no user-choice mechanism or equivalent Kazakh source in the analyzed artifact. In a legal/tax context, language asymmetry can mislead users, degrade accessibility, and increase the risk of misunderstanding compliance-critical obligations, especially for Kazakh-language queries.
The code forces requests to use only "kaz" or defaults everything else to "rus", which is a locale constraint embedded in logic rather than offered as a user choice. Under the policy, language or locale restrictions should be opt-in or clearly documented as region-specific; this file contains no such justification.
The helper exposes a code path that disables TLS certificate validation globally by setting NODE_TLS_REJECT_UNAUTHORIZED=0. That makes HTTPS requests vulnerable to man-in-the-middle interception and tampering, which is especially risky here because the skill fetches legal/tax content from a remote government-related site and could ingest falsified statutes or rules.
Setting NODE_TLS_REJECT_UNAUTHORIZED to 0 disables certificate verification for TLS connections, weakening transport security for the entire Node.js process. An attacker on the network path could spoof the remote server, alter downloaded legal content, or capture sensitive traffic, and the tax-assistant context makes content integrity important because users may rely on the returned legal guidance.
export function applyInsecure(insecure) {
if (insecure) {
console.warn("⚠️ --insecure: проверка TLS отключена. Используйте только в доверенной сети.");
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
}
}
Suspicious Unicode normalization or mixed-script content
The manifest describes a skill focused on answering tax questions about the Kazakhstan Tax Code, KGD rules, rates, deductions, and specific tax declarations. The script documentation explicitly says it can download 'any document' from adilet.zan.kz and lists non-tax laws such as budget, health insurance, social insurance, and pension statutes, which broadens the implemented scope beyond the stated tax-focused purpose.
The '--insecure' mode explicitly enables less secure network retrieval for remote HTML fetching, which can expose the process to man-in-the-middle tampering if used on untrusted networks. Because the fetched content is then parsed and written into the skill’s knowledge base as Markdown, an attacker could poison source documents and cause downstream misinformation or prompt/data contamination.
Suspicious Unicode normalization or mixed-script content