Skip to content

[Bug] [Task Plugin] Dependent type task has security issue #13986

@EricGao888

Description

@EricGao888

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

  • Dependent type task does not check user permissions. Users could use dependent task to query the project / workflow / task lists of other users'.

What you expected to happen

  • Dependent type task should do permission checks.

How to reproduce

  • Create user A with project A, workflow A and task A.
  • Create user B.
  • Use user B to login DS and create a dependent task. In add dependency section, user B could query the project / workflow / task list of user A.

image

Anything else

related code:

/**
* query all project for dependent node
*
* @return project list
*/
@Override
public Result queryAllProjectListForDependent() {
Result result = new Result<>();
List<Project> projects =
projectMapper.queryAllProjectForDependent();
result.setData(projects);
putMsg(result, Status.SUCCESS);
return result;
}

<select id="queryAllProjectForDependent" resultType="org.apache.dolphinscheduler.dao.entity.Project">
select code, name
from t_ds_project
</select>

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions