T09 · Insecure Skill Coding Practices
- Location
SKILL.md:21- Finding
Authentication Cookies Exposed Through Credential Checks
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is meant to publish blog posts, but it handles account cookies and shell commands in ways that could expose credentials or execute unintended commands.
Review before installing. This skill should not be used with real platform cookies until credential checks are changed to never print secrets, publishing commands avoid shell interpolation of user content, and the missing scripts/templates/references are supplied and reviewed. Confirm each target platform before any live post.
SKILL.md:21Authentication Cookies Exposed Through Credential Checks
SKILL.md:69Shell Command Injection Through User-Controlled Publishing Fields
The skill does not clearly warn users that it will send article contents to external platforms and rely on locally stored authentication cookies to act on their behalf. Without an up-front disclosure, users may not understand the privacy and account-risk implications of using the skill, especially because publication is an irreversible external action.
The skill instructs the agent to inspect a local .env file for platform cookies, which is credential material. Even though the immediate commands only check for key presence, directing an automated agent toward secret stores increases the risk of accidental disclosure, logging, or later misuse of account-authentication data.
检查 .env 是否存在且包含目标平台的配置项,如有缺失则引导用户配置。
ls -la .env
grep "CSDN_COOKIES=" .env
grep "51CTO_COOKIES=" .env
grep "CNBLOGS_COOKIES=" .env
This command targets .env to search for CSDN cookie configuration, causing the agent to access a file expected to contain authentication secrets. Accessing secret stores within a loosely constrained shell workflow creates unnecessary exposure risk through command history, tool logs, or accidental value output.
ls -la .env
grep "CSDN_COOKIES=" .env
grep "51CTO_COOKIES=" .env
grep "CNBLOGS_COOKIES=" .env
grep "JUEJIN_COOKIES=" .env
This step instructs checking .env for 51CTO cookie configuration, again leading the agent to interact with stored authentication material. Repeated direct secret-file access across platforms compounds the chance that sensitive cookies are exposed or mishandled during execution or debugging.
ls -la .env
grep "CSDN_COOKIES=" .env
grep "51CTO_COOKIES=" .env
grep "CNBLOGS_COOKIES=" .env
grep "JUEJIN_COOKIES=" .env
The command checks .env for CNBLOGS cookie data, which is sensitive account-authentication information. A skill that operationalizes repeated access to local secret files without strong safeguards normalizes unsafe credential handling and increases the blast radius if outputs are captured.
ls -la .env grep "CSDN_COOKIES=" .env grep "51CTO_COOKIES=" .env grep "CNBLOGS_COOKIES=" .env grep "JUEJIN_COOKIES=" .env
This line directs inspection of .env for JUEJIN cookie configuration, exposing another authentication secret source to the agent. In the context of a skill that can immediately publish to external sites, access to these cookies materially enables account actions and raises the consequences of any leakage.
grep "CSDN_COOKIES=" .env grep "51CTO_COOKIES=" .env grep "CNBLOGS_COOKIES=" .env grep "JUEJIN_COOKIES=" .env
各平台凭证获取方式见 `references/<平台>.md`。
The trigger phrases are broad enough to match ordinary requests to post or sync content, increasing the chance the skill activates without a clear, informed user decision about cross-platform publication. In a skill that transmits content to multiple third-party services using stored cookies, overbroad activation can lead to unintended external posting.
The Juejin authentication guidance is internally inconsistent: one section says only cookies are required and no CSRF header is needed, while the notes later require cookie/CSRF token pairing. Conflicting security instructions can cause operators to mishandle credentials, weaken authentication assumptions, or troubleshoot by exposing additional secrets unnecessarily.
The natural-language instructions, trigger phrases, and workflow are presented only in Chinese, which can amount to a language policy issue when no user opt-in or locale justification is provided. There is no statement that the skill is intended only for Chinese-speaking users or China-specific environments.
No suspicious patterns detected.