T09 · Insecure Skill Coding Practices
- Location
scripts/tcloud_api.py:44- Finding
TLS Certificate and Hostname Verification Disabled When certifi Is Unavailable
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a real Tencent Cloud advisor purpose, but it asks for broad cloud credentials and permissions, weakens network safety, and includes unrelated bulk-publishing material that users should review carefully.
Install only after reviewing the cloud permissions and unrelated publishing files. Use a dedicated least-privilege Tencent Cloud sub-account, avoid storing long-lived SecretKeys in shell profiles, do not share generated login links, and remove or constrain the generic API runner, insecure TLS fallback, broad role policies, and bulk-publishing artifacts before trusting this skill in a sensitive account.
scripts/tcloud_api.py:44TLS Certificate and Hostname Verification Disabled When certifi Is Unavailable
scripts/tcloud_api.py:166Caller-Controlled Host Receives Authenticated Tencent Cloud Request Headers
scripts/create_role.py:42Created Console Role Receives Full Tag and Advisor Access Beyond Minimum Requirements
SKILL.md:24Documentation Requires Persistent Plaintext Storage of Long-Lived Cloud Credentials
scripts/login_url.py:289Passwordless Console Login URL Permits an Unrestricted Post-Login Redirect
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
ctx = _get_ssl_context()
with urlopen(req, context=ctx) as resp:
result = json.loads(resp.read().decode("utf-8"))
response_body = result.get("Response", {})
The code disables TLS certificate verification when certifi is unavailable by setting check_hostname = False and verify_mode = ssl.CERT_NONE, then sends signed Tencent Cloud requests over that connection. Because the request includes attacker-influenced host and secrets-backed authorization headers, a man-in-the-middle or redirected endpoint could intercept requests and responses, defeating transport security and exposing sensitive cloud API interactions.
try:
ctx = _get_ssl_context()
with urlopen(req, context=ctx, timeout=30) as resp:
response_body = resp.read().decode("utf-8")
except HTTPError as e:
try:
The file is wholly unrelated to the declared architecture inventory/risk assessment purpose and instead provides operational guidance for bulk skill publishing after a known supply-chain incident. That mismatch is dangerous because it can conceal unauthorized distribution workflow content inside an unrelated skill, increasing the chance the package is being used to facilitate mass publication or evade platform scrutiny.
The documentation gives instructions for staged bulk publication, monitoring anti-spam triggers, retrying failed uploads, and using alternate tokens, none of which are justified by the stated skill purpose. In context, this appears to normalize anti-abuse evasion behavior and suggests the repository may support deceptive or unauthorized mass distribution activity.
The guidance explicitly recommends token rotation and tuned publication pacing to avoid triggering platform anti-spam controls. Those are classic anti-detection tactics and are especially suspicious in a skill that should be focused on cloud architecture assessment rather than distribution automation.
The file content is materially unrelated to the declared skill purpose of architecture inventory and risk assessment, and instead documents batch publishing automation. This mismatch is dangerous because it suggests the repository may contain repurposed or concealed operational content that could mislead reviewers, mask unauthorized functionality, or facilitate bulk distribution workflows under an unrelated skill identity.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The documented API runner takes service, host, action, and version as parameters, indicating a generic authenticated cloud API invocation mechanism rather than a narrowly constrained advisor-only client. With environment-provided secrets, that broad capability could be repurposed for unintended Tencent Cloud actions if exposed through the skill.
The YARA match is overbroad, but the underlying behavior is still risky: the skill instructs permanent persistence of cloud secrets and role config into shell startup files. In this skill context, that is more dangerous because the stored credentials are powerful Tencent Cloud API keys used for authenticated administrative and console-access workflows.
��变量配置密钥:
TENCENTCLOUD_SECRET_ID — 腾讯云 SecretId(必填)TENCENTCLOUD_SECRET_KEY — 腾讯云 SecretKey(必填)密钥获取地址:https://console.cloud.tencent.com/cam/capi
环境变量必须永久写入 shell 配置文件,确保新会话中仍然生效:
Linux / macOS(写入 ~/.bashrc 或 ~/.zshrc):
echo 'export TENCENTCLOUD_SECRET_ID="your-secret-id"' >> ~/.bashrc
echo 'export TENCENTCLOUD_SECRET_KEY="your-secret-key"' >> ~/.bashrc
source ~/.bashrc
Windows PowerShell(写入用户级环境变量):
[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_ID", "your-secret-id", "User")
[Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_KEY", "your-secret-key", "User")
为生成控制台免密登录链接,需要配置 CAM 角色。角色配置分为 检测 和 创建 两个独立步骤,角色创
Referenced artifact was not completely inspected
- 插件必须包含 `SKILL.md` 文件,描述插件的功能、调用方式和输出格式
The module docstring states the script is read-only and will not modify configuration, but the code writes a config file when it discovers an existing role. This mismatch is dangerous because users and reviewers may grant trust or run the script under false assumptions about side effects.
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
nd("TENCENTCLOUD_SECRET_ID")
if not secret_key:
missing.append("TENCENTCLOUD_SECRET_KEY")
log_fail(f"未配置以下环境变量: {', '.join(missing)}")
log_info("")
log_info(" 请将腾讯云 API 密钥永久写入 shell 配置文件:")
log_info("")
log_info(" Linux / macOS(写入 ~/.bashrc 或 ~/.zshrc):")
log_info(' echo \'export TENCENTCLOUD_SECRET_ID="your-secret-id"\' >> ~/.bashrc')
log_info(' echo \'export TENCENTCLOUD_SECRET_KEY="your-secret-key"\' >> ~/.bashrc')
log_info(" source ~/.bashrc")
log_info("")
log_info(" Windows PowerShell(写入用户级环境变量):")
log_info(' [Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_ID", "your-secret-id", "User")')
log_info(' [Environment]::SetEnvironmentVariable("TENCENTCLOUD_SECRET_KEY", "your-secret-key", "User")')
log_info("")
log_info(" 密钥获取地址: https:
This script performs local release-state manipulation by backing up and then clearing a publish log, which is unrelated to the declared architecture inventory and risk-assessment purpose of the skill. In a skill ecosystem, mismatched capabilities are dangerous because they can reset auditability, hide prior publish outcomes, or enable republishing workflows without an obvious business need.
The file is a destructive cleanup utility that deletes local configuration, cached data, environment-variable cleanup helpers, and optionally a cloud CAM role. That behavior is materially unrelated to the skill’s stated purpose of architecture inventory and risk assessment, so including it expands the skill’s privileges and creates a path for destructive actions if a user runs the script.
This function can call Tencent CAM APIs to delete a cloud role named advisor using available AK/SK credentials. Deleting IAM/CAM roles is an administrative, potentially disruptive action that is unjustified for an inventory/risk-assessment skill and could break dependent automations or access paths.
This script creates a CAM role and attaches broad permissions, which is an IAM write capability unrelated to a skill advertised for architecture inventory and risk assessment. In this context, introducing account-modifying behavior expands privileges and can be abused to establish persistent access or alter the cloud security posture under the guise of assessment setup.
When certifi is unavailable, the code disables certificate validation and hostname verification entirely, allowing man-in-the-middle interception of requests to STS. Because those requests carry long-lived SecretId/SecretKey-derived authorization and return temporary credentials, an active network attacker could steal or tamper with authentication flows and obtain cloud access.
The file implements console access bootstrapping by deriving a role ARN, assuming that role, and producing a direct login URL, despite the surrounding skill being described as inventory and risk assessment. In this context, granting browser-console entry is more dangerous because it enables interactive access beyond passive assessment and can be abused to browse or modify cloud resources under an assessment pretext.
Detected: suspicious.exposed_secret_literal, suspicious.insecure_tls_verification