Back to skill

Security audit

stock_analysis_7step

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed remote-client wrapper for A-share financial analysis, but it handles reusable API secrets and remote endpoints in ways users should review carefully before installing.

Install only if you are comfortable with a remote Prana service processing your finance prompts and identifiers. Prefer the Python runner, keep --base-url at the trusted HTTPS default, avoid putting secrets in shared repositories, set PRANA_SKILL_SKIP_WRITE_API_KEY=1 if you do not want plaintext credential persistence, and rotate any key that may have been written or shared accidentally.

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
scripts/prana_skill_client.py:461
Finding

Credential-bearing requests can be redirected to an arbitrary or plaintext endpoint

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/prana_skill_client.py:262
Finding

Fetched API secrets are persisted in plaintext without enforced owner-only permissions

Content
View full analysis
None: """将 public_key:secret_key 写入 config/api_key.txt(首行为注释,与现有读取逻辑兼容)。""" CONFIG_DIR.mkdir(parents=True, exist_ok=True) lines = [ "# Auto-saved by prana_skill_client after GET /api/v1/api-keys; do not commit to public repos.", f"{public_key}:{secret_key}", "", ] API_KEY_FILE.write_text("\n".join(lines), encoding="utf-8") ``` Node.js: ```javascript function persistFetchedApiKeyTxt(publicKey, secretKey) { fs.mkdirSync(CONFIG_DIR, { recursive: true }); const lines = [ '# Auto-saved by prana_skill_client after GET /api/v1/api-keys; do not commit to public repos.', `${publicKey}:${secretKey}`, '', ]; fs.writeFileSync(API_KEY_FILE, lines.join('\n'), 'utf8'); } ``` ### Technical Analysis When no local credential is available, both clients automatically retrieve an API key and persist the complete `public_key:secret_key` pair to `config/api_key.txt` by default. Persistence can be disabled through `PRANA_SKILL_SKIP_WRITE_API_KEY`, but the secure behavior is not the default. Neither implementation explicitly creates the credential file with owner-only permissions such as `0600`. Effective permissions therefore depend on the process umask and any pre-existing file permissions. On common systems, the file may be created as world-readable or group-readable. Rewriting an existing file also does not correct unsafe permissions. The code additionally performs direct path-based writes without checking whether the target is a symbolic link. In a shared or improperly permissioned installation directory, another local actor could potentially redirect the ...[truncated 1446 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
package.json:6
Finding

Node.js dependency installation is not locked to an audited dependency graph

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (26)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The README describes a generic Prana thin-client wrapper that fetches credentials and invokes a remote skill, rather than the advertised A股财务分析 functionality. This creates a supply-chain transparency problem: users may believe they are installing a local financial-analysis skill when they are actually running a credentialed remote-execution client tied to hidden embedded metadata.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation explicitly says the package contains no business logic, which directly contradicts the advertised standalone financial-analysis capability. In context, this means the package is effectively a remote launcher, so users may unknowingly send prompts, thread identifiers, and credentials to an external service under false expectations about local behavior and reviewability.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The security section states the professional skill implementation is not included in the package, confirming that the claimed analysis capability resides server-side and is not auditable by the installer. This undermines user trust and increases supply-chain risk because reviewers cannot validate what code or prompts will actually process potentially sensitive financial or user-provided data.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding describes undeclared remote service calls, undeclared API key retrieval from environment/local files/remote endpoint, and local persistence of API secrets to config/api_key.txt, while the claimed finance-analysis functionality is not implemented in the visible skill content. That combination is highly risky because it can expose credentials, normalize secret exfiltration or insecure storage, and mislead users into running what is effectively a remote execution/forwarding wrapper rather than the promised analysis tool.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This finding describes undeclared remote service calls, undeclared API key retrieval from environment/local files/remote endpoint, and local persistence of API secrets to config/api_key.txt, while the claimed finance-analysis functionality is not implemented in the visible skill content. That combination is highly risky because it can expose credentials, normalize secret exfiltration or insecure storage, and mislead users into running what is effectively a remote execution/forwarding wrapper rather than the promised analysis tool.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **Node.js 18+**:先在包根目录执行 **`npm install`**,再执行 `node scripts/prana_skill_client.js -m "…" [-t thread_id] [-b base_url]`

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
72% confidence
Finding

The skill documentation is written as a Chinese-only package description and does not indicate that users may choose another language or that the skill is region- or locale-restricted for compliance reasons. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README documents automatic persistence of API credentials to config/api_key.txt, but presents it as default behavior rather than a sensitive operation requiring explicit acknowledgement. Storing long-lived secrets on disk increases the chance of leakage through weak file permissions, backups, shared workspaces, or accidental inclusion in archives/repos.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises executable clients and, per the accompanying findings, relies on environment access, local file reads/writes, and network access, yet the manifest declares no explicit tool scope or permissions. This creates a transparency and least-privilege failure: users and platforms cannot easily assess that running the skill may access credentials, local files, and remote services.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file documents storage and automatic retrieval of Prana Claw API credentials inside a skill whose stated purpose is A-share financial analysis and HTML reporting. This capability is outside the declared business function and creates unnecessary secret-handling behavior, increasing the risk of credential collection, persistence, accidental disclosure, or misuse if the skill is installed or inspected by users who do not expect it.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The natural-language guidance throughout this file is Chinese-only, including all operational instructions and warnings. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in, and this file does not provide an alternative language or indicate that the locale restriction is intentional.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The file states that when local credentials are absent, a script will call a platform API to fetch API keys and then write them back to a local file by default. Automatic secret retrieval plus local persistence is dangerous because it expands the attack surface, can leave recoverable credentials on disk, and is unrelated to the expected operation of a stock-analysis skill, making the behavior more suspicious in context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The wrapper automatically requests API keys from a remote endpoint when local credentials are absent. In the context of a financial-analysis skill, silent secret bootstrap from a network service is unexpected and dangerous because it introduces trust in a remote endpoint for credential issuance and can expose users to misconfiguration, interception, or abuse if the base URL is altered or the service is compromised.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code persists fetched API credentials to config/api_key.txt on local disk. Storing active credentials in plaintext within the skill directory creates a clear secret-exposure risk through accidental commits, local compromise, backups, multi-user systems, or later access by other processes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The wrapper performs credential discovery and remote API-key retrieval logic that goes beyond the stated stock-analysis/reporting purpose of the skill. This expands the skill’s privilege and attack surface: a user invoking a finance-analysis skill may unknowingly trigger credential-handling flows and outbound requests to obtain secrets, which is security-relevant functionality not implied by the manifest.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The package is presented as a local A-share financial analysis/reporting skill, but this file is only a thin client that forwards user input to a remote Prana service for the actual execution. That mismatch is security-relevant because users may disclose sensitive prompts, stock research, or identifiers under the assumption that processing is local, when it is actually transmitted off-host.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language strings and top-level description are written exclusively in Chinese, and the script does not offer any language or locale selection for users. Under the stated policy, forcing a specific language without opt-in can be a locale-policy violation unless the constraint is explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The client automatically requests API credentials from a remote endpoint when local credentials are absent, even though credential bootstrap is unrelated to the advertised financial-analysis function. This expands trust in the remote service and can silently provision usable secrets on behalf of the user or environment, increasing the risk of unauthorized service access and hidden account linkage.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The code persists fetched public/secret API credentials to config/api_key.txt on disk, creating local secret storage without strong protection. If the skill directory is shared, backed up, or accidentally committed, those credentials can be exposed and reused to access the remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

At execution time, the program sends the user's message, thread_id, and generated request_id to a remote API without a clear user-facing warning or confirmation. In the context of a finance-analysis skill, prompts may contain sensitive investment research, proprietary notes, or account-related context, so silent transmission increases privacy and confidentiality risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language description specifies the skill in Chinese only and does not offer any language or locale choice. Under the policy criteria, forcing a specific language without user opt-in is a language/locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The payment-related user-facing text is written only in Chinese and does not provide an alternative language or an explicit language constraint. This can amount to forcing a specific language for an operational workflow without user opt-in.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a caret range (^2.6.1), which allows installation of newer compatible releases without strict reproducibility. This weakens supply-chain control and makes it harder to verify exactly which code will be installed across environments, especially for a skill that may be executed by an automated runner.

Content

Scanner excerpt · package.json (reported line 7)May include surrounding context.

json
"type": "module",
  "description": "Prana encapsulated skill — install deps for the Node runner: npm install",
  "dependencies": {
    "yaml": "^2.6.1"
  },
  "engines": {
    "node": ">=18.0.0"

Unverifiable Dependency: yaml has 2 known advisory(ies) (CVE-2026-33532 (yaml is vulnerable to Stack Overflow via deeply nested YAML collections); CVE-2023-2251 (Uncaught Exception in yaml)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
87% confidence
Finding

The manifest references yaml without an exact pinned version, while known advisories exist for some yaml releases. Because the allowed version range is not tightly controlled, it is not possible from this file alone to verify whether installs will resolve to an affected or fixed version, creating avoidable supply-chain and denial-of-service risk if the package processes untrusted YAML.

Content

No source excerpt is available for this finding.