Skip to content

kie-issues#833: Move all UI packages from kogito-apps to kie-tools #2180

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

Merged
merged 24 commits into from
Mar 28, 2024

Conversation

thiagoelg
Copy link
Member

@thiagoelg thiagoelg commented Feb 23, 2024

Reference: apache/incubator-kie-issues#833

Summary of the migration

Migrated packages from kogito-apps:

  • management-console-webapp -> runtime-tools-management-console-webapp
  • runtime-tools-dev-ui-webapp -> runtime-tools-process-dev-ui-webapp
  • task-console-webapp -> runtime-tools-task-console-webapp

All dependencies of those packages that weren't previously migrated were migrated as well and were distributed across the new or renamed packages:

  • runtime-tools-components
  • runtime-tools-cypress-ouia
  • runtime-tools-process-enveloped-components
  • runtime-tools-process-gateway-api
  • runtime-tools-process-webapp-components
  • runtime-tools-shared-enveloped-components
  • runtime-tools-shared-gateway-api
  • runtime-tools-shared-webapp-components
  • runtime-tools-swf-enveloped-components
  • runtime-tools-swf-gateway-api
  • runtime-tools-swf-webapp-components

Unit and end-to-end tests

Most unit tests were stripped out of those packages since they weren't really testing anything.
End-to-end tests were also stripped out but may come back at a later stage, they were not considered right now due to the time it would take to set it up.

Testing and validating this PR locally

Follow the steps below:

To fetch the branch from my fork without adding my fork as a remote, use this command:

git fetch https://github.com/thiagoelg/kie-tools.git kogito-apps-migration:kogito-apps-migration

then checkout the kogito-apps-migration branch.

Build the new packages with:

pnpm -F runtime-tools-management-console-webapp... -F runtime-tools-process-dev-ui-webapp... -F runtime-tools-task-console-webapp... build:dev

Then run them individually:

RUNTIME_TOOLS_MANAGEMENT_CONSOLE_WEBAPP__kogitoDataIndexUrl=<data_index_url> pnpm -F runtime-tools-management-console-webapp start
RUNTIME_TOOLS_PROCESS_DEV_UI_WEBAPP__kogitoDataIndexUrl=<data_index_url> pnpm -F runtime-tools-process-dev-ui-webapp start
RUNTIME_TOOLS_TASK_CONSOLE_WEBAPP__kogitoDataIndexUrl=<data_index_url> pnpm -F runtime-tools-task-console-webapp start

You may also run the dev command instead of start to use the mock server (in this case, setting the environment variable is not necessary).

}
let sourceString;

const configString = fs.readFileSync(path.join(`${__dirname}/forms/examples/${formName}.config`), "utf8");

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).

const configString = fs.readFileSync(path.join(`${__dirname}/forms/examples/${formName}.config`), "utf8");
if (formInfo[0].type.toLowerCase() === "html") {
sourceString = fs.readFileSync(path.join(`${__dirname}/forms/examples/${formName}.html`), "utf8");

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
if (formInfo[0].type.toLowerCase() === "html") {
sourceString = fs.readFileSync(path.join(`${__dirname}/forms/examples/${formName}.html`), "utf8");
} else if (formInfo[0].type.toLowerCase() === "tsx") {
sourceString = fs.readFileSync(path.join(`${__dirname}/forms/examples/${formName}.tsx`), "utf8");

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
res.send(null);
}
} catch (error) {
res.status(404).send(error);

Check warning

Code scanning / CodeQL

Information exposure through a stack trace

This information exposed to the user depends on [stack trace information](1).
res.send(null);
}
} catch (error) {
res.status(404).send(error);

Check warning

Code scanning / CodeQL

Information exposure through a stack trace

This information exposed to the user depends on [stack trace information](1).
app.post("/management/processes/:processId/instances/:processInstanceId/nodes/:nodeId", controller.callNodeTrigger);
app.get("/management/processes/:processId/nodes", controller.getTriggerableNodes);
app.delete("/jobs/:jobId", controller.callJobCancel);
app.get("/svg/processes/:processId/instances/:id", controller.dispatchSVG);

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [a file system access](1), but is not rate-limited. This route handler performs [a file system access](2), but is not rate-limited. This route handler performs [a file system access](3), but is not rate-limited.

app.get("/forms/list", controller.getForms);
app.get("/customDashboard/list", controller.getCustomDashboards);
app.get("/customDashboard/:name", controller.getCustomDashboardContent);

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [a file system access](1), but is not rate-limited. This route handler performs [a file system access](2), but is not rate-limited.
app.get("/forms/list", controller.getForms);
app.get("/customDashboard/list", controller.getCustomDashboards);
app.get("/customDashboard/:name", controller.getCustomDashboardContent);
app.get("/forms/:formName", controller.getFormContent);

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [a file system access](1), but is not rate-limited. This route handler performs [a file system access](2), but is not rate-limited. This route handler performs [a file system access](3), but is not rate-limited.
}
if (req.body.kogitobusinesskey) {
console.log(`Starting Serverless workflow with business key: ${req.body.kogitobusinesskey}`);
return res.status(200).send(req.body.kogitobusinesskey);

Check failure

Code scanning / CodeQL

Reflected cross-site scripting

Cross-site scripting vulnerability due to a [user-provided value](1).
return res.status(200).send(req.body.kogitobusinesskey);
} else if (req.body.kogitoprocrefid) {
console.log(`Serverless Workflow with id ${req.body.kogitoprocrefid} successfully completed`);
return res.status(200).send(req.body.kogitoprocrefid);

Check failure

Code scanning / CodeQL

Reflected cross-site scripting

Cross-site scripting vulnerability due to a [user-provided value](1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants