T09 · Insecure Skill Coding Practices
- Location
SKILL.md:8- Finding
Hard-Coded External Feishu Destination and Excessive Communication Capabilities
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 8 and 13–18
Vulnerability Type: Excessive tool permissions and unsafe external data destination
Risk Level: MediumVulnerable Code
yaml allowed-tools: [read, write, feishu_create_doc, feishu_update_doc, feishu_fetch_doc, message]text ## Feishu document write location Knowledge base: 7616288931050507220 Node: Evaluation/Test Cases wiki_node: FZXtwQd70iFCD3kifibcdBbpnIdThe labels in the second excerpt have been translated into English for reporting; the identifiers are reproduced exactly.
Technical Analysis
The Skill’s declared function is to generate standardized test cases from user-provided requirements or test points. That function can be completed by returning text in the current conversation or, if explicitly requested, writing to a user-selected file.
However, the Skill grants Feishu document creation, update, and retrieval tools as well as a general messaging tool. It also specifies a fixed Feishu knowledge-base node as the write destination. The instructions do not require runtime verification that this destination belongs to the user, nor do they require explicit confirmation before externally publishing generated content.
User inputs and generated test cases may contain confidential requirements, internal API structures, internal URLs, account information, personal data, or realistic test data. If such content is written to the hard-coded destination, users or collaborators with access to that destination may receive information that the current user did not intend to disclose.
The general
messagecapability andfeishu_fetch_docpermission are not necessary for basic test-case generation. Their inclusion increases the available communication and data-access surface beyond least privilege.The bearer token shown elsewhere in the Skill is only the placeholder
{token}. The audit found no hard-coded credential, credential-file collection, executab ...[truncated 1760 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
message,feishu_fetch_doc,feishu_create_doc, andfeishu_update_docfromallowed-toolsunless a user explicitly requests Feishu integration. - Default to returning generated test cases in the current conversation or writing them only to a user-selected local file.
- Do not hard-code tenant-specific knowledge-base or node identifiers in the distributed Skill.
- Require the user to provide or select the external destination at runtime.
- Before every external write, display the exact destination, identify the data that will be transferred, and obtain explicit user confirmation.
- Validate that the authenticated user is authorized to write to the selected destination.
- Apply data-loss-prevention checks before publication, including redaction of credentials, access tokens, personal data, private URLs, and confidential test values.
- Separate test-case generation from external publication into distinct operations so that generation does not implicitly authorize transmission.
- Grant Feishu update or retrieval permissions only for the specific operation requested, and revoke or omit them afterward.
- Record external-write events with destination, requesting user, timestamp, and content classification while avoiding sensitive content in logs.
- Remove
