---
id: 2
createUser: addon:analyzer
createTime: 2025-06-05T09:11:39.106471231Z
application:
  id: 2
  name: ""
effort: 89
commit: 67f9a56aefee3e65a35c466005206685627e2f5e

issues: 
- id: 2
  createTime: 2025-06-05T09:11:39.110048303Z
  analysis: 2
  ruleset: cloud-readiness
  rule: local-storage-00001
  name: ""
  description: File system - Java IO
  category: mandatory
  effort: 1
  incidents:
  - id: 2
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/javax/servlet/javax.servlet-api/3.1.0/javax/servlet/http/NoBodyResponse.java
    line: 893
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: ""
    facts:
      file: file:///cache/m2/javax/servlet/javax.servlet-api/3.1.0/javax/servlet/http/NoBodyResponse.java
      kind: Constructor
      name: getWriter
      package: ""
  - id: 3
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DailyRollingFileAppender.java
    line: 230
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "220    }\n221  \n222    public void activateOptions() {\n223      super.activateOptions();\n224
      \     if(datePattern != null && fileName != null) {\n225        now.setTime(System.currentTimeMillis());\n226
      \       sdf = new SimpleDateFormat(datePattern);\n227        int type = computeCheckPeriod();\n228
      \       printPeriodicity(type);\n229        rc.setType(type);\n230        File
      file = new File(fileName);\n231        scheduledFilename = fileName+sdf.format(new
      Date(file.lastModified()));\n232  \n233      } else {\n234        LogLog.error(\"Either
      File or DatePattern options are not set for appender [\"\n235  \t\t   +name+\"].\");\n236
      \     }\n237    }\n238  \n239    void printPeriodicity(int type) {\n240      switch(type)
      {"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DailyRollingFileAppender.java
      kind: Constructor
      name: activateOptions
      package: org.apache.log4j
  - id: 4
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DailyRollingFileAppender.java
    line: 322
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "312      // It is too early to roll over because we are still within
      the\n313      // bounds of the current interval. Rollover will occur once the\n314
      \     // next interval is reached.\n315      if (scheduledFilename.equals(datedFilename))
      {\n316        return;\n317      }\n318  \n319      // close current file, and
      rename it to datedFilename\n320      this.closeFile();\n321  \n322      File
      target  = new File(scheduledFilename);\n323      if (target.exists()) {\n324
      \       target.delete();\n325      }\n326  \n327      File file = new File(fileName);\n328
      \     boolean result = file.renameTo(target);\n329      if(result) {\n330        LogLog.debug(fileName
      +\" -> \"+ scheduledFilename);\n331      } else {\n332        LogLog.error(\"Failed
      to rename [\"+fileName+\"] to [\"+scheduledFilename+\"].\");"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DailyRollingFileAppender.java
      kind: Constructor
      name: rollOver
      package: org.apache.log4j
  - id: 5
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DailyRollingFileAppender.java
    line: 327
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "317      }\n318  \n319      // close current file, and rename it to
      datedFilename\n320      this.closeFile();\n321  \n322      File target  = new
      File(scheduledFilename);\n323      if (target.exists()) {\n324        target.delete();\n325
      \     }\n326  \n327      File file = new File(fileName);\n328      boolean result
      = file.renameTo(target);\n329      if(result) {\n330        LogLog.debug(fileName
      +\" -> \"+ scheduledFilename);\n331      } else {\n332        LogLog.error(\"Failed
      to rename [\"+fileName+\"] to [\"+scheduledFilename+\"].\");\n333      }\n334
      \ \n335      try {\n336        // This will also close the file. This is OK
      since multiple\n337        // close operations are safe."
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DailyRollingFileAppender.java
      kind: Constructor
      name: rollOver
      package: org.apache.log4j
  - id: 6
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DefaultThrowableRenderer.java
    line: 58
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "48          return render(throwable);\n49      }\n50  \n51      /**\n52
      \      * Render throwable using Throwable.printStackTrace.\n53       * @param
      throwable throwable, may not be null.\n54       * @return string representation.\n55
      \      */\n56      public static String[] render(final Throwable throwable)
      {\n57          StringWriter sw = new StringWriter();\n58          PrintWriter
      pw = new PrintWriter(sw);\n59          try {\n60              throwable.printStackTrace(pw);\n61
      \         } catch(RuntimeException ex) {\n62          }\n63          pw.flush();\n64
      \         LineNumberReader reader = new LineNumberReader(\n65                  new
      StringReader(sw.toString()));\n66          ArrayList lines = new ArrayList();\n67
      \         try {\n68            String line = reader.readLine();"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/DefaultThrowableRenderer.java
      kind: Constructor
      name: render
      package: org.apache.log4j
  - id: 7
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
    line: 294
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "284      if(bufferedIO) {\n285        setImmediateFlush(false);\n286
      \     }\n287  \n288      reset();\n289      FileOutputStream ostream = null;\n290
      \     try {\n291            //\n292            //   attempt to create file\n293
      \           //\n294            ostream = new FileOutputStream(fileName, append);\n295
      \     } catch(FileNotFoundException ex) {\n296            //\n297            //
      \  if parent directory does not exist then\n298            //      attempt to
      create it and try to create file\n299            //      see bug 9150\n300            //\n301
      \           String parentName = new File(fileName).getParent();\n302            if
      (parentName != null) {\n303               File parentDir = new File(parentName);\n304
      \              if(!parentDir.exists() && parentDir.mkdirs()) {"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
      kind: Constructor
      name: setFile
      package: org.apache.log4j
  - id: 8
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
    line: 301
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: |-
      291            //
      292            //   attempt to create file
      293            //
      294            ostream = new FileOutputStream(fileName, append);
      295      } catch(FileNotFoundException ex) {
      296            //
      297            //   if parent directory does not exist then
      298            //      attempt to create it and try to create file
      299            //      see bug 9150
      300            //
      301            String parentName = new File(fileName).getParent();
      302            if (parentName != null) {
      303               File parentDir = new File(parentName);
      304               if(!parentDir.exists() && parentDir.mkdirs()) {
      305                  ostream = new FileOutputStream(fileName, append);
      306               } else {
      307                  throw ex;
      308               }
      309            } else {
      310               throw ex;
      311            }
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
      kind: Constructor
      name: setFile
      package: org.apache.log4j
  - id: 9
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
    line: 303
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: |-
      293            //
      294            ostream = new FileOutputStream(fileName, append);
      295      } catch(FileNotFoundException ex) {
      296            //
      297            //   if parent directory does not exist then
      298            //      attempt to create it and try to create file
      299            //      see bug 9150
      300            //
      301            String parentName = new File(fileName).getParent();
      302            if (parentName != null) {
      303               File parentDir = new File(parentName);
      304               if(!parentDir.exists() && parentDir.mkdirs()) {
      305                  ostream = new FileOutputStream(fileName, append);
      306               } else {
      307                  throw ex;
      308               }
      309            } else {
      310               throw ex;
      311            }
      312      }
      313      Writer fw = createWriter(ostream);
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
      kind: Constructor
      name: setFile
      package: org.apache.log4j
  - id: 10
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
    line: 305
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: |-
      295      } catch(FileNotFoundException ex) {
      296            //
      297            //   if parent directory does not exist then
      298            //      attempt to create it and try to create file
      299            //      see bug 9150
      300            //
      301            String parentName = new File(fileName).getParent();
      302            if (parentName != null) {
      303               File parentDir = new File(parentName);
      304               if(!parentDir.exists() && parentDir.mkdirs()) {
      305                  ostream = new FileOutputStream(fileName, append);
      306               } else {
      307                  throw ex;
      308               }
      309            } else {
      310               throw ex;
      311            }
      312      }
      313      Writer fw = createWriter(ostream);
      314      if(bufferedIO) {
      315        fw = new BufferedWriter(fw, bufferSize);
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/FileAppender.java
      kind: Constructor
      name: setFile
      package: org.apache.log4j
  - id: 11
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/LogManager.java
    line: 188
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "178       * This method tests if called from a method that\n179       *
      is known to result in class members being abnormally\n180       * set to null
      but is assumed to be harmless since the\n181       * all classes are in the
      process of being unloaded.\n182       *\n183       * @param ex exception used
      to determine calling stack.\n184       * @return true if calling stack is recognized
      as likely safe.\n185       */\n186    private static boolean isLikelySafeScenario(final
      Exception ex) {\n187        StringWriter stringWriter = new StringWriter();\n188
      \       ex.printStackTrace(new PrintWriter(stringWriter));\n189        String
      msg = stringWriter.toString();\n190        return msg.indexOf(\"org.apache.catalina.loader.WebappClassLoader.stop\")
      != -1;\n191    }\n192  \n193    static\n194    public\n195    LoggerRepository
      getLoggerRepository() {\n196      if (repositorySelector == null) {\n197          repositorySelector
      = new DefaultRepositorySelector(new NOPLoggerRepository());\n198          guard
      = null;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/LogManager.java
      kind: Constructor
      name: isLikelySafeScenario
      package: org.apache.log4j
  - id: 12
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/PropertyConfigurator.java
    line: 372
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "362     <p>\n363     @param configFileName The name of the configuration
      file where the\n364     configuration information is stored.\n365  \n366    */\n367
      \   public\n368    void doConfigure(String configFileName, LoggerRepository
      hierarchy) {\n369      Properties props = new Properties();\n370      FileInputStream
      istream = null;\n371      try {\n372        istream = new FileInputStream(configFileName);\n373
      \       props.load(istream);\n374        istream.close();\n375      }\n376      catch
      (Exception e) {\n377        if (e instanceof InterruptedIOException || e instanceof
      InterruptedException) {\n378            Thread.currentThread().interrupt();\n379
      \       }\n380        LogLog.error(\"Could not read configuration file [\"+configFileName+\"].\",
      e);\n381        LogLog.error(\"Ignoring configuration file [\" + configFileName+\"].\");\n382
      \       return;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/PropertyConfigurator.java
      kind: Constructor
      name: doConfigure
      package: org.apache.log4j
  - id: 13
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
    line: 144
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "134          //   if operation fails, do not roll again until\n135
      \         //      maxFileSize more bytes are written\n136          nextRollover
      = size + maxFileSize;\n137      }\n138      LogLog.debug(\"maxBackupIndex=\"+maxBackupIndex);\n139
      \ \n140      boolean renameSucceeded = true;\n141      // If maxBackups <= 0,
      then there is no file renaming to be done.\n142      if(maxBackupIndex > 0)
      {\n143        // Delete the oldest file, to keep Windows happy.\n144        file
      = new File(fileName + '.' + maxBackupIndex);\n145        if (file.exists())\n146
      \        renameSucceeded = file.delete();\n147  \n148        // Map {(maxBackupIndex
      - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}\n149        for (int i = maxBackupIndex
      - 1; i >= 1 && renameSucceeded; i--) {\n150  \tfile = new File(fileName + \".\"
      + i);\n151  \tif (file.exists()) {\n152  \t  target = new File(fileName + '.'
      + (i + 1));\n153  \t  LogLog.debug(\"Renaming file \" + file + \" to \" + target);\n154
      \ \t  renameSucceeded = file.renameTo(target);"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
      kind: Constructor
      name: rollOver
      package: org.apache.log4j
  - id: 14
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
    line: 150
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "140      boolean renameSucceeded = true;\n141      // If maxBackups
      <= 0, then there is no file renaming to be done.\n142      if(maxBackupIndex
      > 0) {\n143        // Delete the oldest file, to keep Windows happy.\n144        file
      = new File(fileName + '.' + maxBackupIndex);\n145        if (file.exists())\n146
      \        renameSucceeded = file.delete();\n147  \n148        // Map {(maxBackupIndex
      - 1), ..., 2, 1} to {maxBackupIndex, ..., 3, 2}\n149        for (int i = maxBackupIndex
      - 1; i >= 1 && renameSucceeded; i--) {\n150  \tfile = new File(fileName + \".\"
      + i);\n151  \tif (file.exists()) {\n152  \t  target = new File(fileName + '.'
      + (i + 1));\n153  \t  LogLog.debug(\"Renaming file \" + file + \" to \" + target);\n154
      \ \t  renameSucceeded = file.renameTo(target);\n155  \t}\n156        }\n157
      \ \n158      if(renameSucceeded) {\n159        // Rename fileName to fileName.1\n160
      \       target = new File(fileName + \".\" + 1);"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
      kind: Constructor
      name: rollOver
      package: org.apache.log4j
  - id: 15
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
    line: 152
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "142      if(maxBackupIndex > 0) {\n143        // Delete the oldest
      file, to keep Windows happy.\n144        file = new File(fileName + '.' + maxBackupIndex);\n145
      \       if (file.exists())\n146         renameSucceeded = file.delete();\n147
      \ \n148        // Map {(maxBackupIndex - 1), ..., 2, 1} to {maxBackupIndex,
      ..., 3, 2}\n149        for (int i = maxBackupIndex - 1; i >= 1 && renameSucceeded;
      i--) {\n150  \tfile = new File(fileName + \".\" + i);\n151  \tif (file.exists())
      {\n152  \t  target = new File(fileName + '.' + (i + 1));\n153  \t  LogLog.debug(\"Renaming
      file \" + file + \" to \" + target);\n154  \t  renameSucceeded = file.renameTo(target);\n155
      \ \t}\n156        }\n157  \n158      if(renameSucceeded) {\n159        // Rename
      fileName to fileName.1\n160        target = new File(fileName + \".\" + 1);\n161
      \ \n162        this.closeFile(); // keep windows happy."
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
      kind: Constructor
      name: rollOver
      package: org.apache.log4j
  - id: 16
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
    line: 160
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "150  \tfile = new File(fileName + \".\" + i);\n151  \tif (file.exists())
      {\n152  \t  target = new File(fileName + '.' + (i + 1));\n153  \t  LogLog.debug(\"Renaming
      file \" + file + \" to \" + target);\n154  \t  renameSucceeded = file.renameTo(target);\n155
      \ \t}\n156        }\n157  \n158      if(renameSucceeded) {\n159        // Rename
      fileName to fileName.1\n160        target = new File(fileName + \".\" + 1);\n161
      \ \n162        this.closeFile(); // keep windows happy.\n163  \n164        file
      = new File(fileName);\n165        LogLog.debug(\"Renaming file \" + file + \"
      to \" + target);\n166        renameSucceeded = file.renameTo(target);\n167        //\n168
      \       //   if file rename failed, reopen file with append = true\n169        //\n170
      \       if (!renameSucceeded) {"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
      kind: Constructor
      name: rollOver
      package: org.apache.log4j
  - id: 17
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
    line: 164
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "154  \t  renameSucceeded = file.renameTo(target);\n155  \t}\n156        }\n157
      \ \n158      if(renameSucceeded) {\n159        // Rename fileName to fileName.1\n160
      \       target = new File(fileName + \".\" + 1);\n161  \n162        this.closeFile();
      // keep windows happy.\n163  \n164        file = new File(fileName);\n165        LogLog.debug(\"Renaming
      file \" + file + \" to \" + target);\n166        renameSucceeded = file.renameTo(target);\n167
      \       //\n168        //   if file rename failed, reopen file with append =
      true\n169        //\n170        if (!renameSucceeded) {\n171            try
      {\n172              this.setFile(fileName, true, bufferedIO, bufferSize);\n173
      \           }\n174            catch(IOException e) {"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
      kind: Constructor
      name: rollOver
      package: org.apache.log4j
  - id: 18
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
    line: 209
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "199      }\n200      }\n201    }\n202  \n203    public\n204    synchronized\n205
      \   void setFile(String fileName, boolean append, boolean bufferedIO, int bufferSize)\n206
      \                                                                  throws IOException
      {\n207      super.setFile(fileName, append, this.bufferedIO, this.bufferSize);\n208
      \     if(append) {\n209        File f = new File(fileName);\n210        ((CountingQuietWriter)
      qw).setCount(f.length());\n211      }\n212    }\n213  \n214  \n215    /**\n216
      \      Set the maximum number of backup files to keep around.\n217  \n218       <p>The
      <b>MaxBackupIndex</b> option determines how many backup\n219       files are
      kept before the oldest is erased. This option takes"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/RollingFileAppender.java
      kind: Constructor
      name: setFile
      package: org.apache.log4j
  - id: 19
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/config/PropertyPrinter.java
    line: 166
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "156          StringBuffer newname = new StringBuffer(name);\n157          newname.setCharAt(0,
      Character.toUpperCase(name.charAt(0)));\n158          return newname.toString();\n159
      \       }\n160      }\n161      return name;\n162    }\n163    \n164    // for
      testing\n165    public static void main(String[] args) {\n166      new PropertyPrinter(new
      PrintWriter(System.out));\n167    }\n168  }\n"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/config/PropertyPrinter.java
      kind: Constructor
      name: main
      package: org.apache.log4j.config
  - id: 20
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/helpers/FileWatchdog.java
    line: 56
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "46    \n47    File file;\n48    long lastModif = 0; \n49    boolean
      warnedAlready = false;\n50    boolean interrupted = false;\n51  \n52    protected\n53
      \   FileWatchdog(String filename) {\n54      super(\"FileWatchdog\");\n55      this.filename
      = filename;\n56      file = new File(filename);\n57      setDaemon(true);\n58
      \     checkAndConfigure();\n59    }\n60  \n61    /**\n62       Set the delay
      to observe between each check of the file changes.\n63     */\n64    public\n65
      \   void setDelay(long delay) {\n66      this.delay = delay;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/helpers/FileWatchdog.java
      kind: Constructor
      name: FileWatchdog
      package: org.apache.log4j.helpers
  - id: 21
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/LogRecord.java
    line: 309
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: |-
      299     * @param thrown A Throwable to associate with this LogRecord.
      300     * @see #getThrown()
      301     * @see #getThrownStackTrace()
      302     */
      303    public void setThrown(Throwable thrown) {
      304      if (thrown == null) {
      305        return;
      306      }
      307      _thrown = thrown;
      308      StringWriter sw = new StringWriter();
      309      PrintWriter out = new PrintWriter(sw);
      310      thrown.printStackTrace(out);
      311      out.flush();
      312      _thrownStackTrace = sw.toString();
      313      try {
      314        out.close();
      315        sw.close();
      316      } catch (IOException e) {
      317        // Do nothing, this should not happen as it is StringWriter.
      318      }
      319      out = null;
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/LogRecord.java
      kind: Constructor
      name: setThrown
      package: org.apache.log4j.lf5
  - id: 22
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/util/LogFileParser.java
    line: 79
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "69    private static SimpleDateFormat _sdf = new SimpleDateFormat(\"dd
      MMM yyyy HH:mm:ss,S\");\n70    private LogBrokerMonitor _monitor;\n71    LogFactor5LoadingDialog
      _loadDialog;\n72    private InputStream _in = null;\n73  \n74    //--------------------------------------------------------------------------\n75
      \   //   Constructors:\n76    //--------------------------------------------------------------------------\n77
      \   public LogFileParser(File file) throws IOException,\n78        FileNotFoundException
      {\n79      this(new FileInputStream(file));\n80    }\n81  \n82    public LogFileParser(InputStream
      stream) throws IOException {\n83      _in = stream;\n84    }\n85    //--------------------------------------------------------------------------\n86
      \   //   Public Methods:\n87    //--------------------------------------------------------------------------\n88
      \ \n89    /**"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/util/LogFileParser.java
      kind: Constructor
      name: LogFileParser
      package: org.apache.log4j.lf5.util
  - id: 23
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java
    line: 143
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "133        }\n134        sb.append(n.getTitle());\n135      }\n136
      \     return sb.toString();\n137    }\n138  \n139    //--------------------------------------------------------------------------\n140
      \   //   Protected Methods:\n141    //--------------------------------------------------------------------------\n142
      \   protected void load() {\n143      File file = new File(getFilename());\n144
      \     if (file.exists()) {\n145        try {\n146          DocumentBuilderFactory
      docBuilderFactory = DocumentBuilderFactory.\n147              newInstance();\n148
      \         DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();\n149
      \         Document doc = docBuilder.parse(file);\n150          processRecordFilter(doc);\n151
      \         processCategories(doc);\n152          processLogLevels(doc);\n153
      \         processLogLevelColors(doc);"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java
      kind: Constructor
      name: load
      package: org.apache.log4j.lf5.viewer.configure
  - id: 24
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java
    line: 321
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "311      CategoryNode n = null;\n312      while (all.hasMoreElements())
      {\n313        n = (CategoryNode) all.nextElement();\n314        n.setSelected(true);\n315
      \     }\n316    }\n317  \n318    protected void store(String s) {\n319  \n320
      \     try {\n321        PrintWriter writer = new PrintWriter(new FileWriter(getFilename()));\n322
      \       writer.print(s);\n323        writer.close();\n324      } catch (IOException
      e) {\n325        // do something with this error.\n326        e.printStackTrace();\n327
      \     }\n328  \n329    }\n330  \n331    protected void deleteConfigurationFile()
      {"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java
      kind: Constructor
      name: store
      package: org.apache.log4j.lf5.viewer.configure
  - id: 25
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java
    line: 333
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "323        writer.close();\n324      } catch (IOException e) {\n325
      \       // do something with this error.\n326        e.printStackTrace();\n327
      \     }\n328  \n329    }\n330  \n331    protected void deleteConfigurationFile()
      {\n332      try {\n333        File f = new File(getFilename());\n334        if
      (f.exists()) {\n335          f.delete();\n336        }\n337      } catch (SecurityException
      e) {\n338        System.err.println(\"Cannot delete \" + getFilename() +\n339
      \           \" because a security violation occured.\");\n340      }\n341    }\n342
      \ \n343    protected String getFilename() {"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/ConfigurationManager.java
      kind: Constructor
      name: deleteConfigurationFile
      package: org.apache.log4j.lf5.viewer.configure
  - id: 26
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
    line: 185
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "175  \n176    /**\n177     * Creates the directory where the MRU file
      list will be written.\n178     * The \"lf5\" directory is created in the Documents
      and Settings\n179     * directory on Windows 2000 machines and where ever the
      user.home\n180     * variable points on all other platforms.\n181     */\n182
      \   public static void createConfigurationDirectory() {\n183      String home
      = System.getProperty(\"user.home\");\n184      String sep = System.getProperty(\"file.separator\");\n185
      \     File f = new File(home + sep + \"lf5\");\n186      if (!f.exists()) {\n187
      \       try {\n188          f.mkdir();\n189        } catch (SecurityException
      e) {\n190          e.printStackTrace();\n191        }\n192      }\n193  \n194
      \   }\n195    //--------------------------------------------------------------------------"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
      kind: Constructor
      name: createConfigurationDirectory
      package: org.apache.log4j.lf5.viewer.configure
  - id: 27
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
    line: 207
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "197    //--------------------------------------------------------------------------\n198
      \   /**\n199     * Gets an input stream for the corresponding file.\n200     *\n201
      \    * @param file The file to create the input stream from.\n202     * @return
      InputStream\n203     */\n204    protected InputStream getInputStream(File file)
      throws IOException,\n205        FileNotFoundException {\n206      BufferedInputStream
      reader =\n207          new BufferedInputStream(new FileInputStream(file));\n208
      \ \n209      return reader;\n210    }\n211  \n212    /**\n213     * Gets an
      input stream for the corresponding URL.\n214     *\n215     * @param url The
      url to create the input stream from.\n216     * @return InputStream\n217     */"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
      kind: Constructor
      name: getInputStream
      package: org.apache.log4j.lf5.viewer.configure
  - id: 28
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
    line: 242
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "232        moveToTop(index);\n233      }\n234    }\n235  \n236    /**\n237
      \    * Loads the MRU file list in from a file and stores it in a LinkedList.\n238
      \    * If no file exists, a new LinkedList is created.\n239     */\n240    protected
      void load() {\n241      createConfigurationDirectory();\n242      File file
      = new File(getFilename());\n243      if (file.exists()) {\n244        try {\n245
      \         ObjectInputStream ois = new ObjectInputStream(\n246              new
      FileInputStream(file));\n247          _mruFileList = (LinkedList) ois.readObject();\n248
      \         ois.close();\n249  \n250          // check that only files and url
      are in linked list\n251          Iterator it = _mruFileList.iterator();\n252
      \         while (it.hasNext()) {"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
      kind: Constructor
      name: load
      package: org.apache.log4j.lf5.viewer.configure
  - id: 29
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
    line: 246
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "236    /**\n237     * Loads the MRU file list in from a file and stores
      it in a LinkedList.\n238     * If no file exists, a new LinkedList is created.\n239
      \    */\n240    protected void load() {\n241      createConfigurationDirectory();\n242
      \     File file = new File(getFilename());\n243      if (file.exists()) {\n244
      \       try {\n245          ObjectInputStream ois = new ObjectInputStream(\n246
      \             new FileInputStream(file));\n247          _mruFileList = (LinkedList)
      ois.readObject();\n248          ois.close();\n249  \n250          // check that
      only files and url are in linked list\n251          Iterator it = _mruFileList.iterator();\n252
      \         while (it.hasNext()) {\n253            Object o = it.next();\n254
      \           if (!(o instanceof File) && !(o instanceof URL)) {\n255              it.remove();\n256
      \           }"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
      kind: Constructor
      name: load
      package: org.apache.log4j.lf5.viewer.configure
  - id: 30
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
    line: 80
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "70      setMaxSize(maxSize);\n71    }\n72    //--------------------------------------------------------------------------\n73
      \   //   Public Methods:\n74    //--------------------------------------------------------------------------\n75
      \ \n76    /**\n77     * Saves a list of MRU files out to a file.\n78     */\n79
      \   public void save() {\n80      File file = new File(getFilename());\n81  \n82
      \     try {\n83        ObjectOutputStream oos = new ObjectOutputStream(new\n84
      \           FileOutputStream(file));\n85        oos.writeObject(_mruFileList);\n86
      \       oos.flush();\n87        oos.close();\n88      } catch (Exception e)
      {\n89        // do nothing\n90        e.printStackTrace();"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
      kind: Constructor
      name: save
      package: org.apache.log4j.lf5.viewer.configure
  - id: 31
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
    line: 83
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "73    //   Public Methods:\n74    //--------------------------------------------------------------------------\n75
      \ \n76    /**\n77     * Saves a list of MRU files out to a file.\n78     */\n79
      \   public void save() {\n80      File file = new File(getFilename());\n81  \n82
      \     try {\n83        ObjectOutputStream oos = new ObjectOutputStream(new\n84
      \           FileOutputStream(file));\n85        oos.writeObject(_mruFileList);\n86
      \       oos.flush();\n87        oos.close();\n88      } catch (Exception e)
      {\n89        // do nothing\n90        e.printStackTrace();\n91      }\n92    }\n93
      \ \n94    /**"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/configure/MRUFileManager.java
      kind: Constructor
      name: save
      package: org.apache.log4j.lf5.viewer.configure
  - id: 32
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SocketServer.java
    line: 154
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "144      try {\n145        port = Integer.parseInt(portStr);\n146      }\n147
      \     catch(java.lang.NumberFormatException e) {\n148        e.printStackTrace();\n149
      \       usage(\"Could not interpret port number [\"+ portStr +\"].\");\n150
      \     }\n151  \n152      PropertyConfigurator.configure(configFile);\n153  \n154
      \     File dir = new File(dirStr);\n155      if(!dir.isDirectory()) {\n156        usage(\"[\"+dirStr+\"]
      is not a directory.\");\n157      }\n158      server = new SocketServer(dir);\n159
      \   }\n160  \n161  \n162    public\n163    SocketServer(File directory) {\n164
      \     this.dir = directory;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SocketServer.java
      kind: Constructor
      name: init
      package: org.apache.log4j.net
  - id: 33
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SocketServer.java
    line: 183
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "173      // the format hostname/d1.d2.d3.d4 e.g. torino/192.168.1.1\n174
      \     String s = inetAddress.toString();\n175      int i = s.indexOf(\"/\");\n176
      \     if(i == -1) {\n177        cat.warn(\"Could not parse the inetAddress [\"+inetAddress+\n178
      \ \t       \"]. Using default hierarchy.\");\n179        return genericHierarchy();\n180
      \     } else {\n181        String key = s.substring(0, i);\n182  \n183        File
      configFile = new File(dir, key+CONFIG_FILE_EXT);\n184        if(configFile.exists())
      {\n185  \tHierarchy h = new Hierarchy(new RootLogger(Level.DEBUG));\n186  \thierarchyMap.put(inetAddress,
      h);\n187  \n188  \tnew PropertyConfigurator().doConfigure(configFile.getAbsolutePath(),
      h);\n189  \n190  \treturn h;\n191        } else {\n192  \tcat.warn(\"Could not
      find config file [\"+configFile+\"].\");\n193  \treturn genericHierarchy();"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SocketServer.java
      kind: Constructor
      name: configureHierarchy
      package: org.apache.log4j.net
  - id: 34
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SocketServer.java
    line: 200
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "190  \treturn h;\n191        } else {\n192  \tcat.warn(\"Could not
      find config file [\"+configFile+\"].\");\n193  \treturn genericHierarchy();\n194
      \       }\n195      }\n196    }\n197  \n198    LoggerRepository  genericHierarchy()
      {\n199      if(genericHierarchy == null) {\n200        File f = new File(dir,
      GENERIC+CONFIG_FILE_EXT);\n201        if(f.exists()) {\n202  \tgenericHierarchy
      = new Hierarchy(new RootLogger(Level.DEBUG));\n203  \tnew PropertyConfigurator().doConfigure(f.getAbsolutePath(),
      genericHierarchy);\n204        } else {\n205  \tcat.warn(\"Could not find config
      file [\"+f+\n206  \t\t \"]. Will use the default hierarchy.\");\n207  \tgenericHierarchy
      = LogManager.getLoggerRepository();\n208        }\n209      }\n210      return
      genericHierarchy;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SocketServer.java
      kind: Constructor
      name: genericHierarchy
      package: org.apache.log4j.net
  - id: 35
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/TelnetAppender.java
    line: 197
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "187      }\n188  \n189      /** \n190  \tContinually accepts client
      connections.  Client connections\n191          are refused when MAX_CONNECTIONS
      is reached. \n192      */\n193      public void run() {\n194        while(!serverSocket.isClosed())
      {\n195          try {\n196            Socket newClient = serverSocket.accept();\n197
      \           PrintWriter pw = new PrintWriter(newClient.getOutputStream());\n198
      \           if(connections.size() < MAX_CONNECTIONS) {\n199              synchronized(this)
      {\n200                  connections.addElement(newClient);\n201                  writers.addElement(pw);\n202
      \                 pw.print(\"TelnetAppender v1.0 (\" + connections.size()\n203
      \ \t\t            + \" active connections)\\r\\n\\r\\n\");\n204                  pw.flush();\n205
      \             }\n206            } else {\n207              pw.print(\"Too many
      connections.\\r\\n\");"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/TelnetAppender.java
      kind: Constructor
      name: run
      package: org.apache.log4j.net
  - id: 36
    createTime: 2025-06-05T09:11:39.113008294Z
    issue: 2
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/xml/DOMConfigurator.java
    line: 749
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "739    \n740    private interface ParseAction {\n741        Document
      parse(final DocumentBuilder parser) throws SAXException, IOException;\n742    }\n743
      \ \n744  \n745    public\n746    void doConfigure(final String filename, LoggerRepository
      repository) {\n747      ParseAction action = new ParseAction() {\n748            public
      Document parse(final DocumentBuilder parser) throws SAXException, IOException
      {\n749                return parser.parse(new File(filename));\n750            }\n751
      \           public String toString() { \n752                return \"file [\"
      + filename + \"]\"; \n753            }\n754      };\n755      doConfigure(action,
      repository);\n756    }\n757    \n758  \n759    public"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/xml/DOMConfigurator.java
      kind: Constructor
      name: parse
      package: org.apache.log4j.xml
  links:
  - url: https://docs.openshift.com/container-platform/4.5/builds/creating-build-inputs.html#builds-input-secrets-configmaps_creating-build-inputs
    title: 'OpenShift Container Platform: Input secrets and ConfigMaps'
  - url: https://docs.openshift.com/container-platform/4.5/logging/cluster-logging.html
    title: 'OpenShift Container Platform: Understanding cluster logging'
  - url: https://docs.openshift.com/container-platform/4.5/storage/understanding-persistent-storage.html
    title: 'OpenShift Container Platform: Understanding persistent storage'
  - url: https://12factor.net/backing-services
    title: 'Twelve-Factor App: Backing services'
  - url: https://12factor.net/config
    title: 'Twelve-Factor App: Config'
  - url: https://12factor.net/logs
    title: 'Twelve-Factor App: Logs'
  labels:
  - konveyor.io/source
  - konveyor.io/target=cloud-readiness
  - storage
- id: 3
  createTime: 2025-06-05T09:11:39.114236832Z
  analysis: 2
  ruleset: cloud-readiness
  rule: local-storage-00002
  name: ""
  description: File system - java.net.URL/URI
  category: mandatory
  effort: 1
  incidents:
  - id: 37
    createTime: 2025-06-05T09:11:39.114642315Z
    issue: 3
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/helpers/SyslogWriter.java
    line: 74
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "64      \n65      String host = syslogHost;\n66      int urlPort =
      -1;\n67      \n68      //\n69      //  If not an unbracketed IPv6 address then\n70
      \     //      parse as a URL\n71      //\n72      if (host.indexOf(\"[\") !=
      -1 || host.indexOf(':') == host.lastIndexOf(':')) {\n73          try {\n74              URL
      url = new URL(\"http://\" + host);\n75              if (url.getHost() != null)
      {\n76                  host = url.getHost();\n77                  //   if host
      is a IPv6 literal, strip off the brackets\n78                  if(host.startsWith(\"[\")
      && host.charAt(host.length() - 1) == ']') {\n79                      host =
      host.substring(1, host.length() - 1);\n80                  }\n81                  urlPort
      = url.getPort();\n82              }\n83          } catch(MalformedURLException
      e) {\n84        \t\tLogLog.error(\"Malformed URL: will attempt to interpret
      as InetAddress.\", e);"
    facts:
      class: ""
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/helpers/SyslogWriter.java
      kind: Constructor
      name: SyslogWriter
      package: org.apache.log4j.helpers
  - id: 38
    createTime: 2025-06-05T09:11:39.114642315Z
    issue: 3
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/LogBrokerMonitor.java
    line: 1453
    message: |-
      An application running inside a container could lose access to a file in local storage.

       Recommendations

       The following recommendations depend on the function of the file in local storage:

       * Logging: Log to standard output and use a centralized log collector to analyze the logs.
       * Caching: Use a cache backing service.
       * Configuration: Store configuration settings in environment variables so that they can be updated without code changes.
       * Data storage: Use a database backing service for relational data or use a persistent data storage system.
       * Temporary data storage: Use the file system of a running container as a brief, single-transaction cache.
    codeSnip: "1443      LogFactor5InputDialog inputDialog = new LogFactor5InputDialog(\n1444
      \         getBaseFrame(), \"Open URL\", \"URL:\");\n1445      String temp =
      inputDialog.getText();\n1446  \n1447      if (temp != null) {\n1448        if
      (temp.indexOf(\"://\") == -1) {\n1449          temp = \"http://\" + temp;\n1450
      \       }\n1451  \n1452        try {\n1453          URL url = new URL(temp);\n1454
      \         if (loadLogFile(url)) {\n1455            _mruFileManager.set(url);\n1456
      \           updateMRUList();\n1457          }\n1458        } catch (MalformedURLException
      e) {\n1459          LogFactor5ErrorDialog error = new LogFactor5ErrorDialog(\n1460
      \             getBaseFrame(), \"Error reading URL.\");\n1461        }\n1462
      \     }\n1463    }"
    facts:
      class: ""
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/lf5/viewer/LogBrokerMonitor.java
      kind: Constructor
      name: requestOpenURL
      package: org.apache.log4j.lf5.viewer
  links:
  - url: https://docs.openshift.com/container-platform/4.5/builds/creating-build-inputs.html#builds-input-secrets-configmaps_creating-build-inputs
    title: 'OpenShift Container Platform: Input secrets and ConfigMaps'
  - url: https://docs.openshift.com/container-platform/4.5/logging/cluster-logging.html
    title: 'OpenShift Container Platform: Understanding cluster logging'
  - url: https://docs.openshift.com/container-platform/4.5/storage/understanding-persistent-storage.html
    title: 'OpenShift Container Platform: Understanding persistent storage'
  - url: https://12factor.net/backing-services
    title: 'Twelve-Factor App: Backing services'
  - url: https://12factor.net/config
    title: 'Twelve-Factor App: Config'
  - url: https://12factor.net/logs
    title: 'Twelve-Factor App: Logs'
  labels:
  - konveyor.io/source
  - konveyor.io/target=cloud-readiness
  - storage
- id: 4
  createTime: 2025-06-05T09:11:39.115755857Z
  analysis: 2
  ruleset: cloud-readiness
  rule: mail-00000
  name: ""
  description: Java Mail API
  category: optional
  effort: 3
  incidents:
  - id: 39
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 33
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "23  import org.apache.log4j.helpers.CyclicBuffer;\n24  import org.apache.log4j.helpers.LogLog;\n25
      \ import org.apache.log4j.helpers.OptionConverter;\n26  import org.apache.log4j.spi.ErrorCode;\n27
      \ import org.apache.log4j.spi.LoggingEvent;\n28  import org.apache.log4j.spi.OptionHandler;\n29
      \ import org.apache.log4j.spi.TriggeringEventEvaluator;\n30  import org.apache.log4j.xml.UnrecognizedElementHandler;\n31
      \ import org.w3c.dom.Element;\n32  \n33  import javax.mail.Authenticator;\n34
      \ import javax.mail.Message;\n35  import javax.mail.MessagingException;\n36
      \ import javax.mail.Multipart;\n37  import javax.mail.PasswordAuthentication;\n38
      \ import javax.mail.Session;\n39  import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 40
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 34
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "24  import org.apache.log4j.helpers.LogLog;\n25  import org.apache.log4j.helpers.OptionConverter;\n26
      \ import org.apache.log4j.spi.ErrorCode;\n27  import org.apache.log4j.spi.LoggingEvent;\n28
      \ import org.apache.log4j.spi.OptionHandler;\n29  import org.apache.log4j.spi.TriggeringEventEvaluator;\n30
      \ import org.apache.log4j.xml.UnrecognizedElementHandler;\n31  import org.w3c.dom.Element;\n32
      \ \n33  import javax.mail.Authenticator;\n34  import javax.mail.Message;\n35
      \ import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 41
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 35
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "25  import org.apache.log4j.helpers.OptionConverter;\n26  import org.apache.log4j.spi.ErrorCode;\n27
      \ import org.apache.log4j.spi.LoggingEvent;\n28  import org.apache.log4j.spi.OptionHandler;\n29
      \ import org.apache.log4j.spi.TriggeringEventEvaluator;\n30  import org.apache.log4j.xml.UnrecognizedElementHandler;\n31
      \ import org.w3c.dom.Element;\n32  \n33  import javax.mail.Authenticator;\n34
      \ import javax.mail.Message;\n35  import javax.mail.MessagingException;\n36
      \ import javax.mail.Multipart;\n37  import javax.mail.PasswordAuthentication;\n38
      \ import javax.mail.Session;\n39  import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 42
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 36
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "26  import org.apache.log4j.spi.ErrorCode;\n27  import org.apache.log4j.spi.LoggingEvent;\n28
      \ import org.apache.log4j.spi.OptionHandler;\n29  import org.apache.log4j.spi.TriggeringEventEvaluator;\n30
      \ import org.apache.log4j.xml.UnrecognizedElementHandler;\n31  import org.w3c.dom.Element;\n32
      \ \n33  import javax.mail.Authenticator;\n34  import javax.mail.Message;\n35
      \ import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 43
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 37
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "27  import org.apache.log4j.spi.LoggingEvent;\n28  import org.apache.log4j.spi.OptionHandler;\n29
      \ import org.apache.log4j.spi.TriggeringEventEvaluator;\n30  import org.apache.log4j.xml.UnrecognizedElementHandler;\n31
      \ import org.w3c.dom.Element;\n32  \n33  import javax.mail.Authenticator;\n34
      \ import javax.mail.Message;\n35  import javax.mail.MessagingException;\n36
      \ import javax.mail.Multipart;\n37  import javax.mail.PasswordAuthentication;\n38
      \ import javax.mail.Session;\n39  import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 44
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 38
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "28  import org.apache.log4j.spi.OptionHandler;\n29  import org.apache.log4j.spi.TriggeringEventEvaluator;\n30
      \ import org.apache.log4j.xml.UnrecognizedElementHandler;\n31  import org.w3c.dom.Element;\n32
      \ \n33  import javax.mail.Authenticator;\n34  import javax.mail.Message;\n35
      \ import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 45
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 39
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "29  import org.apache.log4j.spi.TriggeringEventEvaluator;\n30  import
      org.apache.log4j.xml.UnrecognizedElementHandler;\n31  import org.w3c.dom.Element;\n32
      \ \n33  import javax.mail.Authenticator;\n34  import javax.mail.Message;\n35
      \ import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 46
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 40
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "30  import org.apache.log4j.xml.UnrecognizedElementHandler;\n31  import
      org.w3c.dom.Element;\n32  \n33  import javax.mail.Authenticator;\n34  import
      javax.mail.Message;\n35  import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;\n50  import java.io.Writer;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 47
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 41
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "31  import org.w3c.dom.Element;\n32  \n33  import javax.mail.Authenticator;\n34
      \ import javax.mail.Message;\n35  import javax.mail.MessagingException;\n36
      \ import javax.mail.Multipart;\n37  import javax.mail.PasswordAuthentication;\n38
      \ import javax.mail.Session;\n39  import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;\n50  import java.io.Writer;\n51
      \ import java.util.Date;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 48
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 42
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "32  \n33  import javax.mail.Authenticator;\n34  import javax.mail.Message;\n35
      \ import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;\n50  import java.io.Writer;\n51
      \ import java.util.Date;\n52  import java.util.Properties;"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 49
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 43
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "33  import javax.mail.Authenticator;\n34  import javax.mail.Message;\n35
      \ import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;\n50  import java.io.Writer;\n51
      \ import java.util.Date;\n52  import java.util.Properties;\n53  "
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 50
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 44
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "34  import javax.mail.Message;\n35  import javax.mail.MessagingException;\n36
      \ import javax.mail.Multipart;\n37  import javax.mail.PasswordAuthentication;\n38
      \ import javax.mail.Session;\n39  import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;\n50  import java.io.Writer;\n51
      \ import java.util.Date;\n52  import java.util.Properties;\n53  \n54  /**"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 51
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 45
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "35  import javax.mail.MessagingException;\n36  import javax.mail.Multipart;\n37
      \ import javax.mail.PasswordAuthentication;\n38  import javax.mail.Session;\n39
      \ import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;\n50  import java.io.Writer;\n51
      \ import java.util.Date;\n52  import java.util.Properties;\n53  \n54  /**\n55
      \    Send an e-mail when a specific logging event occurs, typically on"
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  - id: 52
    createTime: 2025-06-05T09:11:39.117056881Z
    issue: 4
    file: /cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
    line: 46
    message: |-
      The configuration parameters of SMTP services for outbound mail may contain environment-specific values such as static IP addresses, host names, properties, credentials, or certificates.

       Recommendations

       * In a cloud environment, mail systems should be considered backing services and treated like attached resources.
       * Ensure that the configuration of the underlying outbound mail connection is not environment-specific.
       * In OpenShift Container Platform, store configuration parameters as environment variables or in a ConfigMap.
    codeSnip: "36  import javax.mail.Multipart;\n37  import javax.mail.PasswordAuthentication;\n38
      \ import javax.mail.Session;\n39  import javax.mail.Transport;\n40  import javax.mail.internet.AddressException;\n41
      \ import javax.mail.internet.InternetAddress;\n42  import javax.mail.internet.InternetHeaders;\n43
      \ import javax.mail.internet.MimeBodyPart;\n44  import javax.mail.internet.MimeMessage;\n45
      \ import javax.mail.internet.MimeMultipart;\n46  import javax.mail.internet.MimeUtility;\n47
      \ import java.io.ByteArrayOutputStream;\n48  import java.io.OutputStreamWriter;\n49
      \ import java.io.UnsupportedEncodingException;\n50  import java.io.Writer;\n51
      \ import java.util.Date;\n52  import java.util.Properties;\n53  \n54  /**\n55
      \    Send an e-mail when a specific logging event occurs, typically on\n56     errors
      or fatal errors."
    facts:
      file: file:///cache/m2/log4j/log4j/1.2.17/org/apache/log4j/net/SMTPAppender.java
      kind: Class
      name: ""
      package: org.apache.log4j.net
  links:
  - url: https://docs.openshift.com/container-platform/4.5/builds/creating-build-inputs.html#builds-input-secrets-configmaps_creating-build-inputs
    title: 'OpenShift Container Platform: Input secrets and ConfigMaps'
  - url: https://12factor.net/backing-services
    title: Twelve-factor app - Backing services
  - url: https://12factor.net/config
    title: Twelve-factor app - Config
  labels:
  - konveyor.io/source=java
  - konveyor.io/source=java-ee
  - konveyor.io/target=cloud-readiness
  - mail
- id: 5
  createTime: 2025-06-05T09:11:39.117837579Z
  analysis: 2
  ruleset: files
  rule: org-konveyor-00001
  name: ""
  description: Local package usage found
  category: mandatory
  effort: 5
  incidents:
  - id: 53
    createTime: 2025-06-05T09:11:39.118160225Z
    issue: 5
    file: /shared/source/pomless-app/src/main/java/org/konveyor/Main.java
    line: 3
    message: Blablabla
    codeSnip: " 1  package org.konveyor;\n 2  \n 3  import org.konveyor.servlet.AppConfigFilter;\n
      4  \n 5  import javax.servlet.ServletException;\n 6  import java.io.IOException;\n
      7  \n 8  public class Main {\n 9      public static void main(String[] args)
      throws ServletException, IOException {\n10          AppConfigFilter appConfigFilter
      = new AppConfigFilter();\n11          appConfigFilter.doFilter(null, null, null);\n12
      \     }\n13  }"
    facts:
      file: file:///shared/source/pomless-app/src/main/java/org/konveyor/Main.java
      kind: Module
      name: org.konveyor.servlet.AppConfigFilter
      package: org.konveyor
  - id: 54
    createTime: 2025-06-05T09:11:39.118160225Z
    issue: 5
    file: /shared/source/pomless-app/src/main/java/org/konveyor/servlet/AppConfigFilter.java
    line: 23
    message: Blablabla
    codeSnip: "13  import javax.servlet.ServletRequest;\n14  import javax.servlet.ServletResponse;\n15
      \ import javax.servlet.annotation.WebFilter;\n16  \n17  import org.apache.log4j.Logger;\n18
      \ \n19  /**\n20   * Servlet Filter implementation class AppConfigFilter\n21
      \  */\n22  @WebFilter(\"/*\")\n23  public class AppConfigFilter implements Filter
      {\n24  \tprotected static Logger logger = Logger.getLogger(AppConfigFilter.class);\n25
      \ \n26      /**\n27       * Default constructor. \n28       */\n29      public
      AppConfigFilter() {\n30      }\n31  \n32  \t/**\n33  \t * @see Filter#destroy()"
    facts:
      file: file:///shared/source/pomless-app/src/main/java/org/konveyor/servlet/AppConfigFilter.java
      kind: Class
      name: AppConfigFilter
      package: org.konveyor.servlet
  links:
  - url: https://openjdk.org/jeps/411
    title: 'JEP 411: Deprecate the Security Manager for Removal'
  labels:
  - konveyor.io/include=always
  - konveyor.io/source
  - konveyor.io/target=cloud-readiness

dependencies: 
- id: 1
  createTime: 2025-06-05T09:11:39.120096763Z
  analysis: 2
  provider: java
  name: log4j.log4j
  version: 1.2.17
  labels:
  - konveyor.io/dep-source=open-source
  - konveyor.io/language=java
  sha: 309d3cac016db1a4cd4565ea2b95c0bdf040f8d1
- id: 2
  createTime: 2025-06-05T09:11:39.120716188Z
  analysis: 2
  provider: java
  name: javax.servlet.javax.servlet-api
  version: 3.1.0
  labels:
  - konveyor.io/dep-source=open-source
  - konveyor.io/language=java
  sha: 330afdf2f976af1584c6a18333f4d53d264df1de
