The following issues were found
src/third_party/wiredtiger/src/utilities/util_main.c
17 issues
Line: 173
Column: 18
CWE codes:
362
/* The next argument is the command name. */
if (argc < 1) {
if (meta_verify)
goto open;
usage();
goto err;
}
command = argv[0];
Reported by FlawFinder.
Line: 264
Column: 1
CWE codes:
362
goto err;
}
open:
/* Build the configuration string. */
len = 10; /* some slop */
p1 = p2 = p3 = "";
len += strlen("error_prefix=wt");
if (config != NULL)
Reported by FlawFinder.
Line: 116
Column: 45
CWE codes:
126
break;
case 'E': /* secret key */
if (secretkey != NULL)
wt_explicit_zero(secretkey, strlen(secretkey));
free(secretkey); /* lint: set more than once */
if ((secretkey = strdup(__wt_optarg)) == NULL) {
(void)util_err(NULL, errno, NULL);
goto err;
}
Reported by FlawFinder.
Line: 122
Column: 43
CWE codes:
126
(void)util_err(NULL, errno, NULL);
goto err;
}
wt_explicit_zero(__wt_optarg, strlen(__wt_optarg));
break;
case 'h': /* home directory */
home = __wt_optarg;
break;
case 'L': /* no logging */
Reported by FlawFinder.
Line: 268
Column: 12
CWE codes:
126
/* Build the configuration string. */
len = 10; /* some slop */
p1 = p2 = p3 = "";
len += strlen("error_prefix=wt");
if (config != NULL)
len += strlen(config);
if (cmd_config != NULL)
len += strlen(cmd_config);
if (readonly_config != NULL)
Reported by FlawFinder.
Line: 270
Column: 16
CWE codes:
126
p1 = p2 = p3 = "";
len += strlen("error_prefix=wt");
if (config != NULL)
len += strlen(config);
if (cmd_config != NULL)
len += strlen(cmd_config);
if (readonly_config != NULL)
len += strlen(readonly_config);
if (salvage_config != NULL)
Reported by FlawFinder.
Line: 272
Column: 16
CWE codes:
126
if (config != NULL)
len += strlen(config);
if (cmd_config != NULL)
len += strlen(cmd_config);
if (readonly_config != NULL)
len += strlen(readonly_config);
if (salvage_config != NULL)
len += strlen(salvage_config);
if (secretkey != NULL) {
Reported by FlawFinder.
Line: 274
Column: 16
CWE codes:
126
if (cmd_config != NULL)
len += strlen(cmd_config);
if (readonly_config != NULL)
len += strlen(readonly_config);
if (salvage_config != NULL)
len += strlen(salvage_config);
if (secretkey != NULL) {
len += strlen(secretkey) + 30;
p1 = ",encryption=(secretkey=";
Reported by FlawFinder.
Line: 276
Column: 16
CWE codes:
126
if (readonly_config != NULL)
len += strlen(readonly_config);
if (salvage_config != NULL)
len += strlen(salvage_config);
if (secretkey != NULL) {
len += strlen(secretkey) + 30;
p1 = ",encryption=(secretkey=";
p2 = secretkey;
p3 = ")";
Reported by FlawFinder.
Line: 278
Column: 16
CWE codes:
126
if (salvage_config != NULL)
len += strlen(salvage_config);
if (secretkey != NULL) {
len += strlen(secretkey) + 30;
p1 = ",encryption=(secretkey=";
p2 = secretkey;
p3 = ")";
}
len += strlen(rec_config);
Reported by FlawFinder.
src/third_party/wiredtiger/examples/c/ex_col_store.c
17 issues
Line: 172
Column: 5
CWE codes:
327
Suggestion:
Use a more secure technique for acquiring random values
WEATHER w;
int country, day;
srand((unsigned int)getpid());
for (int i = 0; i < NUM_ENTRIES; i++) {
day = rand() % 7;
switch (day) {
case 0:
Reported by FlawFinder.
Line: 53
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
uint8_t humidity;
uint8_t wind;
uint8_t feels_like_temp;
char day[5];
char country[5];
} WEATHER;
/*! [col-store decl] */
Reported by FlawFinder.
Line: 54
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
uint8_t wind;
uint8_t feels_like_temp;
char day[5];
char country[5];
} WEATHER;
/*! [col-store decl] */
static void update_celsius_to_fahrenheit(WT_SESSION *session);
Reported by FlawFinder.
Line: 178
Column: 13
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
day = rand() % 7;
switch (day) {
case 0:
strcpy(w.day, "MON");
break;
case 1:
strcpy(w.day, "TUE");
break;
case 2:
Reported by FlawFinder.
Line: 181
Column: 13
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
strcpy(w.day, "MON");
break;
case 1:
strcpy(w.day, "TUE");
break;
case 2:
strcpy(w.day, "WED");
break;
case 3:
Reported by FlawFinder.
Line: 184
Column: 13
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
strcpy(w.day, "TUE");
break;
case 2:
strcpy(w.day, "WED");
break;
case 3:
strcpy(w.day, "THU");
break;
case 4:
Reported by FlawFinder.
Line: 187
Column: 13
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
strcpy(w.day, "WED");
break;
case 3:
strcpy(w.day, "THU");
break;
case 4:
strcpy(w.day, "FRI");
break;
case 5:
Reported by FlawFinder.
Line: 190
Column: 13
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
strcpy(w.day, "THU");
break;
case 4:
strcpy(w.day, "FRI");
break;
case 5:
strcpy(w.day, "SAT");
break;
case 6:
Reported by FlawFinder.
Line: 193
Column: 13
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
strcpy(w.day, "FRI");
break;
case 5:
strcpy(w.day, "SAT");
break;
case 6:
strcpy(w.day, "SUN");
break;
default:
Reported by FlawFinder.
Line: 196
Column: 13
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
strcpy(w.day, "SAT");
break;
case 6:
strcpy(w.day, "SUN");
break;
default:
assert(false);
}
/* 24-hour-time 0-2400. */
Reported by FlawFinder.
src/third_party/wiredtiger/examples/c/ex_backup.c
17 issues
Line: 66
Column: 17
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
else
(void)snprintf(
buf, sizeof(buf), "../../wt -R -h %s.%d dump logtest > %s.%d", home_full, i, full_out, i);
error_check(system(buf));
/*
* Now run dump on the incremental directory.
*/
(void)snprintf(
buf, sizeof(buf), "../../wt -R -h %s.%d dump logtest > %s.%d", home_incr, i, incr_out, i);
Reported by FlawFinder.
Line: 72
Column: 17
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
*/
(void)snprintf(
buf, sizeof(buf), "../../wt -R -h %s.%d dump logtest > %s.%d", home_incr, i, incr_out, i);
error_check(system(buf));
/*
* Compare the files.
*/
(void)snprintf(buf, sizeof(buf), "cmp %s.%d %s.%d", full_out, i, incr_out, i);
Reported by FlawFinder.
Line: 78
Column: 11
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
* Compare the files.
*/
(void)snprintf(buf, sizeof(buf), "cmp %s.%d %s.%d", full_out, i, incr_out, i);
ret = system(buf);
if (i == 0)
(void)snprintf(msg, sizeof(msg), "%s", "MAIN");
else
(void)snprintf(msg, sizeof(msg), "%d", i);
printf("Iteration %s: Tables %s.%d and %s.%d %s\n", msg, full_out, i, incr_out, i,
Reported by FlawFinder.
Line: 94
Column: 21
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
if (i != 0) {
(void)snprintf(buf, sizeof(buf), "rm -rf %s.%d %s.%d %s.%d %s.%d", home_full, i, home_incr,
i, full_out, i, incr_out, i);
error_check(system(buf));
}
return (ret);
}
/*
Reported by FlawFinder.
Line: 116
Column: 21
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
* original at the end.
*/
(void)snprintf(buf, sizeof(buf), "rm -rf %s.%d && mkdir %s.%d", home_incr, i, home_incr, i);
error_check(system(buf));
if (i == 0)
continue;
/*
* For full backups we need 1-N.
*/
Reported by FlawFinder.
Line: 123
Column: 21
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
* For full backups we need 1-N.
*/
(void)snprintf(buf, sizeof(buf), "rm -rf %s.%d && mkdir %s.%d", home_full, i, home_full, i);
error_check(system(buf));
}
}
static void
add_work(WT_SESSION *session, int iter)
Reported by FlawFinder.
Line: 176
Column: 29
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
for (j = 0; j < MAX_ITERATIONS; j++) {
(void)snprintf(h, sizeof(h), "%s.%d", home_incr, j);
(void)snprintf(buf, sizeof(buf), "cp %s/%s %s/%s", home, filename, h, filename);
error_check(system(buf));
}
else {
(void)snprintf(h, sizeof(h), "%s.%d", home_full, i);
(void)snprintf(buf, sizeof(buf), "cp %s/%s %s/%s", home, filename, hdir, filename);
error_check(system(buf));
Reported by FlawFinder.
Line: 181
Column: 25
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
else {
(void)snprintf(h, sizeof(h), "%s.%d", home_full, i);
(void)snprintf(buf, sizeof(buf), "cp %s/%s %s/%s", home, filename, hdir, filename);
error_check(system(buf));
}
}
scan_end_check(ret == WT_NOTFOUND);
error_check(cursor->close(cursor));
}
Reported by FlawFinder.
Line: 206
Column: 21
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
*/
(void)snprintf(h, sizeof(h), "%s.0", home_incr);
(void)snprintf(buf, sizeof(buf), "cp %s/%s %s/%s", home, filename, h, filename);
error_check(system(buf));
for (j = i; j < MAX_ITERATIONS; j++) {
(void)snprintf(h, sizeof(h), "%s.%d", home_incr, j);
(void)snprintf(buf, sizeof(buf), "cp %s/%s %s/%s", home, filename, h, filename);
error_check(system(buf));
}
Reported by FlawFinder.
Line: 210
Column: 25
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
for (j = i; j < MAX_ITERATIONS; j++) {
(void)snprintf(h, sizeof(h), "%s.%d", home_incr, j);
(void)snprintf(buf, sizeof(buf), "cp %s/%s %s/%s", home, filename, h, filename);
error_check(system(buf));
}
}
scan_end_check(ret == WT_NOTFOUND);
/*
Reported by FlawFinder.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Platform/aix.py
17 issues
Line: 38
Column: 1
import os
import subprocess
from . import posix
import SCons.Util
import SCons.Action
def get_xlc(env, xlc=None, packages=[]):
Reported by Pylint.
Line: 35
Column: 1
__revision__ = "src/engine/SCons/Platform/aix.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import os
import subprocess
from . import posix
import SCons.Util
Reported by Pylint.
Line: 43
Column: 1
import SCons.Util
import SCons.Action
def get_xlc(env, xlc=None, packages=[]):
# Use the AIX package installer tool lslpp to figure out where a
# given xl* compiler is installed and what version it is.
xlcPath = None
xlcVersion = None
Reported by Pylint.
Line: 55
Column: 16
xlc = xlc[0]
for package in packages:
# find the installed filename, which may be a symlink as well
pipe = SCons.Action._subproc(env, ['lslpp', '-fc', package],
stdin = 'devnull',
stderr = 'devnull',
stdout = subprocess.PIPE)
# output of lslpp is something like this:
# #Path:Fileset:File
Reported by Pylint.
Line: 71
Column: 26
if ('/' in xlc and filename == xlc) \
or ('/' not in xlc and filename.endswith('/' + xlc)):
xlcVersion = fileset.split()[1]
xlcPath, sep, xlc = filename.rpartition('/')
pass
pass
return (xlcPath, xlc, xlcVersion)
def generate(env):
Reported by Pylint.
Line: 72
Column: 13
or ('/' not in xlc and filename.endswith('/' + xlc)):
xlcVersion = fileset.split()[1]
xlcPath, sep, xlc = filename.rpartition('/')
pass
pass
return (xlcPath, xlc, xlcVersion)
def generate(env):
posix.generate(env)
Reported by Pylint.
Line: 73
Column: 9
xlcVersion = fileset.split()[1]
xlcPath, sep, xlc = filename.rpartition('/')
pass
pass
return (xlcPath, xlc, xlcVersion)
def generate(env):
posix.generate(env)
#Based on AIX 5.2: ARG_MAX=24576 - 3000 for environment expansion
Reported by Pylint.
Line: 33
Column: 1
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
__revision__ = "src/engine/SCons/Platform/aix.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import os
import subprocess
from . import posix
Reported by Pylint.
Line: 36
Suggestion:
https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess
__revision__ = "src/engine/SCons/Platform/aix.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"
import os
import subprocess
from . import posix
import SCons.Util
import SCons.Action
Reported by Bandit.
Line: 40
Column: 1
from . import posix
import SCons.Util
import SCons.Action
def get_xlc(env, xlc=None, packages=[]):
# Use the AIX package installer tool lslpp to figure out where a
# given xl* compiler is installed and what version it is.
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_durable_ts03.py
17 issues
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtscenario import make_scenarios
# test_durable_ts03.py
# Check that the checkpoint honors the durable timestamp of updates.
class test_durable_ts03(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtscenario import make_scenarios
# test_durable_ts03.py
# Check that the checkpoint honors the durable timestamp of updates.
Reported by Pylint.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtscenario import make_scenarios
# test_durable_ts03.py
# Check that the checkpoint honors the durable timestamp of updates.
class test_durable_ts03(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 86
Column: 13
# Check the checkpoint wrote only the durable updates.
cursor2 = self.session.open_cursor(
uri, None, 'checkpoint=WiredTigerCheckpoint')
for key, value in cursor2:
self.assertEqual(value, valueA)
self.assertEquals(cursor.reset(), 0)
session.begin_transaction('read_timestamp=' + self.timestamp_str(150))
for key, value in cursor:
Reported by Pylint.
Line: 89
Column: 9
for key, value in cursor2:
self.assertEqual(value, valueA)
self.assertEquals(cursor.reset(), 0)
session.begin_transaction('read_timestamp=' + self.timestamp_str(150))
for key, value in cursor:
self.assertEqual(value, valueA)
session.commit_transaction()
Reported by Pylint.
Line: 96
Column: 9
session.commit_transaction()
# Read the updated data to confirm that it is visible.
self.assertEquals(cursor.reset(), 0)
session.begin_transaction('read_timestamp=' + self.timestamp_str(210))
for key, value in cursor:
self.assertEqual(value, valueB)
session.commit_transaction()
Reported by Pylint.
Line: 114
Column: 9
for key, value in cursor:
self.assertEqual(value, valueA)
self.assertEquals(cursor.reset(), 0)
for i in range(1, nrows + 1):
session.begin_transaction()
cursor[i] = valueC
session.prepare_transaction('prepare_timestamp=' + self.timestamp_str(220))
session.timestamp_transaction('commit_timestamp=' + self.timestamp_str(230))
Reported by Pylint.
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.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtscenario import make_scenarios
# test_durable_ts03.py
# Check that the checkpoint honors the durable timestamp of updates.
class test_durable_ts03(wttest.WiredTigerTestCase):
Reported by Pylint.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtscenario import make_scenarios
# test_durable_ts03.py
# Check that the checkpoint honors the durable timestamp of updates.
class test_durable_ts03(wttest.WiredTigerTestCase):
Reported by Pylint.
src/third_party/wiredtiger/bench/workgen/runner/runner/__init__.py
17 issues
Line: 50
Column: 5
# Initialize the python path so needed modules can be imported.
# If the path already works, don't change it.
try:
import wiredtiger
except:
# We'll try hard to make the importing work, we'd like to runners
# to be executable directly without having to set environment variables.
sys.path.insert(0, os.path.join(wt_dir, 'lang', 'python'))
sys.path.insert(0, os.path.join(wt_builddir, 'lang', 'python'))
Reported by Pylint.
Line: 57
Column: 9
sys.path.insert(0, os.path.join(wt_dir, 'lang', 'python'))
sys.path.insert(0, os.path.join(wt_builddir, 'lang', 'python'))
try:
import wiredtiger
except:
# If the .libs directory is not in our library search path,
# we need to set it and retry. However, the dynamic link
# library has already cached its value, our only option is
# to restart the Python interpreter.
Reported by Pylint.
Line: 87
Column: 1
sys.path.insert(0, os.path.join(wt_builddir, 'bench', 'workgen'))
import workgen
from .core import txn, extensions_config, op_append, op_group_transaction, op_log_like, op_multi_table, op_populate_with_range, sleep, timed
from .latency import workload_latency
Reported by Pylint.
Line: 88
Column: 1
import workgen
from .core import txn, extensions_config, op_append, op_group_transaction, op_log_like, op_multi_table, op_populate_with_range, sleep, timed
from .latency import workload_latency
Reported by Pylint.
Line: 43
Column: 5
last = ''
try:
last = ':' + os.environ[pathvar]
except:
pass
os.environ[pathvar] = s + last
# Initialize the python path so needed modules can be imported.
# If the path already works, don't change it.
Reported by Pylint.
Line: 51
Column: 1
# If the path already works, don't change it.
try:
import wiredtiger
except:
# We'll try hard to make the importing work, we'd like to runners
# to be executable directly without having to set environment variables.
sys.path.insert(0, os.path.join(wt_dir, 'lang', 'python'))
sys.path.insert(0, os.path.join(wt_builddir, 'lang', 'python'))
try:
Reported by Pylint.
Line: 58
Column: 5
sys.path.insert(0, os.path.join(wt_builddir, 'lang', 'python'))
try:
import wiredtiger
except:
# If the .libs directory is not in our library search path,
# we need to set it and retry. However, the dynamic link
# library has already cached its value, our only option is
# to restart the Python interpreter.
if '_workgen_init' not in os.environ:
Reported by Pylint.
Line: 72
Column: 20
py_args.insert(0, sys.executable)
try:
os.execv(sys.executable, py_args)
except Exception as exception:
print('re-exec failed: ' + str(exception), file=sys.stderr)
print(' exec(' + sys.executable + ', ' + str(py_args) + ')')
print('Try adding "' + dotlibs + '" to the', file=sys.stderr)
print('LD_LIBRARY_PATH environment variable before running ' + \
'this program again.', file=sys.stderr)
Reported by Pylint.
Line: 82
Column: 1
try:
import workgen
except:
sys.path.insert(0, os.path.join(workgen_src, 'workgen'))
sys.path.insert(0, os.path.join(wt_builddir, 'bench', 'workgen'))
import workgen
from .core import txn, extensions_config, op_append, op_group_transaction, op_log_like, op_multi_table, op_populate_with_range, sleep, timed
Reported by Pylint.
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.
site_scons/site_tools/idl_tool.py
17 issues
Line: 29
Column: 1
import subprocess
import sys
import SCons
# We lazily import this at generate time.
idlc = None
IDL_GLOBAL_DEPS = []
Reported by Pylint.
Line: 117
Column: 5
env["BUILDERS"]["Idlc"] = bld
sys.path.append(env.Dir("#buildscripts").get_abspath())
import buildscripts.idl.idl.compiler as idlc_mod
global idlc
idlc = idlc_mod
env["IDLC"] = "$PYTHON buildscripts/idl/idlc.py"
Reported by Pylint.
Line: 25
Column: 1
"""IDL Compiler Scons Tool."""
import os.path
import subprocess
import sys
import SCons
Reported by Pylint.
Line: 26
Column: 1
"""IDL Compiler Scons Tool."""
import os.path
import subprocess
import sys
import SCons
# We lazily import this at generate time.
Reported by Pylint.
Line: 58
Column: 28
IDLCAction = SCons.Action.Action("$IDLCCOM", "$IDLCCOMSTR")
def idl_scanner(node, env, path):
# When generating ninja we only need to add the IDL_GLOBAL_DEPS
# because the implicit dependencies will be picked up using the
# deps=msvc method.
if env.get("GENERATING_NINJA", False):
Reported by Pylint.
Line: 99
Column: 3
idl_scanner = SCons.Scanner.Scanner(function=idl_scanner, skeys=[".idl"])
# TODO: create a scanner for imports when imports are implemented
IDLCBuilder = SCons.Builder.Builder(
action=IDLCAction,
emitter=idlc_emitter,
src_suffix=".idl",
suffix=".cpp",
Reported by Pylint.
Line: 119
Column: 5
sys.path.append(env.Dir("#buildscripts").get_abspath())
import buildscripts.idl.idl.compiler as idlc_mod
global idlc
idlc = idlc_mod
env["IDLC"] = "$PYTHON buildscripts/idl/idlc.py"
base_dir = env.Dir("$BUILD_DIR").path
env["IDLCFLAGS"] = [
Reported by Pylint.
Line: 135
Column: 5
else None)
env["IDLCSUFFIX"] = ".idl"
global IDL_GLOBAL_DEPS
IDL_GLOBAL_DEPS = env.Glob("#buildscripts/idl/*.py") + env.Glob(
"#buildscripts/idl/idl/*.py"
)
env["IDL_HAS_INLINE_DEPENDENCIES"] = True
Reported by Pylint.
Line: 142
Column: 12
env["IDL_HAS_INLINE_DEPENDENCIES"] = True
def exists(env):
return True
Reported by Pylint.
Line: 26
Suggestion:
https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess
"""IDL Compiler Scons Tool."""
import os.path
import subprocess
import sys
import SCons
# We lazily import this at generate time.
Reported by Bandit.
src/third_party/mozjs-60/extract/js/src/devtools/rootAnalysis/t/exceptions/test.py
17 issues
Line: 1
Column: 1
test.compile("source.cpp", '-fno-exceptions')
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 0)
# If we compile with exceptions, then there *should* be a hazard because
# AutoSomething::AutoSomething might throw an exception, which would cause the
# partially-constructed value to be torn down, which will call ~RAII_GC.
Reported by Pylint.
Line: 2
Column: 1
test.compile("source.cpp", '-fno-exceptions')
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 0)
# If we compile with exceptions, then there *should* be a hazard because
# AutoSomething::AutoSomething might throw an exception, which would cause the
# partially-constructed value to be torn down, which will call ~RAII_GC.
Reported by Pylint.
Line: 4
Column: 11
test.compile("source.cpp", '-fno-exceptions')
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 0)
# If we compile with exceptions, then there *should* be a hazard because
# AutoSomething::AutoSomething might throw an exception, which would cause the
# partially-constructed value to be torn down, which will call ~RAII_GC.
Reported by Pylint.
Line: 11
Column: 1
# AutoSomething::AutoSomething might throw an exception, which would cause the
# partially-constructed value to be torn down, which will call ~RAII_GC.
test.compile("source.cpp", '-fexceptions')
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 1)
hazard = hazards[0]
Reported by Pylint.
Line: 12
Column: 1
# partially-constructed value to be torn down, which will call ~RAII_GC.
test.compile("source.cpp", '-fexceptions')
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 1)
hazard = hazards[0]
assert(hazard.function == 'void f()')
Reported by Pylint.
Line: 14
Column: 11
test.compile("source.cpp", '-fexceptions')
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 1)
hazard = hazards[0]
assert(hazard.function == 'void f()')
assert(hazard.variable == 'thing')
assert("AutoSomething::AutoSomething" in hazard.GCFunction)
Reported by Pylint.
Line: 1
Column: 1
test.compile("source.cpp", '-fno-exceptions')
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 0)
# If we compile with exceptions, then there *should* be a hazard because
# AutoSomething::AutoSomething might throw an exception, which would cause the
# partially-constructed value to be torn down, which will call ~RAII_GC.
Reported by Pylint.
Line: 5
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 0)
# If we compile with exceptions, then there *should* be a hazard because
# AutoSomething::AutoSomething might throw an exception, which would cause the
# partially-constructed value to be torn down, which will call ~RAII_GC.
Reported by Bandit.
Line: 5
Column: 1
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 0)
# If we compile with exceptions, then there *should* be a hazard because
# AutoSomething::AutoSomething might throw an exception, which would cause the
# partially-constructed value to be torn down, which will call ~RAII_GC.
Reported by Pylint.
Line: 15
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b101_assert_used.html
test.run_analysis_script('gcTypes')
hazards = test.load_hazards()
assert(len(hazards) == 1)
hazard = hazards[0]
assert(hazard.function == 'void f()')
assert(hazard.variable == 'thing')
assert("AutoSomething::AutoSomething" in hazard.GCFunction)
Reported by Bandit.
src/third_party/wiredtiger/test/suite/test_rollback_to_stable05.py
17 issues
Line: 31
Column: 1
import time
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
from test_rollback_to_stable01 import test_rollback_to_stable_base
Reported by Pylint.
Line: 33
Column: 1
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
from test_rollback_to_stable01 import test_rollback_to_stable_base
# test_rollback_to_stable05.py
# Test that rollback to stable cleans history store for non-timestamp tables.
Reported by Pylint.
Line: 59
Column: 5
scenarios = make_scenarios(key_format_values, in_memory_values, prepare_values)
def conn_config(self):
config = 'cache_size=50MB,statistics=(all)'
if self.in_memory:
config += ',in_memory=true'
else:
config += ',log=(enabled),in_memory=false'
Reported by Pylint.
Line: 29
Column: 1
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
import time
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
Reported by Pylint.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import time
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
from test_rollback_to_stable01 import test_rollback_to_stable_base
Reported by Pylint.
Line: 31
Column: 1
import time
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
from test_rollback_to_stable01 import test_rollback_to_stable_base
Reported by Pylint.
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.
Line: 31
Column: 1
import time
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
from test_rollback_to_stable01 import test_rollback_to_stable_base
Reported by Pylint.
Line: 31
Column: 1
import time
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
from test_rollback_to_stable01 import test_rollback_to_stable_base
Reported by Pylint.
Line: 33
Column: 1
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wiredtiger import stat
from wtscenario import make_scenarios
from test_rollback_to_stable01 import test_rollback_to_stable_base
# test_rollback_to_stable05.py
# Test that rollback to stable cleans history store for non-timestamp tables.
Reported by Pylint.
src/third_party/wiredtiger/test/suite/test_assert05.py
17 issues
Line: 34
Column: 1
#
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_assert05(wttest.WiredTigerTestCase, suite_subprocess):
base = 'assert05'
base_uri = 'file:' + base
Reported by Pylint.
Line: 34
Column: 1
#
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_assert05(wttest.WiredTigerTestCase, suite_subprocess):
base = 'assert05'
base_uri = 'file:' + base
Reported by Pylint.
Line: 79
Column: 13
if (use_ts != 'never'):
self.session.commit_transaction()
else:
'''
Commented out for now: the system panics if we fail after preparing a transaction.
msg = "/timestamp set on this transaction/"
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda:self.assertEquals(self.session.commit_transaction(),
Reported by Pylint.
Line: 107
Column: 13
if (use_ts != 'always' and use_ts != 'never'):
self.session.commit_transaction()
else:
'''
Commented out for now: the system panics if we fail after preparing a transaction.
msg = "/durable_timestamp is required for a prepared/"
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda:self.assertEquals(self.session.commit_transaction(),
Reported by Pylint.
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.
Line: 34
Column: 1
#
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_assert05(wttest.WiredTigerTestCase, suite_subprocess):
base = 'assert05'
base_uri = 'file:' + base
Reported by Pylint.
Line: 34
Column: 1
#
from suite_subprocess import suite_subprocess
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_assert05(wttest.WiredTigerTestCase, suite_subprocess):
base = 'assert05'
base_uri = 'file:' + base
Reported by Pylint.
Line: 37
Column: 1
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_assert05(wttest.WiredTigerTestCase, suite_subprocess):
base = 'assert05'
base_uri = 'file:' + base
session_config = 'isolation=snapshot'
uri_always = base_uri + '.always.wt'
uri_def = base_uri + '.def.wt'
Reported by Pylint.
Line: 37
Column: 1
import wiredtiger, wttest
from wtscenario import make_scenarios
class test_assert05(wttest.WiredTigerTestCase, suite_subprocess):
base = 'assert05'
base_uri = 'file:' + base
session_config = 'isolation=snapshot'
uri_always = base_uri + '.always.wt'
uri_def = base_uri + '.def.wt'
Reported by Pylint.
Line: 45
Column: 1
uri_def = base_uri + '.def.wt'
uri_never = base_uri + '.never.wt'
uri_none = base_uri + '.none.wt'
cfg_always = 'verbose=(write_timestamp=true),write_timestamp_usage=always,assert=(write_timestamp=on)'
cfg_def = ''
cfg_never = 'write_timestamp_usage=never,assert=(write_timestamp=on)'
cfg_none = 'assert=(write_timestamp=off)'
key_format_values = [
Reported by Pylint.