Back to skill

Security audit

xinwencaiji

Security checks for vulnerabilities and agentic risk

Overview

This news-reporting skill mostly matches its stated purpose, but it needs Review because it can send article content and API credentials to configurable network endpoints and accepts unchecked feed URLs and TLS settings.

Review this skill before installing. Use it only in a trusted workspace, inspect all feed configuration files, require HTTPS for authenticated feeds, do not set verify_ssl=false except in a controlled test environment, and leave ARK_API_BASE unset or set only to a trusted HTTPS provider. Use --disable-ai for private or licensed content, and consider pinning dependencies before deployment.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/collect_feeds.py:219
Finding

Feed credentials may be transmitted over insecure or attacker-controlled connections

Content
View full analysis
Request: headers = {"User-Agent": USER_AGENT} if source.headers: headers.update(source.headers) if source.username and source.password: basic_token = base64.b64encode( f"{source.username}:{source.password}".encode("utf-8") ).decode("ascii") headers["Authorization"] = f"Basic {basic_token}" return Request(source.url, headers=headers) def fetch_feed(source: SourceConfig) -> bytes: request = build_request(source) ssl_context = None if not source.verify_ssl: ssl_context = ssl._create_unverified_context() with urlopen(request, context=ssl_context, timeout=30) as response: return response.read() ``` ### Technical Analysis Feed URLs, credentials, and the `verify_ssl` option are loaded directly from workspace configuration. The code does not require HTTPS when Basic authentication is enabled. It also permits certificate verification to be disabled through `verify_ssl=false`. Base64 is the encoding required by HTTP Basic authentication; it is not encryption. Anyone able to observe a plaintext HTTP connection can recover the username and password. When TLS certificate verification is disabled, an active network attacker can impersonate the feed server and obtain the same credentials. The Base64 value is placed in an HTTP Authorization header and is not written to stdout. T ...[truncated 1102 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/collect_feeds.py:228
Finding

Unrestricted feed URLs permit server-side request forgery

Content
View full analysis
Request: headers = {"User-Agent": USER_AGENT} if source.headers: headers.update(source.headers) if source.username and source.password: basic_token = base64.b64encode( f"{source.username}:{source.password}".encode("utf-8") ).decode("ascii") headers["Authorization"] = f"Basic {basic_token}" return Request(source.url, headers=headers) def fetch_feed(source: SourceConfig) -> bytes: request = build_request(source) ssl_context = None if not source.verify_ssl: ssl_context = ssl._create_unverified_context() with urlopen(request, context=ssl_context, timeout=30) as response: return response.read() ``` ### Technical Analysis The collector accepts arbitrary URLs from workspace-controlled JSON and passes them to `urlopen()` without validating the destination. There are no controls blocking: - Loopback addresses - Private network ranges - Link-local addresses - Cloud metadata services - Reserved IP ranges - Unapproved ports - Redirects to prohibited destinations The network request runs with the connectivity available to the Agent or host process. Consequently, a workspace that is not fully trust ...[truncated 1440 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_company_report.py:341
Finding

Model API override can redirect bearer credentials and article data to an arbitrary endpoint

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/requirements.txt:1
Finding

Unpinned third-party dependencies create a mutable software supply chain

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (33)

Tainted flow: 'request' from os.getenv (line 341, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The request destination and credential material are sourced from environment variables and then used in an outbound HTTP request, so a malicious or misconfigured environment can redirect sensitive article content and the ARK bearer token to an attacker-controlled endpoint. In this skill context, the script processes news content from the workspace and automatically transmits full titles, bodies, sources, timestamps, and links externally, making exfiltration more dangerous than a normal local-only reporting tool.

Content

Scanner excerpt · scripts/generate_company_report.py (reported line 351)May include surrounding context.

python
method="POST",
    )

    with urlopen(request, timeout=ARK_TIMEOUT_SECONDS) as response:
        response_payload = json.loads(response.read().decode("utf-8"))

    text = extract_text_from_response(response_payload)

Tainted flow: 'request' from os.getenv (line 283, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
91% confidence
Finding

The destination for the outbound request is derived from ARK_API_BASE, which comes from an environment variable and is used without validation. In a skill marketed as self-contained, this enables exfiltration of news content and the ARK_API_KEY bearer token to an attacker-controlled endpoint if the environment is manipulated, effectively creating SSRF-style outbound access plus credential leakage.

Content

Scanner excerpt · scripts/generate_international_report.py (reported line 293)May include surrounding context.

python
method="POST",
    )

    with urlopen(request, timeout=ARK_TIMEOUT_SECONDS) as response:
        response_payload = json.loads(response.read().decode("utf-8"))

    text = extract_text_from_response(response_payload)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This variant of the mismatch finding includes an undeclared external model/API dependency while the skill is presented as self-contained. Misrepresenting external network usage and data flow can cause users to send workspace content or news data to a third-party service without informed consent, which is a meaningful security/privacy risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This variant of the mismatch finding includes an undeclared external model/API dependency while the skill is presented as self-contained. Misrepresenting external network usage and data flow can cause users to send workspace content or news data to a third-party service without informed consent, which is a meaningful security/privacy risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

This variant of the mismatch finding includes an undeclared external model/API dependency while the skill is presented as self-contained. Misrepresenting external network usage and data flow can cause users to send workspace content or news data to a third-party service without informed consent, which is a meaningful security/privacy risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This variant of the mismatch finding includes an undeclared external model/API dependency while the skill is presented as self-contained. Misrepresenting external network usage and data flow can cause users to send workspace content or news data to a third-party service without informed consent, which is a meaningful security/privacy risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

This variant of the mismatch finding includes an undeclared external model/API dependency while the skill is presented as self-contained. Misrepresenting external network usage and data flow can cause users to send workspace content or news data to a third-party service without informed consent, which is a meaningful security/privacy risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

This variant of the mismatch finding includes an undeclared external model/API dependency while the skill is presented as self-contained. Misrepresenting external network usage and data flow can cause users to send workspace content or news data to a third-party service without informed consent, which is a meaningful security/privacy risk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

This variant of the mismatch finding includes an undeclared external model/API dependency while the skill is presented as self-contained. Misrepresenting external network usage and data flow can cause users to send workspace content or news data to a third-party service without informed consent, which is a meaningful security/privacy risk.

Content

No source excerpt is available for this finding.

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/run_capture_only.py (reported line 28)May include surrounding context.

python
args = parse_args()
    workspace = args.workspace.resolve()

    env = os.environ.copy()
    env["AI_NEWS_WORKSPACE"] = str(workspace)
    command = [sys.executable, str(SCRIPT_DIR / "collect_feeds.py")]
    subprocess.run(command, check=True, cwd=workspace, env=env)

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/run_full_workflow.py (reported line 36)May include surrounding context.

python
args = parse_args()
    workspace = args.workspace.resolve()

    env = os.environ.copy()
    env["AI_NEWS_WORKSPACE"] = str(workspace)
    command = [sys.executable, str(SCRIPT_DIR / "collect_feeds.py")]
    subprocess.run(command, check=True, cwd=workspace, env=env)

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/run_report_only.py (reported line 44)May include surrounding context.

python
args = parse_args()
    workspace = args.workspace.resolve()

    env = os.environ.copy()
    env["AI_NEWS_WORKSPACE"] = str(workspace)
    command = [sys.executable, str(SCRIPT_DIR / "collect_feeds.py")]
    subprocess.run(command, check=True, cwd=workspace, env=env)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises executable shell, file, network, and environment-variable driven behavior but does not declare any tool scope such as permissions or allowed-tools. In practice, this weakens least-privilege controls and can allow the skill to be run with broader capabilities than a reviewer or orchestrator expects, especially since it performs package installation, network access, and filesystem writes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill instructs use of an external API credential (ARK_API_KEY) and states that the model is called for summaries and titles, but it does not warn that collected content and possibly workspace-derived text may be transmitted to a third-party service. This creates a privacy and data-handling risk because users may unknowingly expose sensitive inputs, proprietary source lists, or report content outside their environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The command templates explicitly instruct the agent to update cumulative Excel reports, rebuild Word briefs, and write multiple workspace files, but they do not warn that running the skill will modify persistent data in the current workspace. In an agent setting, missing modification warnings can cause unintended overwrites, state corruption, or silent changes to user files when the user expected a read-only reporting task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code allows per-source disabling of TLS certificate verification via verify_ssl=False and then creates an unverified SSL context for outbound feed fetches. That makes HTTPS feed retrieval vulnerable to man-in-the-middle interception or content tampering, which is especially relevant here because the skill ingests external news content and writes it into downstream workspace data files that may influence later reporting or automation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script sends article content and related metadata to an external AI service automatically whenever ARK_API_KEY is present, without an explicit warning, consent step, or per-run confirmation. In a workspace automation skill, this can cause unintentional data disclosure to a third party, especially if feeds contain licensed, internal, or otherwise sensitive material.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script makes external AI API calls even though the skill description says the workflow is self-contained within the current workspace. This mismatch can cause unanticipated data egress of article content, metadata, and possibly derived summaries to a third party, which is a security and privacy issue in environments expecting local-only processing.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The prompt explicitly instructs the model to generate the title and summary in Chinese and to translate ordinary English terms into Chinese. For a code file, this is a natural-language locale constraint, and the file does not offer any user opt-in or configuration to select another language.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

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

python
env = os.environ.copy()
    env["AI_NEWS_WORKSPACE"] = str(workspace)
    command = [sys.executable, str(SCRIPT_DIR / "collect_feeds.py")]
    subprocess.run(command, check=True, cwd=workspace, env=env)
    return 0

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

python
env = os.environ.copy()
    env["AI_NEWS_WORKSPACE"] = str(workspace)
    command = [sys.executable, str(SCRIPT_DIR / "collect_feeds.py")]
    subprocess.run(command, check=True, cwd=workspace, env=env)
    return 0

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

python
env = os.environ.copy()
    env["AI_NEWS_WORKSPACE"] = str(workspace)
    command = [sys.executable, str(SCRIPT_DIR / "collect_feeds.py")]
    subprocess.run(command, check=True, cwd=workspace, env=env)
    return 0

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This file defines a Chinese-specific parsing and formatting path and the validation error message explicitly instructs users to use a Chinese date expression format. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy concern, and no alternative user-selectable locale mechanism is documented here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The troubleshooting guidance tells operators to check whether ARK_API_KEY is available, but provides no caution against printing, logging, or otherwise exposing the secret during debugging. In shared or agent-managed environments, this can lead to accidental credential disclosure through console output, logs, screenshots, or copied diagnostics.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.