T09 · Insecure Skill Coding Practices
- Location
scripts/trade.py:28- Finding
Live trading password can be transmitted to an arbitrary OpenD host
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for moomoo/Futu trading, but live trading can send the unlock password to any configured OpenD host and the setup check exposes raw financial account identifiers.
Install only if you understand that this skill can trade real securities when explicitly invoked. Keep live trading pointed at a trusted local OpenD instance, avoid remote --host values unless you have a secure authenticated tunnel, protect the unlock-password environment variable, and avoid sharing setup_check.py output because it may include financial account identifiers.
scripts/trade.py:28Live trading password can be transmitted to an arbitrary OpenD host
scripts/setup_check.py:24Setup check exposes raw financial account and card identifiers on standard output
The skill invokes scripts that rely on environment variables, including a live-trading unlock password, but the manifest does not declare any explicit tool scope or permission boundary for environment access. In an agent setting, undeclared env access can expose secrets or enable unintended use of sensitive credentials, which is especially risky here because the skill can place real stock orders.
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
)
try:
return getattr(api.TrdMarket, resolved_market)
except AttributeError as exc:
raise ValueError(f"Trade market '{resolved_market}' is not supported by the SDK.") from exc
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
"K_YEAR",
]
ktype_map = {
name: getattr(api.KLType, name)
for name in ktype_names
if hasattr(api.KLType, name)
}