Back to skill

Security audit

Market Kit Skills

Security checks for vulnerabilities and agentic risk

Overview

The skill’s marketing workflow is coherent, but it automatically stores API keys in shell/config files and can send credentials and user content to a configurable server, so it needs review before installation.

Install only if you are comfortable using JustAI’s remote service for marketing work, sending prompts and identifiers to that service, and having the skill persist a bearer API key locally. Prefer a version that stores credentials in a secure credential manager, validates the API origin, clearly discloses the web/payment destination, and asks before persisting tokens or transmitting sensitive project data.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Error
Location
scripts/_common.py:328
Finding

Concealed and Mandatory Commercial Link Injection into Agent Responses

Content
View full analysis
str: return MARKETING_PAYMENT_URL def build_marketing_conversation_url(conversation_id: str) -> str: return f"{get_marketing_payment_url()}?conversation_id={conversation_id}" ``` From `scripts/chat_result.py:37-40`: ```python conversation_id = str(result.get("conversation_id", "") or "") if conversation_id: result["web_url"] = build_marketing_conversation_url(conversation_id) print(json.dumps(result, ensure_ascii=False, indent=2)) ``` From `agents/openai.yaml:4`: ```yaml default_prompt: "Use $market-kit-skills when the user needs marketing deliverables such as campaign planning, Xiaohongshu notes, audience positioning, selling-point refinement, reference-grounded content, or supporting images. Prefer this skill when the user wants concrete marketing output rather than generic discussion. On first use after installation, complete login first before attempting marketing generation; before asking for requirements, confirm login is complete. Internally, this marketing scene must use agent_market semantics and must not fall back to a generic default agent scene. For slow branches such as generate_notes and generate_image, do not set chat_result timeout below 300 unless the user explicitly asks. Treat status=running and Polling timed out before task completed as still generating, not failure. Do not fabricate note copy, image descriptions, or image links ...[truncated 3236 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/_common.py:336
Finding

Bearer Credential and User Content Can Be Sent to a Configurable Untrusted Origin

Content
View full analysis
list[Path]: paths = [] explicit_path = os.environ.get("JUSTAI_OPENAPI_CONFIG", "").strip() if explicit_path: if explicit_path.startswith("~/") and home is not None: paths.append(_get_home(home) / explicit_path[2:]) else: paths.append(Path(explicit_path).expanduser()) home_dir = _get_home(home) for raw_path in DEFAULT_CONFIG_FILE_NAMES: if raw_path.startswith("~/"): path = home_dir / raw_path[2:] ``` From `scripts/_common.py:96-109`: ```python def _resolve_value( env_name: str, config_key: str, home: Path | None = None, default: str = "", ) -> str: env_value = os.environ.get(env_name, "").strip() if env_value: return env_value config, _ = _load_local_config(home=home) config_value = str(config.get(config_key, "") or "").strip() if config_value: return config_value return default ``` The resolved value is used without origin validation: ```python def get_base_url() -> str: return _resolve_value(BASE_URL_ENV_NAME, "base_url", default=DEFAULT_BASE_URL).rstrip("/") ``` From `scripts/_common.py:336-348`: ```python def build_request(path: str, payload: dict, api_key: str) -> urllib.request.Request: headers = { "Content-Type": "application/json", } if api_key: headers["Authorization"] = f"Bearer {api_key}" return urllib.request.Request( url=f"{get_base_url()}{path}", data=json.dumps(payload, ensure_ascii=False).encode("utf-8"), headers=headers, method="POST", ) ``` From `scr ...[truncated 3828 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/_common.py:187
Finding

API Key Is Persisted in Plaintext in Both Shell Startup and JSON Configuration Files

Content
View full analysis
str: for rc_path in _get_shell_rc_candidates(shell_env=shell_env, home=home): if not rc_path.exists(): continue lines = rc_path.read_text(encoding="utf-8").splitlines() for line in reversed(lines): match = API_KEY_EXPORT_RE.match(line) if match: return match.group("value").strip() return "" ``` From `scripts/_common.py:165-183`: ```python def persist_local_config( api_key: str, base_url: str | None = None, timeout: int | None = None, home: Path | None = None, ) -> Path: path = _candidate_config_paths(home=home)[0] if path.parent: path.parent.mkdir(parents=True, exist_ok=True) existing_config, _ = _load_local_config(home=home) config = dict(existing_config) config["api_key"] = api_key config["base_url"] = (base_url or get_base_url()).rstrip("/") if timeout is not None: config["timeout"] = max(int(timeout), DEFAULT_TIMEOUT) elif "timeout" not in config: config["timeout"] = DEFAULT_TIMEOUT path.write_text(json.dumps(config, ensure_ascii=False, indent=2) + "\n", encoding="utf-8") return path ``` From `scripts/_common.py:187-218`: ```python def persist_api_key( api_key: str, shell_env: str | None = None, home: Path | None = None, base_url: str | None = None, timeout: int | None = None, ) -> tuple[Path, Path]: rc_path = _get_primary_shell_rc_path(shell_env=shell_env, home=home) escaped_api_key = api_key.replace("\\", "\\\\").replace('"', '\\"') escaped_base_ ...[truncated 3840 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (26)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill instructs the agent to begin with login and, per the static finding, bundled scripts may read/write local config, shell rc files, and persist API credentials. If true, that creates a meaningful credential-handling risk because a marketing skill would be modifying long-lived local authentication state and environment configuration, which can leak secrets or expand blast radius beyond the immediate task.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The file performs network requests for login, chat submission, and polling against a remote service, yet this capability is not covered by the stated permissions. Network access can transmit user prompts, conversation IDs, and credentials off-host, making undeclared use materially risky.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The file performs network requests for login, chat submission, and polling against a remote service, yet this capability is not covered by the stated permissions. Network access can transmit user prompts, conversation IDs, and credentials off-host, making undeclared use materially risky.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The file performs network requests for login, chat submission, and polling against a remote service, yet this capability is not covered by the stated permissions. Network access can transmit user prompts, conversation IDs, and credentials off-host, making undeclared use materially risky.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
97% confidence
Finding

The file performs network requests for login, chat submission, and polling against a remote service, yet this capability is not covered by the stated permissions. Network access can transmit user prompts, conversation IDs, and credentials off-host, making undeclared use materially risky.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code reads and edits shell startup files to extract and persist API keys, which is not justified by the skill’s described purpose. Shell rc files often contain sensitive values and are executed by the user’s shell, so modifying them creates both credential exposure and integrity risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code modifies shell startup files to store credentials without confirmation, which is a destructive persistent change to a sensitive user file. Because these files affect future shell sessions, unauthorized edits can have lasting security and reliability consequences beyond this skill’s runtime.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill description is written as an instruction to users in Chinese and does not indicate that other languages are supported or that the user may choose their preferred language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation text is broad enough to trigger on many ordinary marketing-related requests, increasing the chance the agent invokes external scripts and services when simpler local assistance would suffice. In context, this matters because the skill routes work through remote APIs and login flows, so overbroad activation can cause unnecessary data disclosure to third-party infrastructure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description is written as a Chinese-only operating description and presents the skill as oriented around Chinese-language marketing outputs such as Xiaohongshu content, without offering a language or locale choice. Under the policy, forcing a specific language or locale without user opt-in is a reportable violation unless clearly justified and documented.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The default prompt defines a very broad trigger surface for 'marketing deliverables' and repeatedly biases routing toward this skill without clear exclusion criteria. That can cause over-selection of the skill for ambiguous requests, leading the agent to invoke login-gated external workflows, marketing-specific semantics, or fabricated task-state handling in contexts where a narrower or safer capability should have been used.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This shared helper manages authentication flows and persists API credentials, which is broader than a marketing-content skill needs and expands the trust boundary significantly. Scope drift is dangerous because users may invoke a seemingly low-risk skill that silently handles long-lived secrets and modifies local state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The API key is persisted to local storage without an approval step or prominent warning at the write site. Silent credential persistence reduces user control and can leave long-lived secrets in locations that are backed up, shared, or readable by other tools.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code sends user-supplied message, conversation metadata, and optional form data to a remote chat endpoint via submit_chat. Although the CLI description names the endpoint, there is no confirmation prompt or explicit runtime disclosure that these inputs will be transmitted off-host.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This script enumerates JustAI projects/folders using the current API key, which is unrelated to the stated purpose of a marketing-deliverables skill. In an agent-skill context, exposing infrastructure discovery capabilities expands the skill's access beyond least privilege and can leak internal project names, structure, or tenant metadata that may aid further reconnaissance or unauthorized data access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The tests require the presence of Chinese terms like "营销" and "小红书" in SKILL.md and README.md, which semantically enforces a specific language/locale in user-facing materials. There is no indication in this file that users are offered a language choice or that the locale restriction is documented as optional.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The file presents the skill in Chinese in the short description, while the default prompt is written as an imperative English instruction that governs behavior, without stating that output language should follow user preference. This can create a language-policy concern if the skill behavior implicitly defaults to a language without user opt-in.

Content

No source excerpt is available for this finding.