Back to skill

Security audit

GitHub Idea Finder

Security checks for vulnerabilities and agentic risk

Overview

The skill coherently supports GitHub project discovery, with one credential-handling hygiene issue users should fix before storing a token in a local .env file.

Before installing, use a fine-grained read-only GitHub token if you need higher API limits, prefer an environment variable over a project .env file, and add .env to .gitignore if you create one. Expect the skill to contact api.github.com and write a bounded session JSON file at the path you choose.

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

T09 · Insecure Skill Coding Practices

Warning
Location
.gitignore:1
Finding
GitHub token file is not excluded from version control## Vulnerability Details **File Location**: `.gitignore:1` **Vulnerability Type**: Sensitive credential exposure through insecure repository configuration **Risk Level**: Medium ### Vulnerable Code The complete `.gitignore` file contains only: ```gitignore /.idea/ ``` However, `README.md:61-73` instructs users to create a root `.env` file containing a GitHub token: ```text Token 只用于 GitHub API 认证。脚本会优先读取进程环境变量 `GITHUB_TOKEN`,然后读取当前工作目录或 skill 目录下的 `.env` 文件。 Copy-Item .env.example .env 编辑 `.env`: GITHUB_TOKEN=ghp_your_token_here 不要把真实 token 提交到 Git。`.env` 应加入 `.gitignore`。 ``` ### Technical Analysis The documented setup process creates `.env` in the project root and stores `GITHUB_TOKEN` there. The implementation then reads that file in `scripts/github_discovery.py:59-63`. Despite the documentation stating that `.env` should be ignored, the distributed `.gitignore` does not exclude it. Consequently, ordinary commands such as `git add .` can stage the credential file without warning. Git history is durable and may remain accessible even after the file is removed from a later commit. This is an insecure secret-management configuration rather than intentional exfiltration. The script transmits the token only as a Bearer authorization header to the fixed HTTPS endpoint `https://api.github.com`. That network use is disclosed and necessary for authenticated GitHub API access; the vulnerability is the risk of committing the local token. ### Attack Path 1. A user follows the README and copies `.env.example` to `.env`. 2. The user places a valid GitHub personal access token in `GITHUB_TOKEN`. 3. Because `.env` is not ignored, the user runs a routine command such as `git add .` and commits or pushes the file. 4. A collaborator, fork owner, repository visitor, CI artifact consumer, or source-history scanner obtains the token. 5. The recipient authenticates to GitHub using the exposed token until it expires ...[truncated 966 chars]
Remediation
## Remediation Suggestions 1. Update `.gitignore` to exclude local environment files while retaining the example: ```gitignore /.idea/ /.env /.env.* !/.env.example ``` 2. Prefer process environment variables or an operating-system credential store over plaintext project-local token files. 3. Keep the recommendation for a fine-grained, read-only public-repository token and explicitly warn users not to supply broader scopes. 4. Add automated secret scanning or a pre-commit rule that rejects GitHub token patterns. 5. Add a regression test confirming that `.env` is ignored. 6. If a real token has ever been committed, revoke or rotate it immediately and remove it from repository history where appropriate; history rewriting does not replace revocation.
Vulnerability Patterns
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill instructs the agent to run a local Python script, create and update session files, read repository metadata/READMEs, and perform GitHub retrieval, which implies file read/write and network access. Because these capabilities are used without any declared permissions, the runtime may not present appropriate consent or sandboxing expectations, increasing the risk of unintended filesystem access, network egress, or use of sensitive environment configuration by the invoked tooling.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
README.md:70