Skip to content

fix(security): harden archive parsing and CI actions#7293

Merged
FinleyGe merged 1 commit into
labring:mainfrom
FinleyGe:codex/fix-cso-security-findings
Jul 14, 2026
Merged

fix(security): harden archive parsing and CI actions#7293
FinleyGe merged 1 commit into
labring:mainfrom
FinleyGe:codex/fix-cso-security-findings

Conversation

@FinleyGe

Copy link
Copy Markdown
Collaborator

Summary

  • Replace PPTX archive extraction with lazy, streaming yauzl parsing and reject traversal paths, symlinks, and non-regular entries.
  • Enforce archive limits at three layers: 10,000 entries, 10 MB per XML file, and 100 MB cumulative XML output, measured from actual streamed bytes.
  • Pin 129 GitHub and Forgejo action references to immutable 40-character SHAs while preserving version comments.
  • Split Pro coverage reporting into an artifact consumer job so the test job only has contents: read; the privileged report job does not check out PR source.

Verification

  • PPTX parser tests: 10/10 passed, including traversal, symlink, forged size, and entry-count cases.
  • Service suite: 230 files, 3131 tests passed, 35 skipped.
  • Isolated TypeScript check passed.
  • Frozen-lockfile install passed.
  • Parsed all 31 workflow YAML files successfully.
  • Verified all 129 action pins.
  • git diff --check passed.
  • pnpm audit --prod confirms GHSA-mp2f-45pm-3cg9 and GHSA-gmq8-994r-jv83 are absent. Existing dependency baseline remains: 11 critical, 78 high, 125 moderate, 24 low.

Accepted risks

  • Existing fixed deployment credential handling remains unchanged.
  • Existing pull_request_target paths may still execute code from collaborator or owner PR branches; fork-originated untrusted PR code is outside this accepted path.

@github-actions

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 18.3% 1621 / 8854
🔵 Statements 18.3% 1702 / 9299
🔵 Functions 16.08% 339 / 2108
🔵 Branches 14.9% 750 / 5033
File CoverageNo changed files found.
Generated in workflow #1377 for commit 80f8738 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown

Admin Preview Image Ready!

ghcr.io/labring/fastgpt-pr:admin_80f8738c00ac4d7bc55596575aea3d457a649d56

🕒 Time: 2026-07-10 21:29:23 (UTC+8)

@FinleyGe FinleyGe merged commit c8abd09 into labring:main Jul 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant