@@ -19,7 +19,7 @@ public String uploadFile(URI filePathURI) {
19
19
UploadFileRequest .builder ()
20
20
.putObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
21
21
.addTransferListener (LoggingTransferListener .create ())
22
- .source (Paths .get (filePathURI )) // $ PathInjection
22
+ .source (Paths .get (filePathURI )) // $ hasTaintFlow
23
23
.build ();
24
24
25
25
FileUpload fileUpload = this .transferManager .uploadFile (uploadFileRequest );
@@ -33,18 +33,18 @@ public String uploadFileResumable(URI filePathURI) {
33
33
UploadFileRequest .builder ()
34
34
.putObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
35
35
.addTransferListener (LoggingTransferListener .create ())
36
- .source (Paths .get (filePathURI )) // $ PathInjection
36
+ .source (Paths .get (filePathURI )) // $ hasTaintFlow
37
37
.build ();
38
38
39
39
// Initiate the transfer
40
40
FileUpload upload = this .transferManager .uploadFile (uploadFileRequest );
41
41
// Pause the upload
42
42
ResumableFileUpload resumableFileUpload = upload .pause ();
43
43
// Optionally, persist the resumableFileUpload
44
- resumableFileUpload .serializeToFile (Paths .get (filePathURI )); // $ PathInjection
44
+ resumableFileUpload .serializeToFile (Paths .get (filePathURI )); // $ hasTaintFlow
45
45
// Retrieve the resumableFileUpload from the file
46
46
ResumableFileUpload persistedResumableFileUpload =
47
- ResumableFileUpload .fromFile (Paths .get (filePathURI )); // $ PathInjection
47
+ ResumableFileUpload .fromFile (Paths .get (filePathURI )); // $ hasTaintFlow
48
48
// Resume the upload
49
49
FileUpload resumedUpload = this .transferManager .resumeUploadFile (persistedResumableFileUpload );
50
50
// Wait for the transfer to complete
@@ -59,18 +59,18 @@ public String downloadFileResumable(URI downloadedFileWithPath) {
59
59
DownloadFileRequest .builder ()
60
60
.getObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
61
61
.addTransferListener (LoggingTransferListener .create ())
62
- .destination (Paths .get (downloadedFileWithPath )) // $ PathInjection
62
+ .destination (Paths .get (downloadedFileWithPath )) // $ hasTaintFlow
63
63
.build ();
64
64
65
65
// Initiate the transfer
66
66
FileDownload download = this .transferManager .downloadFile (downloadFileRequest );
67
67
// Pause the download
68
68
ResumableFileDownload resumableFileDownload = download .pause ();
69
69
// Optionally, persist the resumableFileDownload
70
- resumableFileDownload .serializeToFile (Paths .get (downloadedFileWithPath )); // $ PathInjection
70
+ resumableFileDownload .serializeToFile (Paths .get (downloadedFileWithPath )); // $ hasTaintFlow
71
71
// Retrieve the resumableFileDownload from the file
72
72
ResumableFileDownload persistedResumableFileDownload =
73
- ResumableFileDownload .fromFile (Paths .get (downloadedFileWithPath )); // $ PathInjection
73
+ ResumableFileDownload .fromFile (Paths .get (downloadedFileWithPath )); // $ hasTaintFlow
74
74
// Resume the download
75
75
FileDownload resumedDownload =
76
76
this .transferManager .resumeDownloadFile (persistedResumableFileDownload );
@@ -85,7 +85,7 @@ public Integer uploadDirectory(URI sourceDirectory) {
85
85
DirectoryUpload directoryUpload =
86
86
this .transferManager .uploadDirectory (
87
87
UploadDirectoryRequest .builder ()
88
- .source (Paths .get (sourceDirectory )) // $ PathInjection
88
+ .source (Paths .get (sourceDirectory )) // $ hasTaintFlow
89
89
.bucket (this .bucketName )
90
90
.build ());
91
91
@@ -98,7 +98,7 @@ public Long downloadFile(String downloadedFileWithPath) {
98
98
DownloadFileRequest .builder ()
99
99
.getObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
100
100
.addTransferListener (LoggingTransferListener .create ())
101
- .destination (Paths .get (downloadedFileWithPath )) // $ PathInjection
101
+ .destination (Paths .get (downloadedFileWithPath )) // $ hasTaintFlow
102
102
.build ();
103
103
104
104
FileDownload downloadFile = this .transferManager .downloadFile (downloadFileRequest );
@@ -111,7 +111,7 @@ public Integer downloadObjectsToDirectory(URI destinationPathURI) {
111
111
DirectoryDownload directoryDownload =
112
112
this .transferManager .downloadDirectory (
113
113
DownloadDirectoryRequest .builder ()
114
- .destination (Paths .get (destinationPathURI )) // $ PathInjection
114
+ .destination (Paths .get (destinationPathURI )) // $ hasTaintFlow
115
115
.bucket (this .bucketName )
116
116
.build ());
117
117
CompletedDirectoryDownload completedDirectoryDownload =
0 commit comments