T09 · Insecure Skill Coding Practices
- Location
README.md:167- Finding
Hardcoded Fadada API Credentials Published in Documentation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill matches its e-signature purpose, but it exposes production-looking API credentials and has unsafe handling around sensitive contract links, downloads, and cancellations.
Review before installing. Rotate or verify the published Fadada credentials are not real, avoid using production credentials until fixed, restrict the API app to least privilege, and treat logs as sensitive because signing, upload, and download URLs may appear there. Require explicit human confirmation for cancellation, production signing submission, and local contract downloads.
README.md:167Hardcoded Fadada API Credentials Published in Documentation
scripts/cancel_sign_task.py:179Fail-Open Status Validation Before Signing-Task Cancellation
scripts/download_signed_contract.py:247Fail-Open Completion Check Before Contract Download
scripts/upload_file.py:70Sensitive Signing and Pre-Signed Storage URLs Exposed Through INFO Logs
scripts/upload_file.py:86Unvalidated Server-Provided Upload URL Receives Sensitive Contract Contents
从提供的 init.py 文档可见,该技能脚本包实际聚焦于“发起签署”相关能力:上传文件、发起签署、查询模板、查询任务状态。与声明相比,代码没有显示支持撤回、撤销、下载合同等关键生命周期操作,因此声明明显宽于实际行为,属于描述与代码能力不一致。未发现额外越权或无关资源访问,但主要能力范围被夸大。
该代码块的单一功能是“查询签署模板详情”,资源对象是 sign-template(模板),而声明描述的是面向合同签署流程的综合技能,涵盖合同发起、流程/任务查询、撤回、下载等多个能力。两者的主要目的和操作对象均明显不同:代码既不涉及合同实例、签署流程实例或任务,也没有下载、撤回、发起等行为,仅做模板明细查询。因此这是实质性描述-行为不匹配。
根据提供的代码块,唯一明确实现的主功能是“发起合同签署任务”,包括普通文档发起、模板发起、签署方标准化、可选提交任务,以及获取签署链接。虽然代码中涉及添加签署方和提交任务,但这些都属于发起流程的组成部分。声明则描述为一个覆盖完整生命周期的技能,包含查询、撤回、下载等多种操作,且触发语义也包含‘查合同’、‘查流程’、‘查任务’、‘撤回合同’、‘下载合同’等。当前代码没有对应这些能力的实现,因此描述显著夸大了该代码块的实际功能范围,构成描述与行为不匹配。
声明描述的是一个面向合同签署流程全生命周期的综合技能,但提供的代码片段仅用于“查询签署模板列表”。它访问的资源是签署模板(sign-template/get-list),而不是合同、签署流程、任务或下载/撤回相关接口。该行为与声明的核心用途 materially different,且代码没有体现声明中的主要触发意图。因此应判定为描述与实际行为不匹配。
声明描述的是一个覆盖电子签全生命周期的综合技能,但所给代码块只是一段上传文件并获取 fileId 的辅助脚本,属于合同发起前置步骤之一。它没有体现查询、撤回、下载等核心能力,也没有实现“发合同”本身的签署任务创建。因此代码实际行为与声明的主要用途存在明显不一致,范围远小于声明内容。虽然文件上传可作为电子签流程的支持步骤,但单独看该代码块,无法支撑“完整签署技能”的描述。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## 认证流程
### 1. 获取 Access Token
**接口**: `POST /service/get-access-token`
The script logs the full signing URL API response, which likely includes direct sign links. These links are highly sensitive because possession of a valid signing URL may allow an unauthorized party to access or complete a signature flow without additional authorization, depending on platform controls.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return headers, data
def get_access_token(self) -> str:
"""获取 Access Token(带缓存)。
Returns:
访问凭证字符串
The README advertises撤回签署/撤销签署 capability as a feature but does not warn that withdrawing a signing task can interrupt legal or business workflows, invalidate ongoing approvals, or cause data/state loss from a user perspective. In a contract-signing skill, destructive operations deserve explicit confirmation and impact disclosure because an agent may expose this action to end users who do not understand the consequences.
The README promotes downloading signed contracts without any warning that these files likely contain sensitive personal, employment, or commercial data. In the context of an e-signature skill, encouraging download flows without handling guidance increases the risk of unauthorized disclosure, insecure local storage, and accidental sharing of legally sensitive documents.
The credential examples include what appear to be realistic secret values and instruct users to place them in shell startup files, which are often broadly readable, persisted, and prone to accidental disclosure via screenshots, backups, dotfile sync, or support sharing. Even if placeholders were intended, this documentation pattern normalizes insecure secret handling for a system that can initiate, cancel, and download legally sensitive signing workflows.
The skill declares broad network and environment-dependent behavior but does not define any explicit tool scope or permission boundaries. That creates an over-privileged integration surface where the agent may access credentials and perform external API actions without clear least-privilege constraints or user-visible guardrails.
The trigger phrases are broad everyday commands such as '查合同' and '下载合同', making accidental or context-confused activation more likely. In a skill that can upload files, query contract data, cancel signature tasks, and download documents, overbroad invocation can lead to unintended state changes or disclosure of sensitive contract information.
The entry constraints use ambiguous intent examples without strong scope checks, so the agent may route generic user requests into this skill even when the user did not intend to operate on the Fadada account. Because the skill can perform external actions against live signing workflows, ambiguous activation increases the risk of unauthorized or mistaken operations.
The skill allows downloading signed contracts to a local path but does not prominently warn users that files may be written to local storage. This can result in sensitive signed contracts being stored in unintended locations, exposing regulated or confidential documents to other local users, backups, or downstream tooling.
The skill is explicitly designed to transmit contract files, signer information, and workflow metadata to an external third-party API endpoint. External transmission is expected in this business context, but it still creates real data exposure risk because highly sensitive documents and personal information leave the local system and are sent to a remote service.
### API基础信息
- **API版本**: FASC API 5.0
- **正式环境**: https://api.fadada.com/api/v5
- **UAT测试环境**: https://uat-api.fadada.com/api/v5
### 环境配置
The manifest description and capabilities focus on upload, initiate signing, template query, and task-detail query. However, the same file's trigger-context, notes, changelog, and examples-related metadata indicate additional implemented lifecycle operations such as 撤回任务, 下载合同, 批量查询任务列表, and API-based enterprise information retrieval, which are materially broader than the declared core capabilities.
The skill handles highly sensitive artifacts including contracts, names, phone numbers, and signature workflow data, but the manifest provides no warning about privacy, data handling, or compliance expectations. In an enterprise e-signature context, this increases the risk of accidental exposure, improper sharing, or unsafe use of production data by operators who are not adequately warned.
This JSON file contains user-facing strings such as the title and action labels entirely in Chinese, but there is no visible indication that the skill is limited to Chinese-speaking users or offers a language/locale choice. That can violate language/locale policy when the skill is expected to work across users without explicit opt-in.
This JSON form presents all user-facing labels and instructions only in Chinese, including the title, description, field labels, placeholders, and submit action. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the locale restriction is clearly documented and justified, which is not present here.
This JSON result card contains multiple user-facing labels and titles exclusively in Chinese, such as the title and field/action labels. For all file types, hard-coding a specific language without opt-in or documented locale justification can violate language/locale policy expectations.
This JSON UI definition contains all user-facing text in Chinese, including the title, description, column labels, empty state, and action label. Because the file provides no indication that the skill is region-specific or that users can opt into this locale, it appears to enforce a specific language without user choice.
This markdown file describes obtaining upload URLs, processing documents, creating signing tasks, and sending signer notification data such as phone numbers to an external e-signature service. Under the markdown-specific SQP-2 criteria, the description should warn users that document contents and personal contact information will be transmitted to a third-party API, but no such warning appears in the documented workflow.
The manifest says the skill covers the full e-sign lifecycle including existing process query, withdrawal/revocation, and contract download. However, this module docstring enumerates only upload, initiate signing, template list/detail, and signing status query scripts, which is a narrower capability set and does not mention withdrawal or download operations.
The code logs the full API response and the contract download operation, which can expose sensitive signed-contract metadata and time-limited download URLs to stderr or centralized logs. In an agent/integration environment, logs are often accessible to operators, support staff, or downstream observability systems, so this can unintentionally disclose private documents or enable unauthorized retrieval while the URL remains valid.