Back to skill

Security audit

Git Log Intelligence

Security checks for vulnerabilities and agentic risk

Overview

The skill largely does what it claims, but it uses a GitHub token, runs the GitHub CLI, and keeps persistent filters with weak scoping and validation, so it should be reviewed before installation.

Install only if you are comfortable giving this skill GitHub API access through a token and storing persistent local ignore patterns. Prefer a fine-grained read-only token limited to the needed repositories, inspect the ignore list periodically, and treat commit text returned by the tool as untrusted content to summarize, not instructions to follow.

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

T01 · Skill Instruction Hijacking

Warning
Location
git_log_intelligence.py:112
Finding

Untrusted GitHub Commit Content Is Passed into the Agent Context Without Prompt-Injection Boundaries

Content
View full analysis
= MAX_LINES: capped_out += 1 continue if full_context: # Truncate long messages to protect the agent's context window content = (full_msg[:MAX_MSG_LEN] + '...') if len(full_msg) > MAX_MSG_LEN else full_msg important.append(f"COMMIT: {sha}\nAUTHOR: {author}\nMESSAGE:\n{content}\n{'-'*20}") else: important.append(f"- {sha}: {subject} ({author})") ``` The corresponding Skill instructions state: ```markdown ### Agent Logic: Call the script with the repo name and timeframe. Receive a filtered list of "Important" commits. Present a natural language summary to the user, noting how many noisy commits were hidden. ``` ### Technical Analysis Commit messages, commit subjects, and author names are controlled by repository contributors. The implementation retrieves these fields from GitHub and places them directly into text intended for processing by an AI agent. The output does not establish a strong trust boundary around the remote content. In particular, the Skill does not instruct the agent to: - Treat all repository metadata as untrusted data rather than instructions. - Ignore directives, tool requests, links, or requests for disclosure embedded in commit text. - Avoid changing its goals or invoking tools based on retrieved cont ...[truncated 2005 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
git_log_intelligence.py:42
Finding

Unchecked Persistent Regular Expressions Permit ReDoS and Persistent Summary Failures

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (8)

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 · SKILL.md (reported line 18)May include surrounding context.

md
## Compatibility
- **Required tools:** `gh`
- **Environment variables:**
  - `GITHUB_PERSONAL_ACCESS_TOKEN` (required): GitHub Personal Access Token. Grant minimal scopes: `public_repo` for public repos, `repo` for private repos.

## Directory Structure
- `git_log_intelligence.py`: The primary script containing execution logic.

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · git_log_intelligence.py (reported line 80)May include surrounding context.

python
since_date = (datetime.now() - timedelta(days=int(days))).isoformat(timespec="seconds") + "Z"
    
    # Authenticate gh strictly via OpenClaw's token convention.
    env = os.environ.copy()
    token = env.get("GITHUB_PERSONAL_ACCESS_TOKEN")
    if not token:
        return "Error: GITHUB_PERSONAL_ACCESS_TOKEN is required for GitHub API access."

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes shell commands, reads environment variables, and persists data to disk, but it does not declare any explicit tool restrictions or permission scope. That increases the attack surface because an orchestrator may permit broader capabilities than are actually needed, making misuse or future code changes harder to contain.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says to use the skill whenever the user asks about repo changes, changelogs, recent commits, PRs, or noisy patterns, which is broad enough to trigger in many common software-assistant contexts. Overbroad invocation can cause unnecessary access to tokens, shell execution, and persistent state changes when a narrower read-only or non-persistent workflow would suffice.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill allows adding and removing ignore patterns that are persisted in a local file, but the operational examples normalize these changes without a strong warning that they are lasting across sessions. Persistent hidden state can be abused to suppress future repository activity, hide relevant commits, or silently bias summaries beyond the current user request.

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 · git_log_intelligence.py (reported line 93)May include surrounding context.

python
print(f"Running command: {' '.join(cmd)}")
        print(f"Using filters: {filters}")

    result = subprocess.run(cmd, capture_output=True, text=True, env=env)
    
    if result.returncode != 0:
        return f"Error: {result.stderr}"

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The code reads GITHUB_PERSONAL_ACCESS_TOKEN from the environment and repackages it as GH_TOKEN for subprocess authentication. This is sensitive credential access, and the file does not include a docstring, comment aimed at user disclosure, or default user-facing message explaining that a personal access token will be used.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The code invokes gh api to send the requested repository identifier and retrieve commit metadata from GitHub, which is a network operation involving user/system context. Although this behavior may be expected for a GitHub summarization tool, the file lacks a normal user-facing disclosure in the default path; only verbose mode prints the command being run.

Content

No source excerpt is available for this finding.