Back to skill

Security audit

Vibe Sanitizer - Check and Sanitize git repository for secrets

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its repository-sanitizing purpose, but some modes can leak raw secrets or local paths, so it should be reviewed before installation.

Install only if you are comfortable with a local repository tool that reads repo contents and can rewrite files when asked. Avoid sanitize --mode stdout on repositories containing real secrets, do not share scan output without reviewing it for full paths, commit or back up before in-place edits, and do not rely on commit-scope scans as proof that a historical commit is clean.

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 (5)

T09 · Insecure Skill Coding Practices

Error
Location
src/vibe_sanitizer/commands.py:48
Finding

Stdout sanitization discloses review-required secrets without redaction

Content
View full analysis
str: applicable = [ finding for finding in findings if finding.replacement_text is not None and (finding.editable_in_place or not in_place_only) ] if not applicable: return text ``` Review-required detectors are explicitly excluded from in-place replacement: ```python RegexDetector( detector_id="credential_url", title="Credential-bearing URL", category="secret", severity="high", message="URLs containing usernames and passwords need review before commit.", pattern=re.compile( r"\b[A-Za-z][A-Za-z0-9+.-]{1,20}://[^/\s:@]+:[^@\s/]+@[^\s'\"`<>]+" ), preview_builder=lambda match: preview_credential_url(match.group()), replacement_builder=lambda match, placeholders: sanitize_credential_url( match.group(), placeholders["credential_url_user"], placeholders["credential_url_password"], ), priority=70, editable_in_place=False, review_required=True, ), ``` ### Technical Analysis The `st ...[truncated 1745 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
src/vibe_sanitizer/detectors/builtins.py:140
Finding

Scan reports expose complete machine-specific filesystem paths

Content
View full analysis
Remediation
View remediation
/…/filename` - `C:\Users\\…\filename` - `/tmp/` - Consider exposing only the detector name, repository-relative finding location, and a generic placeholder. - Ensure both text and JSON report tests reject complete absolute paths. - Treat previews as potentially public output and apply the same disclosure policy used for credentials. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
src/vibe_sanitizer/git.py:23
Finding

Commit scope reads current working-tree files instead of committed blob content

Content
View full analysis
Remediation
View remediation
:` blob. - Creating a temporary archive or isolated worktree for the exact resolved commit. - Do not construct a single shell command; continue passing arguments as a list to `subprocess`. - Represent commit-scope inputs as `(repository-relative path, blob bytes)` rather than ordinary working-tree `Path` objects. - Ensure export copies blob content and file modes from the selected commit. - Add regression tests where committed content differs from working-tree content, including deleted and renamed files. - Include the fully resolved commit identifier in the report so users can verify what was audited. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
src/vibe_sanitizer/filesystem.py:10
Finding

Unbounded whole-file reads allow memory and CPU exhaustion

Content
View full analysis
str | None: data = path.read_bytes() if is_binary_content(data): return None return data.decode("utf-8", errors="replace") ``` ### Technical Analysis `Path.read_bytes()` loads the complete selected file into memory before binary-content detection. There is no file-size limit, streaming strategy, timeout, or resource budget. If a large file contains no NUL byte, it is decoded into an additional string allocation and passed through every enabled regular-expression detector. Sanitization and export may then create further full-size copies during replacement processing. This can cause substantial memory amplification and CPU consumption. Because working-tree scope includes tracked and untracked non-ignored files, a repository can trigger this condition without first committing the oversized file. ### Attack Path 1. An attacker supplies a repository containing a very large non-NUL file in the selected Git scope. 2. A user or automated agent invokes scan, sanitize, or export. 3. `read_bytes()` allocates memory for the complete file. 4. UTF-8 decoding allocates another complete representation. 5. Multiple detector passes consume additional CPU, and replacement operations may allocate more copies. 6. The process becomes unresponsive, is terminated by the operating system, or disrupts the hosting agent or CI job. ### Impact Assessment No additional privileges are obtained. The attacker can consume resources available to the scanner process and may affect the broader agent, CI worker, or shared host if resource isolation is weak. The practical scope includes denial of service, delayed security checks, and failed sanitization or export workflows. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
src/vibe_sanitizer/git.py:36
Finding

External symlink resolution causes an uncaught repository-boundary exception

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises substantive repository analysis and sanitization behavior, but the supplied code chunk contains only package metadata (version). Based on this code alone, none of the core described capabilities are present. This is a material description-to-behavior mismatch.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · src/vibe_sanitizer/detectors/builtins.py (reported line 65)May include surrounding context.

python
title="GitHub token",
            category="secret",
            severity="high",
            message="GitHub personal access tokens should never be committed.",
            pattern=re.compile(r"\b(?:gh[pours]_[A-Za-z0-9]{20,}|github_pat_[A-Za-z0-9_]{20,})\b"),
            preview_builder=lambda match: mask_token(match.group(), keep_prefix=4, keep_suffix=4),
            replacement_builder=lambda _match, placeholders: placeholders["github_token"],

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill instructs the agent to run shell commands and perform file reads/writes, but it declares no explicit tool scope such as allowed-tools or permissions. That creates an authorization ambiguity where a host agent may permit broader capabilities than intended, increasing the chance of unintended repository modification or command execution during use.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The skill describes in-place sanitization commands that rewrite files in the original repository, but it does not present a strong, explicit warning that this operation modifies the source repo and may irreversibly change tracked or staged content. In agent-driven workflows, that omission can lead to accidental destructive edits, especially if the agent executes the documented command without a separate confirmation step.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes scanning an existing Git repository for secrets or paths and sanitizing findings in place or exporting a sanitized copy. This function creates a new repository with git init, which is a repository-management capability rather than an obvious requirement for scanning or sanitizing content.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · src/vibe_sanitizer/git.py (reported line 51)May include surrounding context.

python
def initialize_new_repo(path: Path) -> None:
    path.mkdir(parents=True, exist_ok=True)
    subprocess.run(
        ["git", "init", "-b", "main", str(path)],
        check=True,
        capture_output=True,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · src/vibe_sanitizer/git.py (reported line 60)May include surrounding context.

python
def _run_git(repo_root: Path, args: list[str]) -> str:
    completed = subprocess.run(
        ["git", *args],
        cwd=repo_root,
        check=False,