Back to skill

Security audit

Hong Kong Immigration

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Hong Kong immigration guidance skill, with one install-safety caveat about an optional unpinned GitHub clone path.

Install through ClawHub or use a pinned, reviewed commit rather than cloning the latest GitHub branch directly. Expect the skill to use official immigration websites to verify current rules and to provide general information rather than legal advice.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
README.md:25
Finding

Unpinned Installation from a Mutable Personal Repository

Content
View full analysis

Vulnerability Details

File Location: README.md, lines 25–28
Vulnerability Type: Untrusted and mutable supply-chain source
Risk Level: Medium

Vulnerable Code

bash
Or clone directly:

```bash
git clone https://github.com/djanngau/hongkong-immigration-skill.git \
  ~/.codex/skills/hongkong-immigration
text

### Technical Analysis

The documented installation procedure clones the default branch of a personal GitHub repository directly into the active Codex skills directory. It does not pin an immutable commit or signed release, nor does it require checksum or signature verification.

Consequently, the installed content may differ from the version reviewed in this audit. A subsequent repository modification or compromise of the repository owner's account could introduce hostile skill instructions or executable files without changing the documented installation command.

The audited artifact itself contains no malicious payload. The vulnerability is the unsafe trust model of the documented installation mechanism.

### Attack Path

1. An attacker compromises the upstream repository, its owner account, or another credential capable of changing its default branch.
2. The attacker adds malicious instructions to `SKILL.md` or adds scripts that perform unauthorized actions when invoked.
3. A user follows the README and clones the mutable default branch directly into `~/.codex/skills/hongkong-immigration`.
4. The agent discovers and loads the attacker-controlled skill content from its active skills directory.
5. The malicious instructions or scripts execute within the permissions available to the agent process.

### Impact Assessment

Successful exploitation can provide control over the installed skill's instructions and behavior. The resulting scope is bounded by the tools, filesystem access, network access, credentials, and operating-system privileges available to the agent process.

Potential consequences include agent instruction manipulat
...[truncated 243 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace the default-branch clone instructions with an immutable, reviewed commit or versioned release:
bash
git clone https://github.com/djanngau/hongkong-immigration-skill.git
cd hongkong-immigration-skill
git checkout --detach <reviewed-commit-sha>
  1. Publish SHA-256 checksums for release archives and require users to verify them before installation.
  2. Sign release tags or artifacts and document signature verification.
  3. Prefer immutable, versioned releases from a verified package registry over direct installation from a mutable branch.
  4. Download and verify the skill in a staging directory before copying it into the active skills directory.
  5. Require review of SKILL.md, executable files, and installation hooks before activation.
  6. Protect the upstream repository with multi-factor authentication, branch protection, restricted release permissions, and mandatory review.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says the skill provides Hong Kong immigration guidance to end users. However, the supplied code does not answer immigration questions or perform planning related to visas, permits, residency, or immigration. Instead, it is an internal validator/linter for the skill repository, checking metadata, markdown content, and evaluation files. This is a materially different primary purpose and includes undeclared capabilities unrelated to immigration assistance.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill's purpose, workflow, and output requirements are written as mandatory Chinese-language instructions, including fixed phrasing such as '专业、引经据典是硬要求' and prescribed Chinese output structure. There is no indication that the user may choose another language, which can violate language/locale policy when no opt-in or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This JSON eval file contains prompts and expected outputs entirely in Chinese and defines the skill around Hong Kong immigration queries without indicating that language selection is optional. Under the policy rule, forcing a specific language or locale without user opt-in is a natural-language policy concern unless the constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file contains user-facing instructional content exclusively in Chinese, which can amount to a language/locale policy violation when no user opt-in or alternative language path is provided. The file does not state that the skill is limited to Chinese-speaking users or Hong Kong-specific Chinese output only.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file is entirely written in Chinese and does not indicate that users may request another language or that the skill is intentionally restricted to Chinese-language output. Under the policy rule for natural-language constraints, forcing a specific language without user opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill content is written only in Chinese, with no indication that users may choose another language or that the restriction is region-specific. 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.

Static analysis

No suspicious patterns detected.