Repository navigation
Conversation
…ce and WorkflowManagerInterface - Introduced ScriptModuleInterface for module exposure in PHP scripts. - Updated ServiceTaskImplementationInterface to allow an optional timeout parameter in the run method. - Modified WorkflowManagerInterface to include a timeout parameter in the runServiceImplementation method.
…-process - Introduced ScriptRuntime facade for managing script execution context and module registration. - Added InProcessPhpRunner to run PHP scripts directly within the Laravel process. - Updated ScriptRunner to support in-process execution based on script properties. - Enhanced WorkflowManager and Script models to accommodate new functionality, including allow_in_process property. - Implemented bootstrap for in-process execution and improved error handling for script execution.
- Introduced ScriptExecutionContext to encapsulate per-run context for script modules. - The class includes properties for data, configuration, user, token ID, timeout, script ID, and source. - This addition supports the in-process execution of PHP scripts by providing necessary context information.
- Introduced CoreServiceTask class to handle the execution of allowlisted PHP scripts without Docker or the script microservice. - Implemented validation for script configuration, including script ID and user requirements. - Added support for both module-based and bare execution modes. - Enhanced error handling for various execution scenarios, ensuring robust configuration checks. - Utilized ScriptRuntime and InProcessPhpRunner for executing scripts based on the defined context.
- Enhanced ScriptController to support a new `run_in_process` property for script previews, allowing execution via an in-process PHP runner when enabled. - Updated TestScript job to handle the new `runInProcess` parameter, enabling direct script execution without Docker. - Introduced `shouldPreviewInProcess` method to determine if in-process execution is applicable based on script properties and request flags. - Added comprehensive unit tests to validate in-process execution scenarios and ensure proper handling of configuration and execution context. - Implemented new test cases for CoreServiceTask to verify in-process script execution and error handling for various conditions.
commit b84543b Author: AugustoLopezProcess <augusto.lopez+github@processmaker.com> Date: Tue Apr 21 08:27:15 2026 -0400 Adding plugin admin ui commit ca8a863 Author: Nolan Ehrstrom <github@nolanpro.com> Date: Mon Mar 9 11:01:46 2026 -0700 Add controllers and routes for plugin UI Copied from feature/plugins-poc-vite-ui (just without the vite/Vue3 integration) commit 3cc89bc Merge: 9e9b4aa 5da27ce Author: Nolan Ehrstrom <github@nolanpro.com> Date: Mon Mar 9 10:58:27 2026 -0700 Merge branch 'task/FOUR-28803' into feature/plugins-poc commit 9e9b4aa Author: Nolan Ehrstrom <github@nolanpro.com> Date: Mon Jan 19 12:30:54 2026 -0800 Add install command and cached routes commit 4a5df14 Author: Nolan Ehrstrom <github@nolanpro.com> Date: Wed Dec 10 09:29:20 2025 -0800 Start on plugins
Updating feature/plugins-poc-4 with last changes in develop
FOUR-32722 Some adjustments in plugins installation
…the command: php artisan horizon:terminate
FOUR-32760 After install/enable/disable a plugin, should be executed the command: php artisan horizon:terminate
…ink, add load screen-builder-form.js files from plugin
…ink, add load screen-builder-form.js files from plugin
…ink, add load screen-builder-form.js files from plugin
…ink, add load screen-builder-form.js files from plugin
Include preview presets in screen YAML exports and normalize imported preset data so JSON strings and YAML mappings persist consistently. Add coverage for deploy, update, and pull workflows.
Convert empty arrays to objects before JSON encoding preset data so empty YAML mappings persist as . Add coverage for top-level and nested mappings.
Ignore MySQL error 1412 when reading collection counts while allowing other query errors to propagate. Stabilize script executor and duplication tests, and remove the duplicate process request test.
…ites - Align deploy Nayra executor test with ScriptExecutorResolver contract - Grant create-scripts permission in modules duplicate script test - Disable DB transactions in DataConnectorsServerTest to avoid MySQL 1412 - Skip duplicate-request console tests until the artisan command ships https://processmaker.atlassian.net/browse/FOUR-34469
… test Duplicate validates Script::rules() and requires script_category_id in the request body; align the modules execution_mode test with existing duplicate tests. https://processmaker.atlassian.net/browse/FOUR-34469
Task/FOUR-34428: Move created vue components to plugin project
| $script->retry_wait_time = self::DEFAULT_RETRY_WAIT_TIME; | ||
| } | ||
|
|
||
| $script->code = $code; |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: HIGH
Description: POST /api/1.0/deploy-script (and the package-skeleton alias) replaces a script's PHP by title and save()s it without the modules-mode authorization applied to script create, update, duplicate, and import. Any authenticated caller who lacks run-in-process-modules can overwrite an existing script that already has allow_in_process=true and execution_mode=modules. The stored mode is left unchanged, the new code is published because code is a versionable attribute, and the next script task or core service task includes that PHP in the Laravel worker.
Impact: Process designers and any other authenticated account are not allowed to keep execution_mode=modules: ScriptController downgrades that mode to bare on update and duplicate, and import does the same. deploy-script skips that gate, so a lower-trust user can plant PHP on an administrator-marked modules script. When CORE_SERVICE_TASK_ENABLED and CORE_SERVICE_TASK_MODULES_ENABLED are on, ScriptRuntime includes that file in the worker with framework modules, the script run-as user's API token, and environment-variable values. That is in-process code execution, not the Docker or bare-subprocess path.
Remediation: Before DeployScript save()s an existing script, apply the same rule as ScriptController::authorizeModulesExecution: if execution_mode is modules and the caller is not an administrator and lacks run-in-process-modules, set execution_mode to bare or reject the request, and persist that change on the model. Calling the helper alone is not enough, because deploy-script does not fill execution_mode from the request. Leave new scripts at the bare default. Add a feature test that an edit-scripts user without run-in-process-modules can POST deploy-script against a modules script and the stored execution_mode becomes bare (or the call returns 403) so the next run cannot take the ScriptRuntime include path.
… update Pass version_name on the second deploy-screen POST so preview_presets tests align with FOUR-34469 upsert validation. https://processmaker.atlassian.net/browse/FOUR-34469
…deploy When a script update has a draft and unchanged code, HasVersioning may skip publishing a new row; attach VersionHistory to the current published version instead of returning 422. Add deploy script feature coverage for the case. https://processmaker.atlassian.net/browse/FOUR-34469
| $this->refreshRuntimeAfterPluginChange($pluginName, $userId); | ||
|
|
||
| $this->logDone('Plugin uninstalled successfully', $pluginName, $userId); | ||
| } |
There was a problem hiding this comment.
Plugin paths allow directory traversal
High Severity
uninstall and toggle join the {name} route value into storage/plugins/{name} with no basename or traversal check, so a name like .. can rename or recursively delete outside the plugins directory. extractRepoName likewise accepts a Git URL whose last segment is .., so install can target storage/ instead of a plugin folder. The artisan uninstall command is also built from that unsanitized name.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 15b4760. Configure here.
|
|
||
| $this->info('Scheduled supervisorctl restart on this pod.'); | ||
|
|
||
| return true; |
There was a problem hiding this comment.
Reload version saved before restart
Medium Severity
applyReload records the Redis version with rememberApplied before scheduleSupervisorRestart. If scheduling fails, catch-up treats the version as applied and never retries, so that pod keeps stale plugin code until a later install increments the counter.
Reviewed by Cursor Bugbot for commit 15b4760. Configure here.
| && $this->canUseModules($request) | ||
| ? Script::EXECUTION_MODE_MODULES | ||
| : Script::EXECUTION_MODE_BARE | ||
| ); |
There was a problem hiding this comment.
Duplicate keeps in-process run-as user
Medium Severity
duplicate copies every attribute except id/uuid/timestamps, including allow_in_process and run_as_user_id. execution_mode is gated, but those fields are not. Preview then auto-runs in-process as the original run_as_user_id when allow_in_process is set, so a caller with create-scripts can execute arbitrary preview code as another user.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 15b4760. Configure here.
| * @return mixed | ||
| * | ||
| * Implementations may accept an optional 4th argument `$timeout` (seconds). | ||
| * WorkflowManager passes it when available (see CoreServiceTask). |
There was a problem hiding this comment.
Service tasks may reject timeout argument
High Severity
runServiceImplementation now takes $timeout and RunServiceTask passes it through, while ServiceTaskImplementationInterface::run still declares only three parameters. PHP 8 throws ArgumentCountError when a fourth argument is passed to a three-parameter implementation. Package service tasks that were not updated (including document-send style executors) can fail at runtime.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 15b4760. Configure here.
Redesign the plugin creation modal with MCP setup instructions, a copyable prompt, and client-flow animation. Add Claude, Cursor, and Codex icons, and validate repository URLs and Git refs before saving.
feat(FOUR-34469): require version_name on deploy upsert updates
Task/FOUR-34495: Add in the plugins creation the new UI for create the project
…nd PHP executor Add DeployCategoryResolver and wire process, script, and screen deploy endpoints to accept category names and non-empty descriptions. Prefer the standard PHP executor over php-nayra when creating scripts via deploy. https://processmaker.atlassian.net/browse/FOUR-34493
…nd PHP executor Add DeployCategoryResolver and wire process, script, and screen deploy endpoints to accept category names and non-empty descriptions. Prefer the standard PHP executor over php-nayra when creating scripts via deploy. https://processmaker.atlassian.net/browse/FOUR-34493
feat(FOUR-34493): enrich deploy sync with categories, descriptions, a…
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
There are 26 total unresolved issues (including 23 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 03d8242. Configure here.
| || !$this->canRecordHistory() | ||
| || !method_exists($asset, 'versions') | ||
| ) { | ||
| return; |
There was a problem hiding this comment.
Whitespace version names skip history
Medium Severity
Update validation treats version_name as required with min:1, so a whitespace-only value passes. applyAfterSave then trims it to empty and returns without writing VersionHistory or failing the request, so the asset updates while the named version is silently dropped.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 03d8242. Configure here.
| } | ||
|
|
||
| return (int) $version->getKey() === $publishedVersionIdBefore ? $version : null; | ||
| } |
There was a problem hiding this comment.
Redeploy inserts duplicate version history
Medium Severity
Unchanged script redeploys reuse the current published row, but applyAfterSave always new VersionHistory() and saveOrFail() instead of upserting. Repeat deploys with version_name accumulate extra history rows for the same version, or fail after the script is already saved if versionable_id is unique.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 03d8242. Configure here.
| $this->applyYamlFields($screen, $parsedData, $created); | ||
| $publishedVersionIdBefore = $this->latestPublishedVersionId($screen); | ||
| $screen->save(); | ||
| $this->applyDeployVersionName($screen, $request, !$created, $publishedVersionIdBefore); |
There was a problem hiding this comment.
Screen and script history not transactional
Medium Severity
DeployScreen and DeployScript save the asset, then call applyDeployVersionName. A ValidationException or VersionHistory saveOrFail failure returns an error after the asset change is already committed. DeployProcess wraps both steps in DB::transaction, so the same failure rolls back there and not here.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 03d8242. Configure here.
FOUR-34496 Skeleton improvement and coding agent setup


MCP Server
Related Tickets & Packages
PR's Related
ProcessMaker/modeler#1970
ProcessMaker/nayra#241
ci:deploy
ci:nayra:FOUR-34376
ci:modeler:feature/FOUR-34380
ci:MULTITENANCY=false