T08 · Insecure Dependencies
- Location
simple_skills.json:19- Finding
Core Skill Behavior Depends on an Unbundled and Unverified Python Executable
- Content
View full analysis
Vulnerability Details
File Locations:
skills.json:73-79simple_skills.json:19-25scripts/health_check.py:11-17SKILL.md:78-81
Vulnerability Type: Unverified external executable dependency and local module substitution
Risk Level: HighVulnerable Code
skills.json:73-79:json "exec": { "command": "python3", "args": [ "./scripts/query.py", "{{query}}" ], "env": { "PYTHONUNBUFFERED": "1" } }simple_skills.json:19-25:json "exec": { "command": "python3", "args": [ "/home/node/.openclaw/scripts/ihg-monitor-python/query.py", "{{query}}" ] }scripts/health_check.py:11-17:python sys.path.insert(0, '/home/node/.openclaw/scripts/ihg-monitor-python') try: from query import execute_query except ImportError as e: print(f"❌ Import failed: {e}") sys.exit(1)SKILL.md:78-81:bash python3 /home/node/.openclaw/scripts/ihg-monitor-python/query.py "Shanghai surroundings" python3 /home/node/.openclaw/scripts/ihg-monitor-python/query.py "promotion information"Technical Analysis
The reviewed package does not contain
scripts/query.pyorscripts/hotels.json. Nevertheless, the primary manifest attempts to execute the missing relative script, while the alternate manifest and operational documentation execute/home/node/.openclaw/scripts/ihg-monitor-python/query.pyoutside the reviewed package.The health checker adds that external directory to the beginning of
sys.pathand importsquery. Importing a Python module executes its top-level code immediately. No cryptographic digest, signature, canonical-path check, ownership check, or permission check is performed before execution.Consequently, the effective Skill implementation is not represented by the audited artifact. Its behavior depends on whichever
query.pyhappens to exist at runtime. This creates ...[truncated 2149 chars]- Remediation
View remediation
Remediation Suggestions
- Bundle
query.pyandhotels.jsonwithin the published Skill artifact. - Use one authoritative manifest and a package-relative executable path resolved from the manifest or script directory, not the current working directory.
- Remove the conflicting
simple_skills.jsonmanifest unless it is strictly required. - Before execution, resolve the executable with
realpathand verify that it remains inside the immutable Skill directory. - Reject symbolic links and files writable by untrusted users or groups.
- If an external executable is unavoidable, publish an authenticated manifest containing its SHA-256 digest and verify that digest before every invocation.
- Do not prepend a mutable external directory to
sys.path. Load a verified module from a fixed path or import the bundled package normally. - Apply least-privilege permissions so only the deployment identity can replace executable Skill files.
- Add installation and CI checks that fail when any declared executable or permitted data file is absent.
- Bundle
