Skip to content

Commit 6979fff

Browse files
justin808claude
andcommitted
Fix: Correct misleading security comment in shakapacker.yml
The comment claimed "The hook command will be validated to ensure it points to a file within the project root" but no such validation exists in the codebase. Updated the comment to accurately reflect that users must ensure the hook path points to a trusted file they control. This removes the false promise of automatic validation and places the security responsibility appropriately on the user configuring the hook. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 59d1156 commit 6979fff

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/generators/react_on_rails/templates/base/base/config/shakapacker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ default: &default
4343
ensure_consistent_versioning: true
4444

4545
# Hook to run before webpack compilation (e.g., for generating dynamic entry points)
46-
# SECURITY: Only reference trusted scripts within your project. The hook command will be
47-
# validated to ensure it points to a file within the project root.
46+
# SECURITY: Only reference trusted scripts within your project. Ensure the hook path
47+
# points to a file within the project root that you control.
4848
precompile_hook: 'bin/shakapacker-precompile-hook'
4949

5050
# Select whether the compiler will use SHA digest ('digest' option) or most recent modified timestamp ('mtime') to determine freshness

spec/dummy/config/shakapacker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ default: &default
2222
nested_entries: true
2323

2424
# Hook to run before webpack compilation (e.g., for generating dynamic entry points)
25-
# SECURITY: Only reference trusted scripts within your project. The hook command will be
26-
# validated to ensure it points to a file within the project root.
25+
# SECURITY: Only reference trusted scripts within your project. Ensure the hook path
26+
# points to a file within the project root that you control.
2727
precompile_hook: 'bin/shakapacker-precompile-hook'
2828

2929
development:

0 commit comments

Comments
 (0)