Back to skill

Security audit

Hong Kong Green Minibus Arrival

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a coherent public-transit lookup tool with bounded network access and local caching, not a deceptive or destructive package.

This is reasonable to install if you want Hong Kong Green Minibus arrival lookups and are comfortable with it contacting the disclosed public transit data hosts and writing local cache files. Prefer a runtime that enforces the declared domain allowlist, cache-directory limits, and shell:false argument-array command execution; also note that one route metadata fetch may download up to about 10MB despite smaller limits stated elsewhere in the docs.

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
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (13)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/security-audit.md (reported line 303)May include surrounding context.

Security Validation Tests

bash
# Injection attempts - all rejected with generic error
python3 gmb_arrival.py getGMBArrival "1; rm -rf /" 1 "stop" HKI
# => {"error":"Invalid request parameters."}

python3 gmb_arrival.py getGMBArrival 1 1 "stop;id" HKI

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/security-audit.md (reported line 303)May include surrounding context.

Security Validation Tests

bash
# Injection attempts - all rejected with generic error
python3 gmb_arrival.py getGMBArrival "1; rm -rf /" 1 "stop" HKI
# => {"error":"Invalid request parameters."}

python3 gmb_arrival.py getGMBArrival 1 1 "stop;id" HKI

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/security-audit.md (reported line 303)May include surrounding context.

Security Validation Tests

bash
# Injection attempts - all rejected with generic error
python3 gmb_arrival.py getGMBArrival "1; rm -rf /" 1 "stop" HKI
# => {"error":"Invalid request parameters."}

python3 gmb_arrival.py getGMBArrival 1 1 "stop;id" HKI

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/security-audit.md (reported line 303)May include surrounding context.

Security Validation Tests

bash
# Injection attempts - all rejected with generic error
python3 gmb_arrival.py getGMBArrival "1; rm -rf /" 1 "stop" HKI
# => {"error":"Invalid request parameters."}

python3 gmb_arrival.py getGMBArrival 1 1 "stop;id" HKI

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/security-audit.md (reported line 309)May include surrounding context.

md
python3 gmb_arrival.py getGMBArrival 1 1 "stop;id" HKI
# => {"error":"Invalid request parameters."}

python3 gmb_arrival.py getGMBArrival 1 1 "../../../etc/passwd" HKI
# => {"error":"Stop not found on this route."} (path traversal treated as invalid stop)

python3 gmb_arrival.py getGMBArrival 1 3 "stop" HKI

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill metadata shown in SKILL.md declares tools and commands but does not actually include enforceable permission scoping such as allowed network domains, filesystem paths, or allowed tool boundaries in this file. Because the skill clearly performs network access and runtime cache reads/writes, the absence of machine-enforceable scope at the analyzed artifact level weakens sandboxing and least-privilege controls if the platform relies on this manifest.

Content

No source excerpt is available for this finding.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
85% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · SKILL.md (reported line 174)May include surrounding context.

md
### Context Window Stuffing (Medium) ✅ FIXED

**Finding:** Skill attempted to fill context window with filler content (8MB routeFareList cache), displacing legitimate instructions.

**Remediation:**
1. **No Bundled Cache Files**: Distribution contains only script, manifest, README, references

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
85% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · references/security-audit.md (reported line 221)May include surrounding context.

md
### Context Window Stuffing (Medium) ✅ FIXED

**Finding:** Skill attempted to fill context window with filler content (8MB routeFareList cache), displacing legitimate instructions.

**Remediation:**
1. **No Bundled Cache Files**: Distribution contains only script, manifest, README, references

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 60)May include surrounding context.

md
# Base URLs - MUST be in ALLOWED_DOMAINS
BASE = "https://data.etagmb.gov.hk"
ROUTEFARELIST_URL = "https://data.hkbus.app/routeFareList.min.json"
# Fallback to GitHub source if primary fails
ROUTEFARELIST_FALLBACK = "https://hkbus.github.io/hk-bus-crawling/routeFareList.min.json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 135)May include surrounding context.

md
# Base URLs - MUST be in ALLOWED_DOMAINS
BASE = "https://data.etagmb.gov.hk"
ROUTEFARELIST_URL = "https://data.hkbus.app/routeFareList.min.json"
# Fallback to GitHub source if primary fails
ROUTEFARELIST_FALLBACK = "https://hkbus.github.io/hk-bus-crawling/routeFareList.min.json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · gmb_arrival.py (reported line 45)May include surrounding context.

python
# Base URLs - MUST be in ALLOWED_DOMAINS
BASE = "https://data.etagmb.gov.hk"
ROUTEFARELIST_URL = "https://data.hkbus.app/routeFareList.min.json"
# Fallback to GitHub source if primary fails
ROUTEFARELIST_FALLBACK = "https://hkbus.github.io/hk-bus-crawling/routeFareList.min.json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/security-audit.md (reported line 101)May include surrounding context.

md
# Base URLs - MUST be in ALLOWED_DOMAINS
BASE = "https://data.etagmb.gov.hk"
ROUTEFARELIST_URL = "https://data.hkbus.app/routeFareList.min.json"
# Fallback to GitHub source if primary fails
ROUTEFARELIST_FALLBACK = "https://hkbus.github.io/hk-bus-crawling/routeFareList.min.json"

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/security-audit.md (reported line 323)May include surrounding context.

=> {"error":"Invalid request parameters."}

Size limit enforcement

python3 -c "from gmb_arrival import fetch_json; fetch_json('https://data.etagmb.gov.hk/route', max_size=100)"

=> Exception: Response too large: 3533 bytes (limit: 100)

text

Static analysis

No suspicious patterns detected.