Back to skill

Security audit

ICP 前置审批检查

Security checks for vulnerabilities and agentic risk

Overview

This skill performs a proportionate local check of business-license details against bundled filing rules, with optional OCR dependencies that require separate installation.

If you need the OCR fallback, install reviewed dependency versions in an isolated environment; the supplied requirements are not a lockfile. OCR returns the license's recognized text to your agent. Confirm extracted fields and treat results as preliminary screening rather than filing approval.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 1311)May include surrounding context.

python
ordered_categories = dict(
        sorted(categories.items(), key=lambda pair: (pair[1].order, pair[0]))
    )
    return RuleBook(
        schema_version=schema_version,
        version=version,
        checked_at=checked_at,

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 2840)May include surrounding context.

python
)
    rules_path = Path(args.rules) if args.rules is not None else references / "huawei-rules.json"
    args.rules = str(rules_path)
    return rules_path


def main(argv: Optional[Sequence[str]] = None) -> int:

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: network.

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.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The open-ended requirement permits future, unreviewed onnxruntime releases, creating an installation-time supply-chain and reproducibility weakness rather than demonstrating a currently exploitable package vulnerability. The comment is misleading: a minimum version neither pins a patched release nor prevents the separate onnx package from appearing transitively; separate, optional installation limits exposure during normal skill execution.

Content

Scanner excerpt · requirements-ocr.txt (reported line 7)May include surrounding context.

text
# Pin onnxruntime to latest patched version (CVE-2026-14647 affects
# the "onnx" package, NOT "onnxruntime"; pinning here prevents
# accidental inclusion of the "onnx" package via transitive deps).
onnxruntime>=1.19.0

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 1797)May include surrounding context.

python
}
    terms = []
    for item in result.matches:
        terms.extend(getattr(item, category_attribute))
    for item in result.province_rules:
        rule_terms = getattr(item, rule_attribute)
        if national_category_ids.intersection(item.rule.category_ids):

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 1799)May include surrounding context.

python
for item in result.matches:
        terms.extend(getattr(item, category_attribute))
    for item in result.province_rules:
        rule_terms = getattr(item, rule_attribute)
        if national_category_ids.intersection(item.rule.category_ids):
            rule_terms = tuple(
                term for term in rule_terms if term not in BROAD_PROVINCE_TERMS

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 1806)May include surrounding context.

python
)
        terms.extend(rule_terms)
    for item in result.province_policies:
        terms.extend(getattr(item, rule_attribute))
    return tuple(dict.fromkeys(terms))

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 1942)May include surrounding context.

python
dict.fromkeys(
            term
            for match in result.province_rules + result.province_policies
            for term in getattr(match, attribute)
        )
    )

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 2471)May include surrounding context.

python
multiple_paths = len(row.paths) > 1
    rendered = []
    for path in row.paths:
        values = getattr(path, attribute)
        if isinstance(values, str):
            values = (values,)
        for value in values:

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/check_preapproval.py (reported line 2702)May include surrounding context.

python
raise RuleError("{}过大".format(label))
        flags = os.O_RDONLY
        for name in ("O_CLOEXEC", "O_NOFOLLOW", "O_NONBLOCK"):
            flags |= getattr(os, name, 0)
        descriptor = os.open(str(path), flags)
        opened = os.fstat(descriptor)
        if not stat.S_ISREG(opened.st_mode):