Back to skill

Security audit

miaoda-app-chat-sync

Security checks for vulnerabilities and agentic risk

Overview

This skill performs its stated repository-to-JSON job, but it handles private code, GitHub tokens, and downstream file overwrites with enough unsafe scoping to require review.

Install only if you are comfortable exporting repository contents into JSON and sending them to another agent. Use fine-grained read-only tokens, trusted exact GitHub URLs, explicit commit hashes, exclude .env and credential files, review generated file paths and content before applying, and do not let a downstream agent blindly overwrite files.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
scripts/git/repository.py:53
Finding
GitHub Token Disclosure to Attacker-Controlled Hosts Through Weak Host Validation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/git/repository.py:53-70` **Vulnerability Type**: Credential disclosure through improper URL validation **Risk Level**: Critical ### Complete Code Snippet ```python def _make_authenticated_url(self, repo_url: str) -> str: """Convert repo URL to use authentication if token is provided""" if not self.token or 'github.com' not in repo_url: return repo_url # Remove .git suffix for consistency repo_url = repo_url.rstrip('/') if repo_url.endswith('.git'): repo_url = repo_url[:-4] if '@' in repo_url and '://' in repo_url: parts = repo_url.split('://') # Re-add token return f"{parts[0]}://x-access-token:{self.token}@{parts[1].split('@')[1]}" if repo_url.startswith('https://'): return repo_url.replace('https://', f'https://x-access-token:{self.token}@') elif repo_url.startswith('http://'): return repo_url.replace('http://', f'https://x-access-token:{self.token}@') return repo_url ``` The credential-bearing URL is subsequently used as a Git remote: ```python auth_url = self._make_authenticated_url(repo_url) subprocess.run( ['git', 'remote', 'add', 'origin', auth_url], cwd=target_dir, capture_output=True, timeout=30 ) ``` ### Technical Analysis The code decides whether a repository is hosted by GitHub using the substring condition: ```python 'github.com' in repo_url ``` This does not validate the parsed network hostname. Attacker-controlled addresses such as the following pass the test: ```text https://github.com.attacker.example/repository https://attacker.example/path/github.com/repository ``` For an HTTPS input, the function inserts `GITHUB_TOKEN` into the URL before Git accesses it. Git may therefore transmit the token as HTTP authentication data to an attacker-controlled server. The arbitrary repository URL is accepted directly from the command line without a trusted-host al ...[truncated 1149 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse repository URLs with `urllib.parse.urlsplit()` rather than using substring matching. 2. Require the scheme to be exactly `https`. 3. Require the normalized hostname to be exactly `github.com`, or use a narrowly configured allowlist for trusted GitHub Enterprise hosts. 4. Reject URLs containing unexpected user information, malformed ports, encoded hostname components, fragments, or ambiguous parsing constructs. 5. Prevent authentication headers from being forwarded across redirects to different hosts. 6. Do not inject the credential into the remote URL. Use a restricted, temporary `GIT_ASKPASS` helper or a scoped Git HTTP authorization configuration. 7. Use fine-grained, read-only tokens restricted to the specific repository. 8. Add security tests for lookalike hosts, including `github.com.attacker.example`, `attacker-github.com`, and URLs containing `github.com` only in their path. ]]>

T01 · Skill Instruction Hijacking

Error
Location
scripts/core/prompts.py:15
Finding
Generated Instructions Force Downstream Agents to Overwrite Repository-Controlled File Paths<![CDATA[ ## Vulnerability Details **File Location**: `scripts/core/prompts.py:15-30` **Vulnerability Type**: Downstream AI Agent instruction hijacking and unsafe file overwrite **Risk Level**: Critical ### Complete Code Snippet ```python SYNC = { "action": "CREATE_OR_UPDATE_FILES", "description": "Please create or update all files in the project according to the following JSON data. IMPORTANT: Review all files before applying changes.", "rules": [ "1. MUST update ALL files in the files array - no exceptions", "2. MUST copy content EXACTLY as-is - no modifications, no reformatting, no 'improvements'", "3. MUST preserve ALL whitespace, newlines, indentation, and comments exactly", "4. MUST use EXACT file paths from path field - no path transformation", "5. If file exists: overwrite completely (NOT merge)", "6. If file does not exist: create it", "7. After updating: output complete list of all updated files (format: 1. /path/to/file)", "8. DO NOT ask for confirmation - just execute", "9. DO NOT use Git commands - file operations only", "10. DO NOT skip any file for any reason", "NOTE: These rules are suggestions for accurate file synchronization. Always review changes before applying." ] } ``` Repository-controlled paths and contents are included in the resulting instructions in `scripts/git/repository.py:496-514`: ```python with open(full_file_path, 'r', encoding='utf-8') as f: content = f.read() files_list.append({ 'path': file_path, 'action': 'CREATE_OR_OVERWRITE', 'content': content }) ``` The generated result combines those values with the imperative rules: ```python return { 'action': prompt_config['action'], 'description': prompt_config['description'], 'source': { 'repository': SensitiveInfoHandler.redact_url(repo_url), 'branch': branch, 'commit': commit_hash }, 'summary': { 'files ...[truncated 2907 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove instructions such as “DO NOT ask for confirmation,” “no exceptions,” and “DO NOT skip any file.” 2. Describe repository paths and contents explicitly as untrusted data rather than authoritative instructions. 3. Require explicit user approval after showing a file-by-file diff. 4. Require downstream consumers to resolve every output path against a fixed project root. 5. Reject absolute paths, `..` traversal components, device paths, alternate data streams, and paths that resolve outside the project root. 6. Prevent writes through symlinks or junctions. 7. Apply deny rules for sensitive destinations such as Agent configuration, credential files, Git hooks, CI secrets, and system configuration. 8. Separate data from instructions using a documented schema whose fields cannot override consumer security policy. 9. Allow downstream Agents to refuse or skip unsafe entries. 10. Create backups or use a transactional staging directory before applying approved changes. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/core/temp_manager.py:69
Finding
Private Repository Contents and Token-Bearing Git Configuration Stored in World-Traversable Temporary Directories<![CDATA[ ## Vulnerability Details **File Location**: `scripts/core/temp_manager.py:69-82` **Vulnerability Type**: Unsafe temporary directory permissions **Risk Level**: High ### Complete Code Snippet ```python def create(self) -> str: """ Create a unique temporary directory. Returns: Path to the created temporary directory """ unique_id = uuid.uuid4().hex[:8] sanitized_prefix = self._sanitize_filename(self.prefix) dir_name = f"{sanitized_prefix}-{unique_id}" self._path = os.path.join(self.base_dir, dir_name) self._owns_path = True # Ensure parent directory exists os.makedirs(self.base_dir, exist_ok=True) # Create directory with restricted permissions (Unix) or standard (Windows) os.makedirs(self._path, mode=0o755, exist_ok=True) ``` The authenticated remote is written into the temporary repository by `scripts/git/repository.py:130-144`: ```python auth_url = self._make_authenticated_url(repo_url) # Step 1: Initialize git repo subprocess.run(['git', 'init'], cwd=target_dir, capture_output=True, timeout=30) # Step 2: Configure git user (required for operations) subprocess.run(['git', 'config', 'user.email', 'sync@github.com'], cwd=target_dir, capture_output=True, timeout=10) subprocess.run(['git', 'config', 'user.name', 'GitHub Sync'], cwd=target_dir, capture_output=True, timeout=10) # Step 3: Add remote subprocess.run(['git', 'remote', 'add', 'origin', auth_url], cwd=target_dir, capture_output=True, timeout=30) ``` ### Technical Analysis On Unix-like systems, mode `0755` permits all local users to traverse and read entries whose individual file permissions allow access. Standard Git checkout files are commonly readable by other users. The temporary clone can contain private source code, configuration, and other repository data. In addition, `git remote add origin <auth_url>` writes the credential-bearing URL to `.git/config`. Random dire ...[truncated 1356 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Use `tempfile.TemporaryDirectory()` or `tempfile.mkdtemp()`, which creates directories with restrictive permissions. 2. Enforce mode `0700` immediately after creation with `os.chmod()`. 3. Respect secure platform-specific access controls on Windows. 4. Never store credentials in `.git/config` or another file inside the temporary repository. 5. Use an ephemeral credential helper or restricted `GIT_ASKPASS` script instead. 6. Verify temporary directory ownership and permissions before cloning. 7. Treat cleanup failures as security-relevant errors and report them. 8. Add tests asserting that temporary directories are inaccessible to other users. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/git/repository.py:472
Finding
Sensitive and Unbounded Repository Files Are Included in Generated Agent Payloads<![CDATA[ ## Vulnerability Details **File Location**: `scripts/git/repository.py:472-514` **Vulnerability Type**: Sensitive data exposure and uncontrolled resource consumption **Risk Level**: High ### Complete Code Snippet ```python for file_path in file_paths: # Find the status for this file status = next((s for s, fp in changed_files if fp == file_path), 'M') # Skip deleted files if status == 'D': skipped_deleted += 1 continue full_file_path = os.path.join(temp_dir, file_path) try: if os.path.exists(full_file_path): # Check if file is binary by reading first few bytes with open(full_file_path, 'rb') as f: header = f.read(8192) # Read first 8KB # Check for null bytes (indicator of binary file) if b'\x00' in header: skipped_binary += 1 continue # Try to read as text with open(full_file_path, 'r', encoding='utf-8') as f: content = f.read() files_list.append({ 'path': file_path, 'action': 'CREATE_OR_OVERWRITE', 'content': content }) else: print(f" ⚠️ File not found: {file_path}") except UnicodeDecodeError: skipped_binary += 1 except Exception as e: print(f" ⚠️ Error reading {file_path}: {str(e)}") ``` The declared text extensions also explicitly include environment files in `scripts/core/constants.py:7-14`: ```python TEXT_EXTENSIONS = { '.py', '.js', '.jsx', '.ts', '.tsx', '.html', '.css', '.scss', '.less', '.json', '.yaml', '.yml', '.toml', '.md', '.txt', '.sh', '.bash', '.xml', '.sql', '.env', '.vue', '.svelte', '.rst', } ``` The CLI defines a file-count limit in `scripts/generator.py`, but the active commit-processing call does not pass or enforce it: ```python sync_parser.add_argum ...[truncated 2487 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Exclude `.env`, private keys, credential files, cloud configuration, and other secret-bearing paths by default. 2. Require explicit informed opt-in before including potentially sensitive files. 3. Apply secret scanning and content redaction before serialization. 4. Enforce a conservative per-file size limit before reading the complete file. 5. Enforce maximum file count and aggregate byte limits in `get_commit_full_changes()`. 6. Pass the parsed `--max-files` value into the active processing path and validate that it is positive and bounded. 7. Stream or truncate content where full inclusion is not necessary. 8. Display a sensitivity warning and require confirmation before output is transmitted to another service. 9. Document that generated output may contain repository secrets and should not automatically be sent to external systems. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/git/repository.py:130
Finding
GitHub Token Is Exposed Through Subprocess Arguments and Persisted in Git Configuration<![CDATA[ ## Vulnerability Details **File Location**: `scripts/git/repository.py:130-144` **Vulnerability Type**: Plaintext credential exposure in process arguments and local configuration **Risk Level**: High ### Complete Code Snippet ```python auth_url = self._make_authenticated_url(repo_url) # Step 1: Initialize git repo subprocess.run(['git', 'init'], cwd=target_dir, capture_output=True, timeout=30) # Step 2: Configure git user (required for operations) subprocess.run(['git', 'config', 'user.email', 'sync@github.com'], cwd=target_dir, capture_output=True, timeout=10) subprocess.run(['git', 'config', 'user.name', 'GitHub Sync'], cwd=target_dir, capture_output=True, timeout=10) # Step 3: Add remote subprocess.run(['git', 'remote', 'add', 'origin', auth_url], cwd=target_dir, capture_output=True, timeout=30) ``` The authenticated URL contains the token: ```python if repo_url.startswith('https://'): return repo_url.replace( 'https://', f'https://x-access-token:{self.token}@' ) ``` ### Technical Analysis The credential-bearing `auth_url` is passed as an element of the `git remote add` process argument vector. On systems where process arguments can be inspected by other users or monitoring services, the plaintext token may be exposed during command execution. The command also persists the URL in `.git/config`. The token therefore does not exist only in memory, contrary to the documentation's security claims. Output redaction does not protect process arguments or repository configuration. The absence of shell invocation prevents shell metacharacter injection, but it does not mitigate credential visibility. ### Attack Path 1. The victim invokes the Skill with `GITHUB_TOKEN`. 2. The Skill constructs a URL containing `x-access-token:<token>@`. 3. That URL is passed as an argument to `git remote add`. 4. A local process monitor, audit tool, or another authorized local user observes the argume ...[truncated 505 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never include credentials in subprocess arguments. 2. Never save credentials in Git remote URLs. 3. Use a temporary `GIT_ASKPASS` program with mode `0700`, or an equivalent scoped credential mechanism. 4. Provide the credential only to the specific fetch operation and immediately destroy the helper afterward. 5. Configure the stored remote with the credential-free repository URL. 6. Clear inherited credential-related environment variables where they are not required. 7. Use fine-grained, read-only, repository-specific tokens. 8. Correct the documentation so it does not claim that URL credentials are absent from command-line arguments or disk unless the implementation guarantees those properties. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (49)

Self-Modification

High
Category
Rogue Agent
Content
"3. MUST NOT reformat, optimize, or 'improve' any code",
        "4. MUST maintain all whitespace, indentation, and line endings",
        "5. MUST use exact file paths - no path manipulation",
        "6. MUST overwrite existing files completely (no merging)",
        "7. MUST create new files if they don't exist",
        "8. MUST output complete list of all updated files after execution",
        "9. MUST NOT ask for confirmation - execute immediately",
Confidence
85% confidence
Finding
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
| `--exclude` | Exclude files matching patterns | None |
| `--max-files` | Maximum number of files to process | 50 |
| `--output` | Save output to file | Terminal only |
| `--no-instructions` | Output pure JSON (no formatted instructions) | Show instructions |

#### Examples
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Credential Access

High
Category
Privilege Escalation
Content
**Private Repositories** (Token Required):
```bash
# Step 1: Create token (GitHub → Settings → Developer settings → Personal access tokens)
# Step 2: Set environment variable
export GITHUB_TOKEN="ghp_your_token"
# Step 3: Use the tool
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description centers on retrieving code from Git hosting platforms and converting it into structured JSON instructions for AI workflows. The supplied code instead defines a CircuitBreaker class, a custom exception, and a with_retry decorator implementing retry logic with exponential backoff and jitter. These are generic reliability helpers and do not perform any repository access, code conversion, or JSON generation. This is a clear material mismatch in primary purpose and implemented capabilities.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The declared description emphasizes a platform-agnostic tool that retrieves code from Git repositories and generates structured JSON instructions for AI agents. This code chunk does not interact with GitHub, GitLab, repositories, networking, or code parsing at all. Instead, it only stores and returns hardcoded prompt dictionaries that instruct an agent to create or overwrite files based on existing JSON input. That is a materially different purpose from fetching repository code and converting it to JSON instructions, so this chunk does not accurately represent the declared behavior.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared purpose focuses on repository access and transformation of code into structured JSON instructions for AI workflows. The supplied code chunk does not fetch from Git repositories, parse code, generate JSON, or perform agent-instruction conversion. Instead, it implements security-oriented sanitization and logging helpers for redacting secrets such as GitHub tokens, Slack tokens, API keys, bearer tokens, passwords, and URL credentials. This is a materially different primary purpose, not merely a supporting detail of the declared functionality.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
There is a clear mismatch between the declared purpose and the supplied code. The description claims repository retrieval and transformation of code into structured JSON instructions for AI agents. However, the code only manages temporary directories on the local filesystem: creating unique temp folders, sanitizing names, registering cleanup handlers, and deleting directories on exit or signal. These are generic utility functions and do not implement or directly support the claimed core behavior of fetching repositories or producing JSON instructions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description promises substantial functionality: repository fetching, platform-agnostic Git support, and generation of structured JSON instructions. The provided code chunk does not implement any of these behaviors; it is effectively an empty module placeholder with only a comment. This is a material mismatch because the actual code does not substantiate the declared primary purpose.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
The declared description promises substantial functionality: retrieving code from Git platforms and converting it into structured JSON instructions. The supplied code chunk does not implement any of these behaviors; it is only a package initializer with a comment. Because the actual code does not reflect the described primary purpose or capabilities, this is a clear description-behavior mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The declared description presents a platform-agnostic Git repository ingestion and JSON-instruction generation tool. This code chunk only handles local filesystem traversal and reading of text files, plus simple stats collection. While file processing could be a supporting component of a larger repository-to-JSON pipeline, the chunk itself does not implement the central declared capabilities of fetching from Git providers or producing structured JSON instructions for AI agents. Therefore the description does not accurately represent this supplied code chunk's actual behavior.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding
The code chunk is an instruction/output formatter, not a repository fetcher. Its main functions accept pre-provided file contents, repo metadata, or commit info and then generate JSON plus human-readable wrappers. It also saves output to files and prints to terminal. While this partially aligns with 'generates structured JSON instructions for AI agents,' the declared description specifically claims it fetches code from Git repositories (GitHub, GitLab, etc.), which this code does not do at all. The chunk also supports commit-info and full-change reporting, extending beyond the declared core purpose. Therefore the description does not accurately represent the actual behavior.

Ssd 3

High
Confidence
97% confidence
Finding
The documented workflow explicitly moves repository contents into JSON for downstream AI/automation systems, creating a semantic exfiltration path. For private repositories, this can leak source code, secrets accidentally present in files, and internal architecture to external processors or chat systems.

Ssd 3

High
Confidence
98% confidence
Finding
The template orders downstream agents to reproduce all file contents exactly and return complete file lists, effectively packaging repository data as natural-language/JSON instructions. This makes bulk code disclosure and replication easy, and the 'must follow exactly' framing increases the chance that downstream agents will treat embedded malicious text or unsafe paths as authoritative.

Ssd 3

High
Confidence
98% confidence
Finding
The info command is documented to expose complete file contents for all changed files, which is a direct data-disclosure behavior rather than merely informational metadata. In practice this can leak sensitive code, embedded credentials, internal comments, or legal/proprietary content whenever commit details are requested.

Ssd 3

High
Confidence
97% confidence
Finding
The sync workflow instructs users or agents to send full file-update payloads via chat to another tool, turning source code into chat content. This is a high-risk exfiltration channel because chat systems may log, retain, or further process the payload, and the downstream tool is told to apply it without confirmation.

Credential Access

High
Category
Privilege Escalation
Content
# Batch 1: Configuration
python3 scripts/generator.py sync \
  --repo https://github.com/username/large-project \
  --filter "*.json,*.yaml,*.toml,*.env" \
  --max-files 20 \
  --output batch1.json
Confidence
90% confidence
Finding
Including `*.env` in recommended sync/export filters risks collecting and propagating environment files that commonly contain credentials, secrets, and service endpoints. Since the workflow then serializes file contents into JSON and may forward them to another AI/chat system, the exposure path is direct and severe.

Missing User Warnings

High
Confidence
96% confidence
Finding
The workflow repeatedly instructs downstream agents to overwrite files completely, skip confirmation, and not omit any file, but it does not prominently warn users about destructive data-loss risk. In an agent ecosystem this can cause silent loss of local changes, propagation of malicious repository content, or mass overwrite of a target project.

Credential Access

High
Category
Privilege Escalation
Content
"publishedAt": 1745851829,
  "env": {
    "GITHUB_TOKEN": {
      "description": "GitHub Personal Access Token for private repository access",
      "required": false,
      "scope": "repo (read-only)"
    }
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
"publishedAt": 1745851829,
  "env": {
    "GITHUB_TOKEN": {
      "description": "GitHub Personal Access Token for private repository access",
      "required": false,
      "scope": "repo (read-only)"
    }
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
'.html', '.css', '.scss', '.less',
    '.json', '.yaml', '.yml', '.toml',
    '.md', '.txt', '.sh', '.bash',
    '.xml', '.sql', '.env',
    '.vue', '.svelte', '.rst',
}
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

High
Confidence
97% confidence
Finding
The sync prompt explicitly instructs the agent to overwrite existing files, create missing files, avoid confirmation, and skip no files. In a skill that converts repository content into instructions for AI agents, these directives can drive blind application of untrusted changes, enabling destructive repository tampering or propagation of malicious code if the upstream JSON is attacker-controlled.

Missing User Warnings

High
Confidence
96% confidence
Finding
The same unsafe no-confirmation overwrite behavior appears in the INFO prompt, which is especially dangerous because users may reasonably expect 'info' to be non-destructive. This increases the chance of accidental execution of repository-wide writes under a misleading command name, amplifying the risk beyond the sync prompt alone.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
if command not in prompts:
            raise ValueError(f"Unknown command: {command}. Available: {list(prompts.keys())}")
        
        return prompts[command].copy()
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
if command not in prompts:
            raise ValueError(f"Unknown command: {command}. Available: {list(prompts.keys())}")
        
        return prompts[command].copy()
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
def _get_git_env(self) -> Dict[str, str]:
        """Get environment variables for git commands with authentication"""
        env = os.environ.copy()
        if self.token:
            env['GIT_ASKPASS'] = 'echo'
            env['GIT_TERMINAL_PROMPT'] = '0'
Confidence
72% confidence
Finding
Copying the entire parent environment into git subprocesses can unintentionally propagate sensitive credentials or unsafe git-related environment variables to a network-capable child process. In this skill context, which fetches untrusted remote repositories, inherited variables such as custom git helpers, proxy settings, SSH-related settings, or credentials can broaden the attack surface and leak secrets through subprocess behavior or indirect tooling interactions.

Static analysis

No suspicious patterns detected.