The following issues were found

src/third_party/boost/boost/interprocess/detail/win32_api.hpp
26 issues
SetSecurityDescriptorDacl - Never create NULL ACLs; an attacker can set it to Everyone (Deny All Access), which would even forbid administrator access
Security

Line: 788 Column: 26 CWE codes: 732

                 {
      if(!boost::winapi::InitializeSecurityDescriptor(&sd, security_descriptor_revision))
         return;
      if(!boost::winapi::SetSecurityDescriptorDacl(&sd, true, 0, false))
         return;
      sa.lpSecurityDescriptor = &sd;
      sa.nLength = sizeof(interprocess_security_attributes);
      sa.bInheritHandle = false;
      initialized = true;

            

Reported by FlawFinder.

SetSecurityDescriptorDacl - Never create NULL ACLs; an attacker can set it to Everyone (Deny All Access), which would even forbid administrator access
Security

Line: 788 Column: 26 CWE codes: 732

                 {
      if(!boost::winapi::InitializeSecurityDescriptor(&sd, security_descriptor_revision))
         return;
      if(!boost::winapi::SetSecurityDescriptorDacl(&sd, true, 0, false))
         return;
      sa.lpSecurityDescriptor = &sd;
      sa.nLength = sizeof(interprocess_security_attributes);
      sa.bInheritHandle = false;
      initialized = true;

            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 800 Column: 65 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

                 {  return &sa; }
};

inline void * create_file_mapping (void * handle, unsigned long access, ::boost::ulong_long_type file_offset, const char * name, interprocess_security_attributes *psec)
{
   const boost::winapi::DWORD_ high_size(file_offset >> 32), low_size((boost::winapi::DWORD_)file_offset);
   return CreateFileMappingA (handle, psec, access, high_size, low_size, name);
}


            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 803 Column: 45 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

              inline void * create_file_mapping (void * handle, unsigned long access, ::boost::ulong_long_type file_offset, const char * name, interprocess_security_attributes *psec)
{
   const boost::winapi::DWORD_ high_size(file_offset >> 32), low_size((boost::winapi::DWORD_)file_offset);
   return CreateFileMappingA (handle, psec, access, high_size, low_size, name);
}

inline void * create_file_mapping (void * handle, unsigned long access, ::boost::ulong_long_type file_offset, const wchar_t * name, interprocess_security_attributes *psec)
{
   const boost::winapi::DWORD_ high_size(file_offset >> 32), low_size((boost::winapi::DWORD_)file_offset);

            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 806 Column: 65 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

                 return CreateFileMappingA (handle, psec, access, high_size, low_size, name);
}

inline void * create_file_mapping (void * handle, unsigned long access, ::boost::ulong_long_type file_offset, const wchar_t * name, interprocess_security_attributes *psec)
{
   const boost::winapi::DWORD_ high_size(file_offset >> 32), low_size((boost::winapi::DWORD_)file_offset);
   return CreateFileMappingW (handle, psec, access, high_size, low_size, name);
}


            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 809 Column: 45 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

              inline void * create_file_mapping (void * handle, unsigned long access, ::boost::ulong_long_type file_offset, const wchar_t * name, interprocess_security_attributes *psec)
{
   const boost::winapi::DWORD_ high_size(file_offset >> 32), low_size((boost::winapi::DWORD_)file_offset);
   return CreateFileMappingW (handle, psec, access, high_size, low_size, name);
}

inline void * open_file_mapping (unsigned long access, const char *name)
{  return OpenFileMappingA (access, 0, name);   }


            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 812 Column: 48 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

                 return CreateFileMappingW (handle, psec, access, high_size, low_size, name);
}

inline void * open_file_mapping (unsigned long access, const char *name)
{  return OpenFileMappingA (access, 0, name);   }

inline void * open_file_mapping (unsigned long access, const wchar_t *name)
{  return OpenFileMappingW (access, 0, name);   }


            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 813 Column: 29 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

              }

inline void * open_file_mapping (unsigned long access, const char *name)
{  return OpenFileMappingA (access, 0, name);   }

inline void * open_file_mapping (unsigned long access, const wchar_t *name)
{  return OpenFileMappingW (access, 0, name);   }

inline void *map_view_of_file_ex(void *handle, unsigned long file_access, ::boost::ulong_long_type offset, std::size_t numbytes, void *base_addr)

            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 815 Column: 48 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

              inline void * open_file_mapping (unsigned long access, const char *name)
{  return OpenFileMappingA (access, 0, name);   }

inline void * open_file_mapping (unsigned long access, const wchar_t *name)
{  return OpenFileMappingW (access, 0, name);   }

inline void *map_view_of_file_ex(void *handle, unsigned long file_access, ::boost::ulong_long_type offset, std::size_t numbytes, void *base_addr)
{
   const unsigned long offset_low  = (unsigned long)(offset & ((::boost::ulong_long_type)0xFFFFFFFF));

            

Reported by FlawFinder.

access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 816 Column: 29 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

              {  return OpenFileMappingA (access, 0, name);   }

inline void * open_file_mapping (unsigned long access, const wchar_t *name)
{  return OpenFileMappingW (access, 0, name);   }

inline void *map_view_of_file_ex(void *handle, unsigned long file_access, ::boost::ulong_long_type offset, std::size_t numbytes, void *base_addr)
{
   const unsigned long offset_low  = (unsigned long)(offset & ((::boost::ulong_long_type)0xFFFFFFFF));
   const unsigned long offset_high = offset >> 32;

            

Reported by FlawFinder.

src/third_party/boost/boost/date_time/gregorian/gregorian_io.hpp
26 issues
setstate - This function is not sufficiently random for security-related functions such as key and nonce creation
Security

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

                      // if the user wants exceptions on failbit, we'll rethrow our 
        // date_time exception & set the failbit
        if(std::ios_base::failbit & exception_mask) {
          try { is.setstate(std::ios_base::failbit); } 
          catch(std::ios_base::failure&) {} // ignore this one
          throw; // rethrow original exception
        }
        else {
          // if the user want's to fail quietly, we simply set the failbit

            

Reported by FlawFinder.

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

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

                      }
        else {
          // if the user want's to fail quietly, we simply set the failbit
          is.setstate(std::ios_base::failbit); 
        } 
            
      }
    }    
    return is;

            

Reported by FlawFinder.

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

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

                    catch(...) { 
        std::ios_base::iostate exception_mask = is.exceptions();
        if(std::ios_base::failbit & exception_mask) {
          try { is.setstate(std::ios_base::failbit); } 
          catch(std::ios_base::failure&) {}
          throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 

            

Reported by FlawFinder.

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

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

                        throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 
        } 
            
      }
    }
    return is;

            

Reported by FlawFinder.

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

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

                    catch(...) { 
        std::ios_base::iostate exception_mask = is.exceptions();
        if(std::ios_base::failbit & exception_mask) {
          try { is.setstate(std::ios_base::failbit); } 
          catch(std::ios_base::failure&) {}
          throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 

            

Reported by FlawFinder.

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

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

                        throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 
        } 
            
      }
    }
    return is;

            

Reported by FlawFinder.

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

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

                    catch(...) { 
        std::ios_base::iostate exception_mask = is.exceptions();
        if(std::ios_base::failbit & exception_mask) {
          try { is.setstate(std::ios_base::failbit); } 
          catch(std::ios_base::failure&) {}
          throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 

            

Reported by FlawFinder.

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

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

                        throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 
        } 
            
      }
    }
    return is;

            

Reported by FlawFinder.

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

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

                    catch(...) { 
        std::ios_base::iostate exception_mask = is.exceptions();
        if(std::ios_base::failbit & exception_mask) {
          try { is.setstate(std::ios_base::failbit); } 
          catch(std::ios_base::failure&) {}
          throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 

            

Reported by FlawFinder.

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

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

                        throw; // rethrow original exception
        }
        else {
          is.setstate(std::ios_base::failbit); 
        } 
            
      }
    }
    return is;

            

Reported by FlawFinder.

src/third_party/wiredtiger/test/suite/test_txn01.py
26 issues
Unable to import 'wiredtiger'
Error

Line: 33 Column: 1

              # transactions
# [END_TAGS]

import wiredtiger, wttest
from wtscenario import make_scenarios

# test_txn01.py
#    Transactions: basic functionality
class test_txn01(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 33 Column: 1

              # transactions
# [END_TAGS]

import wiredtiger, wttest
from wtscenario import make_scenarios

# test_txn01.py
#    Transactions: basic functionality
class test_txn01(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Unused variable 'r'
Error

Line: 54 Column: 13

                      count = 0
        # Column-store appends result in phantoms, ignore records unless they
        # have our flag value.
        for r in cursor:
            if self.value_format == 'S' or cursor.get_value() == 0xab:
                count += 1
        return count

    # Checkpoint the database and assert the number of records visible to the

            

Reported by Pylint.

Unused variable 'r'
Error

Line: 145 Column: 13

                  # Return the number of records visible to the cursor.
    def cursor_count(self, cursor):
        count = 0
        for r in cursor:
            count += 1
        return count

    def test_read_committed_default(self):
        self.session.create(self.uri, 'key_format=S,value_format=S')

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 33 Column: 1

              # transactions
# [END_TAGS]

import wiredtiger, wttest
from wtscenario import make_scenarios

# test_txn01.py
#    Transactions: basic functionality
class test_txn01(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Class name "test_txn01" doesn't conform to PascalCase naming style
Error

Line: 38 Column: 1

              
# test_txn01.py
#    Transactions: basic functionality
class test_txn01(wttest.WiredTigerTestCase):
    nentries = 1000
    scenarios = make_scenarios([
        ('col-f', dict(uri='file:text_txn01',key_format='r',value_format='S')),
        ('col-t', dict(uri='table:text_txn01',key_format='r',value_format='S')),
        ('fix-f', dict(uri='file:text_txn01',key_format='r',value_format='8t')),

            

Reported by Pylint.

Missing class docstring
Error

Line: 38 Column: 1

              
# test_txn01.py
#    Transactions: basic functionality
class test_txn01(wttest.WiredTigerTestCase):
    nentries = 1000
    scenarios = make_scenarios([
        ('col-f', dict(uri='file:text_txn01',key_format='r',value_format='S')),
        ('col-t', dict(uri='table:text_txn01',key_format='r',value_format='S')),
        ('fix-f', dict(uri='file:text_txn01',key_format='r',value_format='8t')),

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 50 Column: 5

                  ])

    # Return the number of records visible to the cursor.
    def cursor_count(self, cursor):
        count = 0
        # Column-store appends result in phantoms, ignore records unless they
        # have our flag value.
        for r in cursor:
            if self.value_format == 'S' or cursor.get_value() == 0xab:

            

Reported by Pylint.

Variable name "r" doesn't conform to snake_case naming style
Error

Line: 54 Column: 13

                      count = 0
        # Column-store appends result in phantoms, ignore records unless they
        # have our flag value.
        for r in cursor:
            if self.value_format == 'S' or cursor.get_value() == 0xab:
                count += 1
        return count

    # Checkpoint the database and assert the number of records visible to the

            

Reported by Pylint.

src/third_party/abseil-cpp-master/abseil-cpp/absl/container/internal/unordered_set_constructor_test.h
26 issues
equal - Function does not check the second iterator for over-read conditions
Security

Line: 64 Column: 5 CWE codes: 126
Suggestion: 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

                using H = typename TypeParam::hasher;
  using E = typename TypeParam::key_equal;
  H hasher;
  E equal;
  TypeParam m(123, hasher, equal);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_TRUE(m.empty());
  EXPECT_THAT(keys(m), ::testing::UnorderedElementsAre());

            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 65 Column: 28 CWE codes: 126
Suggestion: 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

                using E = typename TypeParam::key_equal;
  H hasher;
  E equal;
  TypeParam m(123, hasher, equal);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_TRUE(m.empty());
  EXPECT_THAT(keys(m), ::testing::UnorderedElementsAre());
  EXPECT_GE(m.bucket_count(), 123);

            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 67 Column: 25 CWE codes: 126
Suggestion: 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

                E equal;
  TypeParam m(123, hasher, equal);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_TRUE(m.empty());
  EXPECT_THAT(keys(m), ::testing::UnorderedElementsAre());
  EXPECT_GE(m.bucket_count(), 123);
}


            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 78 Column: 5 CWE codes: 126
Suggestion: 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

                using E = typename TypeParam::key_equal;
  using A = typename TypeParam::allocator_type;
  H hasher;
  E equal;
  A alloc(0);
  TypeParam m(123, hasher, equal, alloc);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_EQ(m.get_allocator(), alloc);

            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 80 Column: 28 CWE codes: 126
Suggestion: 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

                H hasher;
  E equal;
  A alloc(0);
  TypeParam m(123, hasher, equal, alloc);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_EQ(m.get_allocator(), alloc);
  EXPECT_TRUE(m.empty());
  EXPECT_THAT(keys(m), ::testing::UnorderedElementsAre());

            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 82 Column: 25 CWE codes: 126
Suggestion: 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

                A alloc(0);
  TypeParam m(123, hasher, equal, alloc);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_EQ(m.get_allocator(), alloc);
  EXPECT_TRUE(m.empty());
  EXPECT_THAT(keys(m), ::testing::UnorderedElementsAre());
  EXPECT_GE(m.bucket_count(), 123);


            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 90 Column: 26 CWE codes: 126
Suggestion: 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

              
  const auto& cm = m;
  EXPECT_EQ(cm.hash_function(), hasher);
  EXPECT_EQ(cm.key_eq(), equal);
  EXPECT_EQ(cm.get_allocator(), alloc);
  EXPECT_TRUE(cm.empty());
  EXPECT_THAT(keys(cm), ::testing::UnorderedElementsAre());
  EXPECT_GE(cm.bucket_count(), 123);
}

            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 187 Column: 5 CWE codes: 126
Suggestion: 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

                using E = typename TypeParam::key_equal;
  using A = typename TypeParam::allocator_type;
  H hasher;
  E equal;
  A alloc(0);
  std::vector<T> values;
  for (size_t i = 0; i != 10; ++i)
    values.push_back(hash_internal::Generator<T>()());
  TypeParam m(values.begin(), values.end(), 123, hasher, equal, alloc);

            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 192 Column: 58 CWE codes: 126
Suggestion: 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

                std::vector<T> values;
  for (size_t i = 0; i != 10; ++i)
    values.push_back(hash_internal::Generator<T>()());
  TypeParam m(values.begin(), values.end(), 123, hasher, equal, alloc);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_EQ(m.get_allocator(), alloc);
  EXPECT_THAT(keys(m), ::testing::UnorderedElementsAreArray(values));
  EXPECT_GE(m.bucket_count(), 123);

            

Reported by FlawFinder.

equal - Function does not check the second iterator for over-read conditions
Security

Line: 194 Column: 25 CWE codes: 126
Suggestion: 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

                  values.push_back(hash_internal::Generator<T>()());
  TypeParam m(values.begin(), values.end(), 123, hasher, equal, alloc);
  EXPECT_EQ(m.hash_function(), hasher);
  EXPECT_EQ(m.key_eq(), equal);
  EXPECT_EQ(m.get_allocator(), alloc);
  EXPECT_THAT(keys(m), ::testing::UnorderedElementsAreArray(values));
  EXPECT_GE(m.bucket_count(), 123);
}


            

Reported by FlawFinder.

src/third_party/wiredtiger/test/suite/test_timestamp06.py
25 issues
Unable to import 'wiredtiger'
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import random
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):
    table_ts_log     = 'table:ts06_ts_logged'
    table_ts_nolog   = 'table:ts06_ts_nologged'

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import random
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):
    table_ts_log     = 'table:ts06_ts_logged'
    table_ts_nolog   = 'table:ts06_ts_nologged'

            

Reported by Pylint.

Unused variable 'k'
Error

Line: 97 Column: 13

                      # Count how many times the given value is present in the
        # logged timestamp table.
        actual_ts_log = 0
        for k, v in cur_ts_log:
            if check_value == v:
                actual_ts_log += 1
        cur_ts_log.close()
        # Count how many times the given value is present in the
        # not logged timestamp table

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

standard import "import random" should be placed before "from helper import copy_wiredtiger_home"
Error

Line: 34 Column: 1

              #

from helper import copy_wiredtiger_home
import random
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

third party import "import wiredtiger, wttest" should be placed before "from helper import copy_wiredtiger_home"
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import random
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):
    table_ts_log     = 'table:ts06_ts_logged'
    table_ts_nolog   = 'table:ts06_ts_nologged'

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 36 Column: 1

              from helper import copy_wiredtiger_home
import random
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios

class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):
    table_ts_log     = 'table:ts06_ts_logged'
    table_ts_nolog   = 'table:ts06_ts_nologged'

            

Reported by Pylint.

Missing class docstring
Error

Line: 39 Column: 1

              import wiredtiger, wttest
from wtscenario import make_scenarios

class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):
    table_ts_log     = 'table:ts06_ts_logged'
    table_ts_nolog   = 'table:ts06_ts_nologged'

    types = [
        # FLCS does not yet work in a timestamp world.

            

Reported by Pylint.

Class name "test_timestamp06" doesn't conform to PascalCase naming style
Error

Line: 39 Column: 1

              import wiredtiger, wttest
from wtscenario import make_scenarios

class test_timestamp06(wttest.WiredTigerTestCase, suite_subprocess):
    table_ts_log     = 'table:ts06_ts_logged'
    table_ts_nolog   = 'table:ts06_ts_nologged'

    types = [
        # FLCS does not yet work in a timestamp world.

            

Reported by Pylint.

Line too long (117/100)
Error

Line: 58 Column: 1

              
    conncfg = [
        ('nolog', dict(conn_config='create', using_log=False)),
        ('V1', dict(conn_config='create,log=(archive=false,enabled),compatibility=(release="2.9")', using_log=True)),
        ('V2', dict(conn_config='create,log=(archive=false,enabled)', using_log=True)),
    ]
    session_config = 'isolation=snapshot'

    scenarios = make_scenarios(conncfg, types, ckpt)

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_rollback_to_stable21.py
25 issues
Unable to import 'wiredtiger'
Error

Line: 34 Column: 1

              # rollback_to_stable:out_of_order_timestamps
# [END_TAGS]

from wiredtiger import stat, WT_NOTFOUND
from wtscenario import make_scenarios
from helper import simulate_crash_restart
from wtdataset import SimpleDataSet
from test_rollback_to_stable01 import test_rollback_to_stable_base


            

Reported by Pylint.

An attribute defined in wttest line 401 hides this method
Error

Line: 50 Column: 5

              
    scenarios = make_scenarios(key_format_values)

    def conn_config(self):
        config = 'cache_size=250MB,statistics=(all),statistics_log=(json,on_close,wait=1)'
        return config

    def test_rollback_to_stable(self):
        nrows = 1000

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 92 Column: 13

              
        for i in range(1, nrows + 1):
            evict_cursor.set_key(i)
            self.assertEquals(evict_cursor.search(), 0)
            self.assertEqual(evict_cursor.get_value(), valuea)
            evict_cursor.reset()

        s.rollback_transaction()
        self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(40))

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 159 Column: 13

              
        for i in range(1, nrows + 1):
            evict_cursor.set_key(i)
            self.assertEquals(evict_cursor.search(), 0)
            self.assertEqual(evict_cursor.get_value(), valuea)
            evict_cursor.reset()

        s.rollback_transaction()
        self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(40))

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 226 Column: 13

              
        for i in range(1, nrows + 1):
            evict_cursor.set_key(i)
            self.assertEquals(evict_cursor.search(), WT_NOTFOUND)
            evict_cursor.reset()

        s.rollback_transaction()
        self.conn.set_timestamp('stable_timestamp=' + self.timestamp_str(40))
        s.checkpoint()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Class name "test_rollback_to_stable21" doesn't conform to PascalCase naming style
Error

Line: 42 Column: 1

              
# test_rollback_to_stable21.py
# Test rollback to stable when an out of order prepared transaction is written to disk
class test_rollback_to_stable21(test_rollback_to_stable_base):
    key_format_values = [
        ('column', dict(key_format='r')),
        ('integer_row', dict(key_format='i')),
    ]


            

Reported by Pylint.

Missing class docstring
Error

Line: 42 Column: 1

              
# test_rollback_to_stable21.py
# Test rollback to stable when an out of order prepared transaction is written to disk
class test_rollback_to_stable21(test_rollback_to_stable_base):
    key_format_values = [
        ('column', dict(key_format='r')),
        ('integer_row', dict(key_format='i')),
    ]


            

Reported by Pylint.

Method could be a function
Error

Line: 50 Column: 5

              
    scenarios = make_scenarios(key_format_values)

    def conn_config(self):
        config = 'cache_size=250MB,statistics=(all),statistics_log=(json,on_close,wait=1)'
        return config

    def test_rollback_to_stable(self):
        nrows = 1000

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 50 Column: 5

              
    scenarios = make_scenarios(key_format_values)

    def conn_config(self):
        config = 'cache_size=250MB,statistics=(all),statistics_log=(json,on_close,wait=1)'
        return config

    def test_rollback_to_stable(self):
        nrows = 1000

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_tiered08.py
25 issues
Unable to import 'wiredtiger'
Error

Line: 35 Column: 1

              # [END_TAGS]
#

import os, threading, time, wiredtiger, wttest
from wiredtiger import stat
from wtthread import checkpoint_thread, flush_tier_thread

# test_tiered08.py
#   Run background checkpoints and flush_tier operations while inserting

            

Reported by Pylint.

Unable to import 'wiredtiger'
Error

Line: 36 Column: 1

              #

import os, threading, time, wiredtiger, wttest
from wiredtiger import stat
from wtthread import checkpoint_thread, flush_tier_thread

# test_tiered08.py
#   Run background checkpoints and flush_tier operations while inserting
#   data into a table from another thread.

            

Reported by Pylint.

An attribute defined in wttest line 401 hides this method
Error

Line: 56 Column: 5

                  bucket_prefix = "pfx_"
    extension_name = "local_store"

    def conn_config(self):
        if not os.path.exists(self.bucket):
            os.mkdir(self.bucket)
        return \
          'statistics=(fast),' + \
          'tiered_storage=(auth_token=%s,' % self.auth_token + \

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 35 Column: 1

              # [END_TAGS]
#

import os, threading, time, wiredtiger, wttest
from wiredtiger import stat
from wtthread import checkpoint_thread, flush_tier_thread

# test_tiered08.py
#   Run background checkpoints and flush_tier operations while inserting

            

Reported by Pylint.

Redefining name 'stat' from outer scope (line 36)
Error

Line: 73 Column: 24

                          extlist.skip_if_missing = True
        extlist.extension('storage_sources', self.extension_name)

    def get_stat(self, stat):
        stat_cursor = self.session.open_cursor('statistics:')
        val = stat_cursor[stat][2]
        stat_cursor.close()
        return val


            

Reported by Pylint.

FIXME-WT-7833
Error

Line: 112 Column: 3

              
    def test_tiered08(self):

        # FIXME-WT-7833
        #     This test can trigger races in file handle access during flush_tier.
        #     We will re-enable it when that is fixed.
        self.skipTest('Concurrent flush_tier and insert operations not supported yet.')

        cfg = self.conn_config()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (os, threading, time, wiredtiger, wttest)
Error

Line: 35 Column: 1

              # [END_TAGS]
#

import os, threading, time, wiredtiger, wttest
from wiredtiger import stat
from wtthread import checkpoint_thread, flush_tier_thread

# test_tiered08.py
#   Run background checkpoints and flush_tier operations while inserting

            

Reported by Pylint.

Imports from package os are not grouped
Error

Line: 35 Column: 1

              # [END_TAGS]
#

import os, threading, time, wiredtiger, wttest
from wiredtiger import stat
from wtthread import checkpoint_thread, flush_tier_thread

# test_tiered08.py
#   Run background checkpoints and flush_tier operations while inserting

            

Reported by Pylint.

third party import "from wiredtiger import stat" should be placed before "import os, threading, time, wiredtiger, wttest"
Error

Line: 36 Column: 1

              #

import os, threading, time, wiredtiger, wttest
from wiredtiger import stat
from wtthread import checkpoint_thread, flush_tier_thread

# test_tiered08.py
#   Run background checkpoints and flush_tier operations while inserting
#   data into a table from another thread.

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_join09.py
25 issues
Unable to import 'wiredtiger'
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import os
import wiredtiger, wttest, run
from wtscenario import make_scenarios

# test_join09.py
#    Join bloom filters with false positives
class test_join09(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Unused import os
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os
import wiredtiger, wttest, run
from wtscenario import make_scenarios

# test_join09.py
#    Join bloom filters with false positives

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import os
import wiredtiger, wttest, run
from wtscenario import make_scenarios

# test_join09.py
#    Join bloom filters with false positives
class test_join09(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Unused import run
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import os
import wiredtiger, wttest, run
from wtscenario import make_scenarios

# test_join09.py
#    Join bloom filters with false positives
class test_join09(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 74 Column: 9

                      jc = self.session.open_cursor('join:table:join09', None, None)
        c0 = self.session.open_cursor('index:join09:index0', None, None)
        c0.set_key('520')
        self.assertEquals(0, c0.search())
        self.session.join(jc, c0, 'compare=ge')

        joinconfig = 'compare=eq,' + self.config
        c1 = self.session.open_cursor('index:join09:index1', None, None)
        c1.set_key('555')

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 80 Column: 9

                      joinconfig = 'compare=eq,' + self.config
        c1 = self.session.open_cursor('index:join09:index1', None, None)
        c1.set_key('555')
        self.assertEquals(0, c1.search())
        self.session.join(jc, c1, joinconfig)

        mbr = set(range(520,600)) | set(range(53,60))

        fp_count = 0

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 89 Column: 13

                      while jc.next() == 0:
            [k] = jc.get_keys()
            [v0,v1] = jc.get_values()
            self.assertEquals(self.gen_values(k), [v0, v1])
            if not k in mbr:
                # With false positives, we can see extra values
                if self.false_positives:
                    fp_count += 1
                    continue

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 102 Column: 9

              
        if len(mbr) != 0:
            self.tty('**** ERROR: did not see these: ' + str(mbr))
        self.assertEquals(0, len(mbr))

        # Turning on false positives does not guarantee we'll see extra
        # values, but we've configured our test with a low count to
        # make sure it happens.
        if self.false_positives:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest, run)
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import os
import wiredtiger, wttest, run
from wtscenario import make_scenarios

# test_join09.py
#    Join bloom filters with false positives
class test_join09(wttest.WiredTigerTestCase):

            

Reported by Pylint.

buildscripts/gdb/mongo_printers.py
25 issues
Unable to import 'gdb.printing'
Error

Line: 8 Column: 1

              import sys
import uuid

import gdb.printing

try:
    import bson
    import bson.json_util
    import collections

            

Reported by Pylint.

TODO: abstract out navigating a std::vector
Error

Line: 252 Column: 3

                      self.val = val

        decl_vector = val["_decorations"]["_registry"]["_decorationInfo"]
        # TODO: abstract out navigating a std::vector
        self.start = decl_vector["_M_impl"]["_M_start"]
        finish = decl_vector["_M_impl"]["_M_finish"]
        decorable_t = val.type.template_argument(0)
        decinfo_t = gdb.lookup_type('mongo::DecorationRegistry<{}>::DecorationInfo'.format(
            str(decorable_t).replace("class", "").strip()))

            

Reported by Pylint.

TODO: abstract out navigating a std::function
Error

Line: 279 Column: 3

              
            # In order to get the type stored in the decorable, we examine the type of its
            # constructor, and do some string manipulations.
            # TODO: abstract out navigating a std::function
            type_name = str(descriptor["constructor"])
            type_name = type_name[0:len(type_name) - 1]
            type_name = type_name[0:type_name.rindex(">")]
            type_name = type_name[type_name.index("constructAt<"):].replace("constructAt<", "")


            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 37 Column: 1

              ###################################################################################################


class StatusPrinter(object):
    """Pretty-printer for mongo::Status."""

    def __init__(self, val):
        """Initialize StatusPrinter."""
        self.val = val

            

Reported by Pylint.

Class 'StatusPrinter' inherits from object, can be safely removed from bases in python3
Error

Line: 37 Column: 1

              ###################################################################################################


class StatusPrinter(object):
    """Pretty-printer for mongo::Status."""

    def __init__(self, val):
        """Initialize StatusPrinter."""
        self.val = val

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 58 Column: 1

                      return 'Status(%s, %s)' % (code, reason)


class StatusWithPrinter(object):
    """Pretty-printer for mongo::StatusWith<>."""

    def __init__(self, val):
        """Initialize StatusWithPrinter."""
        self.val = val

            

Reported by Pylint.

Class 'StatusWithPrinter' inherits from object, can be safely removed from bases in python3
Error

Line: 58 Column: 1

                      return 'Status(%s, %s)' % (code, reason)


class StatusWithPrinter(object):
    """Pretty-printer for mongo::StatusWith<>."""

    def __init__(self, val):
        """Initialize StatusWithPrinter."""
        self.val = val

            

Reported by Pylint.

Class 'StringDataPrinter' inherits from object, can be safely removed from bases in python3
Error

Line: 80 Column: 1

                      return 'StatusWith(%s, %s)' % (code, reason)


class StringDataPrinter(object):
    """Pretty-printer for mongo::StringData."""

    def __init__(self, val):
        """Initialize StringDataPrinter."""
        self.val = val

            

Reported by Pylint.

Class 'BSONObjPrinter' inherits from object, can be safely removed from bases in python3
Error

Line: 100 Column: 1

                      return self.val['_data'].lazy_string(length=size)


class BSONObjPrinter(object):
    """Pretty-printer for mongo::BSONObj."""

    def __init__(self, val):
        """Initialize BSONObjPrinter."""
        self.val = val

            

Reported by Pylint.

Class 'OplogEntryPrinter' inherits from object, can be safely removed from bases in python3
Error

Line: 172 Column: 1

                      return "%s BSONObj %s bytes @ %s%s" % (ownership, size, self.ptr, suffix)


class OplogEntryPrinter(object):
    """Pretty-printer for mongo::repl::OplogEntry."""

    def __init__(self, val):
        """Initialize OplogEntryPrinter."""
        self.val = val

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_tiered04.py
25 issues
Unable to import 'wiredtiger'
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wttest
from wiredtiger import stat
StorageSource = wiredtiger.StorageSource  # easy access to constants

# test_tiered04.py
#    Basic tiered storage API test.

            

Reported by Pylint.

Unable to import 'wiredtiger'
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wttest
from wiredtiger import stat
StorageSource = wiredtiger.StorageSource  # easy access to constants

# test_tiered04.py
#    Basic tiered storage API test.
class test_tiered04(wttest.WiredTigerTestCase):

            

Reported by Pylint.

An attribute defined in wttest line 401 hides this method
Error

Line: 58 Column: 5

                  object_uri_val = 15 * 1024 * 1024
    retention = 600
    retention1 = 350
    def conn_config(self):
        os.mkdir(self.bucket)
        os.mkdir(self.bucket1)
        return \
          'statistics=(all),' + \
          'tiered_storage=(auth_token=%s,' % self.auth_token + \

            

Reported by Pylint.

Redefining name 'stat' from outer scope (line 30)
Error

Line: 84 Column: 24

                      c.close()
        self.assertTrue(val_str in val)

    def get_stat(self, stat, uri):
        if uri == None:
            stat_cursor = self.session.open_cursor('statistics:')
        else:
            stat_cursor = self.session.open_cursor('statistics:' + uri)
        val = stat_cursor[stat][2]

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 97 Column: 9

                      for i in range(0, n):
            self.assertEqual(tc[str(i)], str(i))
        tc.set_key(str(n))
        self.assertEquals(tc.search(), wiredtiger.WT_NOTFOUND)

    # Test calling the flush_tier API.
    def test_tiered(self):
        # Create three tables. One using the system tiered storage, one
        # specifying its own bucket and object size and one using no

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (os, wiredtiger, wttest)
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wttest
from wiredtiger import stat
StorageSource = wiredtiger.StorageSource  # easy access to constants

# test_tiered04.py
#    Basic tiered storage API test.

            

Reported by Pylint.

third party import "from wiredtiger import stat" should be placed before "import os, wiredtiger, wttest"
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wttest
from wiredtiger import stat
StorageSource = wiredtiger.StorageSource  # easy access to constants

# test_tiered04.py
#    Basic tiered storage API test.
class test_tiered04(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Missing class docstring
Error

Line: 35 Column: 1

              
# test_tiered04.py
#    Basic tiered storage API test.
class test_tiered04(wttest.WiredTigerTestCase):

    # If the 'uri' changes all the other names must change with it.
    fileuri_base = 'file:test_tiered04-000000000'
    objuri = 'object:test_tiered04-0000000001.wtobj'
    tiereduri = "tiered:test_tiered04"

            

Reported by Pylint.

Class name "test_tiered04" doesn't conform to PascalCase naming style
Error

Line: 35 Column: 1

              
# test_tiered04.py
#    Basic tiered storage API test.
class test_tiered04(wttest.WiredTigerTestCase):

    # If the 'uri' changes all the other names must change with it.
    fileuri_base = 'file:test_tiered04-000000000'
    objuri = 'object:test_tiered04-0000000001.wtobj'
    tiereduri = "tiered:test_tiered04"

            

Reported by Pylint.