-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add laravel-toolkit extension #24155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Congratulations on your new Raycast extension! 🚀 Due to our current reduced availability, the initial review may take up to 10-15 business days. Once the PR is approved and merged, the extension will be available on our Store. |
Greptile SummaryThis PR adds a comprehensive Laravel Toolkit extension with project management, documentation search, and development tools. The extension provides useful features including Laravel docs search with version switching, project scaffolding wizard, Artisan command reference, code snippets, and development tool management. Major Changes:
Critical Security Issues Found:
Configuration:
Confidence Score: 1/5
Important Files Changed
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (5)
-
extensions/laravel-toolkit/CHANGELOG.md, line 3 (link)syntax: The changelog entry uses a hardcoded date instead of the
{PR_MERGE_DATE}placeholder. According to the custom rules, changelog entries must use{PR_MERGE_DATE}placeholder in titles to ensure merge dates are set automatically during release.Context Used: Rule from
dashboard- What: Changelog entries must use{PR_MERGE_DATE}placeholder in titles, be placed at the top of th... (source) -
extensions/laravel-toolkit/src/utils/editor.ts, line 22 (link)logic: The
execcall doesn't have error handling and uses callback style. IfeditorApplication.pathorpathcontain shell metacharacters beyond what quotes protect, this could lead to command injection issues. -
extensions/laravel-toolkit/src/manage-projects.tsx, line 55-56 (link)logic: Hardcoded Windows-specific PowerShell command won't work on macOS (which is listed as a supported platform in
package.json). Need platform detection. -
extensions/laravel-toolkit/src/create-project.tsx, line 21-23 (link)syntax: Manually defined
Preferencesinterface violates the custom rule. ThePreferencestype is auto-generated inraycast-env.d.tswhen the extension runs and should not be manually defined to avoid sync issues.Context Used: Rule from
dashboard- What: Don't manually definePreferencesforgetPreferenceValues()or commendsArgumentinterfa... (source) -
extensions/laravel-toolkit/src/utils/editor.ts, line 4-6 (link)syntax: Manually defined
EditorPreferencesinterface violates the custom rule. ThePreferencestype is auto-generated inraycast-env.d.tsand should not be manually defined.Context Used: Rule from
dashboard- What: Don't manually definePreferencesforgetPreferenceValues()or commendsArgumentinterfa... (source)
25 files reviewed, 5 comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (7)
-
extensions/laravel-toolkit/src/create-project.tsx, line 239-266 (link)logic: Command injection vulnerability: unsanitized
projectNameanddirectoryare directly interpolated into shell commands without proper escaping or validation. If a user enters a project name or directory path containing special shell characters (e.g.,; rm -rf /, backticks, or$()), it could execute arbitrary commands. -
extensions/laravel-toolkit/src/manage-projects.tsx, line 55 (link)logic: Command injection vulnerability:
projectPathis not escaped before being interpolated into the PowerShell command. A malicious project path could execute arbitrary commands.const command = `start powershell -NoExit -Command "Set-Location '${projectPath.replace(/'/g, "''")}'"`; -
extensions/laravel-toolkit/src/run-artisan.tsx, line 82 (link)logic: Command injection vulnerability: the
commandparameter is directly interpolated without sanitization. Whilecommandcomes from a known list of Artisan commands, it's still passed unsafely. Additionally,currentProject.pathshould be escaped. -
extensions/laravel-toolkit/src/utils/editor.ts, line 15 (link)logic: Command injection vulnerability: both
editorApplication.pathandpathare interpolated without escaping. A malicious path could execute arbitrary code. -
extensions/laravel-toolkit/src/manage-custom-packages.tsx, line 154 (link)syntax: Typo in dropdown item title
-
extensions/laravel-toolkit/src/utils/project-details.ts, line 95-103 (link)style: Duplicate code:
composer.jsonis already read and parsed at lines 47-78, so this entire block at lines 95-103 is redundant and should be removed. -
extensions/laravel-toolkit/src/snippets.tsx, line 14-17 (link)style: Manual
Preferencesinterface definition should not be defined manually. This interface is auto-generated inraycast-env.d.tsand should be imported from the generated types instead.Context Used: Rule from
dashboard- What: Don't manually definePreferencesforgetPreferenceValues()or commendsArgumentinterfa... (source)
25 files reviewed, 7 comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (7)
-
extensions/laravel-toolkit/src/create-project.tsx, line 238-239 (link)logic: Command injection vulnerability -
sanitizedDirectoryonly escapes double quotes but doesn't prevent command injection via special characters like; && || $(). -
extensions/laravel-toolkit/src/create-project.tsx, line 371 (link)logic: Executing untrusted remote script. This downloads and executes code from
getcomposer.orgwithout verification, creating a remote code execution risk. -
extensions/laravel-toolkit/src/manage-projects.tsx, line 55 (link)logic: Command injection vulnerability via path. Single quote escaping with
''is correct for PowerShell but special chars like;can still inject commands. -
extensions/laravel-toolkit/src/utils/editor.ts, line 15-17 (link)logic: Inadequate sanitization for shell execution. Only escaping quotes doesn't prevent command injection via shell metacharacters.
-
extensions/laravel-toolkit/src/manage-tools.tsx, line 192-193 (link)logic: Command injection via user input. The
uninstallCommandTextArea allows arbitrary command execution without sanitization.Add validation to prevent command injection:
// Before executing, validate the command doesn't contain dangerous patterns if (/[;&|$()<>`]/.test(uninstallCommand)) { throw new Error("Command contains potentially unsafe characters"); } -
extensions/laravel-toolkit/src/manage-tools.tsx, line 201-203 (link)logic: Command injection via version parameter. User-controlled
{version}ininstallVersionCmdisn't validated before shell execution. -
extensions/laravel-toolkit/package.json, line 180-182 (link)style: Verify Windows-only restriction is intentional. Extension targets Windows but Laravel development is common on macOS (Herd, Valet). Check if commands work cross-platform.
25 files reviewed, 7 comments
Description
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder