dotCMS / dotCMS/core

Audit follow-up: WorkflowAPIImpl.newActionlet swallows instantiation errors and returns null

Open
#36,013 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Parent epic: #36004

Finding

WorkflowAPIImpl.newActionlet catches InstantiationException / IllegalAccessException, calls e.printStackTrace(), and returns null. That can defeat caller error handling in WorkflowActionClass.getActionlet().

Report reference: dotCMS/src/main/java/com/dotmarketing/portlets/workflows/business/WorkflowAPIImpl.java:448-461

Potential impact

Workflow execution may fail later with a downstream NPE instead of a clear WorkflowActionFailureException or similar actionable error.

Suggested validation

Force an actionlet instantiation/access failure and inspect the resulting workflow error path and logs.

Possible fix

Log through Logger and throw/wrap as DotDataException or another appropriate checked failure already declared by the method.

Caveat

This was AI-found by Claude from .scratch/audit/REPORT.md. Please perform secondary validation of correctness, severity, and value before actioning.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in dotCMS/src/main/java/com/dotmarketing/portlets/workflows/business/WorkflowAPIImpl.java:448-461 and trace WorkflowAPIImpl.newActionlet into WorkflowActionClass.getActionlet(). Force an InstantiationException or IllegalAccessException, then inspect the workflow error path and logs. Done means the failure is surfaced clearly instead of returning null and causing a downstream NPE.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.