The following issues were found

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/suncc.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 37 Column: 1

              
import SCons.Util

from . import cc

def generate(env):
    """
    Add Builders and construction variables for Forte C and C++ compilers
    to an Environment.

            

Reported by Pylint.

Line too long (116/100)
Error

Line: 33 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/suncc.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import SCons.Util

from . import cc


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 51 Column: 1

                  env['SHOBJPREFIX']  = 'so_'
    env['SHOBJSUFFIX']  = '.o'

def exists(env):
    return env.Detect('CC')

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil

            

Reported by Pylint.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/sunf77.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 38 Column: 1

              
import SCons.Util

from .FortranCommon import add_all_to_env

compilers = ['sunf77', 'f77']

def generate(env):
    """Add Builders and construction variables for sunf77 to an Environment."""

            

Reported by Pylint.

Line too long (117/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/sunf77.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import SCons.Util

from .FortranCommon import add_all_to_env


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 56 Column: 1

                  env['SHFORTRANFLAGS'] = SCons.Util.CLVar('$FORTRANFLAGS -KPIC')
    env['SHF77FLAGS'] = SCons.Util.CLVar('$F77FLAGS -KPIC')

def exists(env):
    return env.Detect(compilers)

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil

            

Reported by Pylint.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/uniform_int_distribution_test.cc
3 issues
syntax error
Error

Line: 43

                                                uint32_t, int64_t, uint64_t>;
TYPED_TEST_SUITE(UniformIntDistributionTest, IntTypes);

TYPED_TEST(UniformIntDistributionTest, ParamSerializeTest) {
  // This test essentially ensures that the parameters serialize,
  // not that the values generated cover the full range.
  using Limits = std::numeric_limits<TypeParam>;
  using param_type =
      typename absl::uniform_int_distribution<TypeParam>::param_type;

            

Reported by Cppcheck.

StrCat - Does not check for buffer overflows when concatenating to destination [MS-banned]
Security

Line: 109 Column: 29 CWE codes: 120

                      sample_min = sample;
      }
    }
    std::string msg = absl::StrCat("Range: ", +sample_min, ", ", +sample_max);
    ABSL_RAW_LOG(INFO, "%s", msg.c_str());
  }
}

TYPED_TEST(UniformIntDistributionTest, ViolatesPreconditionsDeathTest) {

            

Reported by FlawFinder.

StrCat - Does not check for buffer overflows when concatenating to destination [MS-banned]
Security

Line: 128 Column: 22 CWE codes: 120

                auto x = dist(gen);

  // Any value will generate a non-empty string.
  EXPECT_FALSE(absl::StrCat(+x).empty()) << x;
#endif  // NDEBUG
}

TYPED_TEST(UniformIntDistributionTest, TestMoments) {
  constexpr int kSize = 100000;

            

Reported by FlawFinder.

src/third_party/abseil-cpp-master/abseil-cpp/absl/random/seed_sequences_test.cc
3 issues
syntax error
Error

Line: 48

                }
}

TEST(CreateSeedSeqFrom, CompatibleWithStdTypes) {
  using ExampleNonsecureURBG =
      absl::random_internal::NonsecureURBGBase<std::minstd_rand0>;

  // Construct a URBG instance.
  ExampleNonsecureURBG rng;

            

Reported by Cppcheck.

random - This function is not sufficiently random for security-related functions such as key and nonce creation
Security

Line: 42 Column: 18 CWE codes: 327
Suggestion: Use a more secure technique for acquiring random values

                }
  {
    auto seed_seq = absl::MakeSeedSeq();
    std::mt19937 random(seed_seq);

    EXPECT_NE(0, random());
  }
}


            

Reported by FlawFinder.

random - This function is not sufficiently random for security-related functions such as key and nonce creation
Security

Line: 44 Column: 18 CWE codes: 327
Suggestion: Use a more secure technique for acquiring random values

                  auto seed_seq = absl::MakeSeedSeq();
    std::mt19937 random(seed_seq);

    EXPECT_NE(0, random());
  }
}

TEST(CreateSeedSeqFrom, CompatibleWithStdTypes) {
  using ExampleNonsecureURBG =

            

Reported by FlawFinder.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/sunar.py
3 issues
Line too long (116/100)
Error

Line: 35 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/sunar.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import SCons.Defaults
import SCons.Tool
import SCons.Util


            

Reported by Pylint.

Trailing whitespace
Error

Line: 44 Column: 1

              def generate(env):
    """Add Builders and construction variables for ar to an Environment."""
    SCons.Tool.createStaticLibBuilder(env)
    
    if env.Detect('CC'):
        env['AR']          = 'CC'
        env['ARFLAGS']     = SCons.Util.CLVar('-xar')
        env['ARCOM']       = '$AR $ARFLAGS -o $TARGET $SOURCES'
    else:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 57 Column: 1

                  env['LIBPREFIX']   = 'lib'
    env['LIBSUFFIX']   = '.a'

def exists(env):
    return env.Detect('CC') or env.Detect('ar')

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil

            

Reported by Pylint.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/sgicc.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 36 Column: 1

              
__revision__ = "src/engine/SCons/Tool/sgicc.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

from . import cc

def generate(env):
    """Add Builders and construction variables for gcc to an Environment."""
    cc.generate(env)


            

Reported by Pylint.

Line too long (116/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/sgicc.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

from . import cc

def generate(env):
    """Add Builders and construction variables for gcc to an Environment."""

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 46 Column: 1

                  env['SHOBJSUFFIX'] = '.o'
    env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1

def exists(env):
    return env.Detect('cc')

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil

            

Reported by Pylint.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/nasm.py
3 issues
Unused variable 'shared_obj'
Error

Line: 49 Column: 17

              
def generate(env):
    """Add Builders and construction variables for nasm to an Environment."""
    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)

    for suffix in ASSuffixes:
        static_obj.add_action(suffix, SCons.Defaults.ASAction)
        static_obj.add_emitter(suffix, SCons.Defaults.StaticObjectEmitter)


            

Reported by Pylint.

Line too long (115/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/nasm.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import SCons.Defaults
import SCons.Tool
import SCons.Util


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 65 Column: 1

                  env['ASCOM']     = '$AS $ASFLAGS -o $TARGET $SOURCES'
    env['ASPPCOM']   = '$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -c -o $TARGET $SOURCES'

def exists(env):
    return env.Detect('nasm')

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil

            

Reported by Pylint.

buildscripts/make_archive.py
3 issues
Consider possible security implications associated with Popen module.
Security blacklist

Line: 35
Suggestion: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess

              import shutil
import zipfile
import tempfile
from subprocess import (Popen, PIPE, STDOUT)


def main(argv):
    """Execute Main program."""
    args = []

            

Reported by Bandit.

Try, Except, Pass detected.
Security

Line: 63
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html

                  """Recursively deletes a directory and its contents."""
    try:
        shutil.rmtree(directory)
    except Exception:  # pylint: disable=broad-except
        pass


def make_tar_archive(opts):
    """Generate tar archive.

            

Reported by Bandit.

subprocess call - check for execution of untrusted input.
Security injection

Line: 109
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b603_subprocess_without_shell_equals_true.html

                  print(" ".join(tar_command))
    # execute the full tar command
    run_directory = os.path.join(os.getcwd(), enclosing_archive_directory)
    proc = Popen(tar_command, stdout=PIPE, stderr=STDOUT, bufsize=0, cwd=run_directory)
    proc.wait()

    # delete temp directory
    delete_directory(enclosing_archive_directory)


            

Reported by Bandit.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/sgicxx.py
3 issues
Line too long (117/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/sgicxx.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import SCons.Util

import SCons.Tool.cxx
cplusplus = SCons.Tool.cxx

            

Reported by Pylint.

Trailing whitespace
Error

Line: 53 Column: 1

                  env['SHCXX']       = '$CXX'
    env['SHOBJSUFFIX'] = '.o'
    env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
    
def exists(env):
    return env.Detect('CC')

# Local Variables:
# tab-width:4

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 54 Column: 1

                  env['SHOBJSUFFIX'] = '.o'
    env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1
    
def exists(env):
    return env.Detect('CC')

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil

            

Reported by Pylint.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/mslib.py
3 issues
Attempted relative import beyond top-level package
Error

Line: 44 Column: 1

              import SCons.Tool.msvc
import SCons.Util

from .MSCommon import msvc_exists, msvc_setup_env_once

def generate(env):
    """Add Builders and construction variables for lib to an Environment."""
    SCons.Tool.createStaticLibBuilder(env)


            

Reported by Pylint.

Line too long (116/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/mslib.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import os

import SCons.Defaults
import SCons.Tool

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 66 Column: 1

                  env['TEMPFILEARGJOIN'] = os.linesep


def exists(env):
    return msvc_exists(env)

# Local Variables:
# tab-width:4
# indent-tabs-mode:nil

            

Reported by Pylint.