Back to skill

Security audit

Github Topics

Security checks for vulnerabilities and agentic risk

Overview

This skill fetches GitHub repository rankings and README summaries; its risks are ordinary for that purpose but should be handled carefully.

Install only if you want a GitHub-focused lookup skill that may make outbound requests to GitHub. Use no token or a minimally scoped GitHub token, and treat README summaries as untrusted repository-authored content rather than instructions for the agent.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T08 · Insecure Dependencies

Note
Location
SKILL.md:56
Finding
Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:56-59` **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Low ### Complete Code Snippet ```markdown **Requirements**: ```bash pip install requests ``` ``` ### Technical Analysis The installation instructions retrieve the latest available version of `requests` and its transitive dependencies without a version constraint, lock file, or integrity hash. Consequently, the code installed in the user's environment depends on mutable package-index state rather than a reviewed dependency set. The package name is legitimate and the project does not use an untrusted package repository, dependency-confusion namespace, or apparent typosquatting package. The risk therefore arises from insufficient supply-chain reproducibility rather than evidence of an intentionally malicious dependency. ### Attack Path 1. An attacker compromises a future `requests` release, one of its transitive dependencies, or the package-distribution infrastructure. 2. A user follows the documented `pip install requests` instruction after the compromised release becomes the selected version. 3. `pip` downloads and installs the altered package or dependency. 4. Malicious installation hooks or imported runtime code execute with the permissions of the user or environment running the Skill. ### Impact Assessment Successful exploitation could execute arbitrary Python code under the account installing or running the Skill. This could expose files, environment variables, GitHub credentials, and other resources accessible to that account. The project itself does not request elevated privileges, so the attainable scope is limited to the privileges of the affected Python environment and operating-system user. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions 1. Declare dependencies in a version-controlled requirements or lock file. 2. Pin `requests` and all transitive dependencies to reviewed versions. 3. Record package hashes and install with hash verification, for example: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Generate dependency locks from a trusted package index and review updates before merging them. 5. Run dependency vulnerability and provenance checks in CI. 6. Document the supported Python version and periodically update pins so security fixes are not indefinitely blocked. ]]>

other

Warning
Location
src/readme_fetcher.py:41
Finding
Untrusted Repository README Content Enters the Agent Summarization Workflow<![CDATA[ ## Vulnerability Details **File Location**: `src/readme_fetcher.py:41-94` **Vulnerability Type**: Indirect prompt-injection exposure **Risk Level**: Medium ### Complete Code Snippet ```python def fetch_readme(self, owner: str, repo: str, html: bool = False) -> Optional[str]: """ 获取仓库 README 内容 Args: owner: 仓库拥有者 repo: 仓库名称 html: 是否返回 HTML 格式 Returns: README 内容 """ url = f"{self.api_base}/repos/{owner}/{repo}/readme" if html: self.session.headers["Accept"] = "application/vnd.github.html" try: response = self.session.get(url, timeout=30) response.raise_for_status() # GitHub 返回的是 base64 编码的内容 data = response.json() if data.get("encoding") == "base64": import base64 content = base64.b64decode(data.get("content", "")).decode("utf-8", errors="ignore") return content else: return data.get("content", "") except requests.RequestException as e: print(f" ⚠️ 获取 README 失败 {owner}/{repo}: {e}") return None def fetch_readme_summary(self, owner: str, repo: str, max_length: int = 500) -> Optional[str]: """ 获取 README 摘要 Args: owner: 仓库拥有者 repo: 仓库名称 max_length: 最大长度 Returns: README 摘要文本 """ readme = self.fetch_readme(owner, repo) if not readme: return None # 移除 Markdown 标记,提取纯文本 summary = self._extract_text_from_markdown(readme) # 截断到指定长度 if len(summary) > max_length: summary = summary[:max_length].rsplit(" ", 1)[0] + "..." return summary ``` ### Technical Analysis GitHub repository owners completely control their README contents. The Skill downloads that content and prepares it for the declared README-summary workflow without establishing an explicit trust boundary between remote data and agent instructions. The Markdown conversion removes some formatting, code blocks ...[truncated 2061 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Treat all fetched repository metadata and README text as untrusted data. 2. Add explicit agent instructions stating that content inside a README must never override system, developer, Skill, or user instructions. 3. Place fetched content inside clearly delimited data sections and request only extraction or summarization of those sections. 4. Ensure the agent cannot invoke tools, disclose secrets, or change configuration solely because remote content requests it. 5. Add prompt-injection screening for common instruction-override, secret-exfiltration, and tool-invocation patterns. Screening should supplement rather than replace strict authorization controls. 6. Enforce response and input size limits before passing content to the model. 7. Consider using a restricted summarization stage with no tool access and pass only its structured output to the main agent. 8. Preserve provenance in generated results by identifying the repository and clarifying that summaries are based on untrusted, repository-authored content. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The skill is described primarily as fetching GitHub topic trending repositories, but the documentation also includes README fetching and summarization for arbitrary repositories. That broader content-retrieval behavior is not fully captured by the top-level description, which can mislead users and reviewers about the real data flows and network access performed by the skill.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill is described primarily as fetching GitHub topic trending repositories, but the documentation also includes README fetching and summarization for arbitrary repositories. That broader content-retrieval behavior is not fully captured by the top-level description, which can mislead users and reviewers about the real data flows and network access performed by the skill.

Description-Behavior Mismatch

High
Confidence
97% confidence
Finding
The entire file identifies the package as an AI news generator rather than a GitHub trending/topics skill, creating a strong mismatch between advertised capability and embedded code metadata. In a security context, such discrepancies raise supply-chain and trust concerns because a mislabeled skill can hide unauthorized behavior, bypass expected review, or cause an agent to invoke code outside the intended domain.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The module docstring states this skill is an AI news daily generator that fetches content from smol.ai and uses Claude, which conflicts with the declared skill purpose of fetching GitHub topic trending repositories. This kind of identity/function mismatch is dangerous because it can mislead reviewers and users about the code’s real purpose, conceal unrelated behavior, and indicate the package may be mislabeled, repurposed, or incomplete.

Credential Access

High
Category
Privilege Escalation
Content
初始化

        Args:
            token: GitHub Personal Access Token
        """
        self.token = token or GITHUB_TOKEN
        self.api_base = GITHUB_API_BASE
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
初始化

        Args:
            token: GitHub Personal Access Token
        """
        self.token = token or GITHUB_TOKEN
        self.api_base = GITHUB_API_BASE
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
初始化

        Args:
            token: GitHub Personal Access Token
        """
        self.token = token or GITHUB_TOKEN
        self.api_base = GITHUB_API_BASE
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill invokes Python scripts and documents use of environment variables and external network access, but it does not declare any tool scope such as permissions or allowed-tools. That creates an authorization gap where the runtime may permit broader-than-expected capabilities, reducing reviewability and increasing the risk of unintended data access or outbound requests.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The manifest says the skill should be used for questions about 'open source projects,' which is much broader than GitHub topic trending lookups. This can cause the skill to intercept general software questions and perform network operations outside the narrow user intent implied by the skill name.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
Most invocation examples and query patterns are written only in Chinese, such as "热门仓库" and "这个仓库是做什么的", while the document does not state that the skill is intentionally Chinese-only or offer alternative language support. This can amount to a language/locale policy issue because it implicitly constrains usage to a specific language without user opt-in or justification.

Vague Triggers

Medium
Confidence
94% confidence
Finding
Very generic triggers like '热门仓库' and 'Top 10' can activate the skill in conversations that are not actually requesting GitHub data. Over-broad activation increases the chance of unintended network calls, unnecessary token use, and confusing behavior in unrelated contexts.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The documentation encourages use of a GitHub personal access token but does not clearly disclose that the token will be presented to GitHub over network requests. Users may provide a credential without understanding where it is sent, how it is scoped, or what minimum permissions are needed.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This Python file contains natural-language documentation and runtime print messages exclusively in Chinese, indicating a fixed language choice for the skill experience. The policy requires not forcing a specific language or locale without user opt-in, and there is no visible option or justification for the language restriction in this file.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The manifest says this skill is for fetching GitHub topic trending repositories, but this file implements repository README retrieval, markdown stripping, summarization, and raw-content fallback fetching. Those are materially broader behaviors than listing or retrieving trending repositories and represent an additional content-ingestion capability not described in the manifest.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This Python file contains the module docstring, class docstrings, and argument descriptions entirely in Chinese, which imposes a specific language on operators or users of the skill. The file does not provide any opt-in, alternative locale, or justification that the skill is intentionally region-specific, so it fits the language/locale policy violation category.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The module docstring describes the skill entirely in Chinese, including its title and behavior, which suggests a fixed language/locale presentation. There is no indication that users can choose another language or that the Chinese-only behavior is a documented, justified locale constraint.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The module docstring and function docstrings/comments are written in Chinese, which imposes a specific language on maintainers or users reading generated help text. The file does not offer any language choice or explain a justified region-specific requirement, matching the locale-policy violation criteria.

Context-Inappropriate Capability

Low
Confidence
83% confidence
Finding
The code imports and uses a GitHub personal access token to authorize requests, but the manifested purpose is simply fetching trending/topic repositories, which is typically achievable with public unauthenticated requests. Accessing credentials introduces a capability not clearly justified by the skill's stated narrow purpose.

Static analysis

No suspicious patterns detected.