Back to skill

Security audit

anti-fraud

Security checks for vulnerabilities and agentic risk

Overview

This anti-fraud skill is mostly protective, but it needs review because it can generate realistic scam pressure scripts and persist user-derived content into trusted skill files.

Review before installing. The defensive triage and warning guidance is coherent, but disable or tightly supervise the simulation workflow unless you are comfortable with realistic scam-script generation. Do not allow ordinary users to approve changes to SKILL.md, workflow YAML, or the knowledge base without independent review.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (2)

T01 · Skill Instruction Hijacking

Warning
Location
workflows/anti-fraud-drill.yaml:3
Finding

Unvalidated Workflow Inputs Are Interpolated into Agent Instructions

Content
View full analysis

Vulnerability Details

File Location: workflows/anti-fraud-drill.yaml:3-16, 21-38
Vulnerability Type: Prompt injection through direct template interpolation
Risk Level: Medium

Vulnerable Code

The following is an English rendering of the relevant YAML content; the configuration structure and interpolation expressions are preserved:

yaml
inputs:
  - name: scam_type
    required: true
    description: "Scam type to simulate; expected to match a knowledge-base title"
  - name: user_level
    required: false
    default: "general"
    description: "Audience level: beginner or general"
  - name: target_group
    required: false
    default: "general audience"
    description: "Audience profile used by the mentor"

steps:
  - id: fraudster_attack
    role: "security/fraudster"
    task: >-
      Act as a fraudster and generate a realistic inducement script for
      "{{scam_type}}". Target a {{user_level}} audience.
    output: attack_script

  - id: user_response
    role: "user"
    task: >-
      Respond to the preceding scam script as a {{target_group}} user.
    output: user_reply

  - id: fraudster_pressure
    role: "security/fraudster"
    task: >-
      Act as a fraudster and generate targeted secondary pressure after
      seeing the user's response.
    output: pressure_script

  - id: mentor_review
    role: "security/mentor"
    task: >-
      Review the complete exercise for the {{target_group}} audience.
    output: mentor_feedback

  - id: evaluator_score
    role: "security/evaluator"
    task: >-
      Score the user's response based on the preceding exercise.
    output: evaluation_report

  - id: drill_summary
    role: "security/mentor"
    task: >-
      Compare the exercise with the "{{scam_type}}" knowledge-base entry
      and summarize it for the {{target_group}} audience.
    output: drill_summary

Tech

...[truncated 2162 chars]

Remediation
View remediation

Remediation Suggestions

  1. Define enforceable enums for scam_type, user_level, and target_group; reject every value not exactly present in the approved lists.
  2. Apply strict length limits and reject control characters, multiline values, markup, template syntax, and instruction-like payloads.
  3. Pass inputs as structured data fields rather than concatenating them into natural-language instructions.
  4. If interpolation is unavoidable, place values inside explicit data delimiters and instruct each role that delimited content is untrusted data and must never be followed as instructions.
  5. Validate generated output before forwarding it to another role, including checks for role-switching language, embedded instructions, requests for real information, and unsafe operational guidance.
  6. Keep immutable safety constraints separate from user-controlled templates and ensure the workflow runner gives those constraints higher priority.
  7. Add adversarial tests covering multiline injection, delimiter breaking, role reassignment, scoring manipulation, and attempts to override the simulation-only boundary.

T02 · Agent Memory Poisoning

Warning
Location
references/brainstorming-flow.md:71
Finding

User-Derived Material Can Be Persisted into Trusted Skill and Knowledge-Base Files

Content
View full analysis

Vulnerability Details

File Location: references/brainstorming-flow.md:71-76
Vulnerability Type: Persistent poisoning of trusted agent knowledge and instructions
Risk Level: Medium

Vulnerable Code

The following is an English rendering of the relevant procedure:

markdown
- Knowledge persistence procedure:
  1. Confirmation threshold: Confirm that the scam is outside the existing
     34 categories and that sufficient evidence exists, including original
     user material, matched predicates, and a reconstructed scheme.
  2. User approval: Explicitly obtain the user's approval to add it.
  3. Append the entry: Add a sequentially numbered category to
     scam-knowledge.md using the required entry format.
  4. Synchronize counts: Update category-count wording in README and SKILL,
     and add the category to the scam_type list in
     workflows/anti-fraud-drill.yaml.
  5. Consistency check: Verify alignment among the knowledge-base headings,
     README, and YAML category list.

The persisted knowledge is subsequently treated as authoritative by references/hallucination-guard.md:13-16, which directs classifications to prioritize the local predicate and scam knowledge files.

Technical Analysis

The procedure permits content derived from original user material to be appended to scam-knowledge.md. It also directs updates to SKILL.md, README.md, and the workflow configuration. User approval is required, but approval by the same user who supplied the material is not an independent trust boundary.

No mandatory maintainer review, provenance verification, sanitization process, instruction-content filter, Unicode normalization, URL policy, or immutable-schema enforcement is specified. There is also no rule requiring user-provided examples to be stored only as quoted inert data.

Because later sessions are instructed to trust the knowledge base, malicious material persisted through th ...[truncated 1713 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace direct modification with generation of a proposed patch that requires independent maintainer review and approval.
  2. Never treat approval from the content submitter as sufficient authorization to modify trusted Skill instructions.
  3. Prohibit conversational workflows from modifying SKILL.md or role definitions. Restrict automated proposals to a staging file outside the trusted instruction path.
  4. Store examples as explicitly quoted, inert data under a strict schema. Do not allow user-derived text in headings, directives, templates, role descriptions, or executable workflow fields.
  5. Record provenance for every proposed entry, including source, submission time, reviewer, evidence, and validation status.
  6. Normalize Unicode and reject hidden characters, embedded directives, template expressions, code blocks, unsolicited URLs, and role-switching language.
  7. Require predicate mappings to reference an allowlisted identifier set and validate them mechanically.
  8. Run security and consistency checks before promotion, including prompt-injection detection and a diff review for every trusted file.
  9. Keep immutable, version-controlled release artifacts and provide a rollback path if poisoned content is discovered.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (23)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The file defines a dedicated 'fraudster' role that generates realistic scam scripts and follow-up coercion, which materially exceeds a defensive anti-fraud assistant’s stated purpose. Even with simulation framing, this gives users reusable social-engineering content that can directly enable phishing, payment fraud, and coercive scam operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

Adaptive generation of persuasive follow-up language is especially dangerous because it helps an operator overcome victim hesitation in real time. That transforms the skill from passive education into active assistance for social engineering, increasing the likelihood and effectiveness of fraud.

Content

No source excerpt is available for this finding.

Ssd 4

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The staged dialogue and explicit requirement to escalate pressure after resistance operationalize a deceptive narrative used in real scams. In context, this is more dangerous because the surrounding skill is branded as anti-fraud, which may lower reviewer or user suspicion while embedding actionable attacker tradecraft.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README describes proactive triggering on broad scam-related keywords such as transfers, verification codes, screen sharing, and remote control, but does not define clear exclusion conditions or confidence thresholds. In a conversational agent, this can cause over-triggering on benign discussions, leading to unsolicited intervention, user confusion, and potentially unsafe escalation if the skill steers users into emergency workflows without sufficient evidence.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The '主动守护' behavior is described at a high level without a precise decision rule for when the skill should automatically intervene versus remain passively responsive. That ambiguity increases the chance of inconsistent behavior across implementations, including unnecessary interruptions or forceful warnings in harmless conversations, which is a policy and safety risk for an autonomous agent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger terms for the '主动守护者' are very broad and include common words like 转账、验证码、银行卡、密码 and 投资稳赚, with instructions to insert risk detection automatically whenever they appear. In a security-sensitive assistant, this can cause the skill to activate in ordinary financial, support, or educational conversations and override the expected flow, creating prompt-scope creep and increasing the chance of unnecessary high-severity warnings or data solicitation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file says the flow can be triggered 'according to the user's description' and 'without user request,' but it does not tightly constrain what kinds of descriptions are in scope. This ambiguity increases the risk of unintended invocation because ordinary analytical or incomplete user messages could satisfy the precheck.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

All user-facing instructions, triggers, and workflow text are specified exclusively in Chinese, with no indication that users may choose another language. This can violate language or locale policy where user opt-in or explicit justification is required.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Phrases like '内容疑点多、线索冲突' and '快速判定五步可能误伤' are subjective and do not define concrete thresholds for activation. Without clearer constraints or exclusions, different implementations may invoke the skill inconsistently or too often.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all user-facing guidance exclusively in Chinese and does not indicate that the skill is region-specific or that users may choose another language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file is entirely written as a mandatory output policy in Chinese and repeatedly uses prescriptive language such as '所有输出' and '输出必带', which indicates a forced language/locale behavior. There is no opt-in mechanism, alternate language option, or stated region-specific justification, so this appears to violate the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document is entirely written as prescriptive response guidance in Chinese, including explicit wording to use with different audiences, but it does not indicate that language choice is optional or limited to a China-specific deployment context. This can violate language/locale policy when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill reference is written exclusively in Chinese, including all labels, guidance, and output examples, with no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking context. This can violate language/locale policy when a skill effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file’s natural-language instructions and required outputs are exclusively in Chinese, which can force a specific language on users without opt-in. The policy only allows this when the skill offers language choice or clearly documents a justified regional or locale-specific constraint, which is not present here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The content instructs the model to produce realistic scam persuasion and pressure tactics without prominent user-facing warnings about manipulation risk, misuse, or strict limitations. In a safety-sensitive domain, lack of clear guardrails raises the chance that harmful outputs are requested, normalized, or repurposed for real victims.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill instruction set is written in Chinese and includes prescriptive phrasing for how feedback should be delivered, but it does not offer the user a language choice or state that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill specification is written in Chinese and frames the role behavior exclusively in that language, with no indication that users may opt into another language or locale. Under the policy rule, a skill that implicitly enforces a specific language without user choice can constitute a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language descriptions and task prompts are entirely written in Chinese, and the skill requires exact matching against a Chinese-titled taxonomy. There is no indication that users may choose another language or that the locale restriction is explicitly justified as a China-specific tool, so this appears to impose a language constraint without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

整份 README 从标题到使用说明均以中文描述,且未声明支持的语言范围、允许用户切换语言,或说明该技能仅面向特定中文场景。按照语言/locale 政策,这种默认单一语言而无用户 opt-in 的自然语言约束可能构成政策问题。

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The advanced analysis workflow is auto-triggered by conditions that are partly subjective, especially when the user asks for 'analysis/deep dive/risk assessment/what to do' rather than simply asking if something is a scam. Because those requests are common and the criteria are open-textured, the skill may enter a more invasive or prolonged workflow unexpectedly, increasing the chance of over-collection, confusing guidance, or bypassing the simpler default path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file contains user-facing instructions and FAQ text only in Chinese, and it does not state that the language is optional or limited to a Chinese-speaking audience. Under the policy rule for natural-language violations, forcing a specific language without opt-in can be a locale/language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains user-facing natural-language content exclusively in Chinese and does not indicate that language selection is optional or limited to a China-specific audience. Under the policy rule, forcing a specific language without user opt-in is a locale/language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. The entire skill is written as Chinese-only operational guidance and does not indicate that users may opt into another language or that the locale restriction is intentionally required for a China-specific training context.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.