T09 · Insecure Skill Coding Practices
- Location
scripts/netease_client.py:190- Finding
Authentication cookies are stored without enforced restrictive permissions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for NetEase Music recommendations, but it persists reusable login cookies insecurely and asks users to pass phone numbers and SMS codes on the command line.
Review this skill before installing. Use it only in a private workspace, treat secrets/netease_cookies.json as a password-equivalent session file, delete it when no longer needed, and avoid entering real phone numbers or SMS codes directly in shell commands where history or process logs may capture them.
scripts/netease_client.py:190Authentication cookies are stored without enforced restrictive permissions
scripts/netease_client.py:278Phone numbers and one-time login codes are accepted through process arguments
Code contains obfuscation (base64, hex encoding with execution). This is often used to hide malicious functionality.
"""网易云加密工具"""
# 网易云固定密钥
MODULUS = '00e0b509f6259df8642dbc35662901477df22677ec152b5ff68ace615bb7b725152b3ab17a876aea8a5aa76d2e417629ec4ee341f56135fccf695280104e0312ecbda92557c93870114af6c9d05c4f7f0c3685b7a46bee255932575cce10b424d813cfe4875d3e82047b97ddef52741d546b8e289dc6935b3ece0462db0a22b8e7'
NONCE = '0CoJUm6Qyw8W8jud'
PUBKEY = '010001'
IV = '0102030405060708'
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# 添加任务(北京时间每天8:00)
curl -X POST "http://localhost:8000/cron/jobs" \
-H "Content-Type: application/json" \
-d '{
"name": "网易云日推推送",
The README states that the skill does not store sensitive information, yet it explicitly documents saving authenticated NetEase cookies to secrets/netease_cookies.json. Session cookies are sensitive credentials because anyone with access to the file may be able to reuse the authenticated session without the user's phone or SMS code.
The README tells users that login results in cookies being saved on disk, but it does not clearly warn that this creates a persistent authenticated session. Persisting cookies locally increases the risk of account misuse if the host, workspace, backups, or logs are accessible to other users or processes.
The documentation explicitly states that login cookies are saved to secrets/netease_cookies.json but does not warn users that this creates persistent session material on disk. If that file is exposed through weak filesystem permissions, backups, logs, or workspace sharing, an attacker may be able to reuse the session and access the user's 网易云 account context without needing the SMS code again.
The client persists authenticated session cookies to disk at a fixed path under /root without warning the user that login state will be stored. Those cookies likely represent bearer-style session credentials, so any local process or user with access to that file can reuse the session and access the account without re-authentication.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
'Referer': 'https://music.163.com/'
})
def get_toplist_detail(self, list_id):
"""获取榜单详情"""
url = f'https://music.163.com/api/playlist/detail?id={list_id}'
try:
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
'Referer': 'https://music.163.com/'
})
def get_toplist_detail(self, list_id):
"""获取榜单详情"""
url = f'https://music.163.com/api/playlist/detail?id={list_id}'
try:
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
'Referer': 'https://music.163.com/'
})
def get_toplist_detail(self, list_id):
"""获取榜单详情"""
url = f'https://music.163.com/api/playlist/detail?id={list_id}'
try:
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
'Referer': 'https://music.163.com/'
})
def get_toplist_detail(self, list_id):
"""获取榜单详情"""
url = f'https://music.163.com/api/playlist/detail?id={list_id}'
try:
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
'Referer': 'https://music.163.com/'
})
def get_toplist_detail(self, list_id):
"""获取榜单详情"""
url = f'https://music.163.com/api/playlist/detail?id={list_id}'
try:
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
'Referer': 'https://music.163.com/'
})
def get_toplist_detail(self, list_id):
"""获取榜单详情"""
url = f'https://music.163.com/api/playlist/detail?id={list_id}'
try:
The cron example specifies 北京时间每天8:00 and Asia/Shanghai, which imposes a specific locale/timezone behavior in the user-facing instructions. The README does not indicate that this is only an example or offer guidance for adapting the schedule to other locales.
The entire skill documentation is presented only in Chinese, with no indication that language selection is optional or that the skill is intentionally restricted to a Chinese-speaking context. The policy requires avoiding forced language or locale constraints unless users are given a choice or the restriction is clearly justified.
The request headers hard-code Accept-Language to zh-CN,zh;q=0.9, which imposes a specific locale on all outbound requests. This is a natural-language policy concern because the file does not offer user opt-in, selection, or explain why a fixed Chinese locale is required.
No suspicious patterns detected.