Back to skill

Security audit

DingTalk OpenAPI Skill

Security checks for vulnerabilities and agentic risk

Overview

This DingTalk messaging skill is mostly coherent, but needs review because it links a credentialed messaging client to an unpinned remote OpenAPI schema and includes a risky manual secret-handling example.

Install only if you are comfortable granting a DingTalk app the ability to look up users and send messages. Prefer the managed UXC bootstrap flow, avoid pasting real secrets into curl commands or agent chats, require explicit confirmation before sends, and use a locally bundled or commit-pinned schema rather than the mutable remote schema URL.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:119
Finding
Mutable Remote OpenAPI Schema Creates a Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md:119-122`; duplicated in `references/usage-patterns.md:5-9` **Vulnerability Type**: Mutable remote dependency without version or integrity pinning **Risk Level**: Medium ### Vulnerable Code `SKILL.md:119-122` ```bash 1. Use the fixed link command by default: - `command -v dingtalk-openapi-cli` - If missing, create it: `uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/dingtalk-openapi-skill/references/dingtalk-messaging.openapi.json` - `dingtalk-openapi-cli -h` ``` `references/usage-patterns.md:5-9` ```bash command -v dingtalk-openapi-cli uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 \ --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/dingtalk-openapi-skill/references/dingtalk-messaging.openapi.json dingtalk-openapi-cli -h ``` ### Technical Analysis The Skill bundles a curated OpenAPI schema locally, but its primary setup instructions direct `uxc link` to retrieve another copy from the mutable GitHub `main` branch. The URL is neither pinned to an immutable commit nor protected by an expected cryptographic digest. An OpenAPI schema controls the operations, parameters, HTTP methods, and paths exposed by the generated CLI. Consequently, the behavior available after installation may differ from the files that were reviewed during this audit. HTTPS protects transport integrity but does not protect against a compromised upstream repository, malicious maintainer change, or accidental modification to the branch. This is narrower than arbitrary remote code execution because the retrieved asset is a declarative API schema and the configured base host remains `https://api.dingtalk.com/v1.0`. Nevertheless, a changed schema could expose additional DingTalk operations or alter request behavior beyond the four operations present in the a ...[truncated 1305 chars]
Remediation
## Remediation Suggestions 1. Use the bundled schema instead of downloading a remote copy during setup. 2. If remote retrieval is necessary, pin the GitHub URL to a reviewed immutable commit SHA rather than `main`. 3. Publish and verify a SHA-256 digest before allowing UXC to consume the schema. 4. Fail closed when the digest or expected schema identity does not match. 5. Validate an explicit allowlist of paths and methods after retrieval. 6. Keep the DingTalk credential binding restricted to HTTPS, `api.dingtalk.com`, and the narrowest viable path prefix. 7. Update both `SKILL.md` and `references/usage-patterns.md` so users cannot inadvertently follow the unsafe mutable-branch workflow.

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:86
Finding
Manual OAuth Example Can Expose DingTalk Credentials and Tokens## Vulnerability Details **File Location**: `SKILL.md:86-92`; duplicated in `references/usage-patterns.md:32-40` **Vulnerability Type**: Sensitive information exposure through command arguments and terminal output **Risk Level**: Low ### Vulnerable Code `SKILL.md:86-92` ```bash Manual fallback if you already have an app access token: ```bash curl -sS https://api.dingtalk.com/v1.0/oauth2/accessToken \ -H 'Content-Type: application/json' \ -d '{"appKey":"dingxxxx","appSecret":"xxxx"}' ``` ``` `references/usage-patterns.md:32-40` ```bash Manual fallback: ```bash curl -sS https://api.dingtalk.com/v1.0/oauth2/accessToken \ -H 'Content-Type: application/json' \ -d '{"appKey":"dingxxxx","appSecret":"xxxx"}' ``` Store the resulting `accessToken` in an environment variable before binding it into `uxc auth` if you are using the manual fallback. ``` ### Technical Analysis The example uses placeholders, so the repository itself does not contain a real secret. However, users may replace those placeholders with production values directly in the command. Doing so places `appSecret` in the shell command line. Depending on the operating environment, it may be retained in shell history, terminal recordings, process telemetry, audit logs, debugging output, or Agent transcripts. The `curl` response is also written directly to standard output. Because the OAuth response contains an `accessToken`, terminal capture or automated logging can expose a reusable bearer token. Transmission of `appKey` and `appSecret` to DingTalk's official HTTPS OAuth endpoint is necessary for the declared authentication flow and does not represent unrelated exfiltration. The weakness is the documented local handling of those values, not the destination or purpose of the network request. ### Attack Path 1. A user replaces `dingxxxx` and `xxxx` with real application credentials. 2. The shell, process-monitoring system, terminal ...[truncated 1017 chars]
Remediation
## Remediation Suggestions 1. Remove the manual inline-secret example and retain the preferred `uxc auth bootstrap` workflow using environment-backed credential fields. 2. If a manual fallback is essential, read the secret from a protected environment variable, file descriptor, or interactive no-echo prompt rather than embedding it in command arguments. 3. Avoid printing the complete OAuth response. Parse the token directly into a protected credential store and suppress standard output. 4. Ensure credential files and temporary outputs use restrictive permissions and are deleted promptly. 5. Warn users not to paste secrets or tokens into Agent conversations, scripts, shell history, CI logs, or issue reports. 6. Document immediate rotation of `appSecret` and revocation of exposed tokens as incident-response steps. 7. Apply the same corrections to both `SKILL.md` and `references/usage-patterns.md`.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (21)

Credential Access

High
Category
Privilege Escalation
Content
DingTalk v1 APIs use app `accessToken` credentials.

Preferred setup is to store `appKey` + `appSecret` as credential fields and let `uxc auth bootstrap` fetch and refresh the short-lived access token automatically.

Bootstrap-managed setup:
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
DingTalk v1 APIs use app `accessToken` credentials.

Preferred setup is to store `appKey` + `appSecret` as credential fields and let `uxc auth bootstrap` fetch and refresh the short-lived access token automatically.

Bootstrap-managed setup:
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

External Transmission

Medium
Category
Data Exfiltration
Content
Manual fallback if you already have an app access token:

```bash
curl -sS https://api.dingtalk.com/v1.0/oauth2/accessToken \
  -H 'Content-Type: application/json' \
  -d '{"appKey":"dingxxxx","appSecret":"xxxx"}'
```
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The schema exposes multiple message-sending endpoints that can transmit content to users and groups, but the skill metadata provided here does not include any user-facing disclosure or warning that prompts may cause outbound messages. In an agent setting, this creates a real risk of unintended or socially engineered communications being sent to enterprise users or chats, especially because the API supports direct user targeting and group delivery.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The manual fallback demonstrates placing app credentials directly into a curl command body, which encourages handling long-lived secrets in shell history, docs, and terminal transcripts without any explicit safety warning. While the endpoint itself is legitimate, this pattern increases the chance of accidental credential exposure through logs, copy/paste reuse, or screen capture.

External Transmission

Medium
Category
Data Exfiltration
Content
Manual fallback:

```bash
curl -sS https://api.dingtalk.com/v1.0/oauth2/accessToken \
  -H 'Content-Type: application/json' \
  -d '{"appKey":"dingxxxx","appSecret":"xxxx"}'
```
Confidence
89% confidence
Finding
This finding is substantively the same risky manual token bootstrap example: it sends app credentials to an external service via curl with inline secrets. The context makes it more dangerous because it is presented as a copyable fallback workflow, which may lead users to unsafe operational handling of credentials.

External Transmission

Medium
Category
Data Exfiltration
Content
Manual fallback:

```bash
curl -sS https://api.dingtalk.com/v1.0/oauth2/accessToken \
  -H 'Content-Type: application/json' \
  -d '{"appKey":"dingxxxx","appSecret":"xxxx"}'
```
Confidence
89% confidence
Finding
This finding is substantively the same risky manual token bootstrap example: it sends app credentials to an external service via curl with inline secrets. The context makes it more dangerous because it is presented as a copyable fallback workflow, which may lead users to unsafe operational handling of credentials.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
rg -q '^description:\s*.+' "${SKILL_FILE}" || fail 'missing description'

rg -q 'command -v dingtalk-openapi-cli' "${SKILL_FILE}" || fail 'missing link-first command check'
rg -q 'uxc link dingtalk-openapi-cli https://api.dingtalk.com/v1.0 --schema-url ' "${SKILL_FILE}" || fail 'missing fixed link create command with schema-url'
rg -q 'dingtalk-openapi-cli -h' "${SKILL_FILE}" || fail 'missing help-first host discovery example'
rg -q 'dingtalk-openapi-cli post:/robot/groupMessages/send -h' "${SKILL_FILE}" || fail 'missing operation-level help example'
rg -q -- '--auth-type bearer' "${SKILL_FILE}" || fail 'missing bearer auth setup'
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Static analysis

No suspicious patterns detected.