Back to skill

Security audit

risk-sentiment-scanner

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but its included scanner can generate low-risk company reports without collecting evidence, so it needs review before use.

Review this skill before installing in any business, credit, procurement, or investment workflow. Require evidence collection to fail closed when no sources are found, add source URLs and timestamps, confirm any scheduled monitoring, and require explicit approval before saving reports or exporting to Feishu.

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/scan.js:163
Finding

Missing Evidence Is Reported as a Completed Low-Risk Assessment

Content
View full analysis
{ console.log(` ⏳ ${name}`); // Note: During actual operation, sentiment data must be obtained through // batch_web_search and extract_content_from_websites. // This returns a placeholder structure; the agent performs real calls in the session. return analyzeCompany(name, []); }); ``` The comments above are an English translation of the original comments; the executable statement is unchanged. ### Technical Analysis The executable script does not implement the web-search and content-extraction workflow described in `SKILL.md`. It passes an empty array to `analyzeCompany` for every company: ```javascript return analyzeCompany(name, []); ``` The empty array becomes an empty combined text value. No risk keywords are detected, so all scoring dimensions remain zero. The script then assigns a score of `0` and the `R1` low-risk classification. This is a fail-open design: absence of evidence is interpreted as evidence of low risk. The resulting JSON has the structure and presentation of a completed assessment, but it is based on no news, regulatory, financial, or governance information. It also lacks the source URLs required by the documented output model. ### Attack Path 1. An operator or automated process invokes the script with one or more company names. 2. The script does not retrieve any current public information. 3. Each company is passed to `analyzeCompany` with an empty news array. 4. Keyword-based risk dimensions remain at zero. 5. Every company receives a zero score and an `R1` low-risk rating. 6. The script persists the misleading result under `reports/risk-report-YYYY-MM-DD.json`. 7. A user or downstream process treats the generated report as a completed credit-risk assessment. An ...[truncated 968 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan.js:70
Finding

Risk Score Can Exceed the Documented 0–100 Range

Content
View full analysis
a + b, 0); return total; ``` ### Technical Analysis The implementation caps each weighted dimension at `100`, then sums all five dimensions. It does not cap or validate the final total. Because each dimension may contribute up to `100`, the theoretical aggregate can reach `500`, despite the documented schema requiring a risk score between `0` and `100`. The weighting logic is also applied to unbounded keyword-accumulation values rather than normalized dimension scores. For example, repeated or numerous financial keywords increase the raw financial value before multiplication by `0.25`. Similar accumulation occurs independently in the regulatory, governance, sentiment, and operational dimensions. The current implementation therefore does not guarantee the documented invariant: ```text 0 <= risk_score <= 100 ``` Although scores above `100` still map to `R4`, they remain invalid according to the report schema and can disrupt consumers that assume a percentage-like range. ### Attack Path 1. News text containing many distinct configured risk keywords is supplied to `scoreCompany`. 2. Each matching keyword increases one or more raw dimension scores. 3. Multiple dimensions accumulate substantial values. 4. Each weighted dimension is capped independently at `100`. 5. The dimensions are added without normalizing or capping the aggregate. 6. A score above `100` is returned and written to the JSON report. 7. A downstream consumer receives a value outside the documented schema and may reject, misinterpret, or incorrectly rank the report. If source text can be in ...[truncated 899 chars]
Remediation
View remediation
sum + value * WEIGHTS[key], 0 ); return Math.min(100, Math.max(0, total)); ``` 3. Define and document the maximum raw value or normalization threshold for every dimension. 4. Validate the final result with `Number.isFinite(total)` and enforce the `[0, 100]` range before serialization. 5. Avoid allowing repeated occurrences of identical terms to inflate scores unless repetition is an intentional and documented model feature. 6. Add unit tests for: - Empty text - Maximum values in one dimension - Maximum values in every dimension - Repeated keywords - Positive offsets - Non-finite or malformed inputs 7. Add schema validation before writing the report, rejecting any `risk_score` outside the documented range. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill promises live public-web sentiment and regulatory-risk scanning, but the documented behavior materially diverges by relying on local inputs/watchlists and optional local persistence without clear implementation boundaries. This can mislead users into trusting stale, fabricated, or incomplete risk assessments as if they were based on fresh external evidence, which is especially dangerous in credit-risk or business decision workflows.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill claims to perform automated public-opinion and risk scanning, but this code generates reports using empty news input arrays and explicitly leaves external collection as a placeholder. That creates materially misleading risk reports that may be acted on as if they were evidence-based, causing unsafe business decisions and undermining integrity of the agent’s output.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The scheduled recheck trigger is underspecified and may run automatically against stored company lists without clear user authorization, schedule bounds, or dataset scope. This can lead to repeated background processing of sensitive business interest lists and generation of reports or alerts the user did not actively request at that time.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The scheduled recheck trigger is underspecified and may run automatically against stored company lists without clear user authorization, schedule bounds, or dataset scope. This can lead to repeated background processing of sensitive business interest lists and generation of reports or alerts the user did not actively request at that time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Pushing report contents to Feishu without a privacy warning or explicit approval introduces third-party data disclosure risk. Even if the data comes from public news, the compiled report reveals the user's monitored company set, internal risk views, and operational decisions, which may be commercially sensitive.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Pushing report contents to Feishu without a privacy warning or explicit approval introduces third-party data disclosure risk. Even if the data comes from public news, the compiled report reveals the user's monitored company set, internal risk views, and operational decisions, which may be commercially sensitive.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The header documents a structured risk-report workflow from company inputs, but the implementation can output complete-looking JSON reports without any underlying sentiment or news data. This is dangerous because users or downstream systems may trust the output format and assume substantive analysis occurred when it did not.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s header comments, usage text, console messages, and returned labels are written exclusively in Chinese, indicating the skill assumes a fixed language for interaction and output. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation unless clearly justified, which this file does not provide.

Content

No source excerpt is available for this finding.