Back to skill

Security audit

阿里云 OSS 静态站部署

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this Alibaba Cloud OSS deployment skill suspicious because scanners report destructive dry-run behavior, unsafe handling of local certificate keys and Git credentials, and cloud routing changes beyond the stated deployment purpose.

Consider avoiding installation until the dry-run deletion risk and local credential and key storage risks are addressed, and until you have reviewed any Function Compute routing changes. The verdict is suspicious, not malicious; Skillspector coverage is partial, including unsupported binary content and unresolved local references, so the scan does not establish that all behavior is safe.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/build_static.py
Finding

Dry-run can recursively delete the existing output directory

Content
View full analysis

Impact

The complete existing output tree is deleted during a purported preview. File-copy operations are subsequently skipped, so its contents are not restored.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/build_static.py
Finding

Source-file symlinks can expose files outside the authorized publication tree

Content
View full analysis

Impact

Readable local credentials or private configuration outside the selected source tree can be copied into the public artifact and uploaded to the public OSS site.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
Findings (26)

Tainted flow: 'req' from os.environ.get (line 245, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/deploy_oss.py (reported line 246)May include surrounding context.

python
b.bucket_name, norm_region(region), "index.html")
    try:
        req = urllib.request.Request(url, headers={"User-Agent": "deploy-verify"})
        with urllib.request.urlopen(req, timeout=20) as resp:
            log("  ✓ 匿名访问 %s -> HTTP %s" % (url, resp.status))
            return True
    except Exception as e:

Tainted flow: 'r' from os.environ.get (line 54, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/set_github_secret.py (reported line 61)May include surrounding context.

python
"Content-Type": "application/json",
    })
    try:
        with urllib.request.urlopen(r, timeout=30) as resp:
            raw = resp.read()
            return resp.status, (json.loads(raw) if raw else {})
    except urllib.error.HTTPError as e:

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The Git troubleshooting instructions configure the plaintext credential-store helper without explaining its security implications. Subsequent successful Git authentication can persist a reusable GitHub token unencrypted, exposing repository access if the credential file or its backups are compromised.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The DNS, ACME, CAS, local certificate storage, and OSS domain-binding operations support the declared HTTPS workflow. However, when the FC arguments are supplied and the FC stage is enabled, the script calls update_custom_domain with both certificate configuration and a wildcard function route. That changes application routing on a separate cloud service, rather than merely managing certificates for an OSS static site. The supplied chunk need not implement every advertised deployment feature, so the absence of static-file upload or GitHub Actions setup is not itself treated as a mismatch.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 104)May include surrounding context.

text

**收尾别忘了反向清理**:部署步骤一旦从 workflow 里删掉,那两个 Secret 与两个
Variable 就成了不再被使用的长期凭证。删掉它们(`DELETE /actions/secrets/<name>`、
`DELETE /actions/variables/<name>`)—— 留着既不安全,也会让下一个人以为「CI 会自动部署」。

- **Variables**(明文,直接 POST):`OSS_BUCKET`、`OSS_REGION`。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

md
**收尾别忘了反向清理**:部署步骤一旦从 workflow 里删掉,那两个 Secret 与两个
Variable 就成了不再被使用的长期凭证。删掉它们(`DELETE /actions/secrets/<name>`、
`DELETE /actions/variables/<name>`)—— 留着既不安全,也会让下一个人以为「CI 会自动部署」。

- **Variables**(明文,直接 POST):`OSS_BUCKET`、`OSS_REGION`。
- **Secrets**:先 `GET /actions/secrets/public-key` 拿 `key_id` + 公钥,再用 PyNaCl `SealedBox` 加密后 PUT

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

md
**收尾别忘了反向清理**:部署步骤一旦从 workflow 里删掉,那两个 Secret 与两个
Variable 就成了不再被使用的长期凭证。删掉它们(`DELETE /actions/secrets/<name>`、
`DELETE /actions/variables/<name>`)—— 留着既不安全,也会让下一个人以为「CI 会自动部署」。

- **Variables**(明文,直接 POST):`OSS_BUCKET`、`OSS_REGION`。
- **Secrets**:先 `GET /actions/secrets/public-key` 拿 `key_id` + 公钥,再用 PyNaCl `SealedBox` 加密后 PUT

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 233)May include surrounding context.

md
「测试/预演」与「真跑」,而且 `--dry-run` 必须真的一个写请求都不发
(见本节第 3 条最后那段)。

## 4.6 写一个语义校验脚本,别每次手敲 curl

把验收固化成 `scripts/verify_deploy.py`,覆盖:首页 / 所有详情页 / 404 页 / 数据文件 /
sitemap / robots / 静态资源。断言的是这些不会因为数据增长而失效的东西:

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SKILL.md (reported line 233)May include surrounding context.

md
「测试/预演」与「真跑」,而且 `--dry-run` 必须真的一个写请求都不发
(见本节第 3 条最后那段)。

## 4.6 写一个语义校验脚本,别每次手敲 curl

把验收固化成 `scripts/verify_deploy.py`,覆盖:首页 / 所有详情页 / 404 页 / 数据文件 /
sitemap / robots / 静态资源。断言的是这些不会因为数据增长而失效的东西:

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/build_static.py (reported line 39)May include surrounding context.

python
NEVER_EXCLUDE_DIRS = {".git", "node_modules", "__pycache__", ".venv", "venv",
                      ".idea", ".vscode", ".github", ".svn", ".DS_Store",
                      "private", "drafts", ".internal", ".cache"}
NEVER_INCLUDE_FILES = {".env", ".gitignore", ".npmrc", ".netrc", "docker-compose.yml",
                       "Dockerfile", "Makefile", "package.json", "package-lock.json",
                       "yarn.lock", "pnpm-lock.yaml", "poetry.lock", "requirements.txt",
                       "manifest.yaml", "SKILL.md", "README.md", "LICENSE"}

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/build_static.py (reported line 39)May include surrounding context.

python
NEVER_EXCLUDE_DIRS = {".git", "node_modules", "__pycache__", ".venv", "venv",
                      ".idea", ".vscode", ".github", ".svn", ".DS_Store",
                      "private", "drafts", ".internal", ".cache"}
NEVER_INCLUDE_FILES = {".env", ".gitignore", ".npmrc", ".netrc", "docker-compose.yml",
                       "Dockerfile", "Makefile", "package.json", "package-lock.json",
                       "yarn.lock", "pnpm-lock.yaml", "poetry.lock", "requirements.txt",
                       "manifest.yaml", "SKILL.md", "README.md", "LICENSE"}

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/build_static.py (reported line 39)May include surrounding context.

python
NEVER_EXCLUDE_DIRS = {".git", "node_modules", "__pycache__", ".venv", "venv",
                      ".idea", ".vscode", ".github", ".svn", ".DS_Store",
                      "private", "drafts", ".internal", ".cache"}
NEVER_INCLUDE_FILES = {".env", ".gitignore", ".npmrc", ".netrc", "docker-compose.yml",
                       "Dockerfile", "Makefile", "package.json", "package-lock.json",
                       "yarn.lock", "pnpm-lock.yaml", "poetry.lock", "requirements.txt",
                       "manifest.yaml", "SKILL.md", "README.md", "LICENSE"}

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/build_static.py (reported line 197)May include surrounding context.

python
low = bad.lower()
        if args.no_inbox and ("inbox" in low or "unverified" in low or "_pending" in low):
            problems.append("产物中仍疑似含未核实数据:%s" % bad)
        if low.endswith((".pem", ".key", ".p12", ".pfx")) or low.startswith(".env"):
            problems.append("产物中疑似含密钥/环境变量:%s" % bad)

    if problems:

Dry-run mode modifies the filesystem and can recursively delete the output directory.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

copy_tree calls shutil.rmtree on an existing output directory when --force is set and calls os.makedirs regardless of --dry-run. Consequently, an ostensibly non-writing preview can recursively delete existing data, and missing source/output relationship checks can make a mistaken output path especially destructive.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · README.md (reported line 42)May include surrounding context.

下载仓库 zip,解压后把整个文件夹放到技能目录下,保证路径是:

text
~/.workbuddy/skills/aliyun-oss-static-deploy/SKILL.md
~/.workbuddy/skills/aliyun-oss-static-deploy/scripts/cert_manager.py
~/.workbuddy/skills/aliyun-oss-static-deploy/scripts/set_github_secret.py

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 100)May include surrounding context.

用 git credential 标准接口取(不直接读凭据存档文件):

TOKEN=$(printf "protocol=https\nhost=github.com\n\n" | git credential fill | sed -n 's/^password=//p') curl --noproxy '*' -H "Authorization: Bearer $TOKEN"
https://api.github.com/repos///actions/{secrets,variables}

text

**收尾别忘了反向清理**:部署步骤一旦从 workflow 里删掉,那两个 Secret 与两个

The Git authentication workaround enables plaintext credential storage without warning the user.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

Setting credential.https://github.com.helper to store enables a helper that saves credentials in plaintext rather than an OS-protected vault. Although the configuration is repository-local, the helper's default credential file is not necessarily repository-local, making this a risky workaround for a deployment skill handling repository credentials.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/cert_manager.py (reported line 73)May include surrounding context.

python
for _ in range(max(1, timeout // 20)):
        try:
            out = subprocess.run(
                ["nslookup", "-type=TXT", fqdn, "223.5.5.5"],
                capture_output=True, text=True, timeout=40,
            ).stdout

Tainted flow: 'ACCOUNT_KEY' from os.environ.get (line 98, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
96% confidence
Finding

The alleged flow from cloud credentials is inaccurate, but this write stores an unencrypted ACME account private key without enforcing restrictive permissions. With a common 022 umask and traversable parent directories, other local users can read it and potentially perform account-authorized operations, including certificate revocation.

Content

Scanner excerpt · scripts/cert_manager.py (reported line 123)May include surrounding context.

python
open(ACCOUNT_KEY, "rb").read(), password=None)
    else:
        acc_key = rsa.generate_private_key(public_exponent=65537, key_size=2048)
        open(ACCOUNT_KEY, "wb").write(acc_key.private_bytes(
            serialization.Encoding.PEM, serialization.PrivateFormat.PKCS8,
            serialization.NoEncryption()))

Tainted flow: 'PRIVKEY' from os.environ.get (line 97, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
97% confidence
Finding

Although this is not a flow from cloud access-key environment variables, it writes the TLS private key unencrypted without setting restrictive permissions. A common 022 umask can leave it readable to other local users when parent directories permit traversal; the default wildcard certificate increases the scope of possible server impersonation.

Content

Scanner excerpt · scripts/cert_manager.py (reported line 152)May include surrounding context.

python
open(PRIVKEY, "rb").read(), password=None)
    else:
        cert_key = rsa.generate_private_key(public_exponent=65537, key_size=2048)
        open(PRIVKEY, "wb").write(cert_key.private_bytes(
            serialization.Encoding.PEM, serialization.PrivateFormat.PKCS8,
            serialization.NoEncryption()))

Tainted flow: 'FULLCHAIN' from os.environ.get (line 96, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/cert_manager.py (reported line 187)May include surrounding context.

python
cleanup()

    pem = final.fullchain_pem
    open(FULLCHAIN, "w", encoding="utf-8").write(pem)
    crt = x509.load_pem_x509_certificate(pem.encode())
    log("新证书已签发,有效期至 %s" % crt.not_valid_after_utc)
    return pem, traditional_pem(cert_key)

The certificate manager can replace Function Compute domain routing, beyond the stated OSS static-site deployment purpose.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

Function Compute support is explicitly documented and gated by arguments, so its presence alone is not suspicious. However, the certificate-update operation also supplies a replacement catch-all route and enables HTTP alongside HTTPS, potentially overwriting existing routing and weakening an HTTPS-only configuration during renewal.

Content

No source excerpt is available for this finding.

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
55% confidence
Finding

Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.

Content

Scanner excerpt · scripts/deploy_oss.py (reported line 170)May include surrounding context.

python
return None
    if not args.no_backup:
        backup_object(b, key, args.backup_dir)
    r = b.put_object(key, data, headers=headers)
    log("  ✓ %s <- %s (%d 字节, md5=%s, http=%s)"
        % (key, os.path.basename(src_path), len(data), md5_of(data), r.status))
    return r

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/set_github_secret.py (reported line 38)May include surrounding context.

python
return tok
    # 走 git credential 官方接口取回本机凭据(不直接读凭据存档文件)
    try:
        out = subprocess.run(
            ["git", "credential", "fill"],
            input="protocol=https\nhost=github.com\n\n",
            capture_output=True, text=True, timeout=15,