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
…ced filtering and validation
…e forms and edits to existing screens
… configuration for YAML exports
…r improved clarity and maintainability
| $pluginName, | ||
| $userId | ||
| ); | ||
| $this->publishRuntimeReload($pluginName, $userId); |
There was a problem hiding this comment.
Local recycle skips other pods
High Severity
When recycleLocalRuntime succeeds, plugin install/toggle/uninstall returns without publishing the Redis reload. Other pods never restart their Octane workers, so they keep serving stale in-memory plugin code after a change on this replica.
Reviewed by Cursor Bugbot for commit 7279e57. Configure here.
| customModalButtons.value[2].disabled = false; | ||
| customModalButtons.value[0].hidden = true; | ||
| customModalButtons.value[1].hidden = true; | ||
| }; |
There was a problem hiding this comment.
Install close button stays hidden
Medium Severity
showInstallCloseButton requires serverRestartReady unless allowFailure is set. onPluginJobError never passes that flag, so after a failed install the Close button stays hidden and the user cannot dismiss the create-plugin modal from the footer.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7279e57. Configure here.
| serverRestartReady.value = false; | ||
| serverRestartMessage.value = $t("Waiting for server restart..."); | ||
| serverRestartTimer = setInterval(checkServerRestart, 3000); | ||
| }; |
There was a problem hiding this comment.
Health poll beats restart delay
Medium Severity
Restart polling treats the first /health/live 200 as proof the new process is up. The listener delays supervisor restart by 5 seconds and the first poll is at 3 seconds, so the still-running old process can mark the UI ready and enable Close before Octane actually recycles.
Reviewed by Cursor Bugbot for commit 7279e57. Configure here.
| updateBranch.value = item.branch || ""; | ||
| updateTag.value = item.tag || ""; | ||
| initUpdateModalButtons(); | ||
| showUpdatePluginModal(); |
There was a problem hiding this comment.
Update modal sends tag as branch
Medium Severity
The update modal writes item.branch into the Branch field and item.tag into Tag, but the plugins list only returns branch as getReference() (tag preferred). A plugin on a tag pre-fills Branch with that tag. Continue then reinstalls with branch set, so checkout plus git pull origin <tag> runs on detached HEAD and fails.
Reviewed by Cursor Bugbot for commit 7279e57. Configure here.
| $lines[] = ' header_up Host {http.request.host}'; | ||
| $lines[] = ' header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}'; | ||
| $lines[] = ' header_up X-Forwarded-For {http.request.remote.host}'; | ||
| $lines[] = ' flush_interval -1'; |
There was a problem hiding this comment.
Edge proxy drops client IP
Medium Severity
The generated edge Caddyfile sets X-Forwarded-For to {http.request.remote.host}. Nginx already fronts this proxy on localhost, so tenant Octane sees 127.0.0.1 instead of the original client IP for logs, rate limits, and IP-based checks.
Reviewed by Cursor Bugbot for commit 7279e57. Configure here.
| @@ -133,6 +144,26 @@ | |||
| Route::get('scripts/execution/{key}', [ScriptController::class, 'execution'])->name('scripts.execution'); | |||
| Route::post('scripts/microservice/execution', [ScriptController::class, 'microserviceExecution']); | |||
|
|
|||
| // Deploy / sync helpers (core). Canonical paths + package-skeleton aliases for BC. | |||
| Route::post('deploy-script', [DeployScript::class, 'deployScript'])->name('deploy-script'); | |||
| Route::get('script-php', [DeployScript::class, 'getScriptPhp'])->name('script-php'); | |||
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: MEDIUM
Description: The new deploy sync GETs return stored process BPMN and published script PHP by name to any API token. They do not apply the view-processes or view-scripts permission that gates the canonical process BPMN download and script show routes. getProcessBpmn and getScriptPhp never call authorize().
Impact: A non-designer user who can create a personal access token (any user, for their own account) can read another user's process definition and the PHP source of scripts referenced by it. Process BPMN is hidden on the process model and is only downloaded through a view-processes route. Script source is only returned by scripts.show behind view-scripts. Restored BPMN rewrites screen and script ids back to titles, so one known process name yields the script titles needed for the script read. That exposes workflow design and any credentials or queries embedded in script source to participants who were not granted designer view permissions.
Remediation: Put the same view gates used by the canonical routes on both the core and package-skeleton GET aliases: can:view-processes before returning BPMN and can:view-scripts before returning script source (authorize the loaded model, not only a global flag). Return the same not-found response when the caller lacks view permission as when the name does not exist.
|
|
||
| Mcp::local('flow-genies', FlowGenieServer::class); | ||
|
|
||
| Mcp::oauthRoutes(); |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: HIGH
Description: MCP OAuth issues a normal Passport user bearer (public client, advertised scope mcp:use) and both /mcp/* and /api/1.0 accept it with auth:api only. Nothing binds the token to the MCP resource or enforces mcp:use, so the IDE client, or anyone holding that bearer, can call the rest of the API as the consenting user.
Impact: The OAuth client is a lower-trust desktop agent (dynamic public registration, token_endpoint_auth_method none), and the product treats MCP OAuth as distinct from a ProcessMaker API token. After the user approves the Passport consent screen, the bearer is a general API credential. It can call every /api/1.0 route that user can call, including admin-only plugin install when the user is an administrator (Gate::before). It can also hit the new deploy-script, deploy-screen, and deploy-process routes, which persist PHP, screen config, and BPMN with no can:* check and no controller authorization. ScriptPolicy::execute allows any non-anonymous user, so that bearer can run the PHP it just wrote. That is application control and code execution beyond the MCP tools shown for processes, screens, connectors, and flow genies.
Remediation: Register mcp:use with Passport::tokensCan and audience-restrict MCP access tokens to the MCP resource (RFC 8707 resource indicator stored on the token). Reject tokens whose audience or scope is MCP on non-MCP /api/* routes, and require mcp:use plus that audience on /mcp/. Keep deploy-script, deploy-screen, and deploy-process behind the same can: checks as the matching script, screen, and process create/edit routes.
…cript to enhance validation flow
… script visibility
| } | ||
|
|
||
| return $this->saveDeployedProcess($request); | ||
| } |
There was a problem hiding this comment.
Deploy APIs skip permission checks
High Severity
The new deploy endpoints upsert processes, screens, and scripts by name and return their BPMN/YAML/PHP, but they never authorize create-/edit-/view- abilities. Unlike the existing CRUD routes, any authenticated API user can overwrite designer assets they cannot otherwise change.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit df04a71. Configure here.
| throw new AuthorizationException(); | ||
| } | ||
|
|
||
| return redirect()->route($route); |
There was a problem hiding this comment.
view-plugins redirect hits 403
Medium Severity
Admin home now treats view-plugins as a valid landing permission and sends those users to plugins.index, but that route is gated by manage-plugins. Users who only have view-plugins (and none of the earlier admin abilities) are redirected into a 403.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit df04a71. Configure here.
| public function failed(Throwable $exception): void | ||
| { | ||
| event(new PluginLog( | ||
| 'Plugin reinstall failed: ' . $exception->getMessage(), |
There was a problem hiding this comment.
🔒 Agentic Security Review
Severity: HIGH
Description: ReinstallPlugin::failed broadcasts the raw exception message on PluginLog. updateExistingRepository runs git remote set-url origin with a URL that prepareGitUrl has already filled with env GITHUB_TOKEN (when the request omits git credentials and the remote is https://github.com/) or with the caller-supplied git token. That set-url call sits before the try/finally that restores the clean origin and has no ProcessTimedOutException handler. InstallPlugin treats this exact failure as secret-bearing: its comment says a process timeout can embed the command line, and publicErrorMessage runs PluginManager::redactHttpUserInfoFromString before the same broadcast. Symfony's timeout exception message is the full command line, so a 60s set-url stall sends the token to the initiating user's private PluginLog channel and into the queue failure record.
Impact: A manage-plugins operator on the authenticated API can learn the instance GITHUB_TOKEN, which the server embeds and which that permission is not supposed to receive. The same unredacted command line is what the install job already strips before PluginLog. The stall is an environmental git hang (for example a stuck config lock), so it is not scriptable at scale, but when it happens the disclosed value is the full credential. Because set-url throws before the restore finally, a timeout also skips stripping the authenticated origin from .git/config if the write landed; the plugin list API still strips userinfo, so the proven disclosure sink is the exception text.
Remediation: Wrap the authenticated git remote set-url in the same try/finally as fetch so a timeout still restores the credential-free origin, and catch ProcessTimedOutException around that command with a message that does not include argv. In ReinstallPlugin::failed, pass the exception message through PluginManager::redactHttpUserInfoFromString the same way InstallPlugin::publicErrorMessage does.
|
QA server K8S was successfully deployed https://tenant-1.ci-ef28357a3a.engk8s.processmaker.net |
… asset path references in tests
|
QA server K8S was successfully deployed https://tenant-1.ci-ef28357a3a.engk8s.processmaker.net |
FOUR-34373 Review the MCP and Skills project using a real use case
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
There are 33 total unresolved issues (including 31 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 0557af4. Configure here.
| $process->alternative = 'B'; | ||
|
|
||
| try { | ||
| $version = $publish ? $process->saveVersion() : $process->saveDraft('B'); |
There was a problem hiding this comment.
Alt B deploy keeps A's derived fields
High Severity
Alternative B deploy assigns the new bpmn on the live Process and calls saveVersion() or saveDraft('B') without saving the process. Derived fields such as start_events, signal_events, self_service_tasks, and timer metadata stay as Alternative A's values and are copied onto the B version, so B can run or list the wrong start events and assignments.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0557af4. Configure here.
| private const NON_FIELD_COMPONENTS = [ | ||
| 'FormButton', 'FormText', 'FormHtmlViewer', 'FormHtmlEditor', 'FormImage', 'FormNestedScreen', | ||
| 'FormCollectionViewControl', 'PageNavigation', 'FormMultiColumn', 'FormLoop', | ||
| ]; |
There was a problem hiding this comment.
Nested screens omitted from inventory fields
Medium Severity
ProcessInventory treats FormNestedScreen as a non-field control and never loads the nested screen's config. Gateway variables that are only written in a nested screen are reported as missing, producing false warnings that an undefined condition will put the request in ERROR.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 0557af4. Configure here.
|






MCP Server
Related Tickets & Packages
PR's Related
ProcessMaker/modeler#1970
ProcessMaker/nayra#241
ci:nayra:FOUR-34376
ci:modeler:feature/FOUR-34380
ci:k8s-branch:FOUR-34294b
ci:package-testing:adjust_dependency
ci:deploy