@@ -19,7 +19,7 @@ public String uploadFile(URI filePathURI) {
1919 UploadFileRequest .builder ()
2020 .putObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
2121 .addTransferListener (LoggingTransferListener .create ())
22- .source (Paths .get (filePathURI )) // $ PathInjection
22+ .source (Paths .get (filePathURI )) // $ hasTaintFlow
2323 .build ();
2424
2525 FileUpload fileUpload = this .transferManager .uploadFile (uploadFileRequest );
@@ -33,18 +33,18 @@ public String uploadFileResumable(URI filePathURI) {
3333 UploadFileRequest .builder ()
3434 .putObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
3535 .addTransferListener (LoggingTransferListener .create ())
36- .source (Paths .get (filePathURI )) // $ PathInjection
36+ .source (Paths .get (filePathURI )) // $ hasTaintFlow
3737 .build ();
3838
3939 // Initiate the transfer
4040 FileUpload upload = this .transferManager .uploadFile (uploadFileRequest );
4141 // Pause the upload
4242 ResumableFileUpload resumableFileUpload = upload .pause ();
4343 // Optionally, persist the resumableFileUpload
44- resumableFileUpload .serializeToFile (Paths .get (filePathURI )); // $ PathInjection
44+ resumableFileUpload .serializeToFile (Paths .get (filePathURI )); // $ hasTaintFlow
4545 // Retrieve the resumableFileUpload from the file
4646 ResumableFileUpload persistedResumableFileUpload =
47- ResumableFileUpload .fromFile (Paths .get (filePathURI )); // $ PathInjection
47+ ResumableFileUpload .fromFile (Paths .get (filePathURI )); // $ hasTaintFlow
4848 // Resume the upload
4949 FileUpload resumedUpload = this .transferManager .resumeUploadFile (persistedResumableFileUpload );
5050 // Wait for the transfer to complete
@@ -59,18 +59,18 @@ public String downloadFileResumable(URI downloadedFileWithPath) {
5959 DownloadFileRequest .builder ()
6060 .getObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
6161 .addTransferListener (LoggingTransferListener .create ())
62- .destination (Paths .get (downloadedFileWithPath )) // $ PathInjection
62+ .destination (Paths .get (downloadedFileWithPath )) // $ hasTaintFlow
6363 .build ();
6464
6565 // Initiate the transfer
6666 FileDownload download = this .transferManager .downloadFile (downloadFileRequest );
6767 // Pause the download
6868 ResumableFileDownload resumableFileDownload = download .pause ();
6969 // Optionally, persist the resumableFileDownload
70- resumableFileDownload .serializeToFile (Paths .get (downloadedFileWithPath )); // $ PathInjection
70+ resumableFileDownload .serializeToFile (Paths .get (downloadedFileWithPath )); // $ hasTaintFlow
7171 // Retrieve the resumableFileDownload from the file
7272 ResumableFileDownload persistedResumableFileDownload =
73- ResumableFileDownload .fromFile (Paths .get (downloadedFileWithPath )); // $ PathInjection
73+ ResumableFileDownload .fromFile (Paths .get (downloadedFileWithPath )); // $ hasTaintFlow
7474 // Resume the download
7575 FileDownload resumedDownload =
7676 this .transferManager .resumeDownloadFile (persistedResumableFileDownload );
@@ -85,7 +85,7 @@ public Integer uploadDirectory(URI sourceDirectory) {
8585 DirectoryUpload directoryUpload =
8686 this .transferManager .uploadDirectory (
8787 UploadDirectoryRequest .builder ()
88- .source (Paths .get (sourceDirectory )) // $ PathInjection
88+ .source (Paths .get (sourceDirectory )) // $ hasTaintFlow
8989 .bucket (this .bucketName )
9090 .build ());
9191
@@ -98,7 +98,7 @@ public Long downloadFile(String downloadedFileWithPath) {
9898 DownloadFileRequest .builder ()
9999 .getObjectRequest (b -> b .bucket (this .bucketName ).key (this .key ))
100100 .addTransferListener (LoggingTransferListener .create ())
101- .destination (Paths .get (downloadedFileWithPath )) // $ PathInjection
101+ .destination (Paths .get (downloadedFileWithPath )) // $ hasTaintFlow
102102 .build ();
103103
104104 FileDownload downloadFile = this .transferManager .downloadFile (downloadFileRequest );
@@ -111,7 +111,7 @@ public Integer downloadObjectsToDirectory(URI destinationPathURI) {
111111 DirectoryDownload directoryDownload =
112112 this .transferManager .downloadDirectory (
113113 DownloadDirectoryRequest .builder ()
114- .destination (Paths .get (destinationPathURI )) // $ PathInjection
114+ .destination (Paths .get (destinationPathURI )) // $ hasTaintFlow
115115 .bucket (this .bucketName )
116116 .build ());
117117 CompletedDirectoryDownload completedDirectoryDownload =
0 commit comments