Skip to content
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

Fix createFile with permission will not work #15556

Conversation

ruanwenjun
Copy link
Member

Purpose of the pull request

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@mergeable mergeable bot removed the backend label Feb 2, 2024
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixTaskGroupQueueWillNeverWakeup branch from c737055 to f6186a0 Compare February 2, 2024 11:30
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixTaskGroupQueueWillNeverWakeup branch from f6186a0 to b4383e8 Compare February 2, 2024 11:36

public static void createDirectoryWith755(@NonNull Path path) throws IOException {
if (OSUtils.isWindows()) {
Files.createDirectories(path);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixTaskGroupQueueWillNeverWakeup branch from b4383e8 to 252e472 Compare February 2, 2024 12:53
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_fixTaskGroupQueueWillNeverWakeup branch from 252e472 to 4d3e6e4 Compare February 3, 2024 07:39
@ruanwenjun ruanwenjun added bug Something isn't working 3.2.1 labels Feb 3, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 3, 2024

Codecov Report

Attention: 26 lines in your changes are missing coverage. Please review.

Comparison is base (1b42d45) 38.40% compared to head (2c33a9c) 38.40%.

❗ Current head 2c33a9c differs from pull request most recent head 4d3e6e4. Consider uploading reports for the commit 4d3e6e4 to get more accurate results

Files Patch % Lines
...pache/dolphinscheduler/common/utils/FileUtils.java 24.00% 16 Missing and 3 partials ⚠️
...e/dolphinscheduler/service/utils/ProcessUtils.java 0.00% 1 Missing ⚠️
...heduler/plugin/storage/abs/AbsStorageOperator.java 0.00% 1 Missing ⚠️
...heduler/plugin/storage/gcs/GcsStorageOperator.java 0.00% 1 Missing ⚠️
...heduler/plugin/storage/obs/ObsStorageOperator.java 0.00% 1 Missing ⚠️
...heduler/plugin/storage/oss/OssStorageOperator.java 0.00% 1 Missing ⚠️
...scheduler/plugin/storage/s3/S3StorageOperator.java 0.00% 1 Missing ⚠️
...server/worker/utils/TaskExecutionContextUtils.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##                dev   #15556   +/-   ##
=========================================
  Coverage     38.40%   38.40%           
  Complexity     4750     4750           
=========================================
  Files          1305     1305           
  Lines         44841    44815   -26     
  Branches       4800     4800           
=========================================
- Hits          17221    17213    -8     
+ Misses        25750    25731   -19     
- Partials       1870     1871    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

} catch (Exception ex) {
throw new FileOperateException("Set directory: " + filePath + " to owner: " + fileOwner + " failed");

Files.createDirectory(path);

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
Copy link

sonarcloud bot commented Feb 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

28.1% Coverage on New Code (required ≥ 60%)

See analysis details on SonarCloud

@ruanwenjun ruanwenjun self-assigned this Feb 3, 2024
@zhongjiajie
Copy link
Member

but we have a secutity scan in this pr

@caishunfeng
Copy link
Contributor

Is it better to add some docs?

@ruanwenjun
Copy link
Member Author

but we have a secutity scan in this pr

It's OK, since the path is controlled by application, the path is not from user input.
image

@ruanwenjun ruanwenjun merged commit 4d15932 into apache:dev Feb 3, 2024
55 of 57 checks passed
@ruanwenjun ruanwenjun deleted the dev_wenjun_fixTaskGroupQueueWillNeverWakeup branch February 3, 2024 10:00
zhongjiajie pushed a commit that referenced this pull request Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants