Back to skill

Security audit

Code Analysis Skills 1.0.6

Security checks for vulnerabilities and agentic risk

Overview

This is a real local Git analysis skill, but it needs Review because it scores identifiable developers for “slacking” and has report-generation safety gaps.

Install only for repositories you are authorized to analyze, get consent before evaluating named developers, avoid broad --scan-all runs on private directories, treat scores and slacking labels as rough repository signals rather than HR facts, keep generated reports private, prefer Markdown/JSON or sanitized HTML/PDF for untrusted repos, and pin dependencies before production use.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
src/reporters/html_reporter.py:243
Finding

Unescaped Repository Metadata Enables Stored HTML Injection and Unsafe PDF Resource Retrieval

Content
View full analysis
📁 {{ repo_name }} {% set all_authors = [] %} {% for key, analyzer_data in repo_metrics.items() %} {% if key != 'evaluations' and analyzer_data is mapping %} {% for author in analyzer_data.keys() %} {% if author not in all_authors %} {% if all_authors.append(author) %}{% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% for author in all_authors | sort %}

👤 {{ author }}

``` ```python class HtmlReporter(BaseReporter): """Generates styled HTML reports from analysis metrics.""" def generate(self, metrics: Dict) -> str: """Generate an HTML report using Jinja2 template.""" template = Template(HTML_TEMPLATE) return template.render(metrics=metrics) ``` The resulting unescaped HTML is subsequently passed to several PDF rendering engines: ```python def generate_to_file(self, metrics: Dict, output_path: str) -> str: """ Generate a PDF report and write it to a file. Args: metrics: Analysis metrics dict. output_path: Path to write the PDF file. Returns: The output file path. """ # Try HTML-to-PDF engines first for best visual quality html_content = self.generate(metrics) for method in [ self._try_weasyprint, self._try_pdfkit, self._try_xhtml2pdf, ]: try: return method(html_content, output_path) except (ImportError, Exception) as e: logger.debug("PDF method failed: %s", e) continue # Fall back to reportlab (always available) ...[truncated 3719 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Third-Party Dependencies Create Supply-Chain and Build Reproducibility Risk

Content
View full analysis
=3.1.40 radon>=6.0.1 pylint>=3.0.0 pydriller>=2.6 tabulate>=0.9.0 jinja2>=3.1.2 pyyaml>=6.0.1 click>=8.1.7 reportlab>=4.0 ``` The package metadata similarly permits arbitrary future compatible releases: ```toml [build-system] requires = ["setuptools>=68.0", "wheel"] build-backend = "setuptools.backends._legacy:_Backend" [project] name = "code-analysis-skills" version = "1.0.0" description = "Git repository code analysis skill for ClawHub" readme = "README.md" license = {text = "MIT"} requires-python = ">=3.9" dependencies = [ "gitpython>=3.1.40", "radon>=6.0.1", "pylint>=3.0.0", "pydriller>=2.6", "tabulate>=0.9.0", "jinja2>=3.1.2", "pyyaml>=6.0.1", "click>=8.1.7", ] ``` The installation instructions also resolve unconstrained package versions: ```bash pip install gitpython pydriller radon tabulate jinja2 click reportlab ``` Optional PDF engines are installed in the same manner: ```bash pip install weasyprint # Recommended, requires system cairo library # or pip install pdfkit # Requires system wkhtmltopdf ``` ### Technical Analysis All runtime and build dependencies are resolved using minimum-version constraints or no version constraints. Consequently, two installations performed at different times can obtain different package versions and code. If a future release is compromised, malicious, or incompatible, following the documented installation process can install that release automatically. Python packages and their transitive dependencies may execute code during build, installation, or import. Build dependencies such as `setuptools` and `wheel` are also not locked o ...[truncated 1382 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (59)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

There is a clear description-to-code mismatch because the declared purpose describes substantial analysis functionality, but the provided code does not implement that functionality at all. The code neither analyzes Git repositories nor evaluates developers, code quality, commit patterns, or efficiency. Instead, it is effectively an empty placeholder/module header. This is a materially different actual behavior from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Yes, this is a mismatch. The declared description promises substantial analysis functionality focused on repositories and developer behavior, but the supplied code chunk is only an empty module stub (# Analyzers Module). There is no observable implementation supporting the stated purpose. Therefore the actual behavior does not accurately represent the declared functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The declared description promises a comprehensive developer evaluation skill covering repository analysis, developer comparison, work habits, efficiency, code quality, and slacking behaviors, with explicit evaluative outputs like scores and grades. The supplied code only performs a focused analysis of code-style-adjacent repository metadata: commit message conventions, issue references, file type/category distributions, and file change sizes per author. While this partially aligns with 'commit patterns' and some code style analysis, it materially falls short of the broader declared purpose and omits the central evaluative and behavioral capabilities described. Therefore, this code chunk does not accurately represent the declared functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Yes, this is a mismatch. The description claims a substantial feature set centered on analyzing Git repositories and evaluating developers. However, the provided code chunk is only an empty Python package initializer with no functional logic. There is no evidence of repository access, commit analysis, code quality analysis, developer comparison, scoring, grading, or suggestion generation. This is a materially different actual behavior from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises substantial analytics and evaluation functionality, but the supplied code chunk is effectively empty aside from a comment in a package initializer. Its actual behavior does not match the claimed purpose at all, indicating a clear description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description promises a high-level analytical skill focused on developer evaluation and repository/code analysis. The supplied code does not implement any of those capabilities. Instead, it performs repository discovery on the local filesystem and extracts minimal repository metadata. While repo scanning could be a supporting subcomponent of a larger analysis system, this code chunk’s actual purpose is materially different from the declared purpose and lacks the core promised functionality.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Yes, this is a mismatch. The declared description promises a substantial analysis capability focused on Git repositories and developer performance evaluation. However, the provided code chunk is merely an empty init.py-style file with a comment and no executable behavior. The actual code does not implement any of the declared primary functions, access patterns, or outputs. This is not a case of minor incompleteness or hidden supporting detail; the visible code has no meaningful relation to the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Yes, this is a mismatch. The description claims substantial analytics functionality focused on repositories and developer evaluation, but the provided code chunk contains only a comment in tests/init.py and no operative logic. There are no implemented capabilities matching the declared purpose, so the actual behavior is materially different from the description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Yes, there is a material mismatch. The declared description promises high-level analysis of repositories and developers, including behavioral and quality assessments with scores and recommendations. The actual code chunk only contains tests for discovering Git repositories on disk. It validates path handling and recursive scanning behavior, but does not analyze commits, compare developers, compute metrics, evaluate code quality, or generate reports. Repository scanning could be a supporting component of a larger analysis system, but this chunk’s primary behavior is much narrower and does not substantiate the declared purpose.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · src/analyzers/code_style_analyzer.py (reported line 129)May include surrounding context.

python
if any(
            pattern in path_lower
            for pattern in [
                "config", ".yml", ".yaml", ".toml", ".ini", ".cfg", ".env",
                "dockerfile", "makefile", ".json",
            ]
        ):

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · src/analyzers/slacking_analyzer.py (reported line 237)May include surrounding context.

python
if any(
            pattern in path_lower
            for pattern in [
                "config", ".yml", ".yaml", ".toml", ".ini", ".cfg", ".env",
                "dockerfile", "makefile", ".json",
            ]
        ):

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The weakness and verdict generators contain direct shaming and accusatory phrases such as 'Lazy commit messages', 'Stop coding before you think', 'Time to have an honest conversation', and 'Needs a wake-up call.' Because this skill is meant to produce per-developer evaluations, these strings can be operationalized into targeted harassment, workplace humiliation, or biased performance judgments against identifiable individuals.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · tests/test_scanner.py (reported line 21)May include surrounding context.

python
# Create a temporary git repo
        repo_path = str(tmp_path / "test_repo")
        os.makedirs(repo_path)
        os.system(f"cd {repo_path} && git init && git commit --allow-empty -m 'init'")

        scanner = RepoScanner()
        repos = scanner.scan_single(repo_path)

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · tests/test_scanner.py (reported line 50)May include surrounding context.

python
# Create a temporary git repo
        repo_path = str(tmp_path / "test_repo")
        os.makedirs(repo_path)
        os.system(f"cd {repo_path} && git init && git commit --allow-empty -m 'init'")

        scanner = RepoScanner()
        repos = scanner.scan_single(repo_path)

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · tests/test_scanner.py (reported line 65)May include surrounding context.

python
# Create a deeply nested repo
        deep_path = tmp_path / "a" / "b" / "c" / "d" / "e" / "f" / "deep_repo"
        os.makedirs(str(deep_path))
        os.system(f"cd {deep_path} && git init && git commit --allow-empty -m 'init'")

        scanner = RepoScanner()
        repos = scanner.scan_directory(str(tmp_path), max_depth=2)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file is entirely presented as a Chinese-language skill README and is explicitly named README.CN.md, with no visible statement offering users a language choice or linking language alternatives. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

整份技能说明和示例均以中文固定呈现,没有说明是否支持其他语言或由用户选择输出语言。按规则,若技能在自然语言层面强制单一语言而无用户 opt-in,属于语言/locale 政策风险。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The example trigger phrases are broad, generic requests like analyzing a repository, comparing developers, or reviewing code quality, which can overlap with ordinary user conversations and cause the skill to activate unexpectedly. In this skill’s context, accidental invocation is more dangerous because it processes sensitive developer activity and can generate evaluative outputs about individuals, increasing privacy and misuse risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are very broad and overlap with normal requests about code analysis, repository diagnostics, developer evaluation, and productivity. This can cause the skill to be invoked unexpectedly in conversations where the user did not intend sensitive workforce surveillance or repo-wide scanning, increasing the chance of over-collection of employee activity data and privacy-invasive analysis.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill explicitly instructs the agent to read repositories, generate reports, and run shell-based analysis commands, but it does not declare any tool scope or allowed-tools boundary. In a skill that processes user-supplied paths and can write output files, missing capability restrictions increases the blast radius if the skill is invoked unexpectedly or against sensitive directories.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough to activate on common requests like 'analyze code' or 'this repository has problems,' which can cause the skill to run in contexts the user did not intend. Because the skill is designed to inspect repositories, use shell commands, and produce output files, overbroad activation materially increases the chance of unintended access to local code or personal developer data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guidance says users can simply describe what they need in natural language without strong activation constraints. In a skill that can inspect local repositories and derive sensitive employee-behavior metrics, permissive invocation semantics increase the risk of accidental activation, analysis of the wrong repository, or use without proper consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file contains natural-language content exclusively in Chinese, and there is no indication that the skill is region-specific or that users may choose another language. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest describes a very broad capability set spanning repository scanning, developer profiling, efficiency scoring, and 'slacking behaviors' without clear trigger boundaries or safety constraints. This increases the risk of overbroad invocation and misuse for invasive employee surveillance or unfair personnel evaluation beyond a narrowly scoped code-quality task.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly promotes scoring of 'slacking behaviors' and direct developer evaluations without documenting methodology, consent requirements, appeal mechanisms, or safeguards against biased inferences. In context, this enables reputational harm and abusive workplace monitoring by turning limited repository activity into unsupported judgments about employee diligence or performance.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.