Skip to content

Conversation

@dongoc
Copy link
Contributor

@dongoc dongoc commented Dec 17, 2025

PR 설명

storybook의 보안 취약점 대응 버전 업데이트를 진행합니다.

  • Storybook 빌드 프로세스에서 .env 파일의 환경변수가 번들에 포함될 수 있는 버그
  • 영향받는 버전: Storybook 7.0.0 ~ 10.0.x (버전 6 이하는 영향 없음)
  • 업그레이드 (권장 버전):
    • 10.1.10+
    • 9.1.17+
    • 8.6.15+
    • 7.6.21+ ← 현재 프로젝트 해당
  • 바벨 throwIfNamespace 옵션을 추가합니다.
    • 문제: Storybook 7.6.21로 업그레이드하면서 Next.js 13 때문에 SWC를 사용할 수 없게 되어 Babel로 전환
    • 원인: Babel의 기본 설정 throwIfNamespace: true가 ses:tags 같은 namespace 태그를 허용하지 않음
    • 해결: @storybook/nextjs는 내부적으로 next/babel preset을 사용하므로, 이를 통해 preset-react 옵션을 전달해야 함

변경 내역

  • storybook 관련 패키지 버전 업데이트

@dongoc dongoc self-assigned this Dec 17, 2025
@codecov
Copy link

codecov bot commented Dec 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 10.08%. Comparing base (16f5c35) to head (9a9bc92).

Additional details and impacted files
@@           Coverage Diff           @@
##              v13    #3775   +/-   ##
=======================================
  Coverage   10.08%   10.08%           
=======================================
  Files         743      743           
  Lines       29160    29160           
  Branches     7912     7912           
=======================================
  Hits         2940     2940           
  Misses      26198    26198           
  Partials       22       22           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dongoc dongoc changed the title storybook 보안 취약점 대응 버전업 보안 취약점 대응 storybook 업데이트 Dec 17, 2025
@dongoc dongoc added this to the v13.49.1 milestone Dec 17, 2025
Comment on lines -28 to -30
builder: {
useSWC: true,
},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Storybook 7.6.21 이상부터는 Next.js 14 미만 버전과 SWC 옵션을 함께 사용할 수 없다고 합니다....
v13이 지원하는 Next.js 버전은 13.4.13이기 때문에 SWC 옵션을 제거합니다.

Comment on lines +32 to +47
babel: async (config) => {
return {
...config,
presets: [
[
'next/babel',
{
'preset-react': {
runtime: 'automatic',
throwIfNamespace: false,
},
},
],
],
}
},
Copy link
Contributor Author

@dongoc dongoc Dec 18, 2025

Choose a reason for hiding this comment

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

swc를 사용할 수 없게 되면서 기본 babel을 사용하게 되는데, Babel의 기본 설정 throwIfNamespace: true가 ses:tags 같은 namespace 태그를 허용하지 않아 스토리북 빌드에 실패합니다.
preset-react 옵션으로 throwIfNamespace를 false로 설정합니다.

@dongoc dongoc changed the title 보안 취약점 대응 storybook 업데이트 보안 취약점 대응 storybook 버전 업데이트 Dec 18, 2025
@dongoc dongoc marked this pull request as ready for review December 18, 2025 00:59
@dongoc dongoc requested a review from a team as a code owner December 18, 2025 00:59
@dongoc dongoc requested review from jhyj0521, seulgiyoon and zhsks528 and removed request for a team December 18, 2025 00:59
@dongoc dongoc marked this pull request as draft December 18, 2025 01:00
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.

2 participants