Back to skill

Security audit

agent-boarding-pass

Security checks for vulnerabilities and agentic risk

Overview

The skill is not overtly malicious, but its trust and installation model are weak enough that users should review it before relying on it for agent permissions.

Install only from a reviewed, pinned source. Do not treat generated boarding passes as cryptographic authorization credentials unless the design adds trusted issuer signatures and stronger evidence validation.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/agent_boarding_pass.py:25
Finding
Boarding passes are forgeable because integrity protection is unkeyed and evidence validation fails open<![CDATA[ ## Vulnerability Details **File Location**: `scripts/agent_boarding_pass.py:25-29, 34-49, 62, 100-115` **Vulnerability Type**: Cryptographically ineffective authenticity validation and insufficient evidence validation **Risk Level**: High ### Vulnerable Code ```python def load_evidence_ref(p: str) -> str: q = p[1:] if p.startswith("@") else p if pathlib.Path(q).is_file(): return sha256_of(pathlib.Path(q).read_text(encoding="utf-8")) return sha256_of(p) ``` ```python def issue(a): ev, laws_hit = {}, set() for item in a.evidence: if "=" not in item: print(f"证据格式错误(应为 key=value):{item}", file=sys.stderr) sys.exit(2) k, v = item.split("=", 1) if not k.startswith(LAW_PREFIX): print(f"证据键须以 l1-/l2-/l3- 开头:{k}", file=sys.stderr) sys.exit(2) ev[k] = load_evidence_ref(v) laws_hit.add(k[:3]) missing = [l for l in ("l1-", "l2-", "l3-") if l not in laws_hit] if missing: msg = "⛔ 拒绝签发:三律证据缺失(" + "、".join(missing) + ")" print(json.dumps({"issued": False, "agent": a.agent, "missing": missing, "note": msg}, ensure_ascii=False, indent=2) if a.json else msg) sys.exit(1) ``` ```python card["fingerprint"] = sha256_of(json.dumps(card, ensure_ascii=False, sort_keys=True)) ``` ```python miss = [k for k in ("pass_type", "agent", "issued_at", "expires_at", "allow", "evidence_sha256", "fingerprint") if k not in card] checks.append(("结构完整", not miss, "缺失字段: " + ",".join(miss) if miss else "字段齐全")) body = {k: card[k] for k in ("pass_type", "agent", "issued_at", "expires_at", "allow", "evidence_sha256") if k in card} checks.append(("指纹防篡改", bool(card.get("fingerprint")) and sha256_of(json.dumps(body, ensure_ascii=False, sort_keys=True)) == card.get("fingerprint"), "重算一致" if checks and sha256_of(json.dumps(body, ensure_ascii=Fa ...[truncated 3510 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the unkeyed fingerprint with authenticated issuance: - Prefer an Ed25519 digital signature over a canonical card representation. - Alternatively, use HMAC-SHA-256 if every verifier can securely share the same secret. - Include an issuer identifier, signature algorithm, and key identifier in the card. - Configure verifiers with trusted public keys rather than accepting keys embedded only in the card. 2. Canonicalize signed data using a clearly specified serialization format. Ensure issuance and verification sign exactly the same fields and reject unknown or malformed security-critical fields where appropriate. 3. Fail closed for evidence references: - Require referenced evidence files to exist and be regular files. - Treat literal values as a separate, explicit input mode if they are genuinely supported. - Validate evidence against defined schemas and trusted provenance. - Bind evidence to the claimed agent and issuer. 4. During verification: - Require `pass_type == "lgd-agent-boarding-pass"`. - Require valid `l1-`, `l2-`, and `l3-` evidence entries. - Validate field types, including that `allow` is a list of permitted action identifiers. - Validate that `issued_at` and `expires_at` are well-formed and chronologically consistent. - Enforce an acceptable maximum TTL. - Reject cards issued unreasonably far in the future. - Verify the issuer signature before trusting identity, evidence, permissions, or expiration. 5. Clearly document that a plain SHA-256 digest provides no proof of issuer authenticity and must not be used as an authorization credential. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:79
Finding
Installation instructions use mutable and unpinned remote supply-chain sources<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:79-84` **Vulnerability Type**: Unpinned executable installation and mutable repository dependency **Risk Level**: Medium ### Vulnerable Code ```bash # One-command retrieval through the skills CLI npx skills add zhaoxinghua09-cell/agent-skills -g # Manual alternative: clone and copy the skill into the Agent skill directory git clone https://github.com/zhaoxinghua09-cell/agent-skills.git cp -r agent-skills/skills/agent-boarding-pass ~/.workbuddy/skills/ ``` ### Technical Analysis The recommended installation path invokes `npx skills` without pinning the CLI package to a reviewed version. Depending on local npm behavior and cache state, `npx` can retrieve and execute a current package release from a remote registry. The source skill is also referenced through a mutable repository location rather than an immutable commit, signed release, or verified archive. The manual installation alternative clones the repository's current default branch and copies its contents directly into an Agent skill directory. As a result, the effective installation payload can change after this audited artifact was reviewed. The documented commands provide no checksum, signature verification, lockfile, commit pin, or mandatory review step. ### Attack Path 1. An attacker compromises the relevant npm package, npm publisher account, GitHub repository, maintainer account, or upstream release process. 2. The attacker publishes a modified CLI release or changes the repository's default branch. 3. A user follows the documented `npx` or `git clone` command. 4. The user's environment retrieves content that differs from the audited artifact. 5. The command globally installs or copies that mutable content into an Agent skill directory. 6. The newly installed skill may be loaded or invoked with the Agent's available permissions. This finding does not establish that the current remote sources are malicious. It identifies the abse ...[truncated 858 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the `skills` CLI to an exact reviewed version, for example by using an explicit package version rather than an unqualified `npx skills` invocation. 2. Pin the skill source to an immutable Git commit or cryptographically signed release tag. 3. Publish SHA-256 checksums or signed provenance for release archives and require verification before installation. 4. Prefer downloading a versioned release archive over cloning a mutable default branch. 5. Avoid global installation unless it is operationally required. Install into a restricted, project-specific environment with least privilege. 6. Require users or automated tooling to inspect the resolved package contents before activation, especially instruction files and executable scripts. 7. Use repository branch protection, signed commits or tags, multi-factor authentication, and protected publishing credentials to reduce upstream compromise risk. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (6)

Lp3

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding
The skill advertises operational use and references scripts plus installation into agent skill directories, but it does not declare an explicit tool scope such as allowed tools or permissions. In an agent setting, missing scope boundaries can cause the host agent to infer broader file read/write authority than intended, increasing the chance of unintended repository or local file access during execution.

Natural-Language Policy Violations

Medium
Confidence
83% confidence
Finding
The operational instructions and usage guidance in the markdown are presented only in Chinese, which can force a specific language on users or agents consuming the skill. The policy allows locale constraints when users are given a choice or when the constraint is clearly documented and justified, which is not present here.

Rp1

Medium
Category
MCP Rug Pull
Confidence
80% confidence
Finding
The documentation instructs users to run 'npx skills add ...' without pinning a specific package version. Unpinned package execution can pull whatever version is current at install time, creating a supply-chain risk where a compromised or breaking upstream release could execute unexpected code on the user's machine.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
SQP-3 applies to all file types and includes language or locale policy violations. This file presents its docstring, CLI description, help text, and runtime messages only in Chinese, with no opt-in or alternative language support, which can violate organizational language-choice policies.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The title presents the skill in Chinese and English, but the document does not explain any language policy, user opt-in, or region-specific justification. Under the policy rule, forcing or assuming a specific language/locale without choice can be a natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
81% confidence
Finding
The category field uses Chinese text ("AI 治理"), which indicates a language-specific presentation choice in the manifest metadata. There is no accompanying opt-in, multilingual alternative, or justification that this skill is region- or locale-specific, so it may violate the language/locale policy for natural-language content.

Static analysis

No suspicious patterns detected.