T09 · Insecure Skill Coding Practices
- Location
scripts/notifier.py:88- Finding
Notification Credentials May Be Disclosed Through Unsanitized Exception Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed Xiaohongshu scheduling and posting helper, with real but manageable risks around automated public posting, local queue data, and optional notification webhooks.
Install only for accounts you control and only after reviewing queued posts carefully. Keep webhook URLs, bot tokens, DingTalk secrets, and Xiaohongshu session data private; avoid routing sensitive titles, links, or errors to shared notification channels. Consider pinning dependencies, redacting notification errors, and adding explicit confirmation or dry-run steps before using unattended publishing.
scripts/notifier.py:88Notification Credentials May Be Disclosed Through Unsanitized Exception Output
声明描述强调的是“自动化内容排期和定时发布”这一调度型能力,并列出队列管理、历史记录、通知、智能推荐等配套功能。但代码并没有任何排期、计划任务、时间参数、队列、历史记录或通知相关实现;它只是一个命令行发布器,调用本地 REST 服务执行登录状态检查和即时发布。虽然“发布小红书内容”这一大方向相关,但主要用途与声明存在明显偏差:声明是排期发布管理器,代码是即时发布客户端。此外,代码还包含视频发布能力,而声明聚焦于笔记排期管理且未明确说明视频发布。因此应判定为描述与实际行为不匹配。
The code is clearly related to the declared domain of Xiaohongshu content scheduling, so it is not unrelated or malicious. However, the description claims a broader end-user capability set than the code actually provides. This chunk only manages a local content queue and task metadata in SQLite, with CLI operations for add/list/delete/pending/stats and methods to update status. There is no network/API integration with Xiaohongshu, no scheduler/worker that actually publishes content, no recommendation logic for optimal publish times, and no notification delivery. Viewing queue state/history is partially supported, and batch management is partially supported through task CRUD/listing. Because core advertised capabilities are absent from the supplied code, the description does not accurately represent what this code chunk actually does.
The supplied code chunk is narrowly focused on recommendation and scheduling logic. It contains hardcoded activity-hour scores, content-type weighting, batch schedule generation, and a CLI that outputs suggested times. There is no network/API interaction, no Xiaohongshu authentication or posting flow, no storage layer for content queues or history, and no notification mechanism. The declared description presents a broader end-to-end automated publisher, while the code only supports one sub-feature: intelligent recommendation of publishing times and schedule generation. Therefore the description materially overstates the implemented behavior.
The marketing and detailed description promote automated Xiaohongshu posting and mention local cookie storage only later under compliance notes, without a clear upfront warning about account-security, platform-policy, and automation risks. In a skill designed specifically for scheduled social-media publishing, this omission can mislead users into enabling sensitive automation before they understand the operational and account consequences.
The README promotes fully automated scheduled posting for a third-party social media account, but it does not prominently warn users that autonomous publishing can post without real-time confirmation, potentially causing unintended account actions, policy violations, or reputational harm. In this skill context, the risk is elevated because the core purpose is unattended account activity on a platform that may enforce anti-automation controls.
The skill describes capabilities that require file access and network interactions, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization and transparency gap: a host or reviewer cannot clearly determine what external actions the skill is expected to take, increasing the risk of overbroad tool access or unintended data exposure.
The skill instructs users to log in and configure webhooks, and states that cookies are automatically saved, but it does not clearly warn that content, images, and session data may be stored locally or that notifications may transmit publishing results to third-party endpoints. This lack of disclosure can lead to inadvertent exposure of sensitive content, account session artifacts, or operational metadata.
The skill offers a 'start scheduled publishing' action that can post content on the user's behalf, yet it does not prominently warn about the irreversible public effects of automated posting. In a social-media publishing context, accidental or mis-scheduled publication can immediately expose content to the public, harm accounts or brands, and be difficult to undo even if the post is later deleted.
This manifest/config file contains user-facing natural-language instructions entirely in Chinese, such as the title and setup guidance for notification webhooks. Under the language/locale policy, forcing a specific language without opt-in or justification is a policy concern because users who do not read Chinese are not given an alternative or explicit locale scope.
This code transmits title/content data to an externally supplied Feishu webhook URL without any validation, allowlisting, or redaction. In this skill context, notifications may include publishing status, task titles, note links, or error details, so misconfiguration or attacker-controlled webhook values could exfiltrate operational or user content to unauthorized destinations.
}
try:
response = requests.post(
self.webhook_url,
json=card,
headers={"Content-Type": "application/json"},
This code sends notification payloads containing title/content data to an external Feishu webhook, and similar behavior exists for other channels. Although the module purpose is notification delivery, there is no explicit user-facing disclosure in the CLI or code path that arbitrary provided content will be transmitted to third-party services, which is relevant because the content may include user or system data.
This sends notification data to a configurable DingTalk webhook endpoint, and when a secret is present it appends security parameters directly to the URL. Because outbound destination control is weak, an attacker or bad configuration could route potentially sensitive publishing metadata or error messages to an unintended external service.
if self.secret:
url = f"{self.webhook_url}×tamp={timestamp}&sign={sign}"
response = requests.post(
url,
json=message,
headers={"Content-Type": "application/json"},
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
"""
self.bot_token = bot_token
self.chat_id = chat_id
self.api_url = f"https://api.telegram.org/bot{bot_token}"
def send(self, title: str, content: str, **kwargs) -> bool:
"""发送Telegram通知"""
The Telegram notifier sends content to an external chat service using a bot token and chat ID, which creates a clear data egress path. Since Telegram is a third-party platform and the module can include task titles, links, and error text, misuse of bot credentials or sending overly detailed content could disclose sensitive workflow information.
message += f"<i>发送时间: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}</i>"
try:
response = requests.post(
f"{self.api_url}/sendMessage",
json={
"chat_id": self.chat_id,
The module title and descriptions are entirely in Chinese and specifically target '小红书', which imposes a language/locale assumption in user-facing strings and documentation. The file does not indicate that language choice is optional or that the locale restriction is explicitly justified as a region-specific tool.
The CLI delete command removes queued tasks immediately with no confirmation, dry-run, undo, or safety interlock. In a scheduling/publishing tool, accidental or induced invocation can permanently remove pending content, causing integrity loss of the publishing queue and potential operational disruption for creators relying on automated posting.
This Python file contains user-facing natural-language strings and documentation entirely in Chinese, including the module description and runtime console messages. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.
This Python file contains user-facing natural-language content entirely in Chinese, including the module description and later CLI prompts/messages. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.
The entire publishing guide and sample listing copy are written only in Chinese, with no indication that other languages are supported or that the language is intentionally limited to a specific audience. This can be a natural-language policy issue when a skill or its required materials impose a language/locale without explicit opt-in or justification.
Throughout the README, all invocation examples and user-facing instructions are presented only in Chinese, and there is no indication that users may interact in another language or that the locale restriction is intentional. Under the policy, forcing a specific language without opt-in can be a natural-language policy issue unless clearly justified as region-specific.
The documentation includes third-party notification webhook configuration without warning that posting status, scheduling metadata, or account-related operational details may be transmitted to external services. This can create avoidable privacy and data leakage risk, especially if users paste production webhooks or route account activity to multi-tenant messaging platforms.
The display name and description are written only in Chinese, which indicates a fixed language experience in the skill metadata. The file does not state that the skill is region-specific or offer any user language choice, so this can conflict with language/locale policy requirements.
The dependency is specified with a lower bound only (requests>=2.28.0), which makes builds non-reproducible and allows future installations to pull in unexpected versions, including vulnerable or breaking releases. In a scheduler that likely handles authenticated publishing and network requests, dependency drift can affect confidentiality or reliability if a bad upstream version is resolved.
requests>=2.28.0
pyyaml>=6.0
python-dateutil>=2.8.0
requests has multiple known advisories, and because the manifest does not pin a specific version, it is impossible to determine whether deployments will install an affected release. In a tool that likely performs authenticated HTTP interactions with a publishing platform, a vulnerable requests version could expose credentials, weaken TLS/redirect handling, or leak sensitive network data depending on the advisory and usage.
pyyaml>=6.0 is unpinned, so the environment may install different versions over time, reducing reproducibility and making it hard to verify whether known vulnerable releases are excluded. This is more relevant in an automation skill because YAML is often used for config or queued content metadata, and parser issues can become security-relevant if untrusted input is ever loaded.
requests>=2.28.0
pyyaml>=6.0
python-dateutil>=2.8.0