Back to skill

Security audit

rednote-contacts

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its crawler-wrapper purpose, but it allows overly broad command execution and can expose browser credentials in returned output and job files.

Review this skill before installing. Use it only in a dedicated workspace, avoid supplying browser_auth unless you accept that it may appear in command output or job files, keep Playwright storage-state files private, and do not allow untrusted prompts or workflows to set runner_command.

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

T09 · Insecure Skill Coding Practices

Error
Location
src/index.py:137
Finding

Caller-Controlled runner_command Enables Arbitrary Command Execution

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
src/index.py:159
Finding

Browser Authentication Credentials Are Returned and Persisted in Plaintext

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:274
Finding

Security-Critical Crawler Dependency Lacks Integrity Verification

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (17)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

_get_runner_command accepts an arbitrary runner_command from input/context and uses it as the executable prefix for all actions. That means the skill can be turned from a red-crawler wrapper into a general command launcher, enabling arbitrary command execution with the permissions of the agent/runtime; in this skill context, that is especially dangerous because the advertised purpose is narrowly scoped contact discovery, so callers may not expect general code execution.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill clearly describes shell execution, filesystem reads/writes, browser automation, network access, and handling of sensitive session-state files, but it does not declare an explicit tool scope such as permissions or allowed-tools. That makes the operational boundary unclear and increases the chance of over-broad execution or unintended access when invoked by an agent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill is explicitly designed to collect contact information and manage Playwright storage-state session files, both of which are sensitive. Although there are some operational safety notes later, the command descriptions themselves do not present a clear user-facing privacy warning, consent expectation, or handling guidance for personal data and authentication artifacts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The example prompts use very broad natural-language phrases like '帮我抓取一批小红书博主' and '我要登录小红书' that can map directly to actions performing crawling or authentication. In an agent setting, such broad triggers increase the risk of accidental invocation of browser automation, login flows, or data collection without sufficiently explicit user intent or parameter confirmation.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

  1. WSLg (built-in graphics support for WSL2) - for browser GUI
  2. Dependencies:
    bash
    sudo apt-get update
    sudo apt-get install -y git python3 python3-pip
    
  3. red-crawler CLI, installed from the published package.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

  1. WSLg (built-in graphics support for WSL2) - for browser GUI
  2. Dependencies:
    bash
    sudo apt-get update
    sudo apt-get install -y git python3 python3-pip
    
  3. red-crawler CLI, installed from the published package.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

  1. WSLg (built-in graphics support for WSL2) - for browser GUI
  2. Dependencies:
    bash
    sudo apt-get update
    sudo apt-get install -y git python3 python3-pip
    
  3. red-crawler CLI, installed from the published package.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

  1. WSLg (built-in graphics support for WSL2) - for browser GUI
  2. Dependencies:
    bash
    sudo apt-get update
    sudo apt-get install -y git python3 python3-pip
    
  3. red-crawler CLI, installed from the published package.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

  1. WSLg (built-in graphics support for WSL2) - for browser GUI
  2. Dependencies:
    bash
    sudo apt-get update
    sudo apt-get install -y git python3 python3-pip
    
  3. red-crawler CLI, installed from the published package.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a skill whose purpose is to run the installed red-crawler CLI for Xiaohongshu contact discovery. In addition to discovery actions, the code exposes bootstrap, job_status, job_logs, job_stop, and ack_event actions and later writes heartbeat, job, log, and event files to manage long-running jobs, which is broader operational behavior than the description claims.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Browser auth and proxy credentials are appended as command-line arguments, which commonly exposes secrets through process listings, job metadata, logs, and returned command strings. In this file the skill also stores/display commands and argv in job records, increasing the chance those credentials are written to disk or surfaced to users unintentionally.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The login flow writes authenticated browser session state to a caller-supplied path, creating a reusable credential artifact on disk. If that file is stored in an insecure location, reused across users, or exposed through workspace access, an attacker may hijack the authenticated session.

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 · src/index.py (reported line 277)May include surrounding context.

python
def run_command(argv, cwd):
    return subprocess.run(argv, cwd=cwd, capture_output=True, text=True)


def _tail_file(path, max_lines):

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 · src/index.py (reported line 331)May include surrounding context.

python
with stdout_path.open("a", encoding="utf-8") as stdout_handle, stderr_path.open(
            "a", encoding="utf-8"
        ) as stderr_handle:
            process = subprocess.Popen(
                wrapper_command,
                cwd=_workspace_root(resolved),
                stdout=stdout_handle,

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The background job runner executes job["argv"] loaded from a JSON job file, and that argv ultimately derives from user-controlled resolved values including runner_command. Because there is no allowlist or integrity protection on the stored job definition, an attacker who can influence skill input or tamper with the job file can cause execution of arbitrary local programs under the skill's privileges.

Content

Scanner excerpt · src/index.py (reported line 417)May include surrounding context.

python
with stdout_path.open("a", encoding="utf-8") as stdout_handle, stderr_path.open(
            "a", encoding="utf-8"
        ) as stderr_handle:
            process = subprocess.Popen(
                job["argv"],
                cwd=job["workspace_path"],
                stdout=stdout_handle,

Tainted flow: 'job' from pathlib.Path.read_text (line 206, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · tests/test_index.py (reported line 279)May include surrounding context.

python
"resolved": resolved,
    }
    job_path.parent.mkdir(parents=True)
    job_path.write_text(json.dumps(job), encoding="utf-8")

    class FakePopen:
        pid = 9876

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This file launches external commands through subprocess.run and subprocess.Popen for crawl, bootstrap, and job wrapper execution. Although subprocess execution is central to the skill's purpose, there is no visible docstring/comment or user-facing notice in this file explaining that external commands will be launched and may continue running in the background.

Content

No source excerpt is available for this finding.