Back to skill

Security audit

agent-boarding-pass

Security checks for vulnerabilities and agentic risk

Overview

The skill is not destructive, but it presents a forgeable SHA-256 checksum as an authorization trust anchor for sensitive agent access.

Review this carefully before installing. Do not rely on these boarding passes as proof of issuer identity or authorization for sensitive data or actions unless the design is changed to use real digital signatures or another trusted issuer mechanism. Also expect local file reading/writing despite the manifest saying filesystem:false.

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

Error
Location
scripts/agent_boarding_pass.py:68
Finding

Forgeable boarding passes used as authorization credentials

Content
View full analysis

Vulnerability Details

File Location: scripts/agent_boarding_pass.py:68, 96-105; authorization workflow documented at SKILL.md:86-91
Vulnerability Type: Unkeyed digest used as proof of authenticity
Risk Level: High

Complete Code Snippet

python
card = {
    "pass_type": "lgd-agent-boarding-pass",
    "agent": a.agent,
    "issued_at": now.isoformat(timespec="seconds"),
    "expires_at": expires,
    "allow": a.allow or [],
    "evidence_sha256": ev,
}
card["fingerprint"] = sha256_of(
    json.dumps(card, ensure_ascii=False, sort_keys=True)
)

Verification reconstructs the same public data and compares its unkeyed SHA-256 digest:

python
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=False, sort_keys=True)
    ) == card.get("fingerprint")
    else "不一致(已被篡改或非本体系签发)"
))

The documented workflow assigns an authorization role to this check:

text
4. Inject the credential into a system prompt or upload to repo/ticket as trust anchor.
5. The receiving agent recomputes the fingerprint and checks expiry before executing.
6. Only after permission match and non-expiry is access granted.

Technical Analysis

The fingerprint is an ordinary SHA-256 digest over fields included in the boarding pass. It does not use a secret signing key, a trusted private key, or any other issuer-only material.

SHA-256 can establish that data matches a supplied digest, but it cannot identify who produced that data. Any party able to construct a boarding-pass JSON document can choose an arbitrary agent identity, permission allowlist, evidence hashes, and expiry, then calculate the corresponding valid fingerprint.

...[truncated 2218 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the unkeyed fingerprint with a digital signature created using an issuer-held private key, such as Ed25519.
  2. Configure verifiers with pinned, trusted issuer public keys and reject unknown issuers or unsupported signature algorithms.
  3. Sign a canonical representation of all security-relevant fields. Include at least:
    • issuer identity and key identifier;
    • subject agent identity;
    • permission allowlist;
    • evidence hashes;
    • issuance and expiry times;
    • intended audience;
    • a unique pass identifier or nonce;
    • schema and signature-algorithm versions.
  4. Verify the signature before trusting any identity, permission, expiry, or evidence field.
  5. Validate the intended audience and issuer in addition to checking expiry, preventing valid passes from being replayed in unrelated systems.
  6. Define clock-skew limits, maximum validity periods, replay handling, revocation behavior, and key-rotation procedures.
  7. Do not describe the current unkeyed hash as a signature, issuer-authentication mechanism, or trust anchor. If cryptographic issuer authentication is not intended, label it only as an accidental-corruption checksum and prohibit its use for access-control decisions.
  8. Add negative tests proving that changing permissions, creating a pass without the issuer's private key, using an unknown issuer, or replaying a pass for another audience causes verification to fail.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (8)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest declares filesystem: false, but the skill explicitly supports --out output paths, @file/path verification input, and instructs users to upload or embed generated credential material into repos or ticketing systems. This creates a trust-boundary mismatch: operators or policy engines may approve the skill under the assumption it cannot read or write files, while its documented behavior requires filesystem interaction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This file contains the operational instructions for AI agents exclusively in Chinese, and it does not provide an opt-in, alternative language, or justification for a Chinese-only policy. That can violate a language/locale policy when agents or maintainers are expected to operate in a broader language context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file presents substantial required content in Chinese, including the license and policy block, without indicating that another language version is available or that the user may choose a preferred language. This can violate a language/locale policy when a skill imposes a specific language without opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest says network: false, yet the surrounding metadata and workflow discuss API usage and uploading credentials to external collaboration systems. Even if the core script itself is offline, this inconsistency can cause reviewers to underestimate exposure and deploy the skill in environments where network-capable handling of credentials would require stricter controls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The changelog states 'English first', but the primary top-level description, display name, category, and much of the manifest-facing metadata are Chinese-only or Chinese-first. This creates a locale policy concern because the skill presents a fixed language preference without any user opt-in or explicit language selection mechanism.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language instructions, usage examples, and status messages exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is justified, which is not indicated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script’s argument help strings, error messages, and success/failure output are presented only in Chinese. Because this affects runtime interaction and there is no language-selection mechanism or documented justification, it violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language content of the file is entirely in Chinese, including the key instruction that AI agents should read SKILL.md first and the one-line skill description. This can amount to a language/locale policy issue because the skill presents a fixed language experience without offering a user choice or documenting that the skill is intended only for a Chinese-speaking context.

Content

No source excerpt is available for this finding.