Back to skill

Security audit

南京留学移民审计 | Nanjing Agency Audit

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed, purpose-aligned audit helper for Nanjing overseas-agency research, with some reliability caveats around source validation and bilingual defaults.

Reasonable to install for public-record agency audits. Treat its output as research support, not legal advice, and independently verify important licensing, registry, complaint, and contract claims from official sources, especially when the helper script reports that a structured audit passed.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/validate_audit.py:48
Finding

Untrusted Sources Can Be Self-Certified as Authoritative Evidence

Content
View full analysis
bool: return isinstance(value, str) and value.startswith(("https://", "http://")) def validate_source(source: Any, label: str, errors: list[str]) -> None: if not isinstance(source, dict): errors.append(f"{label}: {bi('来源必须是对象', 'source must be an object')}") return if not is_http_url(source.get("url")): errors.append(f"{label}: {bi('source.url必须使用http(s)', 'source.url must be http(s)')}") if source.get("grade") not in ALLOWED_GRADES: errors.append(f"{label}: {bi('source.grade必须为A、B、C或D', 'source.grade must be A, B, C, or D')}") ``` The affected dual-license validation logic is: ```python if license_status == "yes-currently-verified": sources = agency.get("current_license_sources", []) official_sources = [source for source in sources if isinstance(source, dict) and source.get("grade") == "A"] if len(official_sources) < 2: errors.append(f"{label}: {bi('现行双证主张至少需要两个A级来源', 'a current dual-licence claim requires at least two Grade A sources')}") for source_index, source in enumerate(sources): validate_source(source, f"{label}.current_license_sources[{source_index}]", errors) ``` ### Technical Analysis The validator treats evidence grades as trusted input. A source is accepted when its URL begins with `http://` or `https://`, and its caller-supplied grade is one of `A`, `B`, `C`, or `D`. It does not establish that a source labeled Grade A belongs to a government authority, official registry, court, regulator, or another authoritative domain. For the particularly sensitive `yes-currently-verified` dual-license status, the validator only counts how many supplied source objects contain `"grade": "A"`. It does ...[truncated 2519 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill explicitly instructs the agent to read local reference files on every task, but it does not declare any tool scope such as permissions or allowed-tools. That mismatch creates implicit file-read capability without an auditable boundary, which can let the agent access unintended local files if path handling, prompt interpretation, or future edits broaden what gets read. In this context the risk is elevated because the skill is designed to perform repeated evidence collection and document-driven audits, making file access a core behavior rather than an incidental one.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The short description and default prompt specify that the audit is bilingual in Chinese and English, which imposes a language behavior by default. Under the policy, forcing a specific language or locale without offering user choice or 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 file states that when bilingual output is requested, Chinese must appear before English in each section, heading, and cell, and repeats that labels and explanations must follow that language order. This is a natural-language locale policy constraint that privileges a specific language ordering without user opt-in, which matches the policy-violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The instruction requires use of Chinese titles in exactly this order and permits English only as an immediate follow-on explanation. That is a language-format mandate rather than a user-selectable preference, so it violates the language/locale policy rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The template requires exact preservation of Chinese wording and mandates Chinese-before-English within bilingual table headings and cells. This imposes a fixed language order and locale convention without indicating user choice or a documented regional necessity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The helper function hardcodes all user-facing messages to a Chinese-first bilingual format, and the module docstring also presents output in that fixed locale ordering. Because this is a code file and there is no opt-in, configuration, or documented region-specific justification in the file, this is a natural-language locale policy constraint.

Content

No source excerpt is available for this finding.