Back to skill

Security audit

QA Architecture Auditor

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate local QA auditing skill, but untrusted repositories can influence report HTML and may cause reads outside the selected folder.

Review before installing. Use this only on repositories you trust or run it in a sandbox/container with read-only access limited to the target repo. Prefer Markdown output or sanitize generated HTML before opening it in a browser. Watch for the extra sibling .md file when generating HTML, and do not rely on the advertised remote git, security-scan, or max-depth behavior without fixing or validating the implementation.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
scripts/analyze_repo.py:688
Finding

Stored HTML Injection in Generated Audit Reports

Content
View full analysis
Forensic Repository Analysis | Repository: {analysis.repo_path}

``` ```python {''.join(f''' {r['severity'].upper()} {r['type']} {r['module']} {r['risk_score']} {r['description']} ''' for r in risk_entries)} ``` ```python {''.join(f'{d["name"]}{d.get("version", "N/A")}{d.get("type", "runtime")}{d.get("ecosystem", "unknown")}' for d in dep_list[:30])} ``` ```python
Test Case {i}: {test_case['title']}
text
{test_case['example']}

Validation: {test_case['validation']}

``` ### Technical Analysis The HTML report generator uses direct string interpolation for values derived from the repository being analyzed. These values include: - The repository path - Module and file paths - Dependency names and versions - Risk descriptions - Generated test-case content No HTML encoding or context-sensitive sanitization is applied before these values are inserted into element bodies and `` blocks. Consequently, characters such as `<`, `>`, `"`, and `'` retain their HTML meaning. A malicious repository can provide crafted filenames or dependency metadata containing markup such as: ```html ``` The payload is stored in the generated HTML report. It may execute when a user opens that report in a browser. Wrapping an attacker-controlled value in `` or `
text
` does not neutralize HTML because those elements still parse nested markup.

This flaw is particularly significant
...[truncated 1642 chars]
Remediation
View remediation
``` Avoid allowing inline scripts, remote scripts, frames, form submission, or unrestricted network connections. 5. Ensure content placed inside `
text
` and `` elements is also escaped. These elements do not provide an HTML security boundary.

6. Add regression tests that generate reports from repository values such as:

```text


">
```

The resulting report should contain encoded text such as `<script>`, with no executable elements in the parsed DOM.

7. Escape Markdown control characters in Markdown reports where report integrity is important, even though the confirmed active-content issue occurs in HTML output.
  ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/analyze_repo.py:202
Finding

Repository Symlinks Can Cause Reads Outside the Authorized Audit Root

Content
View full analysis
Remediation
View remediation
bool: try: resolved = candidate.resolve(strict=True) return ( not candidate.is_symlink() and resolved.is_file() and resolved.is_relative_to(repo_root) ) except (OSError, RuntimeError): return False ``` Use this check immediately before each file read: ```python if not is_safe_repository_file(file): continue content = file.read_text(encoding="utf-8", errors="ignore") ``` 3. Centralize filesystem access in one hardened helper rather than repeating `read_text()` throughout the analyzer. 4. If symlink support is required, make it an explicit opt-in option and only allow links whose resolved targets remain under the repository root. 5. Apply limits to individual file size, total bytes read, file count, and traversal depth to reduce denial-of-service exposure. 6. Treat resolution and file opening as a potential time-of-check/time-of-use race. For higher-risk deployments, run the analyzer in a sandbox or container with: - The target repository mounted read-only - No access to user home directories or host secrets - No network access unless explicitly required - CPU, memory, and filesystem limits 7. Add tests covering: - A source-file symlink to a path outside the repository - A dependency-manifest symlink outside the repository - A symlink whose target remains inside the repository - Broken links and symlink loops - Replacement of a validated file with a symlink before reading ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

There is strong alignment at a high level: the script’s primary purpose is indeed QA-oriented repository analysis and testing-strategy report generation, with security/audit framing and zero-trust assumptions. However, the implementation is materially less capable than the declaration suggests. Most analysis is heuristic and static; many methodology sections are generic templates. Important advertised behaviors are absent or incomplete: the manifest and CLI indicate git URL support and limited network use for clone/fetch, but the supplied chunk contains no cloning/fetch logic; a --security-scan flag exists but is unused and security_scan_performed remains false; max-depth is accepted but never applied. Dependency parsing is narrow, and some report sections are inconsistent due to duplicate method definitions overriding richer implementations. These gaps make the description overstate actual capabilities enough to count as a mismatch, even though the broad purpose is similar.

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 15)May include surrounding context.

md
files: ["scripts/analyze_repo.py"]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `references/methodologies.md` - Testing approach definitions and decision criteria

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 · references/risk-assessment.md (reported line 130)May include surrounding context.

md
| **File upload vulnerabilities** | High | `move_uploaded_file($tmp, $user_path)` | Validate type, name, path |
| **Session fixation** | Medium | Not regenerating session ID on login | `session_regenerate_id()` |
| **Hardcoded credentials** | High | `$db_pass = "secret";` | Environment variables |
| **Insecure direct object references** | High | `?file=../../etc/passwd` | Path validation |
| **Missing CSRF tokens** | Medium | No anti-forgery on forms | Use CSRF tokens |

**PHP Static Analysis**: PHPStan, Psalm, RIPS, SonarQube

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% 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/analyze_repo.py (reported line 1318)May include surrounding context.

python
assert status == 422

# 4. Authentication required
DELETE /api/users/1
assert status in [401, 403]

# 5. Resource not found

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 32)May include surrounding context.

Clone the repository into your OpenClaw workspace:

bash
mkdir -p ~/.openclaw/workspace/skills
git clone https://github.com/shifulegend/qa-architecture-auditor.git ~/.openclaw/workspace/skills/qa-architecture-auditor

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill declares significant capabilities including filesystem access, shell execution, and network/git operations, but does not define an explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where consumers may not understand or constrain what the skill can do, increasing the risk of unintended file access, command execution, or outbound network activity when the skill is invoked.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script writes an extra Markdown file whenever HTML output is selected, which contradicts the declared manifest behavior of writing only the specified output report file. This can violate caller expectations, create unintended artifacts in the working directory, and potentially overwrite an existing .md file adjacent to the chosen output path.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The self-audit makes unsupported claims about serverless architecture, authentication, database operations, and cryptography, while also presenting Markdown files as high-complexity code modules. In a security-oriented QA skill, fabricated or weakly evidenced analysis can mislead users into trusting inaccurate test strategy outputs, causing real risks to be missed and resources to be misallocated.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The docstring at L0003-L0008 explicitly says environment variables accessed: none, while the tool advertises support for git URLs at L1660 and imports subprocess for clone/fetch operations. In practice, invoking git as a subprocess uses inherited environment variables such as HOME, SSH-related variables, and git configuration environment, so the 'none' claim contradicts the actual execution model.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This code accepts a repository argument described as a path or git URL and the file-level manifest states that git clone/fetch network activity may occur when a URL is provided. Although the top docstring documents the behavior, there is no user-facing print or confirmation near argument handling or analysis start that explicitly warns that a remote URL may cause network access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML root sets lang="en", which imposes an English locale in the document without any visible opt-in, alternate locale support, or stated region-specific justification. Under the policy for natural-language violations, forced language selection can be a locale-policy issue when no user choice is offered.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

Assigning white-box path coverage to Markdown reference files indicates the auditor can misclassify non-executable content as code logic. This degrades the reliability of the skill's output and could cause teams to waste effort on meaningless tests while overlooking actual executable paths that need coverage.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.