Back to skill

Security audit

GitHub to RedNote

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but its default caching of authenticated GitHub data and unsafe cover-image SVG handling deserve review before installation.

Install only if you are comfortable giving it a least-privilege GitHub token and storing fetched repository data locally. Avoid using it on private repositories unless caching is disabled or isolated, and avoid --with-image for untrusted or unusual GitHub URLs until the SVG escaping issue is fixed.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/image_generator.py:297
Finding

Unescaped Repository URL Enables SVG/XML Injection During Cover Generation

Content
View full analysis
{github_url} ``` The generated SVG is then processed by one of several renderers: ```python cairosvg.svg2png( url=svg_path, write_to=output_path, output_width=COVER_WIDTH, output_height=COVER_HEIGHT ) ``` ```python result = subprocess.run( ['convert', '-background', 'none', svg_path, '-resize', f'{COVER_WIDTH}x{COVER_HEIGHT}!', '-density', '150', output_path], capture_output=True, text=True, timeout=30, env=env ) ``` ```python result = subprocess.run( ['inkscape', svg_path, '--export-type=png', f'--export-filename={output_path}', f'--export-width={COVER_WIDTH}', f'--export-height={COVER_HEIGHT}', '--export-dpi=150'], capture_output=True, text=True, timeout=30 ) ``` ### Technical Analysis The `github_url` value originates from the user-supplied command-line URL and is retained as `repo_data['url']`. Unlike ...[truncated 2728 chars]
Remediation
View remediation
/ github.com// / ``` Reject query strings, fragments, control characters, XML metacharacters, credentials, and unexpected trailing path components. 4. Use a standard URL parser rather than permissive regular expressions. Validate the hostname exactly as `github.com`. 5. Configure SVG renderers to prohibit: - External network resources. - Local-file references. - Script execution. - Unsafe XML entities. - Unbounded filters, dimensions, and resource consumption. 6. Run image conversion in a sandbox with: - No network access. - A restricted temporary directory. - CPU, memory, file-size, and execution-time limits. - No access to sensitive home-directory files. 7. Add regression tests containing XML metacharacters and attempted element injection in every repository field. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/github_api.py:97
Finding

Authenticated GitHub Responses Are Cached Without Explicit Owner-Only Permissions

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (33)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill is presented as a formatting/content tool, but the behavior includes direct GitHub API queries, cache management, rate-limit handling, and diagnostic/test execution. When a skill performs operational or test actions not disclosed in its manifest, users may trigger network calls and local state changes they did not intend, which is a meaningful trust and safety issue.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill is presented as a formatting/content tool, but the behavior includes direct GitHub API queries, cache management, rate-limit handling, and diagnostic/test execution. When a skill performs operational or test actions not disclosed in its manifest, users may trigger network calls and local state changes they did not intend, which is a meaningful trust and safety issue.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill is presented as a formatting/content tool, but the behavior includes direct GitHub API queries, cache management, rate-limit handling, and diagnostic/test execution. When a skill performs operational or test actions not disclosed in its manifest, users may trigger network calls and local state changes they did not intend, which is a meaningful trust and safety issue.

Content

No source excerpt is available for this finding.

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 · manifest.yaml (reported line 51)May include surrounding context.

yaml
env:
  GITHUB_TOKEN:
    required: true
    description: GitHub personal access token for API access

agent:
  description: Uses OpenClaw's built-in agent capability for content generation. No external LLM API keys required.

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · scripts/formatters.py (reported line 57)May include surrounding context.

python
', '💪', '🚀', '✅', '💯', '🌟'],
        'code': ['💻', '⌨️', '🖥️', '🔧', '⚙️', '📝'],
        'star': ['⭐', '🌟', '💫', '✨'],
        'warning': ['⚠️', '❗', '🔔', '💢'],
        'tip': ['💡', '📌', '✏️', '📝', '🎓'],
        'stats': ['📊', '📈', '📉'],
        'link': ['🔗', '🌐', '📎'],
        'user': ['👤', '👥', '🧑‍💻', '👨‍💻', '👩‍💻'],
        'time': ['⏰', '📅', '🕐'],
        'tag': ['🏷️', '📌', '#️⃣']
    }
    
    # Mobile-friendly line width
    MAX_LINE_WIDTH = 32
    
    @staticmethod
    def add_title_emoji(title: str, emoji: str = None, randomize: bool = False) -> str:
        """Add emoji to title."""
        if not emoji:
            if randomize:
                import random
                emoji = random.choice(RedNoteFormatter.EMOJIS['title'])
            else:
                emoji = RedNoteFormatter.EMOJIS['title'][0]
        return f"{emoji} {title

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 · scripts/image_generator.py (reported line 342)May include surrounding context.

python
# Try using ImageMagick with proper font configuration
    try:
        # Set up font config to handle Chinese
        env = os.environ.copy()
        result = subprocess.run(
            ['convert', '-background', 'none', svg_path, 
             '-resize', f'{COVER_WIDTH}x{COVER_HEIGHT}!',

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/formatters.py (reported line 130)May include surrounding context.

python
def _build_user_prompt(self, repo_data: Dict, template: str, style: str) -> str:
        """Build user prompt with repository data - Enhanced version with structured sections."""
        
        # Stars display rule: only mention if >= 100
        stars = repo_data.get('stars', 0)
        stars_text = f"{stars:,} stars" if stars >= 100 else ""

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/formatters.py (reported line 142)May include surrounding context.

python
def _build_user_prompt(self, repo_data: Dict, template: str, style: str) -> str:
        """Build user prompt with repository data - Enhanced version with structured sections."""
        
        # Stars display rule: only mention if >= 100
        stars = repo_data.get('stars', 0)
        stars_text = f"{stars:,} stars" if stars >= 100 else ""

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/llm_generator.py (reported line 101)May include surrounding context.

python
def _build_user_prompt(self, repo_data: Dict, template: str, style: str) -> str:
        """Build user prompt with repository data - Enhanced version with structured sections."""
        
        # Stars display rule: only mention if >= 100
        stars = repo_data.get('stars', 0)
        stars_text = f"{stars:,} stars" if stars >= 100 else ""

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/llm_generator.py (reported line 233)May include surrounding context.

python
请直接输出文章内容,不要加额外的说明文字。"""
        
        return prompt
    
    def _extract_features_from_readme(self, readme: str) -> list:
        """Extract features section from README."""

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description says the tool converts GitHub repositories into '小红书风格的技术文章', which implies a Chinese-platform-specific output style by default. Because the README does not indicate that users can choose the output language or opt in to a Chinese locale, this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill advertises executable capabilities (env, file read/write, network, shell) without declaring an explicit tool scope or permission boundary. That makes the effective privilege set opaque to users and orchestrators, increasing the risk of unintended data access, network activity, or command execution if the skill is invoked in a broader context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest description says to use the skill when the user wants to generate tech promotion content from GitHub repos, which is a broad natural-language condition rather than a narrowly defined trigger. It does not provide explicit trigger phrases, constraints, or exclusion examples, increasing the chance of unintended invocation for general GitHub-related writing requests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The overview states that the skill produces articles suitable for Chinese tech community promotion, and the rest of the document reinforces a RedNote-specific Chinese-language format. This appears to impose a locale/language preference without stating that the user can choose another language or explicitly opt into Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest declares a language/locale-specific capability, "chinese_technical_writing", as part of the skill's default agent behavior. This can indicate the skill is oriented toward forcing a specific language/locale without an explicit user opt-in or documented choice, which falls under the language/locale policy concerns.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The base prompt instructs the model to act as a creator for Chinese social media and to write articles in Chinese. Repeated later language requirements reinforce a forced locale with no opt-in or alternative, which matches the policy category for language/locale constraints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This template specifies 'Language: Chinese (Simplified)' as a hard requirement. The same pattern appears across the prompt set and does not provide a language selection mechanism or clearly scoped compliance justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This template specifies 'Language: Chinese (Simplified)' as a hard requirement. The same pattern appears across the prompt set and does not provide a language selection mechanism or clearly scoped compliance justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This template specifies 'Language: Chinese (Simplified)' as a hard requirement. The same pattern appears across the prompt set and does not provide a language selection mechanism or clearly scoped compliance justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This template specifies 'Language: Chinese (Simplified)' as a hard requirement. The same pattern appears across the prompt set and does not provide a language selection mechanism or clearly scoped compliance justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This template specifies 'Language: Chinese (Simplified)' as a hard requirement. The same pattern appears across the prompt set and does not provide a language selection mechanism or clearly scoped compliance justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The guide prescribes default hashtags and examples in Chinese for content output, which imposes a specific language/locale convention. The file does not indicate that this is optional, user-selected, or limited to a justified region-specific workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module description and many output strings are explicitly tailored to RedNote with Chinese text, such as Chinese hashtags and labels, which indicates the formatter enforces a Chinese locale/style by default. The file does not provide any user opt-in, language selection mechanism, or documented justification that this skill is restricted to a Chinese-only regional workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring states that the script generates RedNote (小红书) articles, and the implementation later builds Chinese-language content strings, implying a fixed output language. This is a natural-language policy concern because the skill forces a specific locale/language without any user opt-in or configurable language selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code explicitly extracts Chinese README headings and generates Chinese-language selling points such as "社区高度认可" and "文档完善". That imposes a specific output language/locale without any visible user opt-in or configuration, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.