@@ -108,6 +108,9 @@ private static void setURLStreamHandlerFactory()
108108 IllegalAccessException {
109109
110110 Field factoryField = URL .class .getDeclaredField ("factory" );
111+ // HP Fortify "Access Control" false positive
112+ // The need to change the accessibility here is
113+ // necessary, has been review and judged to be safe
111114 factoryField .setAccessible (true );
112115
113116 URLStreamHandlerFactory urlStreamHandlerFactory = (URLStreamHandlerFactory ) factoryField .get (null );
@@ -118,6 +121,9 @@ private static void setURLStreamHandlerFactory()
118121 }
119122 else {
120123 Field lockField = URL .class .getDeclaredField ("streamHandlerLock" );
124+ // HP Fortify "Access Control" false positive
125+ // The need to change the accessibility here is
126+ // necessary, has been review and judged to be safe
121127 lockField .setAccessible (true );
122128 synchronized (lockField .get (null )) {
123129
@@ -150,6 +156,11 @@ protected void processInput(
150156 configFile ,
151157 null );
152158 }
159+
160+ if (configProperties == null ) {
161+ LOGGER .error ("Unable to load properties form " + configFile .getAbsolutePath ());
162+ return ;
163+ }
153164
154165 // If input path is S3
155166 if (inputPath .startsWith ("s3://" )) {
@@ -175,6 +186,9 @@ protected void processInput(
175186 s3EndpointUrl = "s3://" + s3EndpointUrl ;
176187 }
177188 FileSystem fs = FileSystems .newFileSystem (
189+ // HP Fortify "Path Traversal" false positive
190+ // What Fortify considers "user input" comes only
191+ // from users with OS-level access anyway
178192 new URI (
179193 s3EndpointUrl + "/" ),
180194 new HashMap <String , Object >(),
@@ -215,6 +229,9 @@ else if (inputPath.startsWith("hdfs://")) {
215229
216230 URI uri = new URI (
217231 hdfsFSUrl + hdfsInputPath );
232+ // HP Fortify "Path Traversal" false positive
233+ // What Fortify considers "user input" comes only
234+ // from users with OS-level access anyway
218235 path = Paths .get (uri );
219236 if (!Files .exists (path )) {
220237 LOGGER .error ("Input path " + inputPath + " does not exist" );
0 commit comments