Back to skill

Security audit

winforms-to-qt-mapper

Security checks for vulnerabilities and agentic risk

Overview

This migration skill is not clearly malicious, but it needs Review because its generator can write unsafe output from unvalidated mapping data and its analysis reports overstate incomplete or simulated results.

Install only if you are comfortable treating this as a Chinese-language migration aid, not a finished automatic converter. Use it on disposable copies of projects, review any mapping JSON before generation, choose an empty output directory, and inspect generated CMake/C++/UI files before building or running them.

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/generate_qt_code.js:430
Finding

Unvalidated Mapping Data Enables Path Traversal and Generated-Code Injection

Content
View full analysis
namespace Ui { class ${className}; } class ${className} : public QWidget { Q_OBJECT public: explicit ${className}(QWidget *parent = nullptr); ~${className}(); private slots: ${form.events.map(event => `void ${event.handler}();`).join('\n ')} private: Ui::${className} *ui; // Control member variables ${form.controls.map(control => `QWidget *${control.name}; // WinForms type: ${control.type}`).join('\n ')} }; #endif // ${className.toUpperCase()}_H `; const headerPath = path.join(options.output, `include/${lowerName}.h`); fs.writeFileSync(headerPath, headerContent); } ``` The same unvalidated value is used to construct source-file paths and C++ source code: ```js function generateFormSource(form) { const className = form.name; const lowerName = className.toLowerCase(); const sourceContent = `#include "${lowerName}.h" #include "ui_${lowerName}.h" #include #include ${className}::${className}(QWidget *parent) : QWidget(parent) , ui(new Ui::${className}) { ui->setupUi(this); setupUi(); setupConnections(); } void ${className}::setupConnections() { ${form.events.map(event => ` // ${event.control}.${event.event} -> ${event.handler} connect(${event.control}, &${getQtSignalForEvent(event.event)}, this, &${className}::${ev ...[truncated 3896 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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
Findings (95)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The mismatch is especially concerning because the skill appears to generate local project files and CMake configuration while presenting itself as a comprehensive migration solution. Users may integrate generated boilerplate and hardcoded environment assumptions into production repositories, creating brittle builds, hidden portability issues, and false confidence that migration-specific concerns were addressed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The mismatch is especially concerning because the skill appears to generate local project files and CMake configuration while presenting itself as a comprehensive migration solution. Users may integrate generated boilerplate and hardcoded environment assumptions into production repositories, creating brittle builds, hidden portability issues, and false confidence that migration-specific concerns were addressed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The mismatch is especially concerning because the skill appears to generate local project files and CMake configuration while presenting itself as a comprehensive migration solution. Users may integrate generated boilerplate and hardcoded environment assumptions into production repositories, creating brittle builds, hidden portability issues, and false confidence that migration-specific concerns were addressed.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The mismatch is especially concerning because the skill appears to generate local project files and CMake configuration while presenting itself as a comprehensive migration solution. Users may integrate generated boilerplate and hardcoded environment assumptions into production repositories, creating brittle builds, hidden portability issues, and false confidence that migration-specific concerns were addressed.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 31)May include surrounding context.

md
node scripts/architecture_analyzer.js --project <路径> --output <文件>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 125)May include surrounding context.

md
node scripts/architecture_analyzer.js --project <路径> --output <文件>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 218)May include surrounding context.

md
node scripts/architecture_analyzer.js --project <路径> --output <文件>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 221)May include surrounding context.

md
node scripts/architecture_analyzer.js --project <路径> --output <文件>

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 224)May include surrounding context.

md
node scripts/architecture_analyzer.js --project <路径> --output <文件>

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script presents dependency and complexity analysis as if it were derived from the target WinForms project, but key functions return fixed placeholder data instead of computed results. In a migration-analysis skill, this can mislead users into trusting fabricated architectural conclusions, causing incorrect refactoring decisions, missed risks, and unsafe changes in enterprise codebases.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The generated Markdown report converts hard-coded dependency levels and fabricated complexity findings into authoritative-looking project documentation. Because this skill is explicitly marketed for enterprise WinForms-to-Qt migration guidance, false reports can directly drive architecture, testing, and prioritization decisions based on nonexistent evidence.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/cli/index.js (reported line 125)May include surrounding context.

js
.option('--intelligent', '启用智能映射', true)
    .option('--no-intelligent', '禁用智能映射(使用基础映射)')
    .option('--template <type>', '项目模板类型', 'basic-qt-widgets')
    .option('--skip-validation', '跳过迁移验证')
    .option('--dry-run', '试运行,不实际生成文件')
    .action(async (options) => {
        try {

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description and the entire user-facing README content are written in Chinese, with no indication that other languages are supported or that the user can opt into this locale. Under the policy, a skill should not effectively impose a specific language unless it offers a choice or clearly justifies a region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings and comments that present the skill exclusively in Chinese, including the main description and subsequent console output. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The package manifest includes outbound/network and server-side capabilities (axios, ws, express, cors, helmet, compression) that are not clearly required for an offline WinForms-to-Qt migration skill. This expands the attack surface by enabling data exfiltration, remote communication, or unexpected service exposure if later code paths use these libraries.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This section is presented as an automation script for analyzing WinForms/C# project complexity, yet it walks .cs files and passes their contents to Python's ast.parse, which only parses Python syntax. That is an active contradiction between the documentation's stated intent and the shown implementation, and would mislead users about the tool's actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file is entirely framed in Chinese and presents the guidance as the default skill content, with no indication that users may choose another language or locale. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the regional constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file is written as a prescriptive reference entirely in Chinese, beginning with a Chinese-only title. Under the policy rule, forcing a specific language without user opt-in is a natural-language locale violation unless the locale constraint is explicitly justified, which is not stated here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The interface example declares methods such as StopAcquisition, IsInitialized, IsAcquiring, LoadConfig, SaveConfig, ConnectToServer, DisconnectFromServer, IsConnected, and GetErrorCount, plus signals like DataReceived and AcquisitionProgressChanged. In the shown implementation section, only Initialize, Shutdown, StartAcquisition, GetLatestData, GetStatusMessage, and GetLastError are implemented, creating an active documentation-to-code contradiction rather than a mere omission.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The tests call wrapper_->IsInitialized(), wrapper_->GetErrorCount(), and wrapper_->IsAcquiring(), but those methods are not implemented in the provided MainControlWrapper.cpp sample. This directly conflicts with the document's claim of a working, fully tested implementation and suggests the code and accompanying test narrative are inconsistent.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes this skill as providing migration guidance, architecture analysis, control mapping, event conversion, optimization, and testing guidance. In this document, the example for measuring memory usage launches an external system command via QProcess (tasklist), which introduces subprocess execution capability that is not justified by a documentation-oriented migration-mapping skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The title and entire document are written in Chinese, and there is no indication that users may choose another language or that the content is intentionally limited to a Chinese-speaking audience. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

该文档在全局字体设置中明确指定使用“Microsoft YaHei”,并在全文中将其作为统一修复方案的一部分。这会把界面默认呈现绑定到特定中文区域字体,但文档没有说明仅适用于中文本地化场景,也没有提供其他语言/区域的可选方案。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The entire skill document is written exclusively in Chinese and includes fixed Chinese UI text examples such as button labels and window titles, without indicating that language selection is optional or that the skill is intended only for a Chinese-language environment. This can violate language/locale policy because it effectively forces one locale on users without opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Natural-language strings throughout the file, including the header comment, console output, error messages, and help text, are presented only in Chinese. This imposes a specific language choice on all users with no documented opt-in, selection mechanism, or locale justification.

Content

No source excerpt is available for this finding.