T09 · Insecure Skill Coding Practices
- Location
SKILL.md:57- Finding
OAuth Callback Accepts Uncorrelated Authorization Codes
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Dida365 skill matches its stated purpose, but it should be reviewed because it stores a long-lived task API token and documents write/delete actions without enough safety guidance.
Review this skill before installing if you will let an agent act on your Dida365 account. Use it only for an account where tasks:read and tasks:write access is acceptable, protect the token file and client secret, and require explicit confirmation before completing or deleting tasks or projects. Users copying the OAuth script should add per-run state validation and create the token file with restrictive permissions before writing the token.
SKILL.md:57OAuth Callback Accepts Uncorrelated Authorization Codes
SKILL.md:113Bearer Token File Is Permission-Restricted Only After Sensitive Data Is Written
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
建议将上述配置写入 `~/.bashrc`、`~/.zshrc` 或 `.env` 文件。
## 获取 Access Token
首次使用需要通过 OAuth 授权获取 Access Token。以下流程会启动一个临时本地服务来接收回调。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
建议将上述配置写入 `~/.bashrc`、`~/.zshrc` 或 `.env` 文件。
## 获取 Access Token
首次使用需要通过 OAuth 授权获取 Access Token。以下流程会启动一个临时本地服务来接收回调。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
建议将上述配置写入 `~/.bashrc`、`~/.zshrc` 或 `.env` 文件。
## 获取 Access Token
首次使用需要通过 OAuth 授权获取 Access Token。以下流程会启动一个临时本地服务来接收回调。
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
建议将上述配置写入 `~/.bashrc`、`~/.zshrc` 或 `.env` 文件。
## 获取 Access Token
首次使用需要通过 OAuth 授权获取 Access Token。以下流程会启动一个临时本地服务来接收回调。
The documented DELETE project endpoint enables irreversible removal of user content if an agent is induced to supply the wrong projectId or act on ambiguous instructions. In a tool-using agent context, destructive endpoints materially raise the risk of parameter abuse because IDs can be attacker-influenced or misresolved.
DELETE /open/v1/project/{projectId}
成功时返回空响应(状态码 200)。
The DELETE task endpoint can permanently remove user tasks if an agent uses attacker-supplied or mistaken identifiers. This is especially dangerous in agent workflows where natural-language ambiguity can cause the wrong task to be selected and deleted.
DELETE /open/v1/project/{projectId}/task/{taskId}
成功时返回空响应(状态码 200)。
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
);
### curl 示例
```bash
# 读取 Token
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
TOKEN=$(cat ~/.config/dida365/token | python3 -c "import sys,json; print(json.load(sys.stdin)['access_token'])")
# 列出项目
curl -s -H "Authorization: Bearer $TOKEN" https://api.dida365.com/open/v1/project | python3 -m json.tool
# 创建任务
curl -s -X POST https://api.dida365.com/open/v1/task \
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
curl -s -H "Authorization: Bearer $TOKEN" https://api.dida365.com/open/v1/project | python3 -m json.tool
# 创建任务
curl -s -X POST https://api.dida365.com/open/v1/task \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title":"测试任务","projectId":"YOUR_PROJECT_ID"}' | python3 -m json.tool
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
https://api.dida365.com/open/v1/
The skill documents a project deletion endpoint but does not clearly warn that invoking it irreversibly removes user data. In an agent-skill context, omission of destructive-operation warnings increases the chance that an agent or user triggers deletion without informed confirmation.
The skill describes task completion and deletion operations without a prominent caution that they modify persistent user state. In an automation context, that omission can lead to unintended data changes if an agent executes these endpoints based on ambiguous user requests.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
print(json.dumps(projects, indent=2, ensure_ascii=False))
# 创建任务
resp = requests.post("https://api.dida365.com/open/v1/task", headers=headers, json={
"title": "新任务",
"projectId": "YOUR_PROJECT_ID",
"content": "通过 API 创建的任务",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
print(json.dumps(projects, indent=2, ensure_ascii=False))
# 创建任务
resp = requests.post("https://api.dida365.com/open/v1/task", headers=headers, json={
"title": "新任务",
"projectId": "YOUR_PROJECT_ID",
"content": "通过 API 创建的任务",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
print(resp.json())
# 完成任务
resp = requests.post(
"https://api.dida365.com/open/v1/project/YOUR_PROJECT_ID/task/TASK_ID/complete",
headers=headers
)