T09 · Insecure Skill Coding Practices
- Location
scripts/verify_bankcard_three.py:25- Finding
Banking, identity, and credential data transmitted over plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a legitimate verification purpose, but it handles bank and identity details in an unsafe, under-confirmed way.
Review before installing. Use only with explicit user consent to send full bank card, legal name, and ID number to Juhe. Do not use this version for real data unless the endpoint is changed to HTTPS or otherwise verified secure; avoid passing the API key on the command line or storing it in a repository-local .env file.
scripts/verify_bankcard_three.py:25Banking, identity, and credential data transmitted over plaintext HTTP
The skill states it will send bank card number, real name, and national ID number to a third-party API, but it does not include a clear user-facing notice and consent requirement before transmission. This is especially dangerous because these are highly sensitive personal and financial identifiers, and disclosure to an external provider can create privacy, compliance, and misuse risks.
The documentation explicitly recommends writing the API key into scripts/.env, a local file in the project tree. Storing credentials in a workspace file increases the chance of accidental exposure through source control, backups, logs, or other tools that can read files in the project, especially in agent environments with file-read capabilities.
export JUHE_BANKCARD3_KEY=你的AppKey
# 方式二:.env 文件(在脚本目录创建)
echo "JUHE_BANKCARD3_KEY=你的AppKey" > scripts/.env
# 方式三:每次命令行传入
python scripts/verify_bankcard_three.py --key 你的AppKey --bankcard 卡号 --realname 姓名 --idcard 身份证号
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
API Key 配置(任选其一,优先级从高到低):
1. 环境变量: export JUHE_BANKCARD3_KEY=your_api_key
2. 脚本同目录的 .env 文件: JUHE_BANKCARD3_KEY=your_api_key
3. 直接传参: python verify_bankcard_three.py --key your_api_key ...
免费申请 API Key: https://www.juhe.cn/docs/api/id/207
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
API Key 配置(任选其一,优先级从高到低):
1. 环境变量: export JUHE_BANKCARD3_KEY=your_api_key
2. 脚本同目录的 .env 文件: JUHE_BANKCARD3_KEY=your_api_key
3. 直接传参: python verify_bankcard_three.py --key your_api_key ...
免费申请 API Key: https://www.juhe.cn/docs/api/id/207
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
API Key 配置(任选其一,优先级从高到低):
1. 环境变量: export JUHE_BANKCARD3_KEY=your_api_key
2. 脚本同目录的 .env 文件: JUHE_BANKCARD3_KEY=your_api_key
3. 直接传参: python verify_bankcard_three.py --key your_api_key ...
免费申请 API Key: https://www.juhe.cn/docs/api/id/207
The script sends highly sensitive personal data and the API key to an HTTP endpoint using query parameters, exposing bank card numbers, names, ID numbers, and credentials to interception or modification by any network attacker on the path. In this skill context, the risk is elevated because the data is financial and identity-related PII, making confidentiality and integrity critical.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
if env_key:
return env_key
env_file = Path(__file__).parent / ".env"
if env_file.exists():
for line in env_file.read_text(encoding="utf-8").splitlines():
line = line.strip()
The skill performs sensitive operations including reading environment variables, local file access, and outbound network requests, but it does not declare an explicit tool scope or permissions boundary. In an agent setting, this weakens least-privilege controls and makes it easier for the skill to be invoked with broader capabilities than users or reviewers expect.
The trigger description is broad and based on loose natural-language examples without clear exclusions or confirmation steps. Because this skill handles highly sensitive financial and identity data, overbroad triggering can cause accidental collection and transmission of personal information to a third party when the user did not intend to invoke this exact verification workflow.
The module docstring says python verify_bankcard_three.py --file data.csv # 批量核验, and later help text repeats the same capability, but the CLI parser has no branch for --file. This is an active contradiction between documentation and implementation, not merely missing detail.
The documentation explicitly encourages passing the API key via --key on the command line, which can expose the credential through shell history, process listings, logging, and job-control tooling. While this does not guarantee compromise on every system, it is an avoidable secret-handling weakness.
The manifest and module docstring both state that the skill supports 批量核验 and the help text advertises a --file mode, but the argument parser never handles a --file option and no CSV batch-processing logic is implemented. The actual code only performs a single verification request, so the delivered behavior is narrower than the stated functionality.
The runtime help lists --file as a supported parameter for CSV batch verification, yet the argument-parsing loop never recognizes --file, leaving file_path permanently unset. This causes the documented interface to diverge from the actual behavior users receive.