T09 · Insecure Skill Coding Practices
- Location
payment.py:11- Finding
Hard-Coded Billing API Credential
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This paid crypto-security skill needs Review because it advertises strong safety decisions while much of the analysis is simulated or hard-coded, and its billing code uses automatic charging with a hard-coded API key.
Install only if you treat it as a demo or toy, not as a source of wallet, contract, transaction, phishing, or incident-response truth. Before real use, require removal of mock/random security decisions, rotation and removal of the embedded billing key, explicit consent for every charge, and clear warnings for any asset-affecting workflow.
payment.py:11Hard-Coded Billing API Credential
payment.py:48User Identifier Disclosed During Automatic Billing
scripts/contract_auditor.py:68Requested Contracts Are Replaced with Fixed Mock Source Code
scripts/wallet_guardian.py:65Wallet Security Findings Are Randomly Generated
scripts/tx_validator.py:180Transaction Simulation Is Hard-Coded to Succeed
scripts/multisig_manager.py:106Multisig Confirmation Threshold Can Be Bypassed by Reusing One Signer
scripts/incident_responder.py:134Emergency Freeze Reports Successful Containment Without Performing Actions
scripts/phishing_detector.py:122Phishing Detector Equates an HTTPS Prefix with Certificate Safety
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def check_balance(user_id: str) -> float:
"""查询用户余额"""
try:
resp = requests.get(
f"{BILLING_API_URL}/api/v1/billing/balance",
params={"user_id": user_id},
headers=HEADERS,
The code automatically charges a user by sending an environment-sourced user_id to an external billing API without explicit user confirmation or strong binding between the current user/session and that identifier. If an attacker can influence SKILLPAY_USER_ID or trigger this code path, they may cause unauthorized charges, account mix-ups, or billing abuse.
返回: {"ok": bool, "balance": float, "payment_url": str|None}
"""
try:
resp = requests.post(
f"{BILLING_API_URL}/api/v1/billing/charge",
headers=HEADERS,
json={
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def get_payment_link(user_id: str, amount: float = 5.0) -> str:
"""生成充值链接"""
try:
resp = requests.post(
f"{BILLING_API_URL}/api/v1/billing/payment-link",
headers=HEADERS,
json={"user_id": user_id, "amount": amount},
The description frames the skill as a comprehensive security system, while the underlying behavior reportedly uses simulated or randomized checks instead of real security data and does not implement several advertised controls. That creates a false sense of assurance in a high-risk domain involving wallets, contracts, and transactions, where inaccurate results can directly influence unsafe user decisions.
The description frames the skill as a comprehensive security system, while the underlying behavior reportedly uses simulated or randomized checks instead of real security data and does not implement several advertised controls. That creates a false sense of assurance in a high-risk domain involving wallets, contracts, and transactions, where inaccurate results can directly influence unsafe user decisions.
The description frames the skill as a comprehensive security system, while the underlying behavior reportedly uses simulated or randomized checks instead of real security data and does not implement several advertised controls. That creates a false sense of assurance in a high-risk domain involving wallets, contracts, and transactions, where inaccurate results can directly influence unsafe user decisions.
YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).
wallet 0x... --status
python scripts/multisig_manager.py --wallet 0x... --propose --to 0x... --value 1.0
python scripts/multisig_manager.py --wallet 0x... --sign --tx-id 1
python scripts/multisig_manager.py --wallet 0x... --execute --tx-id 1
python scripts/multisig_manager.py --wallet 0x... --add-owner 0x...
### scripts/incident_responder.py
安全事件响应器
```bash
# 紧急冻结
python scripts/incident_responder.py --emergency-freeze --wallet 0x...
# 事件分析
python scripts/incident_responder.py --analyze --tx-hash 0x...
# 损失评估
python scripts/incident_responder.py --assess-loss --address 0x...
# 生成报告
python scripts/incident_responder.py --generate-report --incident-id 1
安全监控中心
# 启动监控
python scripts/security_monitor.py --daemon
# 监控特定地址
python scripts/security_monitor.py --watch 0x... --events all
# 监控合�
The file is entirely focused on billing enforcement despite the skill being presented as a security-defense tool. This mismatch is dangerous because it conceals unrelated monetization logic inside a trust-sensitive security skill, increasing the likelihood of deceptive deployment and reducing informed consent for operators and users.
verify_payment immediately invokes charge_user, meaning a charge attempt occurs automatically at skill start before any explicit warning or consent. In a security-focused skill, this is especially risky because users may trust the tool during urgent incidents and be billed without informed authorization.
The audit workflow accepts a real contract address and emits an audit report for that address, but if no code is provided it analyzes the hard-coded mock contract instead. In this security context, the mismatch can directly produce false audit conclusions for arbitrary contracts, which is especially dangerous because the tool presents itself as a defense/auditing system.
revoke_confirmation decrements the aggregate confirmation count without tracking which owners actually confirmed and without verifying that the supplied signer previously approved the transaction. In a multisig context this breaks authorization integrity: any caller who can reach this method can arbitrarily reduce approvals, potentially blocking legitimate execution or manipulating transaction state.
add_owner and remove_owner directly mutate the owner set immediately, despite presenting themselves as multisig administration functions and accepting a proposer parameter that is never enforced. In a security tool for multisig wallet management, this effectively bypasses multisignature governance and would allow unauthorized takeover, lockout, or weakening of wallet control if exposed in real operations.
These functions present themselves as security checks but generate outcomes using random values rather than real on-chain, reputation, or approval data. In a wallet-security skill, fabricated results can directly mislead users into trusting malicious addresses or distrusting safe ones, creating dangerous false negatives and false positives.
The scan workflow aggregates and reports a 'security score' and 'overall risk' as if they were meaningful security conclusions, but for full scans those conclusions are largely derived from random mock checks. Because this skill is explicitly positioned as a defensive wallet-security tool, users may act on unreliable results and expose funds to theft, scams, or incorrect incident response.
The skill advertises and documents capabilities that imply network access, environment-variable use, and file/output side effects, yet it declares no explicit tool scope or permissions boundary. In an agent setting, missing scope declarations can cause overbroad runtime access, making it harder to constrain billing, monitoring, or transaction-related actions and increasing the blast radius if the skill is misused or compromised.
The skill documents high-impact operations such as revoking approvals, executing multisig actions, emergency freezing, and daemonized monitoring without clear upfront warning, confirmation, rollback, or dry-run guidance. In a crypto/security context, these actions can affect asset control or service availability, so weak safety UX materially increases the chance of accidental or socially engineered misuse.
The top-level natural-language description is written as 自动集成付费验证功能 with no indication that users may choose their preferred language or locale. This can violate language/locale policy when the skill imposes a specific language without opt-in or documented justification.
The code transmits billing-related user data to an external service during a charge operation. External transmission itself is expected for payment processing, but here it is more dangerous because it is hidden inside a security skill and coupled with automatic charging, creating privacy and trust risks.
返回: {"ok": bool, "balance": float, "payment_url": str|None}
"""
try:
resp = requests.post(
f"{BILLING_API_URL}/api/v1/billing/charge",
headers=HEADERS,
json={
The payment-link generation sends user billing data to an external provider. While common in payment integrations, in this skill context it is an undocumented external disclosure unrelated to the declared security-defense purpose, which makes it a meaningful trust and privacy concern.
def get_payment_link(user_id: str, amount: float = 5.0) -> str:
"""生成充值链接"""
try:
resp = requests.post(
f"{BILLING_API_URL}/api/v1/billing/payment-link",
headers=HEADERS,
json={"user_id": user_id, "amount": amount},
The skill reads billing identity from an environment variable even though its declared purpose is security defense, not payments. In this context, that hidden dependency enables silent identity coupling, potential account confusion, and unexpected data disclosure to an external service.
This Python file contains user-facing natural language such as the module description and later console output exclusively in Chinese. Because the skill does not provide any opt-in or language selection mechanism, it effectively forces a specific language/locale on users, which matches the policy-violation criteria.
The function is documented and parameterized as if it retrieves contract source for a supplied address/network, but it always returns embedded mock code. In a smart-contract security skill, this creates a deceptive analysis path where users may believe a real target was audited when in fact results are unrelated, leading to unsafe decisions based on false assurance.
The logger messages, printed report headings, field labels, and completion notices are all hard-coded in Chinese. This is a natural-language locale restriction in operational output, and the file does not offer an alternative language or any explicit user choice.
The demo states it is auditing the example address, but it actually exercises the embedded sample contract path. While likely intended as a demonstration convenience, it conditions users to trust address-based output that is not tied to the target contract, reinforcing the misleading behavior of the main audit flow.
This code contains natural-language strings, comments, and docstrings such as the module description and all printed/logged messages in Chinese only. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.
No suspicious patterns detected.