Back to skill

Security audit

A股公众号大V

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly does what it claims, but it needs review because it handles a RedFox API key in risky ways and can persist or delete local subscription state.

Review before installing. Prefer REDFOX_API_KEY from a secure environment or secret manager, avoid passing the key with --api-key, and do not use the plaintext config-file method unless permissions are locked down. Be aware that the skill stores subscription choices locally and can clear them without an extra confirmation step.

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
SKILL.md:39
Finding

API Key Exposure Through Command-Line Arguments and Insecure Plaintext Configuration

Content
View full analysis
~/.qoder/apis/redfox.json` | ``` `scripts/fetch_astock_accounts.py:224`: ```python parser.add_argument("--api-key", help="API Key (不传则读取环境变量或配置文件)") ``` `scripts/fetch_subscribed_updates.py:202`: ```python parser.add_argument("--api-key", help="API Key(不传则读取环境变量或配置文件)") ``` The corresponding credential-loading logic accepts the exposed command-line value: ```python def get_api_key(cli_key=None): """Get API key: CLI arg > env var > config file.""" if cli_key: return cli_key env_key = os.environ.get(ENV_KEY) if env_key: return env_key if CONFIG_FILE.exists(): try: data = json.loads(CONFIG_FILE.read_text()) key = data.get("api_key") if key: return key except (json.JSONDecodeError, OSError): pass return None ``` ### Technical Analysis The Skill documents and implements an `--api-key` command-line option. Secrets passed as process arguments can be exposed through shell history, process inspection utilities, process-accounting systems, diagnostic tooling, terminal recordings, or automation logs. The documented configuration command also writes the API key to a plaintext file using ordinary shell redirection. It does not explicitly create the file with mode `0600`, verify ownership, or reject a file whose permissions allow access by other local users. The resulting permissions depend on the user's current `umask`. This behavior conflicts with the security guidance in `README.en.md`, which instructs users not to ex ...[truncated 1571 chars]
Remediation
View remediation
~/.qoder/apis/redfox.json chmod 600 ~/.qoder/apis/redfox.json ``` 5. Avoid placing the real key directly in documentation examples, prompts, CI logs, or terminal recordings. 6. Document key scope limitation, expiration, rotation, and immediate revocation procedures. 7. Add automated checks that warn or fail when the configuration file has unsafe ownership or permissions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (32)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the actual implementation behaves like an API test script that writes raw results locally instead of a date-based leaderboard tool, then the documented purpose materially understates side effects and overstates guarantees about returned data. The main security concern is undeclared local file output and operator confusion, not direct compromise.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If the actual implementation behaves like an API test script that writes raw results locally instead of a date-based leaderboard tool, then the documented purpose materially understates side effects and overstates guarantees about returned data. The main security concern is undeclared local file output and operator confusion, not direct compromise.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the actual implementation behaves like an API test script that writes raw results locally instead of a date-based leaderboard tool, then the documented purpose materially understates side effects and overstates guarantees about returned data. The main security concern is undeclared local file output and operator confusion, not direct compromise.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

If the actual implementation behaves like an API test script that writes raw results locally instead of a date-based leaderboard tool, then the documented purpose materially understates side effects and overstates guarantees about returned data. The main security concern is undeclared local file output and operator confusion, not direct compromise.

Content

No source excerpt is available for this finding.

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/search_user_test_result.json (reported line 7)May include surrounding context.

json
[
  {
    "accountName": "股股股股股",
    "account": "gu15035170350",
    "wxId": "gh_437364b7a1f3",
    "bizInfo": "MzkwMzQzNzMxNQ==",
    "description": "分析自己持有的股票的意图和目的,并对大盘走势进行一定分析。",
    "verifyInfo": "",
    "avatarUrl": "http://mmbiz.qpic.cn/mmbiz_png/LmQTSJbo5RUg5gy3UTsz82DbsZAT5iaBb1LHnzu01JdglxAUt7q5vJsbkcGhfSHnNib4MnF12icUI9IyvdRESAlrA/0?wx_fmt=png"
  },
  {
    "accountName": "股股股",
    "account": "gugugu902",
    "wxId": "gh_61ddc5dd1e92",
    "bizInfo": "MzUxMzgzODM4MQ==",
    "description": "龙头信仰",
    "verifyInfo": "微信认证:深圳市前海中广文化传媒有限公司",
    "avatarUrl": "http://mmbiz.qpic.cn/mmbiz_png/TIsZL1iaOjcKKnQeja

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file describes activation behavior, so vague-trigger review applies. The phrase implies the skill may respond to any natural-language request and does not define clear scope limits, explicit trigger phrases, or negative examples, increasing the risk of unintended invocation from ordinary conversation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README says users can 'directly use natural language to describe needs, no need to remember commands,' which makes activation scope ambiguous and does not define what requests should or should not invoke the skill. Although examples follow, there are no explicit exclusion conditions or narrow trigger boundaries to prevent overlap with ordinary conversation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill documents capabilities that access environment variables, perform network requests, and read/write local files, but it does not declare any explicit tool scope such as allowed-tools or permissions. This weakens sandboxing and review controls because an orchestrator may permit broader actions than users expect, including persistence via subscriptions.json and cache files plus outbound API calls using secrets from REDFOX_API_KEY.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest advertises a passive lookup tool, but the body documents persistent subscription workflows and daily update operations. This discrepancy can cause users or calling systems to invoke a seemingly read-only skill that actually stores state and changes future behavior, which is a meaningful integrity and transparency issue.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest and intro repeatedly describe the skill as returning 30 A-share accounts, implying a bounded and consistent output scope. Other sections contradict that by stating a fixed pool of 49 accounts, dual-category output with each category up to 30, and a default '--count 120' behavior, which is materially different from the stated scope.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Broad trigger phrases such as generic references to A-share public accounts or stock KOL lists can cause the skill to activate on ordinary finance queries that may not require external API calls or file-backed workflows. Overbroad activation increases the chance of unnecessary secret use, network requests, caching, and unintended stateful interactions in contexts where the user did not specifically ask for this tool.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Subscription-update phrases like '看订阅账号更新' or '推送今日更新' are sufficiently vague that they may match generic requests to view updates, causing the skill to read persisted subscriptions and perform network calls without clear intent. Because this path depends on prior local state, accidental activation can expose or act on historical subscriptions the user did not mean to use in the current conversation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The API guide contains two incompatible operational models: a one-call dailyPublish flow and a separate older two-step hotArticle + gzhUser/query flow. This inconsistency can cause an agent or maintainer to implement the wrong data path, accidentally make many more external requests than intended, or expose different sets of data than users expect, creating a real security and privacy risk through unintended data sharing and unpredictable behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains user-facing natural-language documentation and interaction text entirely in Chinese, and the script does not provide any option to select another language or opt in to this locale. Under the policy for natural-language violations, forcing a specific language without user choice is reportable unless clearly justified as a region-specific tool.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The --accounts help text says it is a temporary query mode and does not read the subscription list, which implies a non-subscription workflow. However, when combined with --interactive, the code subsequently loads existing subscriptions and writes new entries into the subscription file, contradicting the temporary-query framing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and CLI description present this script as querying subscribed A股公众号 accounts and outputting push content, but the --interactive path also adds new subscriptions and writes them to subscriptions.json. That is a meaningful behavior expansion from read/query output into persistent state modification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script persistently writes to subscriptions.json, introducing local state modification that goes beyond the skill’s described purpose of retrieving rankings and article/account data. In an agent-skill context, undeclared write capabilities expand the trust boundary and can enable unintended side effects or covert statefulness even if the code itself is not overtly malicious.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The clear operation irreversibly deletes an entire category of subscriptions and writes the change immediately, without any confirmation, dry-run, or rollback. In agent-driven environments, this increases the risk of accidental or prompt-induced destructive actions that can cause loss of user state.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code implements add/remove/clear subscription-management operations that are materially different from a read-only ranking/data retrieval skill. In a security review, hidden or unjustified capabilities are dangerous because they allow an agent to mutate user state under a misleading description, increasing the chance of abuse or unauthorized actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The dataset materially diverges from the stated skill purpose of returning A股公众号大V榜单 data and includes unrelated coupon, carbon-market, fund, and broad investment entities. This can poison retrieval quality and cause the agent to surface irrelevant or misleading accounts, undermining trust and potentially steering users toward unintended financial entities.

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 and runtime messages are written exclusively in Chinese, with no language-selection mechanism or indication that the tool is intentionally limited to a Chinese-speaking audience. Under the stated policy, forcing a single language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The documentation instructs the skill to send query dates, account names, and an API key to a third-party service without any user-facing disclosure, consent guidance, or handling requirements for the secret. In this skill context, the transmitted inputs are not highly sensitive by themselves, but silent external sharing and unclear API-key handling still create privacy, transparency, and secret-management risks.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The top-level docstring says the script queries 49 fixed A股公众号 accounts, which matches the implemented combined list, but the next line says there are 19 fixed personal accounts while the broader wording can be read as if all 49 are A股公众号 targets of the same type. More importantly, the documentation and comments mix '49 fixed accounts' with '19 personal accounts' in a way that does not clearly match the code's two-category implementation and output behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes a tool that, given a date, returns account and article data. In addition to fetching and returning that data, the script persists the generated dual-category result to a local cache file under the skill directory. Local stateful writing is not mentioned in the manifest and goes beyond pure retrieval behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file docstring explicitly documents a subscription-management tool with add/delete/clear workflows. That directly conflicts with the skill’s declared purpose of taking a date and returning A股公众号大V榜单 plus account/article metrics, indicating the packaged code’s own documentation describes a different intent.

Content

No source excerpt is available for this finding.