Skip to content

fix: upgrade handlebars to 4.7.9, fix pre-push hook#1134

Open
jdalton wants to merge 2 commits intomainfrom
fix/upgrade-handlebars-4.7.9
Open

fix: upgrade handlebars to 4.7.9, fix pre-push hook#1134
jdalton wants to merge 2 commits intomainfrom
fix/upgrade-handlebars-4.7.9

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

@jdalton jdalton commented Mar 29, 2026

Summary

  • Upgrades handlebars from 4.7.8 to 4.7.9, resolving all 6 open Dependabot alerts (1 critical, 4 high, 1 medium)
  • Fixes pre-push hook false positives on new branches by comparing against origin/main instead of release tags

Dependabot alerts resolved

Test plan

  • pnpm run check passes
  • Pre-push hook correctly validates only new commits on branch push

Note

Medium Risk
Updates a security-sensitive templating dependency and changes the pre-push commit-range logic; low code complexity, but regressions could either miss validations or block valid pushes.

Overview
Fixes the .husky/pre-push hook behavior on new branch pushes by deriving the remote default branch (fallback main) and validating only commits not already on that branch, instead of scanning from the latest release tag.

Upgrades handlebars in packages/package-builder (and lockfile) from 4.7.8 to 4.7.9 to pull in security fixes.

Written by Cursor Bugbot for commit f09224f. Configure here.

jdalton added 2 commits March 29, 2026 00:08
Addresses all 6 open Dependabot alerts:
- CVE-2026-33937 (critical): JS Injection via AST Type Confusion
- CVE-2026-33941 (high): JS Injection in CLI Precompiler
- CVE-2026-33940 (high): JS Injection via AST Type Confusion (dynamic partial)
- CVE-2026-33939 (high): DoS via Malformed Decorator Syntax
- CVE-2026-33938 (high): JS Injection via AST Type Confusion (@partial-block)
- CVE-2026-33916 (medium): Prototype Pollution Leading to XSS
For new branches, compare against remote default branch instead of
searching for release tags. The tag-based approach included commits
already on origin/main, causing false positives for AI attribution.
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​handlebars@​4.7.8 ⏵ 4.7.999 +1100 +75100 +191100

View full report

@socket-security-staging
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​handlebars@​4.7.8 ⏵ 4.7.999 +1100 +75100 +191 +6100

View full report

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Comment @cursor review or bugbot run to trigger another review on this PR

if [ -z "$default_branch" ]; then
default_branch="main"
fi
range="${remote}/${default_branch}..$local_sha"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New branch push fails if remote default branch ref missing

Low Severity

When pushing a new branch, range is set to ${remote}/${default_branch}..$local_sha}, but if the tracking ref (e.g. origin/main) doesn't exist locally, git rev-list on line 49 fails and set -e kills the script with a cryptic error, blocking the push entirely. This can happen with --single-branch clones, shallow clones, or manually-added remotes that haven't fetched the default branch. The old code had a safe fallback (range="$local_sha") when no tags were found; the new code has no equivalent fallback when the remote branch ref is missing.

Additional Locations (1)
Fix in Cursor Fix in Web

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