Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler.
Number of rules (primarily dangerous function names) in C/C++ ruleset: 223
Examining data/kim-api-2.2.0/c/include/KIM_ChargeUnit.h
Examining data/kim-api-2.2.0/c/include/KIM_Collection.h
Examining data/kim-api-2.2.0/c/include/KIM_CollectionItemType.h
Examining data/kim-api-2.2.0/c/include/KIM_Collections.h
Examining data/kim-api-2.2.0/c/include/KIM_ComputeArgumentName.h
Examining data/kim-api-2.2.0/c/include/KIM_ComputeArguments.h
Examining data/kim-api-2.2.0/c/include/KIM_ComputeCallbackName.h
Examining data/kim-api-2.2.0/c/include/KIM_DataType.h
Examining data/kim-api-2.2.0/c/include/KIM_EnergyUnit.h
Examining data/kim-api-2.2.0/c/include/KIM_FunctionTypes.h
Examining data/kim-api-2.2.0/c/include/KIM_LanguageName.h
Examining data/kim-api-2.2.0/c/include/KIM_LengthUnit.h
Examining data/kim-api-2.2.0/c/include/KIM_Log.h
Examining data/kim-api-2.2.0/c/include/KIM_LogMacros.h
Examining data/kim-api-2.2.0/c/include/KIM_LogVerbosity.h
Examining data/kim-api-2.2.0/c/include/KIM_Model.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelCompute.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelComputeArguments.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelComputeArgumentsCreate.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelComputeArgumentsDestroy.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelCreate.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelDestroy.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelDriverCreate.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelDriverHeaders.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelExtension.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelHeaders.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelRefresh.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelRoutineName.h
Examining data/kim-api-2.2.0/c/include/KIM_ModelWriteParameterizedModel.h
Examining data/kim-api-2.2.0/c/include/KIM_Numbering.h
Examining data/kim-api-2.2.0/c/include/KIM_SemVer.h
Examining data/kim-api-2.2.0/c/include/KIM_SimulatorHeaders.h
Examining data/kim-api-2.2.0/c/include/KIM_SimulatorModel.h
Examining data/kim-api-2.2.0/c/include/KIM_SpeciesName.h
Examining data/kim-api-2.2.0/c/include/KIM_SupportStatus.h
Examining data/kim-api-2.2.0/c/include/KIM_SupportedExtensions.h
Examining data/kim-api-2.2.0/c/include/KIM_TemperatureUnit.h
Examining data/kim-api-2.2.0/c/include/KIM_TimeUnit.h
Examining data/kim-api-2.2.0/c/include/KIM_UnitSystem.h
Examining data/kim-api-2.2.0/c/src/KIM_ChargeUnit_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_CollectionItemType_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_Collection_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_Collections_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ComputeArgumentName_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ComputeArguments_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ComputeCallbackName_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_DataType_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_EnergyUnit_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_LanguageName_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_LengthUnit_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_LogVerbosity_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_Log_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelComputeArgumentsCreate_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelComputeArgumentsDestroy_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelComputeArguments_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelCompute_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelCreate_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelDestroy_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelDriverCreate_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelExtension_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelRefresh_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelRoutineName_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_ModelWriteParameterizedModel_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_Model_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_Numbering_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_SemVer_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_SimulatorModel_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_SpeciesName_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_SupportStatus_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_TemperatureUnit_c.cpp
Examining data/kim-api-2.2.0/c/src/KIM_TimeUnit_c.cpp
Examining data/kim-api-2.2.0/cmake/KIM_SharedLibrarySchema.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ChargeUnit.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_Collection.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_CollectionItemType.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_Collections.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ComputeArgumentName.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ComputeArguments.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ComputeCallbackName.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_DataType.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_EnergyUnit.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_FunctionTypes.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_LanguageName.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_LengthUnit.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_Log.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_LogMacros.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_LogVerbosity.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_Model.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelCompute.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelComputeArguments.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelComputeArgumentsCreate.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelComputeArgumentsDestroy.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelCreate.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelDestroy.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelDriverCreate.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelDriverHeaders.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelExtension.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelHeaders.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelRefresh.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelRoutineName.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_ModelWriteParameterizedModel.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_Numbering.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_SemVer.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_SimulatorHeaders.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_SimulatorModel.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_SpeciesName.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_SupportStatus.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_SupportedExtensions.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_TemperatureUnit.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_TimeUnit.hpp
Examining data/kim-api-2.2.0/cpp/include/KIM_UnitSystem.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ChargeUnit.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_Collection.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_CollectionItemType.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_Collections.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ComputeArgumentName.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ComputeArguments.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ComputeArgumentsImplementation.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ComputeArgumentsImplementation.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ComputeCallbackName.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_DataType.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_EnergyUnit.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_FilesystemPath.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_FilesystemPath.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_LanguageName.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_LengthUnit.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_Log.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_LogImplementation.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_LogImplementation.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_LogVerbosity.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_Model.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelCompute.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelComputeArguments.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelComputeArgumentsCreate.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelComputeArgumentsDestroy.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelCreate.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelDestroy.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelDriverCreate.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelExtension.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelImplementation.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelImplementation.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelRefresh.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelRoutineName.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_ModelWriteParameterizedModel.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_Numbering.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SemVer.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SharedLibrary.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SharedLibrary.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SimulatorModel.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SimulatorModelImplementation.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SimulatorModelImplementation.hpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SpeciesName.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_SupportStatus.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_TemperatureUnit.cpp
Examining data/kim-api-2.2.0/cpp/src/KIM_TimeUnit.cpp
Examining data/kim-api-2.2.0/cpp/src/edn-cpp/edn.hpp
Examining data/kim-api-2.2.0/cpp/src/edn-cpp/example.cpp
Examining data/kim-api-2.2.0/cpp/src/edn-cpp/repl.cpp
Examining data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp
Examining data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612.cpp
Examining data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612.hpp
Examining data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp
Examining data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.hpp
Examining data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612ImplementationComputeDispatch.cpp
Examining data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c
Examining data/kim-api-2.2.0/examples/portable-models/LennardJones_Ar/LennardJones_Ar.cpp
Examining data/kim-api-2.2.0/examples/portable-models/ex_model_Ar_P_Morse_07C/ex_model_Ar_P_Morse_07C.c
Examining data/kim-api-2.2.0/examples/portable-models/ex_model_Ar_P_Morse_07C_w_Extensions/ex_model_Ar_P_Morse_07C_w_Extensions.c
Examining data/kim-api-2.2.0/examples/portable-models/ex_model_Ar_P_Morse_MultiCutoff/ex_model_Ar_P_Morse_MultiCutoff.c
Examining data/kim-api-2.2.0/examples/simulators/collections-example/collections-example-c.cpp
Examining data/kim-api-2.2.0/examples/simulators/collections-example/collections-example.cpp
Examining data/kim-api-2.2.0/examples/simulators/ex_test_Ar_fcc_cluster/ex_test_Ar_fcc_cluster.c
Examining data/kim-api-2.2.0/examples/simulators/ex_test_Ar_fcc_cluster_cpp/ex_test_Ar_fcc_cluster_cpp.cpp
Examining data/kim-api-2.2.0/examples/simulators/simulator-model-example/simulator-model-example-c.cpp
Examining data/kim-api-2.2.0/examples/simulators/simulator-model-example/simulator-model-example.cpp
Examining data/kim-api-2.2.0/utils/collections-info.cpp
Examining data/kim-api-2.2.0/utils/portable-model-info.cpp
Examining data/kim-api-2.2.0/utils/shared-library-test.cpp
Examining data/kim-api-2.2.0/utils/simulator-model.cpp

FINAL RESULTS:

data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1940:21:  [5] (race) readlink:
  This accepts filename arguments; if an attacker can move those files or
  change the link content, a race condition results. Also, it does not
  terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach.
        auto rc = ::readlink(p.c_str(), buffer.data(), buffer.size());
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:4261:15:  [5] (race) chmod:
  This accepts filename arguments; if an attacker can move those files, a
  race condition results. (CWE-362). Use fchmod( ) instead.
        if (::chmod(p.c_str(), static_cast<mode_t>(prms)) != 0) {
data/kim-api-2.2.0/cpp/include/KIM_Collection.hpp:136:25:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
extern Collection const system;
data/kim-api-2.2.0/cpp/src/KIM_Collection.cpp:45:18:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
Collection const system(ID_system);
data/kim-api-2.2.0/cpp/src/KIM_Collection.cpp:58:5:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  m[system] = "system";
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:407:38:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  if (collection == KIM::COLLECTION::system)
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:441:25:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  if (collection == KC::system)
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:539:20:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
               KC::system, itemType, itemName, log, &itemPath))
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:541:15:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    col = KC::system;
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:903:11:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      KC::system, itemType, log_, listOfPaths);
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:1279:33:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
  if (collection == COLLECTION::system) { PrivateGetSystemDirs(dirsMap); }
data/kim-api-2.2.0/cpp/src/KIM_FilesystemPath.cpp:90:3:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
  strcpy(_path, path_.c_str());
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:387:11:  [4] (buffer) sscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function.
    ier = sscanf(nextLine,
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:508:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(paramfile1name, "%s/%s", paramfiledirname, paramfilebasename);
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:519:9:  [4] (buffer) fscanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
  ier = fscanf(fid,
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:563:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(buffer->speciesName, "%s", speciesNameString);
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:748:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(stringBuffer, "%s.params", modelName);
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:751:3:  [4] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf.
  sprintf(stringBuffer, "%s/%s.params", path, modelName);
data/kim-api-2.2.0/examples/portable-models/ex_model_Ar_P_Morse_07C_w_Extensions/ex_model_Ar_P_Morse_07C_w_Extensions.c:550:5:  [4] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused).
    strcpy(supportedExtensions->supportedExtensionID[0],
data/kim-api-2.2.0/examples/simulators/collections-example/collections-example.cpp:176:40:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    dirsForCollection(KIM::COLLECTION::system, col);
data/kim-api-2.2.0/examples/simulators/collections-example/collections-example.cpp:186:41:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    namesForCollection(KIM::COLLECTION::system, col);
data/kim-api-2.2.0/examples/simulators/ex_test_Ar_fcc_cluster/ex_test_Ar_fcc_cluster.c:136:11:  [4] (buffer) scanf:
  The scanf() family's %s operation, without a limit specification, permits
  buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a
  different input function. If the scanf format is influenceable by an
  attacker, it's exploitable.
  error = scanf(NAMESTRFMT, modelname);
data/kim-api-2.2.0/examples/simulators/simulator-model-example/simulator-model-example-c.cpp:130:13:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
    error = system((std::string("cat ") + pDirName + "/" + pSpecName).c_str());
data/kim-api-2.2.0/examples/simulators/simulator-model-example/simulator-model-example-c.cpp:152:15:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
            = system((std::string("cat ") + pDirName + "/" + pParamFileBasename)
data/kim-api-2.2.0/examples/simulators/simulator-model-example/simulator-model-example.cpp:127:11:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        = system((std::string("cat ") + *pDirName + "/" + *pSpecName).c_str());
data/kim-api-2.2.0/examples/simulators/simulator-model-example/simulator-model-example.cpp:147:17:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
        error = system(
data/kim-api-2.2.0/utils/collections-info.cpp:235:55:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      col->CacheListOfDirectoryNames(KIM::COLLECTION::system,
data/kim-api-2.2.0/utils/collections-info.cpp:243:55:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      col->CacheListOfDirectoryNames(KIM::COLLECTION::system,
data/kim-api-2.2.0/utils/collections-info.cpp:251:55:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      col->CacheListOfDirectoryNames(KIM::COLLECTION::system,
data/kim-api-2.2.0/utils/collections-info.cpp:283:42:  [4] (shell) system:
  This causes a new program to execute and is difficult to use safely
  (CWE-78). try using a library call that implements the same functionality
  if available.
      colList.push_back(KIM::COLLECTION::system);
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:172:31:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  char const * const varVal = getenv(name.c_str());
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:245:30:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  dirsMap[modelDriver].Parse(getenv(KIM_ENVIRONMENT_MODEL_DRIVER_PLURAL_DIR));
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:247:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      getenv(KIM_ENVIRONMENT_PORTABLE_MODEL_PLURAL_DIR));
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:249:7:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
      getenv(KIM_ENVIRONMENT_SIMULATOR_MODEL_PLURAL_DIR));
data/kim-api-2.2.0/cpp/src/KIM_FilesystemPath.cpp:247:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  return Path(getenv("PWD"));
data/kim-api-2.2.0/cpp/src/KIM_FilesystemPath.cpp:279:15:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
  return Path(getenv("HOME"));
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:4601:26:  [3] (buffer) getenv:
  Environment variables are untrustable input if they can be set by an
  attacker. They can have any content and length, and the same variable can
  be set more than once (CWE-807, CWE-20). Check environment variables
  carefully before using them.
        temp_path = std::getenv(*temp_name);
data/kim-api-2.2.0/c/include/KIM_SupportedExtensions.h:72:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char supportedExtensionID[KIM_MAX_NUMBER_OF_EXTENSIONS]
data/kim-api-2.2.0/cpp/include/KIM_SupportedExtensions.hpp:58:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char supportedExtensionID[KIM_MAX_NUMBER_OF_EXTENSIONS]
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:115:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char linecpy[LINELEN];
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:260:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  cfl.open(configFile.string().c_str());
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:277:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char line[LINELEN];
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:338:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      fl.open(configFile.string().c_str());
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:689:6:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fl.open(fileName.string().c_str(), std::ofstream::out | std::ofstream::trunc);
data/kim-api-2.2.0/cpp/src/KIM_FilesystemPath.cpp:79:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char _path[PATH_MAX];
data/kim-api-2.2.0/cpp/src/KIM_LogImplementation.cpp:151:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  file.open(LOG_FILE, std::ios_base::out | std::ios_base::app);
data/kim-api-2.2.0/cpp/src/KIM_LogImplementation.cpp:381:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char date[1024];
data/kim-api-2.2.0/cpp/src/KIM_SharedLibrary.cpp:78:3:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  wchar_t pathBuf[MAX_PATH];
data/kim-api-2.2.0/cpp/src/KIM_SharedLibrary.cpp:640:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fl.open(specificationFilePathName.string().c_str(),
data/kim-api-2.2.0/cpp/src/KIM_SharedLibrary.cpp:671:8:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    fl.open(parameterFilePathName.string().c_str(),
data/kim-api-2.2.0/cpp/src/KIM_SimulatorModelImplementation.cpp:917:7:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  ifs.open(filePath.string().c_str());
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1110:35:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    basic_filebuf<charT, traits>* open(const path& p, std::ios_base::openmode mode)
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1113:51:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        return std::basic_filebuf<charT, traits>::open(p.wstring().c_str(), mode) ? this : 0;
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1115:51:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        return std::basic_filebuf<charT, traits>::open(p.string().c_str(), mode) ? this : 0;
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1130:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream<charT, traits>::open(p.wstring().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1130:118:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream<charT, traits>::open(p.wstring().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1136:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream<charT, traits>::open(p.string().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1136:118:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in) { std::basic_ifstream<charT, traits>::open(p.string().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1153:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream<charT, traits>::open(p.wstring().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1153:119:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream<charT, traits>::open(p.wstring().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1159:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream<charT, traits>::open(p.string().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1159:119:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::out) { std::basic_ofstream<charT, traits>::open(p.string().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1176:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream<charT, traits>::open(p.wstring().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1176:138:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream<charT, traits>::open(p.wstring().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1182:10:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream<charT, traits>::open(p.string().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1182:138:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    void open(const path& p, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { std::basic_fstream<charT, traits>::open(p.string().c_str(), mode); }
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1752:5:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    char buffer[512];
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:3506:17:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((in = ::open(from.c_str(), O_RDONLY)) < 0) {
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:3515:18:  [2] (misc) open:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    if ((out = ::open(to.c_str(), mode, static_cast<int>(sf.permissions() & perms::all))) < 0) {
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:4590:5:  [2] (buffer) wchar_t:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
    wchar_t buffer[512];
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:314:32:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
    parameterFilePointers[i] = fopen(filename.c_str(), "r");
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:317:7:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
      char message[MAXLINE];
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:318:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(message,
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:344:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char spec1[MAXLINE], spec2[MAXLINE], nextLine[MAXLINE];
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:356:5:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
    sprintf(nextLine, "unable to read first line of the parameter file");
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:396:7:  [2] (buffer) sprintf:
  Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or
  vsnprintf. Risk is low because the source has a constant maximum length.
      sprintf(nextLine, "error reading lines of the parameter file");
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:113:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char speciesName[SPEC_NAME_LEN];
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:396:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char paramfile1name[2048];
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:400:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char speciesNameString[SPEC_NAME_LEN];
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:511:9:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fid = fopen(paramfile1name, "r");
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:735:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char stringBuffer[2048];
data/kim-api-2.2.0/examples/model-drivers/ex_model_driver_P_Morse/ex_model_driver_P_Morse.c:752:8:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
  fp = fopen(stringBuffer, "w");
data/kim-api-2.2.0/examples/portable-models/ex_model_Ar_P_Morse_07C_w_Extensions/ex_model_Ar_P_Morse_07C_w_Extensions.c:554:5:  [2] (buffer) strcpy:
  Does not check for buffer overflows when copying to destination [MS-banned]
  (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy
  easily misused). Risk is low because the source is a constant string.
    strcpy(supportedExtensions->supportedExtensionID[1], "Fake_Extension");
data/kim-api-2.2.0/examples/simulators/ex_test_Ar_fcc_cluster/ex_test_Ar_fcc_cluster.c:120:3:  [2] (buffer) char:
  Statically-sized arrays can be improperly restricted, leading to potential
  overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use
  functions that limit length, or ensure that the size is larger than the
  maximum possible length.
  char modelname[NAMESTRLEN];
data/kim-api-2.2.0/utils/simulator-model.cpp:121:21:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      FILE * file = fopen(filePath.c_str(), "rb");
data/kim-api-2.2.0/utils/simulator-model.cpp:131:14:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
      file = fopen(filePath.c_str(), "rb");
data/kim-api-2.2.0/utils/simulator-model.cpp:154:19:  [2] (integer) atol:
  Unless checked, the resulting number can exceed the expected range
  (CWE-190). If source untrusted, check both minimum and maximum, even if the
  input had no minus sign (large numbers can roll over into negative number;
  consider saving to an unsigned value if that is intended).
      int index = atol(argv[2]);
data/kim-api-2.2.0/utils/simulator-model.cpp:177:23:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        FILE * file = fopen(filePath.c_str(), "r");
data/kim-api-2.2.0/utils/simulator-model.cpp:187:16:  [2] (misc) fopen:
  Check when opening files - can an attacker redirect it (via symlinks),
  force the opening of special file type (e.g., device files), move things
  around to create a race condition, control its ancestors, or change its
  contents? (CWE-362).
        file = fopen(filePath.c_str(), "r");
data/kim-api-2.2.0/c/src/KIM_SemVer_c.cpp:90:13:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
          = strncpy(prerelease, prereleaseLocal.c_str(), prereleaseLength);
data/kim-api-2.2.0/c/src/KIM_SemVer_c.cpp:95:27:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
      char * copyReturn = strncpy(
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:119:3:  [1] (buffer) strncpy:
  Easily used incorrectly; doesn't always \0-terminate or check for invalid
  pointers [MS-banned] (CWE-120).
  strncpy(linecpy, line, LINELEN - 1);
data/kim-api-2.2.0/cpp/src/KIM_CollectionsImplementation.cpp:506:10:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
        (strlen(fileStrings.back().c_str()) == length) ? true : false);
data/kim-api-2.2.0/cpp/src/KIM_FilesystemPath.cpp:78:22:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  const size_t len = strlen(path_.c_str());
data/kim-api-2.2.0/cpp/src/KIM_SharedLibrary.cpp:323:21:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
    fl.fileLength = strlen(schemaV1->compiledWithVersion);
data/kim-api-2.2.0/cpp/src/KIM_SimulatorModelImplementation.cpp:930:17:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    node = edn::read(ednString);
data/kim-api-2.2.0/cpp/src/edn-cpp/edn.hpp:442:11:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
  EdnNode read(string edn) {
data/kim-api-2.2.0/cpp/src/edn-cpp/example.cpp:6:12:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
using edn::read;
data/kim-api-2.2.0/cpp/src/edn-cpp/example.cpp:11:23:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    EdnNode someMap = read("{:some :map :with [a vector of symbols]}");
data/kim-api-2.2.0/cpp/src/edn-cpp/repl.cpp:17:34:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
        edn::EdnNode node = edn::read(ednString);
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:1594:46:  [1] (buffer) equal:
  Function does not check the second iterator for over-read conditions
  (CWE-126). This function is often discouraged by most C++ coding standards
  in favor of its safer alternatives provided since C++14. Consider using a
  form of this function that checks the second iterator before potentially
  overflowing it.
    return with.length() <= what.length() && equal(with.begin(), with.end(), what.begin());
data/kim-api-2.2.0/cpp/src/ghc-filesystem/filesystem.hpp:3521:20:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    while ((br = ::read(in, buffer.data(), buffer.size())) > 0) {
data/kim-api-2.2.0/examples/model-drivers/LennardJones612__MD_414112407348_003/LennardJones612Implementation.cpp:516:52:  [1] (buffer) strlen:
  Does not handle strings that are not \0-terminated; if given one it may
  perform an over-read (it could cause a crash if unprotected) (CWE-126).
  } while ((strncmp("#", nextLinePtr, 1) == 0) || (strlen(nextLinePtr) == 0));
data/kim-api-2.2.0/utils/portable-model-info.cpp:347:22:  [1] (buffer) read:
  Check buffer boundaries if used in a loop including recursive loops
  (CWE-120, CWE-20).
    modelInfo = edn::read(edn.str());

ANALYSIS SUMMARY:

Hits = 104
Lines analyzed = 58932 in approximately 1.13 seconds (52384 lines/second)
Physical Source Lines of Code (SLOC) = 35303
Hits@level = [0]  17 [1]  15 [2]  52 [3]   7 [4]  28 [5]   2
Hits@level+ = [0+] 121 [1+] 104 [2+]  89 [3+]  37 [4+]  30 [5+]   2
Hits/KSLOC@level+ = [0+] 3.42747 [1+] 2.94593 [2+] 2.52103 [3+] 1.04807 [4+] 0.849786 [5+] 0.0566524
Dot directories skipped = 1 (--followdotdir overrides)
Minimum risk level = 1
Not every hit is necessarily a security vulnerability.
There may be other security vulnerabilities; review your code!
See 'Secure Programming HOWTO'
(https://dwheeler.com/secure-programs) for more information.