T01 · Skill Instruction Hijacking
- Location
SKILL.md:94- Finding
Mandatory Third-Party Attribution Alters User-Facing Reports
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This monitoring report skill is not proven malicious, but it needs Review because it uses API credentials and live monitoring data while requiring unsafe temporary script execution and retaining sensitive local report data.
Install only in a trusted internal environment after reviewing the exporter workflow. Require HTTPS for LWJK_API_URL, keep LWJK_API_SECRET out of shared files, restrict the output directory, avoid untrusted report names or paths, inspect or replace the temporary Excel script generation, and delete intermediate JSON/temp files if they contain sensitive infrastructure data.
SKILL.md:94Mandatory Third-Party Attribution Alters User-Facing Reports
alert_data.py:75Sensitive Monitoring API Traffic Uses Plaintext HTTP
references/export_excel_template.py:26Unsafe Executable-Template Substitution and Predictable Temporary Script
references/export_excel_template.py:98Spreadsheet Formula Injection in Exported Monitoring Data
alert_data.py:211Complete Raw API Objects Are Unnecessarily Persisted to Disk
The declared behavior says the skill exports a finished 4-sheet Excel workbook, but the documented flow actually returns a template path and instructs creation/execution of a temporary script, while also producing additional JSON artifacts not clearly disclosed in the description. This mismatch is dangerous because reviewers and users may approve the skill under incomplete assumptions, and downstream agents may execute extra file-generation steps or rely on outputs that were never promised.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return read_json_rows(args.hosts_file), read_json_rows(args.problems_file)
skill_dir = Path(__file__).resolve().parent
load_env(skill_dir / ".env")
load_env(skill_dir.parent / "alert-inspection" / ".env")
api_url = Path
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return read_json_rows(args.hosts_file), read_json_rows(args.problems_file)
skill_dir = Path(__file__).resolve().parent
load_env(skill_dir / ".env")
load_env(skill_dir.parent / "alert-inspection" / ".env")
api_url = Path
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return read_json_rows(args.hosts_file), read_json_rows(args.problems_file)
skill_dir = Path(__file__).resolve().parent
load_env(skill_dir / ".env")
load_env(skill_dir.parent / "alert-inspection" / ".env")
api_url = Path
The skill performs sensitive operations including reading environment variables, making network requests, and writing files, but SKILL.md declares no explicit tool scope or permission boundaries. This creates unnecessary ambient authority: an agent may invoke the skill with broader capabilities than users expect, increasing the chance of unintended data access or file-system side effects.
The workflow instructs the agent to copy a template to /tmp, substitute values, and execute the generated Python script, while also writing multiple local files, without any user-facing warning or consent step. Generating and executing temporary scripts is a powerful side effect that can expand attack surface, especially if placeholder values or file paths are influenced by untrusted data or if the environment treats /tmp as shared.
The trigger phrases are broad everyday requests such as '做巡检' and related variants, which can cause accidental invocation in contexts where the user did not intend network access, credential use, file writes, or script execution. Because this skill has side effects and uses external data sources, overly broad triggers materially increase the risk of unintended execution.
The report template, workbook contract, and field names mandate Chinese titles, labels, and worksheet names, and the file does not provide any language-selection option. This creates a locale policy concern because the skill imposes a specific language without user opt-in or an explicit region-specific justification.
The file embeds user-visible status and classification labels entirely in Chinese, with no indication that language is configurable or selected by the user. This can violate language/locale policy when a skill imposes a specific locale by default without offering choice or documenting a justified region-specific constraint.
This code constructs and sends HTTP POST requests containing request parameters and a signed payload to an external API, but the function has no user-facing prompt, warning, or explanatory comment/docstring about transmitting data off-host. For a code file, outbound network operations that may send user or system data should have some form of disclosure unless the warning is documented elsewhere or clearly evident from the skill context.
The script accesses LWJK_API_URL and LWJK_API_SECRET, which are credentials or sensitive configuration, but gives no prior user-facing indication that secrets will be loaded from .env files or environment variables. Under the code-file criteria, access to sensitive environment variables should not be silent when there is no other visible disclosure in the file.
This code calls remote API endpoints via fetch_all_pages and transmits authentication material loaded from LWJK_API_SECRET, but the script provides no confirmation prompt, print/log notice, or inline warning describing that outbound requests and credential use will occur. For code files, network calls that transmit user or system data should have some form of visible disclosure unless clearly communicated elsewhere in the skill, which is not evident in this file.
The script writes a Markdown report plus normalized host and problem datasets to disk without any user-facing warning or consent. Because these files can contain hostnames, IPs, alert descriptions, and operational status, silent persistence may create sensitive local artifacts that can be read, copied, or retained longer than intended.
The manifest says the skill generates a Markdown inspection report and exports an Excel workbook with 4 sheets. In this file, the payload explicitly sets "excel_file" to None and only provides a template path plus a "next_step" instruction to generate another script later, so the claimed Excel export behavior is not implemented here.
The file requires LWJK_API_SECRET and says it is read from .env, but it does not warn users that the skill accesses credentials and transmits monitoring data to an external API. For a markdown skill description, this omission leaves privacy and credential usage insufficiently disclosed.
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
def build_problem_params(args) -> dict:
params = {"searchtype": args.searchtype or "history", "status": args.status}
for attr in ("clock_begin", "clock_end", "ip", "keyword", "priority", "sort_order", "sort_name"):
value = getattr(args, attr)
if value not in (None, ""):
key = attr.replace("_", "")
if attr in {"sort_order", "sort_name"}:
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
def build_problem_params(args) -> dict:
params = {"searchtype": args.searchtype or "history", "status": args.status}
for attr in ("clock_begin", "clock_end", "ip", "keyword", "priority", "sort_order", "sort_name"):
value = getattr(args, attr)
if value not in (None, ""):
key = attr.replace("_", "")
if attr in {"sort_order", "sort_name"}:
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
def build_problem_params(args) -> dict:
params = {"searchtype": args.searchtype or "history", "status": args.status}
for attr in ("clock_begin", "clock_end", "ip", "keyword", "priority", "sort_order", "sort_name"):
value = getattr(args, attr)
if value not in (None, ""):
key = attr.replace("_", "")
if attr in {"sort_order", "sort_name"}:
Several user-visible strings, including errors, report headings, conclusions, and next-step instructions, are hardcoded in Chinese throughout the script. The policy requires avoiding forced language/locale behavior unless the user is given a choice or the region-specific constraint is explicitly justified, which is not present here.
The script writes normalized host and problem JSON files to disk in addition to the user-visible report, even though the skill description only mentions report generation and Excel export. Persisting extra structured monitoring data can expose sensitive infrastructure details, increase data retention risk, and surprise users who did not consent to those artifacts being stored.
No suspicious patterns detected.