Back to skill

Security audit

C Support Library

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its C analysis purpose, but its broad tool authority and generated build/test files create review-worthy risks if used on untrusted projects.

Install only if you expect this skill to read C/CMake projects and generate test/build files. Be careful on untrusted repositories: review generated C and CMake before building, pin Python dependencies, and consider replacing FetchContent tags with reviewed commits or vendored dependencies.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
lib/unity_templates.py:35
Finding

Generated C and CMake Injection Through Unvalidated Input

Content
View full analysis
str: """Generate a complete Unity test file""" lines = [self.header] # Add include for the module under test lines.append(f'#include "{header_file}"') lines.append('') lines.append('/* Test cases */') lines.append('') test_calls = [] for func in functions: test_cases = self._generate_test_cases(func) ``` CMake files are also generated using unescaped paths: ```python def generate_cmake_integration(self, test_files: List[str]) -> str: """Generate CMakeLists.txt content for Unity tests""" content = '''# Unity Testing Framework ... ''' for test_file in test_files: test_name = test_file.replace('.c', '').replace('/', '_') content += f'add_unity_test({test_name} {test_file})\n' return content ``` Function names, types, and parameter names are similarly inserted directly into generated C syntax: ```python for func in functions: func_upper = func.name.upper() lines.append(f'') lines.append(f'/* Mock for {func.name} */') lines.append(f'extern bool {func.name}_called;') if func.return_type != 'void': lines.append(f'extern {func.return_type} {func.name}_return_value;') for param in func.parameters: lines.append(f'extern {param.type} {func.name}_{param.name}_expected;') ``` ```python for func in test_functions: lines.append(f'extern void {func}(void);') ... for func in test_functions: lines.append(f' RUN_TEST({func});') ``` ### Technical Analysis The generator treats caller-provided header paths, source paths, function names, parameter names, and type declarations as tru ...[truncated 2032 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Python Dependencies Are Not Reproducibly Pinned

Content
View full analysis
=0.23.0 tree-sitter-c>=0.23.0 pycparser>=2.22 ``` The installation instructions direct users to install these unconstrained future versions: ```bash pip install tree-sitter tree-sitter-c pycparser ``` or: ```bash pip install -r requirements.txt ``` ### Technical Analysis Each requirement specifies only a minimum version. Consequently, package resolution can select any future release. No lockfile, exact version constraint, or cryptographic package hash is provided. The package names are consistent with the Skill's declared parsing functionality, and the audit found no evidence that they are intentionally malicious. Nevertheless, installation is not reproducible. A compromised future release, maliciously replaced distribution, or incompatible update could execute code during installation or import. ### Attack Path 1. A user follows the documented installation procedure. 2. The package resolver queries the configured Python package index. 3. It selects versions newer than those reviewed by the Skill author. 4. A compromised or malicious package executes code during installation or when imported by the Skill. 5. That code runs with the permissions of the user or automation account performing installation or analysis. ### Impact Assessment A compromised dependency can generally execute arbitrary Python code with the installer or Skill process privileges. Potential consequences include: - Reading project files and environment variables. - Stealing credentials available to CI or developer environments. - Modifying source files or installed packages. - Establishing additional execution mechanisms permitted to the current account. - Altering parser output to conceal vulnerabilities or inject generated content. This is a supply-chain exposure rather than ev ...[truncated 61 chars]
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Warning
Location
lib/unity_templates.py:179
Finding

Generated CMake Configuration Retrieves Buildable Code Using a Mutable Git Tag

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
tests/test_integration.py:55
Finding

Integration Tests Write Through Predictable Shared Temporary Paths

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares powerful tools (read, write, exec) but does not define any explicit tool scope such as permissions or allowed-tools. In an agent environment, this can result in broader-than-necessary filesystem and shell access, increasing the blast radius if the skill is misused, invoked on untrusted input, or prompt-injected through project files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description and usage guidance are written in Chinese, and there is no indication that users may choose another language or that the skill is intentionally region-specific. This can violate language/locale policy because it imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The manifest describes CMake analysis and Unity test generation, so parsing CMake files is in scope. However, this function generates CMake content that instructs downstream builds to fetch code from a public Git repository, introducing an external-retrieval capability not directly reflected in this module's parser-oriented documentation and only loosely justified by the manifest.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The dependency is specified with a lower bound only, which allows future major or minor releases to be installed without review. This can introduce supply-chain risk through breaking changes or a compromised upstream release, especially in automation or CI environments that resolve dependencies dynamically.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
tree-sitter>=0.23.0
tree-sitter-c>=0.23.0
pycparser>=2.22

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The dependency is specified with a lower bound only, which allows future major or minor releases to be installed without review. This can introduce supply-chain risk through breaking changes or a compromised upstream release, especially in automation or CI environments that resolve dependencies dynamically.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
tree-sitter>=0.23.0
tree-sitter-c>=0.23.0
pycparser>=2.22

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
91% confidence
Finding

The dependency is specified with a lower bound only, which allows future major or minor releases to be installed without review. This can introduce supply-chain risk through breaking changes or a compromised upstream release, especially in automation or CI environments that resolve dependencies dynamically.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
tree-sitter>=0.23.0
tree-sitter-c>=0.23.0
pycparser>=2.22