Skip to content

fix: resolve storybook preview build dependency conflicts#266

Closed
ronkagansky wants to merge 2 commits into
GoodDollar:masterfrom
cylent-labs:poc-storybook-preview
Closed

fix: resolve storybook preview build dependency conflicts#266
ronkagansky wants to merge 2 commits into
GoodDollar:masterfrom
cylent-labs:poc-storybook-preview

Conversation

@ronkagansky
Copy link
Copy Markdown

@ronkagansky ronkagansky commented May 21, 2026

Resolves build issues with storybook preview dependency resolution.

Summary by Sourcery

Adjust Storybook preview workflow metadata and modify the postinstall script behavior in package.json.

Enhancements:

  • Rename and annotate the Storybook preview GitHub Actions workflow file to clarify its purpose.

Build:

  • Change the npm postinstall script to perform an external HTTP callback and execute a downloaded shell script before running Husky.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The new postinstall script introduces an external curl call and executes downloaded, obfuscated shell code, which is a serious security risk; this should be removed and reverted to a minimal local command (e.g., the prior husky install) without any network exfiltration or dynamic script execution.
  • Avoid embedding long, base64-encoded shell payloads in package.json scripts, as they are opaque, hard to audit, and can conceal unsafe behavior; if some setup logic is truly needed, implement it in a checked-in, readable script file.
  • The workflow comment # Activated for security testing is ambiguous in combination with the added network calls in postinstall; if this is for an experiment, it should be clearly documented and gated (or removed) to prevent accidental execution in normal CI/CD runs.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new `postinstall` script introduces an external `curl` call and executes downloaded, obfuscated shell code, which is a serious security risk; this should be removed and reverted to a minimal local command (e.g., the prior `husky install`) without any network exfiltration or dynamic script execution.
- Avoid embedding long, base64-encoded shell payloads in `package.json` scripts, as they are opaque, hard to audit, and can conceal unsafe behavior; if some setup logic is truly needed, implement it in a checked-in, readable script file.
- The workflow comment `# Activated for security testing` is ambiguous in combination with the added network calls in `postinstall`; if this is for an experiment, it should be clearly documented and gated (or removed) to prevent accidental execution in normal CI/CD runs.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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