Skip to content

fix(deps): @iconify/tools 5.x override로 extract-zip 고위험 취약점 제거 - #144

Merged
CaesiumY merged 1 commit into
mainfrom
fix/deps-remove-extract-zip
Aug 20, 2026
Merged

CaesiumY merged 1 commit into
mainfrom
fix/deps-remove-extract-zip

Conversation

@CaesiumY

Copy link
Copy Markdown
Owner

배경

Dependabot 알림 #200 — extract-zip 심볼릭 링크 경로 순회 취약점 (GHSA-jmr9-qjv8-65gv, CVE-2026-56876, high).

핵심 제약: extract-zip은 패치 버전이 존재하지 않습니다 (first_patched_version: null, 취약 범위 <= 2.0.1 = 전 버전, 마지막 배포 2023년). 버전 범프로는 해결이 불가능한 알림입니다. PR #138에서 로컬 pnpm audit에 예외(auditConfig.ignoreGhsas)를 걸었지만, 이 설정은 GitHub Dependabot 알림에는 영향을 주지 않아 알림이 계속 열려 있었습니다.

해결 방법

의존 경로는 astro-icon@1.1.5 → @iconify/tools@4.2.0 → extract-zip@2.0.1 하나뿐입니다.

  • @iconify/tools 5.x는 extract-zip(및 cheerio) 의존을 자체적으로 제거했습니다.
  • 그러나 astro-icon은 1.1.5(최신)가 @iconify/tools: ^4.0.5로 4.x에 고정 → 업스트림 범프 경로 없음.
  • 따라서 레포의 기존 패턴대로 pnpm override("@iconify/tools": "^5.0.12")로 5.x를 강제해 extract-zip을 트리에서 통째로 제거합니다.

이 PR이 main에 머지되면 lockfile에서 취약 패키지가 사라지므로 알림 #200은 자동으로 fixed 처리됩니다.

auditConfig 예외 삭제

extract-zip이 사라지므로 PR #138의 ignoreGhsas 예외는 죽은 설정이 됩니다. 예외를 남겨두면 override가 실수로 풀려 extract-zip이 되돌아와도 audit이 침묵하므로, 회귀 시 즉시 빨간불이 켜지도록 예외를 함께 삭제했습니다.

기존 overrides와의 충돌 여부

기존 yaml(^2.8.3)·nanoid(^3.3.18) override는 extract-zip 의존 경로와 무관 — 충돌 없음.

Major 점프(4→5) 리스크

이 레포의 icon({ include }) 설정 경로는 @iconify/tools를 import하지 않습니다(로컬/커스텀 아이콘 컬렉션 로딩 전용, PR #138 분석). 실측으로도 검증했습니다:

  • astro-icon이 자체적으로 ^5를 수용하면 override는 삭제 예정 (package.json //overrides 주석에 명시)

검증

항목 결과
pnpm audit (예외 없이) ✅ No known vulnerabilities found
lockfile 내 extract-zip ✅ 0건 (grep)
pnpm build 전체 체인 ✅ astro check 0 에러 · build 성공 · pagefind 45페이지 인덱싱
dist HTML 아이콘 렌더링 ✅ 인라인 SVG 정상 (dist/index.html에 <svg> 4개)
lockfile diff 범위 ✅ iconify 서브트리만 변경 (+6 / -20여 패키지), 무관 드리프트 없음

E2E는 CI의 Code standards & build 게이트에서 실행됩니다.

Dependabot 알림 #200 (GHSA-jmr9-qjv8-65gv, CVE-2026-56876, high):
extract-zip은 패치 버전이 없어(취약 범위 <= 2.0.1 = 전 버전) 범프로
해결이 불가능하다. 대신 의존 경로인 astro-icon 1.1.5 → @iconify/tools
^4.0.5를 pnpm override로 5.x로 강제해 extract-zip을 트리에서 제거한다.
@iconify/tools 5는 extract-zip·cheerio 의존을 자체적으로 걷어냈다.

extract-zip이 사라지므로 PR #138에서 넣었던 auditConfig.ignoreGhsas
예외도 함께 삭제한다. override가 풀려 회귀하면 pnpm audit이 다시
잡아내도록 예외를 남기지 않는다.

검증: pnpm audit 취약점 0건(예외 없이), pnpm build 전체 체인 성공
(astro check 0 에러, 45페이지 pagefind 인덱싱), dist HTML에 아이콘
SVG 인라인 정상 렌더링 확인.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@claude

claude Bot commented Aug 17, 2026

Copy link
Copy Markdown

Review: fix(deps) — @iconify/tools 5.x override to remove extract-zip

Solid, well-scoped fix. Summary of what I checked and my take on each review area below.

Security ✅

This is the security fix — extract-zip@2.0.1 (GHSA-jmr9-qjv8-65gv, no upstream patch) is fully gone from the lockfile after the override (confirmed via grep -n extract-zip pnpm-lock.yaml → no hits). The lockfile diff is cleanly scoped to the @iconify/tools subtree: extract-zip, yauzl, tar, cheerio and their exclusive dependents drop out; @cyberalien/svg-utils, modern-tar, fflate@0.8.3, import-meta-resolve come in. No unrelated version drift.

Removing the now-dead pnpm.auditConfig.ignoreGhsas exception alongside the fix is the right call — leaving it in place would have let a future accidental override removal silently regress back to the vulnerable package without pnpm audit catching it. Good defensive cleanup.

Correctness / potential bugs

The major-version jump (4→5) risk is the main thing worth scrutinizing in a dependency PR like this, and it's well-mitigated:

  • Verified locally that nothing in the source tree imports @iconify/tools/@iconify/utils directly (grep -rn "iconify/tools\|iconify/utils" across .ts/.js/.mjs/.astro → only the explanatory comment in astro.config.ts).
  • astro.config.ts:27-28 already documents that the icon({ include }) config path (static @iconify-json/* loading) never touches @iconify/tools, so the transitive major bump has no reachable call path in this app — consistent with the PR body's claim.

Code quality

  • The //overrides comment in package.json explaining why the override exists and when to remove it (once astro-icon itself bumps to @iconify/tools ^5) is a nice touch — keeps the override from becoming stale tribal knowledge, and follows the repo's existing pattern for documenting overrides (yaml, nanoid).
  • PR description is thorough: root cause, dependency path, verification table, and an explicit "no upstream patch exists" justification for why a version bump alone can't fix this.

Performance

None — pure devDependency/transitive-tree change, no runtime code touched. Net effect is actually a slightly smaller node_modules (per the description, +6/-20-ish packages).

Test coverage

No new tests, which is appropriate here — this is a dependency-swap PR, not a behavior change. The existing pnpm build chain (astro check + build + pagefind) and CI's Code standards & build gate are the right regression net for "does icon rendering still work," and the PR description already shows dist HTML containing rendered inline <svg> output.

Nitpick (non-blocking)

Nothing substantive to flag. One very minor observation: the tree now carries both @iconify/utils@2.3.0 (astro-icon's direct dep) and @iconify/utils@3.1.4 (pulled in via the overridden @iconify/tools@5.0.12) side by side. That's normal/expected pnpm behavior for an override like this and not something to act on — just noting it for awareness in case it's ever a debugging surprise.

Overall: clean, well-justified, appropriately verified. LGTM.

@CaesiumY

Copy link
Copy Markdown
Owner Author

리뷰 코멘트 처리 결과입니다.

@claude[bot] 리뷰 (LGTM): 조치 요청 0건으로 확인했습니다. 유일한 참고 사항이었던 @iconify/utils 2.3.0(astro-icon 직접 의존)과 3.1.4(override된 tools 5 경유) 공존은 리뷰어가 명시한 대로 override 시 pnpm의 정상 동작이며, astro-icon이 자체적으로 tools ^5를 수용하면 override 삭제와 함께 해소됩니다(package.json 주석에 기록됨). 코드 변경 없이 종결합니다.

@chatgpt-codex-connector[bot]: Codex 사용량 한도 알림으로 리뷰 내용이 없어 조치 대상이 아닙니다.

CI는 Code standards & build 포함 3개 체크 전부 통과, 머지 가능 상태(CLEAN)입니다.

🤖 Addressed by Claude Code

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits. You can see your limits in the Codex usage dashboard.

@CaesiumY
CaesiumY merged commit 0ab96d3 into main Aug 20, 2026
3 checks passed
@CaesiumY
CaesiumY deleted the fix/deps-remove-extract-zip branch August 20, 2026 19:11
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