Back to skill

Security audit

Git Manager

Security checks for vulnerabilities and agentic risk

Overview

This Git automation skill mostly matches its stated purpose, but its token handling and credential guidance create real risk of exposing repository access tokens.

Review before installing. Use only narrowly scoped, read-only, revocable tokens; avoid passing tokens on the command line; do not use plaintext HTTP or untrusted custom GitLab/Gitea hosts; and avoid git credential.helper store on shared or production machines.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/batch_clone.py:26
Finding

API Tokens Can Be Transmitted to Arbitrary or Plaintext HTTP Hosts

Content
View full analysis
dict | list: """发送 GET 请求,返回解析后的 JSON auth_type: 'bearer'(GitHub/GitLab/Gitea/Bitbucket)或 'basic'(Azure DevOps) """ headers = {"Accept": accept, "User-Agent": "git-manager-skill/1.0"} if token: if auth_type == "basic": # Azure DevOps: Basic Base64(":PAT") encoded = base64.b64encode(f":{token}".encode()).decode() headers["Authorization"] = f"Basic {encoded}" else: headers["Authorization"] = f"Bearer {token}" headers["PRIVATE-TOKEN"] = token # GitLab 兼容 req = Request(url, headers=headers) try: with urlopen(req, timeout=30) as resp: return json.loads(resp.read().decode()) ``` The destination host is constructed from a user-controlled argument without scheme or origin validation: ```python elif args.platform == "gitlab": host = args.host.rstrip("/") if args.host else "https://gitlab.com" elif args.platform == "gitea": if not args.host: print("[ERROR] Gitea 需要指定 --host 参数") sys.exit(1) host = args.host.rstrip("/") ``` ### Technical Analysis GitLab and Gitea legitimately support self-hosted instances, so accepting a configurable host is consistent with the declared functionality. However, the implementation attaches the supplied API token to requests without requiring HTTPS or validating the normalized destination. A caller can therefore select a plaintext `http://` endpoint or an unrelated attacker-controlled HTTPS host. The request then includes the token in `Authorization` and, for non-Basic authentication, also in `PRIVATE-TOKEN`. Sending both headers to every bea ...[truncated 2089 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/batch_clone.py:446
Finding

Documented Environment-Variable Token Handling Is Broken

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/examples.md:263
Finding

Documentation Recommends Unencrypted Persistent Credential Storage

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (154)

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

md
| `--type` | ID type: `org` \| `group` \| `user` \| `project` |
| `--id` | Org name, group ID, username, or project ID |
| `--host` | Platform URL (GitLab/Gitea only; GitHub auto-detected) |
| `--token` | API access token (required for private repos; GitHub anonymous: 60 req/hr) |
| `--ssh` | Use SSH URLs instead of HTTPS |
| `--branch` | Clone specific branch |
| `--depth N` | Shallow clone with N commits |

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims platform-specific batch cloning and multi-repository automation by organization/group/project/workspace identifiers, but the analysis reports that these integrations are not implemented. In practice, this can mislead orchestration logic into sending secrets, identifiers, or repository targets to a skill that lacks the promised handling, increasing the chance of operational failure, accidental data exposure, or fallback to unsafe ad hoc commands.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill claims platform-specific batch cloning and multi-repository automation by organization/group/project/workspace identifiers, but the analysis reports that these integrations are not implemented. In practice, this can mislead orchestration logic into sending secrets, identifiers, or repository targets to a skill that lacks the promised handling, increasing the chance of operational failure, accidental data exposure, or fallback to unsafe ad hoc commands.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill claims platform-specific batch cloning and multi-repository automation by organization/group/project/workspace identifiers, but the analysis reports that these integrations are not implemented. In practice, this can mislead orchestration logic into sending secrets, identifiers, or repository targets to a skill that lacks the promised handling, increasing the chance of operational failure, accidental data exposure, or fallback to unsafe ad hoc commands.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill claims platform-specific batch cloning and multi-repository automation by organization/group/project/workspace identifiers, but the analysis reports that these integrations are not implemented. In practice, this can mislead orchestration logic into sending secrets, identifiers, or repository targets to a skill that lacks the promised handling, increasing the chance of operational failure, accidental data exposure, or fallback to unsafe ad hoc commands.

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/git_ops.py` | 单仓库完整操作:clone / pull / fetch / branch / checkout / merge / rebase / **reflog / describe / worktree / grep / cherry-pick / revert / bise

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/api_reference.md:16