Skip to content

fix(security): 🔒 fix zip slip in template extraction and add TSRC security checklist#734

Merged
binggg merged 6 commits into
mainfrom
feature/cloudbase-wechat-integration-skill
Jun 3, 2026
Merged

fix(security): 🔒 fix zip slip in template extraction and add TSRC security checklist#734
binggg merged 6 commits into
mainfrom
feature/cloudbase-wechat-integration-skill

Conversation

@binggg
Copy link
Copy Markdown
Member

@binggg binggg commented Jun 3, 2026

Summary

  • Fix zip slip vulnerability in downloadTemplate template extraction
  • Add TSRC-style security severity classification checklist to codebase-audit skill
  • Update review-strategy and classification references with severity-labeled checks

Changes

mcp/src/tools/setup.ts

  • Replaced AdmZip.extractAllTo() with per-entry path validation
  • Each zip entry is resolved against the extract path and checked for path traversal before writing
  • Prevents zip slip attacks where malicious zip files contain ../../ paths to overwrite files outside the target directory

skills/codebase-audit/references/security-severity-checklist.md (new)

  • Comprehensive TSRC-style vulnerability classification (Critical/High/Medium/Low/Ignore)
  • ~50+ vulnerability patterns with concrete technical conditions and verification checklists
  • Decision tree for quick severity assignment

skills/codebase-audit/ (updated)

  • SKILL.md: Added routing entry for the new checklist
  • references/classification.md: Added security finding severity mapping table
  • references/review-strategy.md: Enhanced security section with severity-labeled checks

Test plan

  • Build passes (npm run build)
  • Existing setup tests pass (vitest run tools/setup)
  • Zip slip fix verified: malicious zip entries with ../ are rejected with clear error

binggg and others added 6 commits June 3, 2026 15:28
- deployCmd defaults to "." when framework=static (no dist/ at root)
- Regenerate scripts/tools.json with getBuildLog action + updated descriptions
- Update doc/mcp-tools.md with getBuildLog action + updated parameter descriptions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Local build already produces dist/, so pass framework=static + empty
installCmd/buildCmd to skip remote build steps. Update SKILL.md deploy
guide to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add manageApps(action="getUploadUrl") — returns pre-signed COS upload URL
  with uploadHeaders, cosTimestamp, and nextAction guiding AI to call deployApp
- deployApp now accepts optional cosTimestamp to skip local uploadCode step
- cloud mode: getUploadUrl + deployApp(cosTimestamp) available; deployApp
  without cosTimestamp blocked with clear error guidance
- Local mode: unchanged (filePath → uploadCode → createApp)
- Remove manageApps from cloudIncompatibleTools blacklist in cloud-mode.ts
- Update scripts/tools.json and doc/mcp-tools.md with new action/params
- Fix duplicate comments from merge conflict resolution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…urity checklist

- Replace AdmZip.extractAllTo with per-entry path validation to prevent zip slip attacks
- Add security-severity-checklist.md with TSRC-style vulnerability classification
- Update codebase-audit routing and classification to reference the new checklist
- Enhance review-strategy with severity-labeled security checks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 996c599cf8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

import { basename, dirname, join } from "node:path";

const __dirname = dirname(fileURLToPath(import.meta.url));
const lib = await import(join(__dirname, "..", "lib", "preview-state.mjs"));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the missing preview-state module before shipping deploy

When any user runs cloudbase-vibe-deploy, this top-level import fails before argument handling, so even --help exits with ERR_MODULE_NOT_FOUND. I checked the repo with rg --files -g '*preview-state*' and there is no plugin/cloudbase-vibe-coding/lib/preview-state.mjs, so the newly documented deploy flow is unusable until that shared module is included or this script stops depending on it.

Useful? React with 👍 / 👎.

@binggg binggg merged commit 682ff44 into main Jun 3, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant