added stringdate 2024-11-18 17:59:49 2024-11-19 03:44:43 | created int64 126B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.09 | source stringclasses 1
value | text stringlengths 257 22.3k | num_lines int64 16 648 | avg_line_length float64 15 61 | max_line_length int64 31 179 | ast_depth int64 8 40 | length int64 101 3.8k | lang stringclasses 1
value | sast_semgrep_findings stringlengths 1.56k 349k | sast_semgrep_findings_count int64 1 162 | sast_semgrep_success bool 1
class | sast_semgrep_error stringclasses 1
value | cwe_ids listlengths 1 162 | rule_ids listlengths 1 162 | subcategories listlengths 1 162 | confidences listlengths 1 162 | severities listlengths 1 162 | line_starts listlengths 1 162 | line_ends listlengths 1 162 | column_starts listlengths 1 162 | column_ends listlengths 1 162 | owasp_categories listlengths 1 162 | messages listlengths 1 162 | cvss_scores listlengths 1 162 | likelihoods listlengths 1 162 | impacts listlengths 1 162 | filename stringlengths 4 105 | path stringlengths 5 372 | repo_name stringlengths 5 115 | license stringclasses 385
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T22:29:35.403602+00:00 | 1,621,329,897,000 | 4c1393499620d78b18bea72fe609ca61673ab801 | 2 | {
"blob_id": "4c1393499620d78b18bea72fe609ca61673ab801",
"branch_name": "refs/heads/master",
"committer_date": 1621329897000,
"content_id": "90ce160f475348a1e573cd91c0e07629012af7f9",
"detected_licenses": [
"MIT"
],
"directory_id": "7670cd0bfcfd852eba490ad49ec9e96c813b32e3",
"extension": "py",
"fi... | 2.40625 | stackv2 | import torch
import torch.nn as nn
import torch.nn.functional as F
if __package__:
from .resnet3d import *
else:
from resnet3d import *
__all__ = ['ResNet3dT', 'resnet3dt50']
class ResNet3dT(nn.Module):
networks = {'resnet3d10': None,
'resnet3d18': None,
'resnet3d34': None... | 52 | 32.87 | 94 | 16 | 527 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_23d3c4a68cd477ee_8af9da86", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
23
] | [
23
] | [
20
] | [
33
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | resnet3dt.py | /torchreid/models/resnet3dt.py | hopstone/AGRL.pytorch | MIT | |
2024-11-18T22:29:38.169473+00:00 | 1,554,361,927,000 | d42e18289d4953c8c3abbd0870f22d1d1a15a7bc | 3 | {
"blob_id": "d42e18289d4953c8c3abbd0870f22d1d1a15a7bc",
"branch_name": "refs/heads/master",
"committer_date": 1554361927000,
"content_id": "f1f5d89abd1673d75d2386d200cc17422817b5c6",
"detected_licenses": [
"MIT"
],
"directory_id": "d7cb03a3a9da361c4a9ba53ea8409bec178feacc",
"extension": "py",
"fi... | 2.609375 | stackv2 | import pickle
import numpy as np
import glob
import tensorflow as tf
import matplotlib.pyplot as plt
import os
# csvlist = glob.glob('*.csv')
# for name in csvlist:
# print(name)
# with open(name, newline = '') as csvfile:
# reader = csv.reader(csvfile)
# dict = {}
# for row in reader:
... | 48 | 34.23 | 88 | 16 | 522 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c4c0582eb6125765_b690b42b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
29,
48
] | [
29,
48
] | [
16,
5
] | [
49,
50
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | read.py | /position transformation/read.py | llcyyyy/biyelunwen | MIT | |
2024-11-18T22:29:38.580297+00:00 | 1,692,804,620,000 | 1dcecefdd20926e33ef1ed2060a9cbedc57811b6 | 2 | {
"blob_id": "1dcecefdd20926e33ef1ed2060a9cbedc57811b6",
"branch_name": "refs/heads/main",
"committer_date": 1692804620000,
"content_id": "0f5dedcc4b88c5c97d416684bed815b089c2fa31",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "29bd0e9b5bdef7e2b4ff79edda3be258d5bde63c",
"extension": "py"... | 2.5 | stackv2 | """Prompt formatter for simple version control branches"""
# pylint:disable=no-member, invalid-name
import contextlib
import os
import pathlib
import queue
import re
import subprocess
import sys
import threading
import xonsh.tools as xt
from xonsh.built_ins import XSH
from xonsh.lazyasd import LazyObject
RE_REMOVE_AN... | 315 | 30.37 | 112 | 19 | 2,306 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.return-not-in-function_39ea444f1abfc681_c9607668", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.return-not-in-function", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "`return` only makes se... | 5 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
28,
129
] | [
28,
129
] | [
12,
14
] | [
77,
86
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | vc.py | /xonsh/prompt/vc.py | xonsh/xonsh | BSD-2-Clause | |
2024-11-18T22:40:28.537337+00:00 | 1,554,519,103,000 | 6f5e789fc2a809cca9f563842c9c85a3eba7c6df | 3 | {
"blob_id": "6f5e789fc2a809cca9f563842c9c85a3eba7c6df",
"branch_name": "refs/heads/master",
"committer_date": 1554519103000,
"content_id": "a0f86e8e35a2e82f3a4a7d545a13834e53183afb",
"detected_licenses": [
"MIT"
],
"directory_id": "8264942d64e48fd29e10a2a56a618942f559fe62",
"extension": "py",
"fi... | 3.109375 | stackv2 | import os
import pickle
import torch
from torch.utils.data import Dataset, DataLoader, sampler
import torchvision
from torchvision.transforms import ToTensor
import pdb
N_TEST = 10000
N_VAL = 2000
DATA_SAVE_PATH = 'sequential_mnist.pkl'
class SequentialMNIST(Dataset):
"""Contains the Sequential MNIST data from ht... | 85 | 37.75 | 87 | 16 | 685 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_922d331037efdbe8_7b954dba", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.python-debugger-found", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Importing the python debugger;... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
28,
47
] | [
28,
47
] | [
27,
13
] | [
66,
67
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | mnist_dataloader.py | /RecurrentBN/mnist_dataloader.py | matthewkennedy5/paper-implementations | MIT | |
2024-11-18T22:40:28.590902+00:00 | 1,565,696,160,000 | ef7877cc8de3ffb1e1108b17f37cca60195c9766 | 2 | {
"blob_id": "ef7877cc8de3ffb1e1108b17f37cca60195c9766",
"branch_name": "refs/heads/master",
"committer_date": 1565696160000,
"content_id": "5f9842f992fb2f3e905a3e3d4e3904b05056fe95",
"detected_licenses": [
"MIT"
],
"directory_id": "ea277ac4ba95a63dd1e0c6b2f4533303c662021f",
"extension": "py",
"fi... | 2.5 | stackv2 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import ssl
import time
from bs4 import BeautifulSoup
from urllib.parse import quote
import string
import urllib3
import pymysql
import re
import hashlib
urllib3.disable_warnings()
user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14) AppleWebKit\
/537.36 (KHTML,... | 75 | 30.76 | 75 | 16 | 641 | python | [{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-md5_403823d21117fd08_276312da", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.insecure-hash-algorithm-md5", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected MD5 hash algorithm which... | 2 | true | [
"CWE-295"
] | [
"rules.python.lang.security.audit.network.disabled-cert-validation"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
37
] | [
37
] | [
16
] | [
60
] | [
"A03:2017 - Sensitive Data Exposure"
] | [
"certificate verification explicitly disabled, insecure connections possible"
] | [
7.5
] | [
"HIGH"
] | [
"MEDIUM"
] | MovieDetail.py | /MovieDetail.py | whde/Movie | MIT | |
2024-11-18T22:40:30.583171+00:00 | 1,691,828,981,000 | c93eac13c12816dfdb80083b1cee0ab080c58c6c | 2 | {
"blob_id": "c93eac13c12816dfdb80083b1cee0ab080c58c6c",
"branch_name": "refs/heads/master",
"committer_date": 1691829108000,
"content_id": "b44fee4a8ff57a72609731749034d41f4e93b983",
"detected_licenses": [
"MIT"
],
"directory_id": "72f805b7fcde53b8e3b5d7829b94e5f6f0b2a0b9",
"extension": "py",
"fi... | 2.328125 | stackv2 | # -*- coding: utf-8 -*-
#
# Copyright 2013-2014 Haiku, Inc.
# Distributed under the terms of the MIT License.
# -- Modules ------------------------------------------------------------------
from .Configuration import Configuration
from .Utils import sysExit
from copy import deepcopy
from subprocess import check_outp... | 200 | 29.16 | 79 | 20 | 1,567 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c64d4590f13c6755_d9b7a48b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH",
"HIGH"
] | [
97,
111,
120,
135,
137
] | [
97,
111,
120,
135,
137
] | [
14,
6,
4,
14,
13
] | [
36,
60,
64,
48,
31
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"HIGH",
"HIGH"
] | PackageInfo.py | /HaikuPorter/PackageInfo.py | haikuports/haikuporter | MIT | |
2024-11-18T22:40:51.216393+00:00 | 1,626,395,636,000 | 94a1b4bf99709a2dc3413515ec2e6696c007d4c4 | 2 | {
"blob_id": "94a1b4bf99709a2dc3413515ec2e6696c007d4c4",
"branch_name": "refs/heads/master",
"committer_date": 1626395636000,
"content_id": "3838dd92a5482458a5c6231ab77dec8550195201",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dfaa1c38fe96b8ddb0096110846a3182edc42a5c",
"extension": "py"... | 2.5 | stackv2 | #!/usr/bin/env python
import sys
import os
import re
import os.path
PinPATH = "your-path-to-pin/source/tools/MyDSLTool"
parserPATH="your-path-to-cinnamon/cinnamon"
def usage():
print "compileToPin.py <program.dsl>"
if len(sys.argv) != 2:
usage()
sys.exit(0)
#Step 1: Invoke DSL parser and generator
dslFile = sys.arg... | 120 | 42.77 | 168 | 14 | 1,494 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_3af11438eb7c29ce_1a45da7b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 29 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-tainted-env-args"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
18,
18
] | [
18,
18
] | [
15,
15
] | [
56,
56
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found user-controll... | [
7.5,
7.5
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | compileToPin.py | /Scripts/compileToPin.py | c0de3/Cinnamon | Apache-2.0 | |
2024-11-18T22:41:22.571858+00:00 | 1,430,343,603,000 | 6aa80e3875e5300918d7dbdcf065d58ebcc49f19 | 2 | {
"blob_id": "6aa80e3875e5300918d7dbdcf065d58ebcc49f19",
"branch_name": "refs/heads/master",
"committer_date": 1430343603000,
"content_id": "ba893b84264891a90f8fd57abb49832092673687",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9db7a1a182f0265bce528e4dd61c27beaa12cad6",
"extension": "py"... | 2.46875 | stackv2 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 58 | 34.76 | 93 | 13 | 453 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_7ed545f2afc7e8b7_565adc83", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 2 | true | [
"CWE-79",
"CWE-116"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
39,
39
] | [
39,
39
] | [
11,
11
] | [
63,
63
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | jinja.py | /st2common/st2common/util/jinja.py | rgaertner/st2 | Apache-2.0 | |
2024-11-18T22:41:23.289622+00:00 | 1,600,783,475,000 | 290bc7156257706e2d3e68f5e86bf922ebe864c5 | 3 | {
"blob_id": "290bc7156257706e2d3e68f5e86bf922ebe864c5",
"branch_name": "refs/heads/master",
"committer_date": 1600783475000,
"content_id": "b62c28d69d6c7ea535ff37b3c4ef48797fd80aa5",
"detected_licenses": [
"MIT"
],
"directory_id": "9265ffb70652c3c0d7cb9fda6685ff67d83eade1",
"extension": "py",
"fi... | 2.578125 | stackv2 | import pickle
#------------ upload files for 1k documents ---------------#
with open(".../dataset/vtkel_pairs.pkl","rb") as infile:
vtkel_pairs_1k = pickle.load(infile)
with open(".../dataset/linker_pairs_1k.pkl","rb") as infile:
linker_pairs_resnet_1k = pickle.load(infile)
#------------ upload files for 31k... | 107 | 33.25 | 90 | 14 | 1,072 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_20e597e70e18dcf2_a6aee925", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 4 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
5,
8,
12,
15
] | [
5,
8,
12,
15
] | [
22,
30,
23,
31
] | [
41,
49,
42,
50
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | Evaluations.py | /baseline/Evaluations.py | shahidost/Visual-Textual-Knowledge-Entity-Linking | MIT | |
2024-11-18T22:41:23.401503+00:00 | 1,599,664,738,000 | 3d39058a81c63d0d4426c18b1086097a630af6ab | 3 | {
"blob_id": "3d39058a81c63d0d4426c18b1086097a630af6ab",
"branch_name": "refs/heads/master",
"committer_date": 1599664738000,
"content_id": "808967742f7de9ba08e2f88ae088cba358db10fd",
"detected_licenses": [
"MIT"
],
"directory_id": "85bf049e5b7eaff17e26e7f4de8e82e8e3c368c3",
"extension": "py",
"fi... | 2.5625 | stackv2 | import itertools
from slurmpy import Slurm
import os
#partition = 'low'
# sweep different ways to initialize weights=
params_to_vary = {
'regularizer_rate': [ 10, 100] ,
'seed': [x for x in range(3)] ,
}
ks = sorted(params_to_vary.keys())
vals = [params_to_vary[k] for k in ks]
param_combinations... | 26 | 24.54 | 73 | 14 | 188 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_ffaa04eea1bf5594_61fe7888", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
25
] | [
25
] | [
5
] | [
25
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | 04_train_all.py | /isic-skin-cancer/ISIC/04_train_all.py | SeyumA/deep-explanation-penalization | MIT | |
2024-11-18T22:54:05.755983+00:00 | 1,691,070,964,000 | abd08f752a88981f0247ef00effe5fce77b2aaf6 | 3 | {
"blob_id": "abd08f752a88981f0247ef00effe5fce77b2aaf6",
"branch_name": "refs/heads/master",
"committer_date": 1691070964000,
"content_id": "a3b91785f86069f5cc633bd1038224939121490e",
"detected_licenses": [],
"directory_id": "fd14e730ba385499c63a2a057a4a09241b611fc0",
"extension": "py",
"filename": "ini... | 2.546875 | stackv2 | #!/usr/bin/env python
from flask import Flask
from app import db
from app.models import Configuration, User
from config import Config
def init_db():
config = Config()
admin = User(
username="admin",
name="Administrateur"
)
admin.set_password(config.ADMIN_PASSWORD)
configurations = ... | 43 | 33.33 | 96 | 15 | 350 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_4fe002f417261740_a51b937f", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'admin' is being s... | 1 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
14
] | [
14
] | [
5
] | [
46
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'admin' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | init_db.py | /init_db.py | gormux/Cantina | ||
2024-11-18T22:54:06.253933+00:00 | 1,637,675,851,000 | 92efd46a24032d56ac2aab0652faa30fa758daaf | 2 | {
"blob_id": "92efd46a24032d56ac2aab0652faa30fa758daaf",
"branch_name": "refs/heads/main",
"committer_date": 1637675851000,
"content_id": "92f7673987d4e1e04a38c963c80560083d447223",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ee4c4c2cc6c663d4233d8145b01ae9eb4fdeb6c0",
"extension": "py",
... | 2.359375 | stackv2 | import os
from xml.dom.minidom import Document
from xml.dom.minidom import parse
import xml.dom.minidom
import numpy as np
import csv
import cv2
import codecs
import sys
sys.path.append('../../..')
from alpharotate.libs.utils.mask_sample import points_sampling
def make_xml(filename, path, box_list, labels, w, h, d... | 136 | 30.53 | 78 | 18 | 989 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_cd7cb726700deaf2_b1024989", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 4 | true | [
"CWE-611",
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
2,
3,
4
] | [
2,
3,
4
] | [
1,
1,
1
] | [
37,
34,
23
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | txt2xml.py | /dataloader/dataset/Total_Text/txt2xml.py | yangcyz/RotationDetection | Apache-2.0 | |
2024-11-18T22:54:13.847394+00:00 | 1,583,231,190,000 | 1d10c160cf1f64239f69e6ff888d3a8556d0cc17 | 3 | {
"blob_id": "1d10c160cf1f64239f69e6ff888d3a8556d0cc17",
"branch_name": "refs/heads/master",
"committer_date": 1583231190000,
"content_id": "cfa53d0cef0037ed796023811da119abc66006d3",
"detected_licenses": [
"MIT"
],
"directory_id": "d2698a4bc3e14d39dc42fa847eb23cdcc49c0abb",
"extension": "py",
"fi... | 2.953125 | stackv2 | import os
import librosa
import numpy as np
import pandas as pd
from sklearn.preprocessing import normalize
def extract_features(file_name,label = None):
"""
filename to extract the feature
:type file_name:
:param file_name: file path
:type label:
:param label:
:raises:
:rtyp... | 114 | 27.75 | 132 | 15 | 899 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_324662d2b0f85bed_2f226bf3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 3 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
84,
86,
88
] | [
84,
86,
88
] | [
5,
5,
5
] | [
82,
120,
133
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | utils.py | /voiceClassifier/utils.py | Raman-Raje/voiceClassifier | MIT | |
2024-11-18T22:54:14.572099+00:00 | 1,636,114,093,000 | e45021e8c97b97e91a2cd9d4b8eac53d720b88ed | 2 | {
"blob_id": "e45021e8c97b97e91a2cd9d4b8eac53d720b88ed",
"branch_name": "refs/heads/master",
"committer_date": 1636114093000,
"content_id": "040a4e77d081bac436710a4f7d5efaf925a4c8d4",
"detected_licenses": [
"MIT"
],
"directory_id": "4dc4fcfa95ed9187e14c7559f34bac2b24277835",
"extension": "py",
"fi... | 2.453125 | stackv2 | import os
import pickle
import sys; sys.path.append('.')
import numpy as np
import matplotlib.pylab as plt
# parameters to include in the plot
SAVE_PLOT = True
################################################################################
# Make plot ... | 62 | 34.15 | 90 | 13 | 519 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0518e1745ccacd74_bccc2040", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
34,
35
] | [
34,
35
] | [
13,
14
] | [
83,
90
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | plot_learningcapacity.py | /RandomSequenceTask/plot_learningcapacity.py | anjarabus/SORN_V2 | MIT | |
2024-11-18T22:54:15.533587+00:00 | 1,630,400,779,000 | 63c4c9c7bf0fbcb55e7147b931fba9f19971517b | 3 | {
"blob_id": "63c4c9c7bf0fbcb55e7147b931fba9f19971517b",
"branch_name": "refs/heads/master",
"committer_date": 1630400779000,
"content_id": "ea68f1f7617c66d3b8d838489493cc63aa3872b8",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "14f1ff5e809875c8a9044a4796d1843606b0b795",
"extension": "p... | 2.875 | stackv2 | import os
import sys
import subprocess
separator = '|'
def _writePlotHeaderData(gnuplotFile, outputFileName, config):
# For details see the gnuplot manual.
# set the type of output with 'set terminal <type>' and additional parameters
print("set terminal pdfcairo enhanced color", file=gnuplotFile)
... | 113 | 37.42 | 138 | 23 | 1,052 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_61608ee888d7814f_f77f4854", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
107
] | [
107
] | [
9
] | [
74
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | plotterDefault.py | /util/BenchmarkRunner/plotterDefault.py | jdeantoni/lingua-franca | BSD-2-Clause | |
2024-11-18T22:54:17.865760+00:00 | 1,501,638,090,000 | 264fae966853208922d6c99af0605e3b4c32260b | 3 | {
"blob_id": "264fae966853208922d6c99af0605e3b4c32260b",
"branch_name": "refs/heads/master",
"committer_date": 1501638090000,
"content_id": "5d580275e5e275b4d5b7b2617f52c7d8b723b3c0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9fd2e1e7850dd3a6f886ea6a8622eb38217e811e",
"extension": "py"... | 2.515625 | stackv2 | """
parameter_search.py
Provides parameter tuning pipelines for RIDDLE and various scikit-learn
machine learning classifiers.
Requires: Keras, NumPy, scikit-learn, RIDDLE (and their dependencies)
Author: Ji-Sung Kim, Rzhetsky Lab
Copyright: 2016, all rights reserved
"""
from __future__ import print_function... | 346 | 36.53 | 84 | 17 | 3,180 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_01d5aaa72e39fb7b_6cb40c98", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
85
] | [
85
] | [
32
] | [
46
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | parameter_search.py | /parameter_search.py | girish8050517990/RIDDLE | Apache-2.0 | |
2024-11-18T22:54:20.826437+00:00 | 1,481,064,246,000 | 3c13791b183e7ed210552aecb5cdc8f277a0e343 | 3 | {
"blob_id": "3c13791b183e7ed210552aecb5cdc8f277a0e343",
"branch_name": "refs/heads/master",
"committer_date": 1481064246000,
"content_id": "7e390afbe38dd5e50768bd4ee9360881c9e2399b",
"detected_licenses": [
"MIT"
],
"directory_id": "4b1f652b2f658c7fdd0d45c2c70f7f157d2e05b8",
"extension": "py",
"fi... | 3.421875 | stackv2 |
import Tkinter
import tkFileDialog
def open_it():
filename = tkFileDialog.askopenfilename()
return filename
def save_it():
filename = tkFileDialog.askopenfilename()
return filename
def save_as():
filename = tkFileDialog.asksaveasfilename()
return filename
def _raiseDataTableKeyError():
... | 179 | 35.09 | 136 | 24 | 1,626 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_4b19c6971f76931e_b1e2e50a", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-95",
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
175,
176,
177
] | [
175,
176,
177
] | [
22,
24,
23
] | [
36,
38,
37
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | DataTable.py | /DataTable.py | FrogBomb/random-python27-scripts-and-projects | MIT | |
2024-11-18T22:54:24.120712+00:00 | 1,676,139,610,000 | 7e08f171486177d37acb84e198d1a4470ab6f4e9 | 3 | {
"blob_id": "7e08f171486177d37acb84e198d1a4470ab6f4e9",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "5853467f44dc733b8aef52815f32327f11745f12",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 2.9375 | stackv2 | class Colorcodes(object):
"""
Provides ANSI terminal color codes which are gathered via the ``tput``
utility. That way, they are portable. If there occurs any error with
``tput``, all codes are initialized as an empty string.
The provides fields are listed below.
Control:
- bold
- res... | 41 | 26.15 | 74 | 15 | 252 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c288157b9f14d4df_f2035aa8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 6 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.danger... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
25,
26,
28,
29,
30,
31
] | [
25,
26,
28,
29,
30,
31
] | [
25,
26,
25,
26,
27,
24
] | [
69,
70,
72,
73,
74,
71
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | snippet.py | /all-gists/4007035/snippet.py | gistable/gistable | MIT | |
2024-11-18T22:54:24.933596+00:00 | 1,445,190,877,000 | 6d0cb8480b5fb4a087d15a1c19cf6d7f2069d6a1 | 3 | {
"blob_id": "6d0cb8480b5fb4a087d15a1c19cf6d7f2069d6a1",
"branch_name": "refs/heads/master",
"committer_date": 1445190877000,
"content_id": "8ef090393408968f25cd130b500c4c32a6703fd6",
"detected_licenses": [
"MIT"
],
"directory_id": "38461a0955ec06432f983a81992f8a9601c381ce",
"extension": "py",
"fi... | 2.875 | stackv2 | #!/usr/bin/env python3
import argparse
import tempfile
import subprocess
import os
import fnmatch
import shutil
parser = argparse.ArgumentParser(description='extract recursive rars')
parser.add_argument('archive', help='rar archive to extract from')
parser.add_argument('-p', help='rar password', default=None)
parser.... | 86 | 28.15 | 114 | 23 | 523 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_8979320ec06c8d27_92810144", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
67,
68,
73
] | [
74,
72,
73
] | [
9,
13,
19
] | [
10,
14,
23
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"HIGH"
] | [
"HIGH",
"MEDIUM",
"LOW"
] | extract.py | /extract.py | vindolin/uploaded | MIT | |
2024-11-18T22:54:28.387442+00:00 | 1,584,170,324,000 | 7e82dde98e4e4e65fc324c3794ccfbf2b3444727 | 3 | {
"blob_id": "7e82dde98e4e4e65fc324c3794ccfbf2b3444727",
"branch_name": "refs/heads/master",
"committer_date": 1584170324000,
"content_id": "2863bad00a5b8b1812b0e34efe5d03f8f467ae81",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "599eda631342a27c8fc359680d83200cb57ae5f6",
"extension": "py",
... | 2.625 | stackv2 | import pandas as pd
from sklearn.preprocessing import LabelEncoder
import pickle
import nltk
import string
import re
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.naive_bayes import Berno... | 200 | 31.48 | 94 | 12 | 1,667 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c9cc52b641228029_995b96d5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
31,
199
] | [
31,
199
] | [
1,
1
] | [
28,
41
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | build1.py | /build1.py | dyuwan/SongSuggester | CC0-1.0 | |
2024-11-18T22:54:29.464258+00:00 | 1,601,505,098,000 | de83e3c09df1c1986619d0886b750ec1c9dd38fd | 2 | {
"blob_id": "de83e3c09df1c1986619d0886b750ec1c9dd38fd",
"branch_name": "refs/heads/master",
"committer_date": 1601505098000,
"content_id": "9e29caead00c7b07be720a8ba0af57862721ca67",
"detected_licenses": [
"MIT"
],
"directory_id": "0b8d21d2baa05dd81bab8060c0bd8507031ed6f6",
"extension": "py",
"fi... | 2.390625 | stackv2 | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from django.contrib.auth.base_user import BaseUserManager
from .utils import get_hash
import json
class UserManager(BaseUserManager):
def create_user(self, details):
"""
Creates and saves a User... | 195 | 36.08 | 134 | 18 | 1,437 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_59a66566b9f37596_ed750129", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user' is being se... | 1 | true | [
"CWE-521"
] | [
"rules.python.django.security.audit.unvalidated-password"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
18
] | [
18
] | [
9
] | [
36
] | [
"A07:2021 - Identification and Authentication Failures"
] | [
"The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | models.py | /agri/models.py | Bhavesh0327/Agriblock | MIT | |
2024-11-18T22:54:32.198851+00:00 | 1,613,939,890,000 | 04d9d447411f7ffcefb84505a92e5014a0a29df0 | 3 | {
"blob_id": "04d9d447411f7ffcefb84505a92e5014a0a29df0",
"branch_name": "refs/heads/master",
"committer_date": 1613939890000,
"content_id": "b0d2616a9ac01256f4ef5de325154feae2ccd30b",
"detected_licenses": [
"MIT"
],
"directory_id": "e2b44d240cf2bdb12d780551d4f5c849693173dd",
"extension": "py",
"fi... | 2.765625 | stackv2 | #! /usr/bin/env python3
from collections import defaultdict
from typing import DefaultDict, Tuple
import os
import shelve
from lib.files import get_hash, walk, PathList
# Types
class FileInfo(object):
def __init__(self, path: str, mtime: int, size: int):
self.path = path
self.mtime = mtim... | 161 | 35.94 | 110 | 20 | 1,283 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_86eef60163fb31ab_7505ba0e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-shelve",
"rules.python.lang.security.deserialization.avoid-shelve"
] | [
"security",
"security"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
80,
99
] | [
80,
99
] | [
14,
14
] | [
34,
34
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `shelve`, whic... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | comparedirs.py | /python/comparedirs.py | kfsone/tinker | MIT | |
2024-11-18T20:55:04.597580+00:00 | 1,614,196,388,000 | 303407dec63f2e3dd5dab148842b717b229b4390 | 2 | {
"blob_id": "303407dec63f2e3dd5dab148842b717b229b4390",
"branch_name": "refs/heads/master",
"committer_date": 1614196388000,
"content_id": "2842e9921690556a00776b48704d9b118b1c3767",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1bf3b66a4beded5f927ce8a28d9e81b8845e255c",
"extension": "py"... | 2.484375 | stackv2 | from collections import Counter
import dataclasses
from dataclasses import dataclass
import json
import logging
import os
import pickle
from typing import Any, List, Optional, Tuple, Union
from dgl import DGLGraph
from rdflib import Graph as RDFGraph
import torch
from tqdm import tqdm
from .rdf2dgl import relations_i... | 337 | 40.7 | 177 | 18 | 3,376 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_90711155609ced9f_5cd7dfe5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 10 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.pyth... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
100,
101,
102,
104,
105,
107,
108,
109,
111,
112
] | [
100,
101,
102,
104,
105,
107,
108,
109,
111,
112
] | [
24,
22,
23,
27,
28,
22,
20,
21,
25,
26
] | [
97,
93,
95,
99,
101,
100,
96,
98,
102,
104
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserial... | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5,
5,
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | base_reader.py | /data_readers/base_reader.py | Punchwes/SIFT | Apache-2.0 | |
2024-11-18T20:55:07.017688+00:00 | 1,560,326,976,000 | 70b4f8298dd5f47073ac4cecbac68eec26924e52 | 3 | {
"blob_id": "70b4f8298dd5f47073ac4cecbac68eec26924e52",
"branch_name": "refs/heads/master",
"committer_date": 1560326976000,
"content_id": "b285a33f9a798b3d3d6cb78db32616a5a5db41fd",
"detected_licenses": [
"MIT"
],
"directory_id": "7705255f1982e84d4cc5f4fca33317f2a07b6295",
"extension": "py",
"fi... | 2.515625 | stackv2 | # coding=utf-8
# extract_transc_feats.py: extract word features from transcriptions and
# persuasiveness from the labels.
from __future__ import print_function
import glob
import re
import itertools
import cPickle
from collections import Counter
import nltk
VOCAB_FILE = "data/vocab.txt"
TRANSC_RAW_DIR = "data/raw/t... | 107 | 32.06 | 79 | 17 | 916 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f30506d1bd4206b6_08d03744", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-cPickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
63,
65
] | [
63,
65
] | [
22,
24
] | [
38,
40
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `cPickle`, which is known to lead ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | extract_transc_feats.py | /tools/extract_transc_feats.py | arlla/cmu-ammml-project | MIT | |
2024-11-18T20:55:08.324583+00:00 | 1,527,200,130,000 | 117d1999ef146ccf90642d7f44bcbb2c9112f9bf | 3 | {
"blob_id": "117d1999ef146ccf90642d7f44bcbb2c9112f9bf",
"branch_name": "refs/heads/master",
"committer_date": 1527200328000,
"content_id": "fd1b57d20145a7d5394e82a4371c25e2ed837d47",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "592cc6935e0e1da41d3a161b66f891895a7e4249",
"extension": "py"... | 2.609375 | stackv2 | #!/usr/bin/env python
from jinja2 import Environment, FileSystemLoader
import os
import argparse
import sys
import re
def doc_from_template(template, output, append=False, nvars=None):
nvars = nvars or {}
nvars.update(os.environ)
template_abs_path = os.path.abspath(template)
template_dir = os.path.di... | 48 | 31.17 | 82 | 14 | 357 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_a1581b6b6718096f_8dc8f686", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 4 | true | [
"CWE-79",
"CWE-116",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
16,
16,
19
] | [
17,
17,
19
] | [
12,
12,
16
] | [
43,
43,
40
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | pyj2.py | /docker/pyj2.py | Juniper/contrail-docker | Apache-2.0 | |
2024-11-18T20:55:09.737365+00:00 | 1,432,282,642,000 | 39b71250ddcf2cb3061f8fbb650fa9c7eda82dba | 3 | {
"blob_id": "39b71250ddcf2cb3061f8fbb650fa9c7eda82dba",
"branch_name": "refs/heads/master",
"committer_date": 1432282642000,
"content_id": "0c673eb1848b2ba9cda5a07bbfabd69716fff06d",
"detected_licenses": [
"MIT"
],
"directory_id": "2a17971e124b65430621c0179be13ca5fa3febf3",
"extension": "py",
"fi... | 2.984375 | stackv2 | """Documentation generation script.
Copies the built html documentation into the gh-pages branch of the
appropriate repository and makes a commit.
The commit needs to be pushed manually after it has been verified.
"""
import os
import re
import sys
from os import chdir as cd
from os.path import join as pjoin
from s... | 115 | 25.97 | 78 | 13 | 707 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_61ca29dd7973490c_410016f1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
31,
40
] | [
31,
40
] | [
12,
9
] | [
39,
44
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess ... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | gh-pages.py | /doc/gh-pages.py | nicolasfauchereau/windspharm | MIT | |
2024-11-18T21:07:35.141976+00:00 | 1,618,583,552,000 | 9bcabc852af8b8959570cbc629f48e257d6ac1aa | 3 | {
"blob_id": "9bcabc852af8b8959570cbc629f48e257d6ac1aa",
"branch_name": "refs/heads/main",
"committer_date": 1618583552000,
"content_id": "ba645e46978c54260bd44445c79a3abce4daeb26",
"detected_licenses": [
"MIT"
],
"directory_id": "c5e9a80fbea809b60a0ff9cab1987ed559026453",
"extension": "py",
"file... | 2.65625 | stackv2 | import os
import psycopg2
from psycopg2 import sql
import dotenv
CREATE_TABLE_APPUSER = """CREATE TABLE IF NOT EXISTS app_user (
appuser_login VARCHAR(50) PRIMARY KEY,
appuser_pass VARCHAR(50) NOT NULL
);"""
CREATE_APPUSER = "INSERT INTO app_user (appuser_login, appuser_pass) VALUES (%s, %s);"
GET_APPUSER... | 181 | 35.96 | 135 | 15 | 1,593 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_8a13d27f51b80dc4_b29de6b0", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 1 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
141
] | [
141
] | [
5
] | [
49
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | main.py | /main.py | esdevop/budget_db | MIT | |
2024-11-18T21:07:35.859727+00:00 | 1,630,143,343,000 | e7734eb298ffcd81e61b8af53f54e1c80c73be4f | 3 | {
"blob_id": "e7734eb298ffcd81e61b8af53f54e1c80c73be4f",
"branch_name": "refs/heads/main",
"committer_date": 1630143343000,
"content_id": "a58783debd848a1ef3316bf7c9b3bbfff05eb857",
"detected_licenses": [
"MIT"
],
"directory_id": "2d6c0cf164f80180b3f0ddefa732f22d5f576238",
"extension": "py",
"file... | 2.625 | stackv2 | import connectToTwitter
import json
import createDatabase
import insertIntoDb
import time
apiVersion1Call = 'https://api.twitter.com/1.1/friends/ids.json'
def getUsers(party, db, retweetersLimit):
Query = 'Select retweeterId from ' + party + 'retweeterFreq order by freq desc limit ' + str(retweetersLimit)
... | 84 | 31.18 | 113 | 16 | 638 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_8f863179459c51e3_d06bc09a", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 3 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
12
] | [
12
] | [
14
] | [
31
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | crawlFriends.py | /crawlFriends.py | Gurchani/crawl-Code | MIT | |
2024-11-18T21:07:37.870007+00:00 | 1,480,097,324,000 | acbd08e7c24d32726894a8a7ba9668de5a59282a | 3 | {
"blob_id": "acbd08e7c24d32726894a8a7ba9668de5a59282a",
"branch_name": "refs/heads/master",
"committer_date": 1480097324000,
"content_id": "903ddeb1d3f498092cbcac0b1d07e2ccf786ce86",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5ef733e7922dc52cd72af4fba7719e1cbe533982",
"extension": "py"... | 2.71875 | stackv2 | #!/usr/bin/env python3
import os
import sys
import requests
import argparse
from lxml import etree
URL_BASE = 'https://www.reddit.com'
def get_arg():
parser = argparse.ArgumentParser(description='Change your wallpaper by the last one posted in reddit')
parser.add_argument('--sub', dest='subreddit', type=str, ... | 106 | 30.1 | 131 | 20 | 828 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_c9261d66c6a904b4_f18485b8", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 8 | true | [
"CWE-295",
"CWE-78"
] | [
"rules.python.requests.security.disabled-cert-validation",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
26,
70
] | [
26,
70
] | [
16,
9
] | [
65,
118
] | [
"A03:2017 - Sensitive Data Exposure",
"A01:2017 - Injection"
] | [
"Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation.",
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"LOW",
"HIGH"
] | wallpaper.py | /wallpaper.py | kibzota/scripts | Apache-2.0 | |
2024-11-18T21:07:39.210449+00:00 | 1,386,305,120,000 | 141a61dc0d8d958daa1b6aa5357d95744eded9d1 | 2 | {
"blob_id": "141a61dc0d8d958daa1b6aa5357d95744eded9d1",
"branch_name": "refs/heads/master",
"committer_date": 1386305120000,
"content_id": "ce07ba0e188bf7d5da85d88c86888de7bd6918ec",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "517b77a97ccabc7b858a48be7aed37d2da2c24bb",
"extension": "py"... | 2.421875 | stackv2 | import itertools
import json
import arrow
from flask import Flask, request
import psycopg2
app = Flask(__name__)
app.debug = True
@app.route("/eligibility", methods=["GET"])
def eligibility():
""" Checks eligibility for this particular user. """
user_id = get_user_id()
model, sdk_version, app_version = g... | 171 | 36.66 | 115 | 22 | 1,386 | python | [{"finding_id": "semgrep_rules.python.flask.best-practice.use-jsonify_8926918343f622c5_f40663b2", "tool_name": "semgrep", "rule_id": "rules.python.flask.best-practice.use-jsonify", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "flask.jsonify() is a Flask helper method which han... | 2 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
148
] | [
152
] | [
13
] | [
22
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | flaskapp.py | /example/backend/flaskapp.py | Antarix/PhoneHome | Apache-2.0 | |
2024-11-18T21:07:41.017134+00:00 | 1,463,606,563,000 | c735145982e09980f3c66126f54c81707cd6e911 | 3 | {
"blob_id": "c735145982e09980f3c66126f54c81707cd6e911",
"branch_name": "refs/heads/master",
"committer_date": 1463606563000,
"content_id": "6e0de9d5d403857e33e8311a37e6e207cbb58f9c",
"detected_licenses": [
"MIT"
],
"directory_id": "7fd8e7d4d27bab3bcc4b1dd15ca3d64967f6d6cb",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/python
import subprocess
import os
class Control:
def __init__(self, config):
self.config = config
self.sudo_method = self.config['sudo_method']
def do_call(self, args):
cmdargs = []
if self.sudo_method == 'sudo':
cmdargs = ['sudo']
cmd = cmdargs + args
return subprocess.call(cmd)
def ... | 50 | 26.62 | 99 | 18 | 330 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5f281ae60ddd4c1e_d1b27ab2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
17,
40
] | [
17,
40
] | [
10,
7
] | [
30,
100
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | control.py | /control.py | yuhuating/pypiwifi | MIT | |
2024-11-18T21:07:42.283668+00:00 | 1,481,133,005,000 | 72c42abb816f2b0f297fa446adb0ac340a07bc56 | 3 | {
"blob_id": "72c42abb816f2b0f297fa446adb0ac340a07bc56",
"branch_name": "refs/heads/master",
"committer_date": 1481133005000,
"content_id": "79a3d4032864c60756bc138f0f5d4b7cf4fe6746",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "64bcbd285b347b98f4b814a6787953bf538d3640",
"extension": "p... | 2.765625 | stackv2 | """
Handwritten Digit Recognition
Licence: BSD
Author : Hoang Anh Nguyen
"""
import os
from flask import redirect, render_template, flash, request, jsonify
from werkzeug.utils import secure_filename
from app import app
from classifier import SoftmaxClassifier, CNNClassifier
@app.route('/')
def index():
return ren... | 56 | 31.18 | 74 | 15 | 384 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_266209def15fc162_58f9c53a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
50
] | [
50
] | [
10
] | [
45
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | mnist.py | /app/mnist.py | hanguyen86/mnist | BSD-2-Clause | |
2024-11-18T21:07:45.125153+00:00 | 1,646,120,245,000 | 4567447ff6d565113240fdf823fd7aa4f9ec114b | 2 | {
"blob_id": "4567447ff6d565113240fdf823fd7aa4f9ec114b",
"branch_name": "refs/heads/master",
"committer_date": 1646120245000,
"content_id": "1415e221f9b30b6f02a5b1fac3e1c38fa17a6f40",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "9d45c025a8fce775ef5f87da5a7cf900b710a9ed",
"extension": "p... | 2.484375 | stackv2 | import requests
import re
from allmychanges.downloaders.utils import normalize_url
def _get_data(data, path):
def iterate(data, path):
head = path[0]
tail = path[1:]
value = data.get(head)
if value is None:
return None
else:
if tail:
... | 94 | 28.39 | 100 | 18 | 629 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_338fd9bc8a1fd19d_2bdb52d0", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 7 | true | [
"CWE-96"
] | [
"rules.python.lang.security.dangerous-globals-use"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
91
] | [
91
] | [
15
] | [
62
] | [
"A03:2021 - Injection"
] | [
"Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | source_guesser.py | /allmychanges/source_guesser.py | AllMyChanges/allmychanges.com | BSD-2-Clause | |
2024-11-18T21:07:47.758874+00:00 | 1,526,068,419,000 | 9139a652144d9dee1c17bcaa261c967a7e920c78 | 3 | {
"blob_id": "9139a652144d9dee1c17bcaa261c967a7e920c78",
"branch_name": "refs/heads/master",
"committer_date": 1526068419000,
"content_id": "b8a65d33cd396e762b3b531204cf659702eb5dfc",
"detected_licenses": [
"MIT"
],
"directory_id": "23ed9e2adf55ebcc3f984d8d5da97df7cb096611",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python
import queuemanager
import logging
import datetime
import time
import pickle
import os
import json
import urllib
checkIntervalInSeconds = 60*5
storageFileName = 'snow_level.p'
existingSnowLevel = 0
snowLevelMap = {}
logging.basicConfig()
logger = logging.getLogger('blinkylog')
if not logger.h... | 62 | 27.42 | 118 | 13 | 468 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6809f33edf27c1f4_5469c8ad", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
32,
55
] | [
32,
55
] | [
18,
2
] | [
58,
56
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | checkforsnow.py | /checkforsnow.py | goggledefogger/BlinkyTapeQueue | MIT | |
2024-11-18T21:07:49.042760+00:00 | 1,544,793,535,000 | d42a093024b8a3a81131deb2038d68428f59b3cf | 3 | {
"blob_id": "d42a093024b8a3a81131deb2038d68428f59b3cf",
"branch_name": "refs/heads/master",
"committer_date": 1544793535000,
"content_id": "4be9136bbf0f8f0bca31b02958bc4fc15fc880db",
"detected_licenses": [
"MIT"
],
"directory_id": "c55615a3638317e71f966cbde3a81c61ca7beee1",
"extension": "py",
"fi... | 3.171875 | stackv2 | from .game_logger import logger, log_decorator, debug_decorator
from .custom_exeption import InvalidDirectionError, InvalidMapSizeError, InvalidSaveDataError
from . import game_map
from . import player
import math
import pickle
from . import enemy
from threading import Thread
"""
https://test.pypi.org/project/dungeon... | 132 | 25.73 | 93 | 18 | 812 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ec36136dcd6d1f25_2aedcddf", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
87,
99
] | [
87,
99
] | [
9,
21
] | [
94,
40
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | dungeon_game.py | /Kateryna_Liukina/10/dangeon_game_package_kliukina/dangeon_game_package_kliukina/dungeon_game.py | SmischenkoB/campus_2018_python | MIT | |
2024-11-18T21:33:02.560922+00:00 | 1,571,683,124,000 | 68b6c7e9a4d7640855769486f2fad74097206d14 | 3 | {
"blob_id": "68b6c7e9a4d7640855769486f2fad74097206d14",
"branch_name": "refs/heads/master",
"committer_date": 1571683124000,
"content_id": "a2400c79707d2841971c05f23a98674aa6f0656f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6a621f8cbbfc2b865555e083cc1790af12465c2e",
"extension": "py"... | 2.671875 | stackv2 | import xml.etree.ElementTree as ET
import unittest
#TCA
from TCACore import Timer, logger
from TCARandom import Random_generator
class Region(object):
def __init__(self, title, point1, point2):
self.title = title
self.x1 = float(point1[0])
self.y1 = float(point1[1])
self.x2 = flo... | 342 | 33.01 | 124 | 22 | 2,748 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_99704068d1d9cfeb_ad6b70fc", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
1,
195
] | [
1,
195
] | [
1,
16
] | [
35,
37
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | TCARegions.py | /old_versions/TCA_2_2/TCA_P_2_2_1/code/TCARegions.py | OSADP/TCA | Apache-2.0 | |
2024-11-18T21:33:07.672805+00:00 | 1,417,966,028,000 | d702458266c77f83401435dcda88559dda4dbf57 | 3 | {
"blob_id": "d702458266c77f83401435dcda88559dda4dbf57",
"branch_name": "refs/heads/master",
"committer_date": 1417966028000,
"content_id": "63a966e49249bfa1236a94fe5d611f3e88a8871a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a15e61a1e760114124115adbe0701803c2f64ea3",
"extension": "py"... | 3.03125 | stackv2 | """
fem_mesh.py
Generic functions for all meshing functions
Copyright 2014 Mark L. Palmeri (mlp6@duke.edu)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2... | 128 | 27.91 | 76 | 14 | 1,001 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_6d38680bdb271e4e_509925f8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
38
] | [
38
] | [
5
] | [
75
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | fem_mesh.py | /mesh/fem_mesh.py | kmwalsh1/fem | Apache-2.0 | |
2024-11-18T21:33:13.376866+00:00 | 1,560,587,799,000 | 404b480767fbfa83ed4d0cc4000bd361a816d53e | 3 | {
"blob_id": "404b480767fbfa83ed4d0cc4000bd361a816d53e",
"branch_name": "refs/heads/master",
"committer_date": 1560587799000,
"content_id": "7af13fac8f9413a94053b0c88dc75de0b7978042",
"detected_licenses": [
"MIT"
],
"directory_id": "8d31ef4dc9e2bf1a5f248c1c9ddb329ba53aea8a",
"extension": "py",
"fi... | 2.703125 | stackv2 | from flask import request, make_response, render_template
from flask.views import MethodView
from flask_cas import login_required
from common_functions import display_access_control_error
from catCas import validate_professor
import gbmodel
class MissingStudentException(Exception):
"""
We raise this exception... | 221 | 36.16 | 108 | 18 | 1,748 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_e5b1318357ad0352_73493b28", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "... | 2 | true | [
"CWE-79",
"CWE-79"
] | [
"rules.python.flask.security.audit.xss.make-response-with-unknown-content",
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
46,
72
] | [
46,
72
] | [
24,
24
] | [
42,
42
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | report.py | /report.py | capstoneteamb/capstone360 | MIT | |
2024-11-18T21:33:16.417533+00:00 | 1,554,795,012,000 | 4af068db31684176f4ac6c74dd4cebc329cd5e36 | 2 | {
"blob_id": "4af068db31684176f4ac6c74dd4cebc329cd5e36",
"branch_name": "refs/heads/master",
"committer_date": 1554795012000,
"content_id": "cd7070d7ced993a003c54404ba9bd45b8c2cf10c",
"detected_licenses": [
"MIT"
],
"directory_id": "f7c6ec8b666a9a5ba6df90e8f435c0f95afd0258",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/python3
# author: watchingheart
# email: jzgjava@163.com
import os
from io import StringIO
import datetime
import filecmp
import difflib
import fire
import deploy_config
def tabs(count):
return ' ' * count
def print_file(buffer, flag, path, file, level, newer=None, change_size=0):
full_path =... | 343 | 33.42 | 114 | 22 | 2,817 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_2e306b6ca4664c2e_3f30f801", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 11 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-c... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
127,
133,
153,
174,
194,
272,
331,
334
] | [
127,
133,
153,
174,
194,
272,
331,
334
] | [
21,
17,
17,
17,
17,
16,
21,
17
] | [
35,
31,
31,
31,
31,
30,
35,
31
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | deploy.py | /deploy.py | watchingheart/pydeploy | MIT | |
2024-11-18T21:33:17.520283+00:00 | 1,593,110,182,000 | 522499c8db9356c89e21b11b07897389191ccf01 | 3 | {
"blob_id": "522499c8db9356c89e21b11b07897389191ccf01",
"branch_name": "refs/heads/master",
"committer_date": 1593110182000,
"content_id": "62ed69642f8fca39923e0bcdebf7bbf028e88cfa",
"detected_licenses": [
"MIT"
],
"directory_id": "546b067636c7779832f2f7c53607e74e5f535158",
"extension": "py",
"fi... | 3.40625 | stackv2 | #!/usr/bin/env python3
# programs.py
#
# Within the bowels of your compiler, you need to represent programs
# as data structures. In this file, you will manually encode
# some simple Wabbit programs using the data model you've developed
# in the file wabbit/model.py
#
# The purpose of this exercise is two-fold:
#
# ... | 241 | 24.26 | 101 | 19 | 1,577 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_186b8182d8e7341d_0b96a9fb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
59,
59,
61
] | [
59,
59,
61
] | [
5,
60,
5
] | [
65,
64,
28
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' f... | [
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW"
] | [
"HIGH",
"LOW",
"HIGH"
] | programs.py | /programs.py | scottidler/dabeaz-compiler | MIT | |
2024-11-18T21:33:17.615526+00:00 | 1,491,285,588,000 | 7f4b85d027b2bbb6127746468ca06631029d64bd | 3 | {
"blob_id": "7f4b85d027b2bbb6127746468ca06631029d64bd",
"branch_name": "refs/heads/master",
"committer_date": 1491285588000,
"content_id": "51462b2391f7f17aa068cc90eb244e3e22883d64",
"detected_licenses": [
"MIT"
],
"directory_id": "33bcff04c27233f1d75a4b3c06919d160bbb7383",
"extension": "py",
"fi... | 2.984375 | stackv2 | """A server that handles a connection with an OpenBCI board and serves that
data over both a UDP socket server and a WebSocket server.
Requires:
- pyserial
- asyncio
- websockets
"""
import argparse
import cPickle as pickle
import json
import sys;
sys.path.append(
'..') # help python find open_bci_v3.py r... | 76 | 27.03 | 76 | 14 | 517 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_8334a3e0eb9c4de8_25f5add2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
68,
68
] | [
68,
68
] | [
28,
28
] | [
48,
48
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | udp_server.py | /Code/OpenBCIPy/src/scripts/udp_server.py | neurotechuoft/Wall-EEG | MIT | |
2024-11-18T21:33:21.779050+00:00 | 1,633,216,059,000 | d4e5e8b4f5e82571820b840e32ec2658178f4d5e | 2 | {
"blob_id": "d4e5e8b4f5e82571820b840e32ec2658178f4d5e",
"branch_name": "refs/heads/main",
"committer_date": 1633216059000,
"content_id": "5fdfa250fe49596f238e934417cf77276bb73140",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "61266a005252c7e844c7e14e8ef9c158bc34f134",
"extension": "py",
... | 2.375 | stackv2 | import subprocess
from pathlib import Path
from typing import List
from loguru import logger
from novelsave.core.services import BaseCalibreService
from novelsave.exceptions import RequirementException, ToolException
class CalibreService(BaseCalibreService):
def ebook_convert(self, input_file: Path, output_fil... | 38 | 33.58 | 106 | 15 | 270 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f6b2d6999823d498_5c34575a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
30
] | [
30
] | [
13
] | [
66
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | calibre_service.py | /novelsave/services/tools/calibre_service.py | JoyceEstrada13/novelsave | Apache-2.0 | |
2024-11-18T21:33:22.691409+00:00 | 1,374,086,423,000 | 2b36d31d99c97fdaedc85d5272d9f5163d50ef6e | 3 | {
"blob_id": "2b36d31d99c97fdaedc85d5272d9f5163d50ef6e",
"branch_name": "refs/heads/master",
"committer_date": 1374086423000,
"content_id": "6ab2d2f48aa5b7cb59f5ab667992b70f124ff07e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6922efa48148f528c921762b44be49c2de3f0554",
"extension": "py"... | 2.546875 | stackv2 | # -*- coding: utf-8 -*-
import sys, re, json
from xml.parsers import expat
#
# Parse the TZ input file and build the tree.
#
text = open("../tz.json").read()
data = json.loads(text)
cities = {}
conflicts = {
'CD': 'Africa/Kinshasa',
'ML': 'Africa/Bamako',
'AR': 'America/Argentina/Buenos_Aires', # This is... | 120 | 24.5 | 78 | 16 | 957 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_19a335104cd13be7_dec9c570", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
3
] | [
3
] | [
1
] | [
30
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | default_timezones.py | /shared/resources/apn/default_timezones.py | vingtetun/gaia | Apache-2.0 | |
2024-11-18T21:33:23.260933+00:00 | 1,544,694,895,000 | 45a705e12db86968f4ac8331523e260ec72dcb8e | 2 | {
"blob_id": "45a705e12db86968f4ac8331523e260ec72dcb8e",
"branch_name": "refs/heads/master",
"committer_date": 1544694895000,
"content_id": "b38bc37cb710dab6cf78b4ff03e7eea3527a54fc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d56392ae246ac643392788ce1f96c791885943b2",
"extension": "py"... | 2.3125 | stackv2 | #
# Copyright (c) 2017 All rights reserved
# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
from processutils import execute
from ssh_util im... | 88 | 37.67 | 79 | 17 | 749 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.string-is-comparison_d6b1e2d61539ff92_934261e8", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.string-is-comparison", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Found st... | 4 | true | [
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"HIGH"
] | [
53,
60,
60
] | [
53,
60,
60
] | [
17,
17,
17
] | [
69,
52,
52
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | ssh_client.py | /odl-pipeline/lib/utils/ssh_client.py | opnfv/sdnvpn | Apache-2.0 | |
2024-11-18T21:33:25.236524+00:00 | 1,475,549,551,000 | 68eb96182ac2c4fec751302ca10bb0adaa54fe2f | 3 | {
"blob_id": "68eb96182ac2c4fec751302ca10bb0adaa54fe2f",
"branch_name": "refs/heads/master",
"committer_date": 1475549551000,
"content_id": "fdaa2558b780a99e5f8deb814a076c78cd576cbc",
"detected_licenses": [
"MIT"
],
"directory_id": "3bc4ab3313f72cfeee98237a9af9a22f243cc498",
"extension": "py",
"fi... | 3.234375 | stackv2 | """Defines a class and methods for evaluating 1D quantum potentials.
"""
import numpy as np
from basis import msg
class Potential(object):
"""Represnts a 1D quantum potential.
Args:
potcfg (str): path to the potential configuration file.
Attributes:
filepath (str): absolute path to the ... | 145 | 30.23 | 76 | 17 | 917 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_113f79e2a4deb327_bbe578ec", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 4 | true | [
"CWE-95",
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
86,
109,
110
] | [
86,
109,
110
] | [
38,
22,
24
] | [
48,
47,
48
] | [
"A03:2021 - Injection",
"A03:2021 - Injection",
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | potential.py | /basis/potential.py | wsmorgan/782 | MIT | |
2024-11-18T21:33:27.141927+00:00 | 1,486,641,479,000 | 401c9c31c26a1a47cd4ca37769d7ea1bd7e2ee51 | 2 | {
"blob_id": "401c9c31c26a1a47cd4ca37769d7ea1bd7e2ee51",
"branch_name": "refs/heads/master",
"committer_date": 1486641479000,
"content_id": "7844c8aff790d5556cad3f6446ba1c139cd13c2a",
"detected_licenses": [
"MIT"
],
"directory_id": "fb166c67df5f66197d6ad68bbec2ca9c55841871",
"extension": "py",
"fi... | 2.40625 | stackv2 | from flask import Response, render_template, Markup
def get_response(qres, output):
if output == 'text/html':
return render_template('response.html', tabledata=Markup(html_serialize(qres)))
elif output == 'application/sparql-results+xml':
return Response(
qres.serialize(format='... | 31 | 31.39 | 87 | 16 | 242 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.explicit-unescape-with-markup_4b7ec41d752377e0_0e935c19", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.explicit-unescape-with-markup", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected e... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
5
] | [
5
] | [
59
] | [
87
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected explicitly unescaped content using 'Markup()'. This permits the unescaped data to include unescaped HTML which could result in cross-site scripting. Ensure this data is not externally controlled, or consider rewriting to not use 'Markup()'."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | adhs_response.py | /adhs_response.py | eccenca/adhs | MIT | |
2024-11-18T21:33:31.881393+00:00 | 1,484,168,766,000 | d6505f55f402a331384dc09bfc01fd5c781686bd | 2 | {
"blob_id": "d6505f55f402a331384dc09bfc01fd5c781686bd",
"branch_name": "refs/heads/master",
"committer_date": 1484168766000,
"content_id": "7082b5cf95c80a8b1e6d862b7f0ba2962d68d6b5",
"detected_licenses": [
"MIT"
],
"directory_id": "02d18af2875be29966e944dcae2f139cf4ad02fc",
"extension": "py",
"fi... | 2.46875 | stackv2 | from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from charts.models import Chart
from charts import interp
def chart(request):
return render_to_response('charts/chart.html',{
'ds1':[[10, 50, 60, 80, 40],[50, 60, 100, 40, 20]],
'ds2':[ [77,66,1... | 63 | 30.87 | 83 | 15 | 640 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_4ecb40312030c303_e3c0f57b", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ... | 3 | true | [
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.django.security.injection.raw-html-format",
"rules.python.django.security.audit.xss.direct-use-of-httpresponse"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
52,
52,
63
] | [
52,
52,
63
] | [
16,
29,
12
] | [
84,
83,
34
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.",
"Detected user input flowing into a manually constructed HTML... | [
5,
5,
5
] | [
"LOW",
"HIGH",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | views.py | /weatherometer/charts/views.py | hoadu/weatherometer | MIT | |
2024-11-18T21:33:33.294643+00:00 | 1,581,984,059,000 | 4d41352a810ce134691256add9d8bbcbf46e1638 | 3 | {
"blob_id": "4d41352a810ce134691256add9d8bbcbf46e1638",
"branch_name": "refs/heads/master",
"committer_date": 1581984059000,
"content_id": "fa52cb839d4408b37b99233290d3068502e1d346",
"detected_licenses": [
"MIT"
],
"directory_id": "46d5b0bca41cb6758750aee775d96941e1a23432",
"extension": "py",
"fi... | 2.78125 | stackv2 | import os, sys
import xml.etree.cElementTree as ET
import re
from collections import OrderedDict
import json
import string
printable = set(string.printable)
## Reader: ToDo: use another file reader.py to import various formats, convert to txt and clean docs, here, below
def read_document(filepath):
f = open(filepa... | 210 | 38.17 | 113 | 21 | 1,860 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_dd274d75751d1f44_104de565", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611",
"CWE-96"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.dangerous-globals-use"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM"
] | [
2,
177
] | [
2,
177
] | [
1,
33
] | [
36,
61
] | [
"A04:2017 - XML External Entities (XXE)",
"A03:2021 - Injection"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"Found non static data as an index to 'globals()'. This is ... | [
7.5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | parser3.py | /z_old-files/parser3.py | Disha-hub/AutomatedResumeShortlisting | MIT | |
2024-11-18T21:55:50.289761+00:00 | 1,489,163,163,000 | b45de9e77e282d166be8ccf2ece2d6924ab76010 | 3 | {
"blob_id": "b45de9e77e282d166be8ccf2ece2d6924ab76010",
"branch_name": "refs/heads/master",
"committer_date": 1489163163000,
"content_id": "67bf105c1e8edf3ce2266aa2e5fb0e7b09fe904f",
"detected_licenses": [
"MIT"
],
"directory_id": "458f83ca5d4306d258ece8d1ffe8d73661744ed0",
"extension": "py",
"fi... | 2.75 | stackv2 | import numpy as np
import h5py
import os
import collections
from tqdm import tqdm
import simple_config
from sklearn.cluster import SpectralClustering
from scipy.spatial.distance import cdist
from sklearn.metrics.pairwise import cosine_similarity
from utils.data_utils import load_w2vec
def subset_iterator(X, m, repe... | 355 | 25.91 | 79 | 16 | 2,334 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_694ff1cbdee9b61a_0dbd8912", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
238
] | [
238
] | [
5
] | [
69
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | metacluster.py | /word2vec_pipeline/metacluster.py | panyang/word2vec_pipeline | MIT | |
2024-11-18T21:55:51.940054+00:00 | 1,498,041,147,000 | db55fb789fe51540b80f13b9f1ede70ee1b858fe | 3 | {
"blob_id": "db55fb789fe51540b80f13b9f1ede70ee1b858fe",
"branch_name": "refs/heads/master",
"committer_date": 1498041147000,
"content_id": "7b6d67bf3712adfb7af0722adbc176804964a083",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cdee5cc20a5085b40f8555e7199fe19403e005c3",
"extension": "py"... | 2.71875 | stackv2 | #!/Users/greghines/Library/Enthought/Canopy_64bit/User/bin/python
__author__ = 'greghines'
import csv
import cPickle as pickle
goldStandardDict = {}
resultingDict = {}
print "loading experts"
i = 0
with open('/Users/greghines/Databases/expert_classifications.csv', 'rb') as csvfile:
classificationReader = csv.read... | 50 | 28.18 | 84 | 15 | 367 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_22c04254817c204f_0aaffc04", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
48,
48
] | [
48,
48
] | [
1,
1
] | [
79,
79
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | serenegtiExpertConsensus.py | /experimental/old/serenegtiExpertConsensus.py | visenger/aggregation | Apache-2.0 | |
2024-11-18T21:55:57.121530+00:00 | 1,598,439,866,000 | 19be8aec378a02cb45ad2bf06beaab82f9ca445e | 3 | {
"blob_id": "19be8aec378a02cb45ad2bf06beaab82f9ca445e",
"branch_name": "refs/heads/master",
"committer_date": 1598439866000,
"content_id": "22bda775667cfdda65a1a9bc491d51ea07afa78b",
"detected_licenses": [
"MIT"
],
"directory_id": "7eba92a100906b5ed19666af720d3627e129228f",
"extension": "py",
"fi... | 2.796875 | stackv2 | from sklearn.cluster import MiniBatchKMeans
from sklearn.cluster import KMeans
import numpy as np
from scipy.spatial import distance
import pickle
import torch
from torch.autograd import Variable
class Node:
def __init__(self, parent, previous, n, c, centroid):
self.parent = parent
self.previous =... | 152 | 32.74 | 113 | 15 | 1,326 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_00f57f65400802eb_9dd6e613", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 4 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
144,
151
] | [
144,
151
] | [
5,
12
] | [
34,
35
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | hierarhical_tree_gpu.py | /hierarhical_tree_gpu.py | BatyrM/QL-Net | MIT | |
2024-11-18T21:55:57.789812+00:00 | 1,496,889,344,000 | 4d889c9d031e3798d5a5891ca7cd4f7fae07e9ea | 3 | {
"blob_id": "4d889c9d031e3798d5a5891ca7cd4f7fae07e9ea",
"branch_name": "refs/heads/master",
"committer_date": 1496889344000,
"content_id": "4eaad65a8fedc3ac9a263c2a80a734159f3ed449",
"detected_licenses": [
"MIT"
],
"directory_id": "87d3fac1cfe6f84644497f9e4986171648afc16f",
"extension": "py",
"fi... | 2.546875 | stackv2 | from django.shortcuts import render
from .models import getTrends, getTweets
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
import json
@csrf_exempt
def index(request):
"""
:param request: HttpRequest
:return: renders the home page of the application
"""
... | 47 | 25.43 | 74 | 11 | 294 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.no-csrf-exempt_5ed8a49bda8b2ee2_7cf2ce5b", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.no-csrf-exempt", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected usage of @csrf_exempt, which indicate... | 3 | true | [
"CWE-352",
"CWE-352",
"CWE-352"
] | [
"rules.python.django.security.audit.no-csrf-exempt",
"rules.python.django.security.audit.no-csrf-exempt",
"rules.python.django.security.audit.no-csrf-exempt"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
8,
17,
36
] | [
14,
33,
47
] | [
1,
1,
1
] | [
48,
72,
75
] | [
"A01:2021 - Broken Access Control",
"A01:2021 - Broken Access Control",
"A01:2021 - Broken Access Control"
] | [
"Detected usage of @csrf_exempt, which indicates that there is no CSRF token set for this route. This could lead to an attacker manipulating the user's account and exfiltration of private data. Instead, create a function without this decorator.",
"Detected usage of @csrf_exempt, which indicates that there is no C... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | views.py | /tweets/views.py | jaknap/tweet_relevance | MIT | |
2024-11-18T21:56:00.858852+00:00 | 1,606,049,336,000 | 8f439c52eb36c1ab33860e4d7e092e40c1b1b8a7 | 2 | {
"blob_id": "8f439c52eb36c1ab33860e4d7e092e40c1b1b8a7",
"branch_name": "refs/heads/master",
"committer_date": 1606049336000,
"content_id": "113e05a8dce81637f5bf59d3ff787abbeb0aa991",
"detected_licenses": [
"MIT"
],
"directory_id": "80692ada326f01332815ed6f86fed66b348c4b9c",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script is used to split the dataset by arguments from commandline for the distributed version.
Accept three arguments:
--dataset
--num_users
--iid
"""
import os
import pickle
import shutil
from options import args_parser
from update import *
from utils import *
im... | 49 | 28.53 | 117 | 14 | 334 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4050f425fd9a322c_7752483d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
44,
48
] | [
44,
48
] | [
13,
9
] | [
59,
36
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | dataset_split.py | /src/dataset_split.py | NaiboWang/HFL-CS6203-NaiboShiqi | MIT | |
2024-11-18T21:56:02.119808+00:00 | 1,569,837,862,000 | 779a1ac40fa639ffe801cab2cb09518bfc39e1bf | 3 | {
"blob_id": "779a1ac40fa639ffe801cab2cb09518bfc39e1bf",
"branch_name": "refs/heads/master",
"committer_date": 1569837862000,
"content_id": "e9fd7ff71e2facbdedaf828f58e1c1ac1c87736c",
"detected_licenses": [
"MIT"
],
"directory_id": "6e76a5526cccd01b174b36dc614bf30b4e530f96",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: Yitan Lou
@email: dabing930714@gmail.com
y.lou@liacs.leidenuniv.nl
"""
import numpy as np
import re,os
from BayesOpt import BO
from BayesOpt.Surrogate import RandomForest
from BayesOpt.SearchSpace import NominalSpace, OrdinalSpace
from multiprocessing... | 173 | 33.13 | 160 | 19 | 1,526 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_092099ec6bebb66e_b2116d2d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 5 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
28
] | [
28
] | [
13
] | [
26
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | hyper_para_tuning_sge.py | /src/hyper_para_tuning_sge.py | dabingrosewood/MasterThesisProj | MIT | |
2024-11-18T21:56:02.177187+00:00 | 1,589,384,507,000 | 819970b14868a8b8b89f25312c15e6740b0b1690 | 2 | {
"blob_id": "819970b14868a8b8b89f25312c15e6740b0b1690",
"branch_name": "refs/heads/master",
"committer_date": 1589384507000,
"content_id": "f32d507ad9e7da6213fecd61f8f06046118f678b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4ede3e287d25e0e100ad65b58a673223a63e89a7",
"extension": "py"... | 2.4375 | stackv2 | import os
import sys
import time
import globals
def run_cmd(cmd):
cmd_stdout = ""
tmpfile = "/tmp/pf9.{}.tmp".format(os.getppid())
cmd_exitcode = os.system("{} > {} 2>&1".format(cmd,tmpfile))
# read output of command
if os.path.isfile(tmpfile):
try:
fh_tmpfile = open(tmpfile, '... | 90 | 26.62 | 145 | 16 | 638 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_fb609045065fcf15_8d182b11", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 4 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
9
] | [
9
] | [
20
] | [
65
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | ssh_utils.py | /lib/ssh_utils.py | dyvantage/pkt | Apache-2.0 | |
2024-11-18T21:56:05.451498+00:00 | 1,587,994,051,000 | 3b9c7c783293e2f73d8464781c77254d1ffe869f | 3 | {
"blob_id": "3b9c7c783293e2f73d8464781c77254d1ffe869f",
"branch_name": "refs/heads/master",
"committer_date": 1587994051000,
"content_id": "7e66c8eeb519f8d889847d526ad24844c968db61",
"detected_licenses": [
"MIT"
],
"directory_id": "b0f2317020df334a855d48b657c9704362313e32",
"extension": "py",
"fi... | 2.59375 | stackv2 | from flask import Flask, render_template, request, json, Response
import names
import random
import player_faces
import uuid
import time
app = Flask(__name__)
games = {}
@app.route('/')
def hello():
return render_template('index.html')
@app.route('/name')
def player_request():
return random.choice(names.AD... | 148 | 29.2 | 86 | 16 | 1,098 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.directly-returned-format-string_c840a4f31aeae4d9_7b487437", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.directly-returned-format-string", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected Fl... | 5 | true | [
"CWE-79"
] | [
"rules.python.flask.security.audit.directly-returned-format-string"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
118
] | [
118
] | [
7
] | [
25
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'."
] | [
5
] | [
"HIGH"
] | [
"MEDIUM"
] | server.py | /server.py | giriakhil/Tron-a-MultiPlayerGame | MIT | |
2024-11-18T22:39:33.041957+00:00 | 1,408,139,950,000 | 2f36c275bba04342b5d7812526deb7b541105693 | 4 | {
"blob_id": "2f36c275bba04342b5d7812526deb7b541105693",
"branch_name": "refs/heads/master",
"committer_date": 1408139950000,
"content_id": "c0c7fd3aa8c269882094b30f5deb5c0aa3b985f3",
"detected_licenses": [
"MIT"
],
"directory_id": "14603c24f81efd1803fe702888d2fbffbea2cd89",
"extension": "py",
"fi... | 3.8125 | stackv2 | # Python Challenege 5
# Chris Baldwin
# Completed
# Strategy:
# Use pickle module to unpickle the data from the banner in the html source
# Got an array of arrays of tuples
# The tuples are # or ' ' and a number
# print the character number times
# get an old school unix banner
# banner says: channel
import pickle
#... | 30 | 18.63 | 75 | 12 | 160 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_96513e9339026428_7905e3fb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
20
] | [
20
] | [
9
] | [
23
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | challenge5.py | /challenge5.py | ChrisDBaldwin/PythonChallenge | MIT | |
2024-11-18T22:39:34.572709+00:00 | 1,472,141,795,000 | ab26d5b402425e893b4a5a09a03e6bdfe15ea02e | 2 | {
"blob_id": "ab26d5b402425e893b4a5a09a03e6bdfe15ea02e",
"branch_name": "refs/heads/master",
"committer_date": 1472141795000,
"content_id": "3fa873400d9ca2b7b498ed678c82f9bd5f3865db",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2ec80813a860b31e0682d8b94229415e0a9b280c",
"extension": "py"... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import division
# Copyright 2016 The Switch-Chile Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
# Operations, Control and Markets laboratory at Pontificia Universidad
# Católica de Chile.
"""
"""
import psycopg2, ... | 196 | 30.22 | 128 | 25 | 1,801 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_4c118ccfb8763e6e_1fe20808", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 2 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
144
] | [
144
] | [
5
] | [
27
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | db_hydrology_uploader.py | /python_utility_scripts/db_hydrology_uploader.py | OCM-Lab-PUC/switch-chile | Apache-2.0 | |
2024-11-18T22:39:34.860156+00:00 | 1,393,780,124,000 | eef3f3ab243e2bc8a27ae91c5b4747ab282c4d53 | 3 | {
"blob_id": "eef3f3ab243e2bc8a27ae91c5b4747ab282c4d53",
"branch_name": "refs/heads/master",
"committer_date": 1393780124000,
"content_id": "786b85b71bd8a8364dbc2d9f954d8be87afb261e",
"detected_licenses": [
"MIT"
],
"directory_id": "b27ad3bad01991c9c5bff267d2e3ccbd16fe2a95",
"extension": "py",
"fi... | 2.546875 | stackv2 | import pickle
from socketserver import BaseRequestHandler, TCPServer, ThreadingMixIn
class Handler(BaseRequestHandler):
def handle(self):
while True:
buff = bytearray()
while not buff.endswith(b'.'):
buff += self.request.recv(256)
method, args, kwargs =... | 32 | 25.62 | 70 | 16 | 195 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8d673a38e69307fb_44acaaea", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
12,
19
] | [
12,
19
] | [
36,
34
] | [
54,
54
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | server.py | /microrpc/server.py | jasonjohnson/microrpc | MIT | |
2024-11-18T22:39:34.911646+00:00 | 1,579,452,644,000 | 27b6e5312e38cd60d247b26e2ba1b6d31940380d | 3 | {
"blob_id": "27b6e5312e38cd60d247b26e2ba1b6d31940380d",
"branch_name": "refs/heads/master",
"committer_date": 1579452644000,
"content_id": "e0c61084c5bdf69eacc048a54a720dd5e1d12023",
"detected_licenses": [
"MIT"
],
"directory_id": "a216e28224c21afb06ef4f316677ddf78e9038c3",
"extension": "py",
"fi... | 2.796875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 8 15:19:49 2019
@author: sachin_sharma
"""
import subprocess
import os
import argparse
import glob
def parse_args():
parser = argparse.ArgumentParser(description="Merge class maps")
parser.add_argument('-f', '--file', type=str, required=T... | 99 | 24.91 | 135 | 11 | 679 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_ee9695c77dd1ce09_0dba66ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.unchecked-subprocess-call", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "This is not checking the ret... | 10 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
62,
62,
70,
70
] | [
62,
62,
70,
70
] | [
5,
131,
5,
130
] | [
136,
135,
135,
134
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | merge_class_maps_and_prob_maps.py | /Code/merge_class_maps_and_prob_maps.py | sachinsharma9780/Mapping-Infrastructure-and-Monitor-Urbanization-in-Europe-using-Deep-Learning- | MIT | |
2024-11-18T23:06:08.522997+00:00 | 1,634,714,216,000 | 3b1d0d9599b49a37c6d725e9e7c9132afec7e796 | 2 | {
"blob_id": "3b1d0d9599b49a37c6d725e9e7c9132afec7e796",
"branch_name": "refs/heads/main",
"committer_date": 1634714216000,
"content_id": "f1829628c86d9eceb54dbef5b2ba81da793e8aa2",
"detected_licenses": [
"MIT"
],
"directory_id": "909e86d1d4ac3c33fbb08392db277465bb7e8779",
"extension": "py",
"file... | 2.328125 | stackv2 | import sys
from RFEM.enums import *
#import json
#import xml.etree.ElementTree as ET
# Import SUDS module
try:
sys.version_info[0] == 3
except:
print('Must be using Python 3!')
input('Press Enter to exit...')
sys.exit()
try:
from suds.client import Client
except:
print('SUDS library is not ins... | 300 | 34.06 | 129 | 15 | 2,416 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_aaa8bb8d0b10d28a_32fea4ae", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 12 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.danger... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
25,
26,
48,
70,
92
] | [
25,
26,
48,
70,
92
] | [
13,
13,
13,
13,
13
] | [
67,
69,
69,
74,
70
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | initModel.py | /RFEM/initModel.py | r0m30d4c/DlubalRFEM6 | MIT | |
2024-11-18T23:06:08.924692+00:00 | 1,627,186,462,000 | e8646d69c8cf526aaf63b4b7481886aec6e60bb5 | 3 | {
"blob_id": "e8646d69c8cf526aaf63b4b7481886aec6e60bb5",
"branch_name": "refs/heads/main",
"committer_date": 1627186462000,
"content_id": "16c2a3c83469940c743261e1fe97d5e56230c38e",
"detected_licenses": [
"MIT"
],
"directory_id": "92bebb5e2b864225e3a20d52851dd8204de6d0f4",
"extension": "py",
"file... | 3.09375 | stackv2 | #!/usr/bin/env python3
"""
VideoPlaylistDownloader - VPD
download m3u8 playlists with given base uri
usage: main.py Playlist.m3u8 https://statics.example.com
"""
import requests
import sys
import os
from dataclasses import dataclass
from logger import Logger
@dataclass
class ReadFile:
file_name: str
lines = [... | 112 | 27.69 | 111 | 18 | 713 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_caff3a1d338e5cb7_2fc9db05", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 5 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
43
] | [
43
] | [
17
] | [
27
] | [
"A03:2021 - Injection"
] | [
"Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | main.py | /main.py | AMJoshaghani/VPD | MIT | |
2024-11-18T23:06:13.956938+00:00 | 1,602,426,007,000 | bf1f71b6000431f9cee973bd407f3f23c51834ca | 3 | {
"blob_id": "bf1f71b6000431f9cee973bd407f3f23c51834ca",
"branch_name": "refs/heads/main",
"committer_date": 1602426007000,
"content_id": "3a1d7394053e88767d4f9a9ea12ff0af12d61a0d",
"detected_licenses": [
"MIT"
],
"directory_id": "32b1ce7e3ca14bb2ae8a5414c188c49b29974394",
"extension": "py",
"file... | 3.015625 | stackv2 | import pandas as pd
import numpy as np
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split, cross_val_score
from sklearn.metrics import mean_squared_error
def build_model():
print("Creating the model .... ")
#Read the dataset
df = pd.read_csv("./model... | 65 | 19.25 | 86 | 13 | 333 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4c2a0494f92b84dc_15fb8074", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
51
] | [
51
] | [
9
] | [
31
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | model.py | /model/model.py | Rujul-Patel/Predicting-Graduate-Admission-Chance-API | MIT | |
2024-11-18T23:06:14.024271+00:00 | 1,616,994,847,000 | d88e83647be91701cd2a95e877e8785f2e12775f | 3 | {
"blob_id": "d88e83647be91701cd2a95e877e8785f2e12775f",
"branch_name": "refs/heads/main",
"committer_date": 1616994847000,
"content_id": "7b5e75cf6da82cc3c7e5f2e0a4727e2b6660e5d9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "55d0276ac4a59375fbe896813d3f05474459af19",
"extension": "py",
... | 3.125 | stackv2 | import os
import subprocess
# =============================================================================
# Visualize for computational graph
# =============================================================================
def _dot_var(v, verbose=False):
dot_var = '{} [label="{}", color=orange, style=filled]\n'
... | 89 | 31.45 | 79 | 14 | 674 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_67151f6632d0528f_a0db3a9b", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
82,
82
] | [
82,
82
] | [
5,
31
] | [
36,
35
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' function... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | utils.py | /dezero/utils.py | jinmang2/DeZero | Apache-2.0 | |
2024-11-18T23:06:16.970156+00:00 | 1,566,310,063,000 | 4387de14b0ba535f729dc851c51d07d5386bfc4c | 3 | {
"blob_id": "4387de14b0ba535f729dc851c51d07d5386bfc4c",
"branch_name": "refs/heads/master",
"committer_date": 1566310063000,
"content_id": "4e2c9d0fe06f07caaa6b360ada3a31db493a4b03",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dcc630fa04d3f0711f303ec09ac3105bfaccb1d0",
"extension": "py"... | 2.921875 | stackv2 | import copy
import xml.etree.ElementTree as ET
import pandas as pd
from pytorch_pretrained_bert.tokenization import BertTokenizer
arg_dict = {'id': [], 'org': [], 'org_stance': [], 'response': [], 'response_stance': [], 'label': [], 'topic': []}
def create_data_from_xml_debatepedia(path, replacement):
"""
... | 120 | 42.46 | 121 | 16 | 1,243 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_38166831d18c8147_00adf512", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 5 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
3,
19
] | [
3,
19
] | [
1,
12
] | [
35,
26
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | convert_datasets_to_csv.py | /data/convert_datasets_to_csv.py | JannisBush/code_relation_prediction | Apache-2.0 | |
2024-11-18T23:06:18.791719+00:00 | 1,582,896,502,000 | 29b6b889c95714419a4eb4fb9348f93daf1b04df | 4 | {
"blob_id": "29b6b889c95714419a4eb4fb9348f93daf1b04df",
"branch_name": "refs/heads/master",
"committer_date": 1582896502000,
"content_id": "a081993216e87abf5ed94a0010be0b336b21d266",
"detected_licenses": [
"MIT"
],
"directory_id": "a75b8ca7b02d9e7e09f1d57ba6c0a13d4ad1d0f0",
"extension": "py",
"fi... | 3.546875 | stackv2 | """Games, or Adversarial Search (Chapter 5)"""
from collections import namedtuple
import random
from utils import argmax
infinity = float('inf')
GameState = namedtuple('GameState', 'to_move, utility, board, moves')
# ______________________________________________________________________________
# Minimax Search
d... | 230 | 31.28 | 80 | 16 | 1,616 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_f034a47eb4d6a1b8_54eebf81", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
218
] | [
218
] | [
16
] | [
33
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | jogos_sint.py | /SI/PL_07/jogos_sint.py | Tjccs/College-Python | MIT | |
2024-11-18T23:06:19.377795+00:00 | 1,544,483,878,000 | 931f9ce85f272d40c9c2d540f710753beed984ec | 3 | {
"blob_id": "931f9ce85f272d40c9c2d540f710753beed984ec",
"branch_name": "refs/heads/master",
"committer_date": 1544483878000,
"content_id": "8ba9de371b1498c3146b05cfa7acc28519c1df0c",
"detected_licenses": [
"MIT"
],
"directory_id": "8c240a531380eb9a7184f52a20f87122fe0aa0ae",
"extension": "py",
"fi... | 2.9375 | stackv2 | #interacting with paths/folders
import os
#handling, organizing, and saving data
import sqlite3
from sqlite3 import Error
#IPA extraction (international phonetic alphabet)
from collect_speech_data import collect_tgzfiles, tgz_2_annotations
#needed for logging
import time
import logging.handlers
from my_logger impor... | 67 | 30.45 | 165 | 14 | 438 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_8637d31ea6cde1b7_5194e833", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
47,
47
] | [
47,
47
] | [
13,
13
] | [
166,
166
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | collect_info_English_tgz.py | /speech_recognition_multilingual/collect_info_English_tgz.py | a-n-rose/language-classifier | MIT | |
2024-11-18T23:06:20.486323+00:00 | 1,531,340,771,000 | 137307c3a09495cb9674d5ba098318e3a1d7e3a2 | 3 | {
"blob_id": "137307c3a09495cb9674d5ba098318e3a1d7e3a2",
"branch_name": "refs/heads/master",
"committer_date": 1531340771000,
"content_id": "41ef9131a9ace5b35ee413122430feb9edf09cf9",
"detected_licenses": [
"MIT"
],
"directory_id": "d125cb9c251dbb453911f804a567f4efad146378",
"extension": "py",
"fi... | 2.75 | stackv2 | """
Generate data for paper
"""
import os, sys
import pandas as pd
import numpy as np
import sklearn
import sklearn.model_selection
import pickle
import matplotlib.pyplot as plt
import copy
# Add the module to source path
dirname = os.path.dirname(os.path.realpath(__file__))
source_path = dirname + "/portfolio"
sys.... | 392 | 34.66 | 111 | 16 | 3,487 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_324217dfe5bde595_a33a4771", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
107,
213
] | [
107,
213
] | [
9,
9
] | [
30,
30
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | run_models.py | /run_models.py | ibaltopoulos/portfolio | MIT | |
2024-11-18T23:06:21.152011+00:00 | 1,606,610,073,000 | 43984ded232aa6180342cb7dda8bf2a4de81d394 | 2 | {
"blob_id": "43984ded232aa6180342cb7dda8bf2a4de81d394",
"branch_name": "refs/heads/main",
"committer_date": 1606610113000,
"content_id": "40bfc3f84f8e8e0293f148fc1ea2ebdb78c00bcf",
"detected_licenses": [
"MIT"
],
"directory_id": "d9afb22957bf3c0c53bf22a840b0d92cce202796",
"extension": "py",
"file... | 2.4375 | stackv2 | import flask
import pickle
app = flask.Flask(__name__)
model = None
@app.route('/predict', methods=['POST'])
def predict():
if flask.request.method == 'POST':
with open('./knn.pkl', 'rb') as f:
model = pickle.load(f)
data = flask.request.get_json()
pred = model.predict(data[... | 25 | 18.52 | 42 | 14 | 111 | python | [{"finding_id": "semgrep_rules.python.flask.security.insecure-deserialization_7d507930d2413431_41f6bb98", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.insecure-deserialization", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected the use of an insecure deserializ... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.flask.security.insecure-deserialization",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM"
] | [
13,
13
] | [
13,
13
] | [
21,
21
] | [
35,
35
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Detected the use of an insecure deserialization library in a Flask route. These libraries are prone to code execution vulnerabilities. Ensure user data does not enter this function. To fix this, try to avoid serializing whole objects. Consider instead using a serializer such as JSON.",
"Avoid using `pickle`, whi... | [
7.5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | run.py | /02-machine-learning-with-python/04-machine-learning-model-deployment/02-rest_api_server/run.py | NLGRF/python-for-data-scientists | MIT | |
2024-11-18T23:06:22.184674+00:00 | 1,619,536,681,000 | b35f969ce1010613cb09d72861b85bee5ca20664 | 3 | {
"blob_id": "b35f969ce1010613cb09d72861b85bee5ca20664",
"branch_name": "refs/heads/main",
"committer_date": 1619536681000,
"content_id": "a451d9413a19cdbdd38c2cf154e7e5a190e2d7a0",
"detected_licenses": [
"MIT"
],
"directory_id": "bbef2a03592155c2fdbc5f95555ea3bd728ab1b8",
"extension": "py",
"file... | 2.671875 | stackv2 | from pymysql import *
class DataBase:
def __init__(self):
self.db_name='shop'
self.db=connect('localhost','yxg','yxg579521..',self.db_name)
def insertUser(self,username,password):
c=self.db.cursor()
c.execute('''INSERT into user values (%s,%s)''' ,(username,passwo... | 114 | 26.6 | 93 | 14 | 703 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_0f5bc6f25140e9f5_c10adb8f", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 1 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
49
] | [
49
] | [
9
] | [
26
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | DataBase.py | /pyqt数据库系统/超市商品管理/DataBase.py | yxg995995/yxg-code | MIT | |
2024-11-18T20:56:51.504926+00:00 | 1,587,991,170,000 | 363ff9d592394cef41ec852488f263306dd99aa6 | 3 | {
"blob_id": "363ff9d592394cef41ec852488f263306dd99aa6",
"branch_name": "refs/heads/master",
"committer_date": 1587991170000,
"content_id": "b88dd1e5819603129b3c80ffae6d46d76dbafd99",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cfac61b3126a5d88feb1b82aea085c0c6d158716",
"extension": "py"... | 3.078125 | stackv2 | """
This is the deployments module and supports all the ReST actions for the
sourceControl collection
"""
# System modules
from datetime import datetime
# 3rd party modules
from flask import make_response, abort
from config import db, app
from models import SourceControl, SourceControlSchema
from pprint import pforma... | 147 | 29.99 | 95 | 13 | 991 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_d719ff19cd6119d6_8b67d019", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
141
] | [
141
] | [
16
] | [
79
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ... | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | sourcecontrol.py | /sourcecontrol.py | karwootang-gft/tb-houston-service | Apache-2.0 | |
2024-11-18T20:56:54.640388+00:00 | 1,522,259,984,000 | 162b0728d64e27c3dd97fec4b7188d64dc4af547 | 3 | {
"blob_id": "162b0728d64e27c3dd97fec4b7188d64dc4af547",
"branch_name": "refs/heads/master",
"committer_date": 1522259984000,
"content_id": "81d2a354ad100e2da3c793d2efde92ec0ceeb4ed",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "095417c6e71fe9d55271ecf76e99047f88b5a12d",
"extension": "p... | 2.59375 | stackv2 | #!/usr/bin/env python3
import argparse
import re
import subprocess
import sys
CMD = ['groff',
'-P', '-r', # No hr at the end of the page
'-K', 'utf-8',
'-mandoc', '-Thtml']
NAME_RE = r'([-_.a-zA-Z0-9]+)'
SECTION_RE = r'\((\d+[px]?)\)'
SECTION_LETTER_RX = re.compile(r'[a-z]+$')
INSTALLED_LINK = '<a href... | 78 | 25.99 | 117 | 16 | 560 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_18429d47834f9e29_e32d0c6c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
35,
56
] | [
35,
57
] | [
16,
13
] | [
71,
77
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | man.py | /mup/converters/man.py | agateau/mup | BSD-3-Clause | |
2024-11-18T20:56:54.892854+00:00 | 1,465,135,497,000 | f6aaed9631a78f1325c95883e72cf0fd8d987fd9 | 2 | {
"blob_id": "f6aaed9631a78f1325c95883e72cf0fd8d987fd9",
"branch_name": "refs/heads/master",
"committer_date": 1465135497000,
"content_id": "19273e570b3d82c0a394052046c6d94ea21c16ed",
"detected_licenses": [
"MIT"
],
"directory_id": "17fd63af73362c5f8488a0d6eebbb95ecacd9d84",
"extension": "py",
"fi... | 2.359375 | stackv2 | import shelve
import time
from metrics import *
# little data set for testing
testdata_users = {'max':{'odin doma':3,'labirint straha':5,'detektiv':2,'komnata':4},
'dima':{'odin doma':5,'labirint straha':1,'detektiv':5},
'alex':{'odin doma':5,'pila':2,'komnata':3,'grabim bank':3,'labirint strah... | 341 | 32.68 | 128 | 19 | 3,629 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_6ddbf1550db4698d_08890d5f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use... | 9 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-shelve",
"rules.python.lang.security.deserialization.avoid-shelve",
"rules.python.lang.security.deserialization.avoid-shelve",
"rules.python.lang.security.deserialization.avoid-shelve"
] | [
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
28,
46,
61,
119
] | [
28,
46,
61,
119
] | [
10,
10,
10,
12
] | [
31,
31,
31,
27
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `shelve`, whic... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | itembased_recommender_system.py | /itembased_recommender_system.py | maximdanilchenko/fusionBasedRecSys | MIT | |
2024-11-18T20:57:01.377929+00:00 | 1,507,846,963,000 | 09f013f4ff2bf274cea4b710d7ee563a69ba9460 | 2 | {
"blob_id": "09f013f4ff2bf274cea4b710d7ee563a69ba9460",
"branch_name": "refs/heads/master",
"committer_date": 1507846963000,
"content_id": "bf18ca523ef45159d27095358d8e89017b56a0ac",
"detected_licenses": [
"MIT"
],
"directory_id": "14cab1c8639806d2d4003fc388c008c34d41c5fc",
"extension": "py",
"fi... | 2.40625 | stackv2 | import sys
import cPickle as pickle
if len(sys.argv) != 3:
print('Usage: script.py input output')
sys.exit()
in_path, out_path = sys.argv[1:]
benchmarks = pickle.load(open(in_path))
results = {}
errors = 0
for bmk in benchmarks:
try:
res = bmk.run()
except Exception, e:
errors += 1
... | 30 | 23.3 | 68 | 14 | 200 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_953a272365d1620c_f9dfc583", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
9,
9,
29,
29
] | [
9,
9,
29,
29
] | [
14,
14,
14,
14
] | [
40,
40,
55,
55
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | vb_run_benchmarks.py | /vbench/scripts/vb_run_benchmarks.py | ElijahAhianyo/vbench | MIT | |
2024-11-18T22:43:33.510282+00:00 | 1,631,099,537,000 | c7e2209da86da60acd325146c1739a9bfbd6174b | 2 | {
"blob_id": "c7e2209da86da60acd325146c1739a9bfbd6174b",
"branch_name": "refs/heads/master",
"committer_date": 1631099537000,
"content_id": "612ceb5597a9a9dd54da9a856076cbb7c175dfd2",
"detected_licenses": [
"MIT"
],
"directory_id": "65356d0ae6fb8602c315be7bcc7582c137de7904",
"extension": "py",
"fi... | 2.40625 | stackv2 | from time import sleep
from src.tube import get, search_for, get_print, download
from src import styling, utils
from src.style import Style
import sys
from subprocess import check_output
from youtube_dl import version
from src.args import get_args
LOGO = """
______
/_ __/__ _________ ___ ____ _ __
... | 337 | 33.58 | 103 | 25 | 2,415 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_4a9c25e86857a29c_46ae5f6d", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 32 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
253
] | [
253
] | [
14
] | [
54
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | main.py | /src/main.py | raluvy95/termpv | MIT | |
2024-11-18T22:44:01.233931+00:00 | 1,553,323,010,000 | 013d9f92a2610478dc4fe505c392aa439322e53f | 3 | {
"blob_id": "013d9f92a2610478dc4fe505c392aa439322e53f",
"branch_name": "refs/heads/master",
"committer_date": 1553323010000,
"content_id": "cbabe63713ce344417218375d2f084844a2c034e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "64310de01c29ce3ea711f77d7115ad24c0d326e8",
"extension": "p... | 2.5625 | stackv2 | import logging
from time import sleep
from xml.etree import ElementTree
from string import Template
import requests
from bs4 import BeautifulSoup
LOGGER = logging.getLogger(__name__)
# logging.basicConfig(level=logging.DEBUG)
# logging.getLogger('requests').setLevel(logging.ERROR)
def str_sub(string, **kwargs):
... | 57 | 24.3 | 101 | 14 | 325 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e6f371d25a492003_93e15292", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 3 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
3
] | [
3
] | [
1
] | [
34
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | utils.py | /steampak/webapi/utils.py | idlesign/steampak | BSD-3-Clause | |
2024-11-18T22:44:06.304856+00:00 | 1,625,083,948,000 | 311dac529f4d734070a76eff96c667afe152d690 | 2 | {
"blob_id": "311dac529f4d734070a76eff96c667afe152d690",
"branch_name": "refs/heads/master",
"committer_date": 1625083948000,
"content_id": "3c11f652b926fb05ad47f1f023617411ba2d0dc6",
"detected_licenses": [
"MIT"
],
"directory_id": "c665ee987ef39ba71e470931f6d2160b03140a6f",
"extension": "py",
"fi... | 2.390625 | stackv2 |
from datetime import datetime
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django.contrib.auth.decorators import login_required
from pyqrcode import QRCode
from student.models import Student
from author.models import UserSettings
from logger.models import Logger
# Create your ... | 165 | 24.7 | 95 | 14 | 1,107 | python | [{"finding_id": "semgrep_rules.python.django.security.nan-injection_8b3c45b6b731c672_f59c666d", "tool_name": "semgrep", "rule_id": "rules.python.django.security.nan-injection", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found user input going directly into typecast for bool(), f... | 7 | true | [
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704"
] | [
"rules.python.django.security.nan-injection",
"rules.python.django.security.nan-injection",
"rules.python.django.security.nan-injection",
"rules.python.django.security.nan-injection",
"rules.python.django.security.nan-injection",
"rules.python.django.security.nan-injection",
"rules.python.django.securit... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
86,
87,
88,
89,
90,
91,
92
] | [
86,
87,
88,
89,
90,
91,
92
] | [
10,
10,
10,
10,
10,
10,
10
] | [
49,
49,
49,
49,
49,
49,
49
] | [
"",
"",
"",
"",
"",
"",
""
] | [
"Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | views.py | /certificates/graduates/views.py | iamsajjad/certificates | MIT | |
2024-11-18T22:44:08.393181+00:00 | 1,589,987,849,000 | dcd1d11f0ed006714e3d540b3d6138728050c55f | 3 | {
"blob_id": "dcd1d11f0ed006714e3d540b3d6138728050c55f",
"branch_name": "refs/heads/master",
"committer_date": 1589987849000,
"content_id": "b8e80bfe4540d9e43325f747063b9738b984414d",
"detected_licenses": [
"MIT"
],
"directory_id": "66e7615f4d8b4819d8a8feca3e1acd4fa5b52249",
"extension": "py",
"fi... | 3.46875 | stackv2 | # Manipulação do Arquivo
def abrir(path):
try:
a = open(path, 'tr')
except:
print('Criando Arquivo...')
a = open(path, 'w+')
finally:
a.close()
def ler(path):
try:
f = open(path, 'tr')
arquivo = f.readlines()
f.close()
abriu = True
... | 273 | 25.26 | 119 | 24 | 1,927 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_383d0b59ff7c5d00_27f14985", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 24 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
129
] | [
129
] | [
5
] | [
29
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | placar1.1.py | /Projetos/placar/placar1.1.py | GuilhermoCampos/Meus-Projetos | MIT | |
2024-11-18T22:44:08.904318+00:00 | 1,558,732,297,000 | 80757d779fc7e235dc1375acf043b5979ea08603 | 3 | {
"blob_id": "80757d779fc7e235dc1375acf043b5979ea08603",
"branch_name": "refs/heads/master",
"committer_date": 1558732297000,
"content_id": "b8bbf0f0b3ccbf3fa759a8aee738f1d854aad392",
"detected_licenses": [
"MIT"
],
"directory_id": "1727822cf0e7836626c495965bea00aebd92f6ed",
"extension": "py",
"fi... | 2.6875 | stackv2 | # sysrsync.py
import os
import sys
import pipes
import subprocess
import collections
from functools import reduce
from operator import iconcat
from typing import Any, Iterable, List, Tuple, Optional
import pprint as pprint_lib
pprint = pprint_lib.PrettyPrinter(indent=1).pprint
__version__ = '0.2.0-alpha'
def ... | 242 | 29.26 | 120 | 13 | 1,520 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_07b1ed741745fc88_b3a891e9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
179
] | [
189
] | [
29
] | [
14
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | sysrsync.py | /sysrsync.py | pjcrosbie/sysrsync | MIT | |
2024-11-18T22:44:12.976817+00:00 | 1,579,143,297,000 | 844db808fff86ccc093a639b4b2f51264aedf56d | 3 | {
"blob_id": "844db808fff86ccc093a639b4b2f51264aedf56d",
"branch_name": "refs/heads/master",
"committer_date": 1579143297000,
"content_id": "d093b6da6dd179f190c5646671d18190b01c0e03",
"detected_licenses": [
"MIT"
],
"directory_id": "b0d7ffe365039aba345881fdf4463e51d3f44142",
"extension": "py",
"fi... | 3.3125 | stackv2 | # Example use cases for depablo_box
############################################################################
# Start to end use case
############################################################################
"""I want to calculate different chemical properties and perform machine learning on them"""
from d... | 126 | 32.81 | 108 | 9 | 931 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e1508b7fdd259b40_4a388f08", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
99
] | [
99
] | [
8
] | [
22
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | examples.py | /examples.py | peterpaohuang/tapir | MIT | |
2024-11-18T22:44:13.934027+00:00 | 1,436,509,087,000 | ea92d8ebe3948b35bb9974e009e73b72f4b25dbb | 2 | {
"blob_id": "ea92d8ebe3948b35bb9974e009e73b72f4b25dbb",
"branch_name": "refs/heads/master",
"committer_date": 1436509087000,
"content_id": "bd087bbdb38a63e0089f0dd88030cca8c6984b41",
"detected_licenses": [
"MIT"
],
"directory_id": "8707bcc5b90f4d60f59743a2b2abfdb54bafbbae",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python
# coding: UTF-8
"""
gowalla_filter:
SELECT user,COUNT(unkown) as loc,COUNT(DISTINCT unkown) as distinct_loc,COUNT(unkown)/COUNT(DISTINCT unkown) as ratio FROM raw a GROUP BY `user` ORDER BY ratio desc;
找出那些比率(所有地点/不同地点)合适的用户
所有地点决定了tensor的稀疏度;不同地点决定了tensor的dimensionality
eg:找到了用户id为147986的所有记录,并将... | 361 | 29.74 | 178 | 22 | 3,082 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_9baaaaaf2b96856b_189b1b9f", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
61,
138
] | [
61,
138
] | [
22,
22
] | [
41,
41
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | mobility.py | /utils/mobility.py | smileyk/markov2tensor | MIT | |
2024-11-18T23:10:38.182906+00:00 | 1,622,224,746,000 | 9e31860e19f23ec540e66e8f9227fdc67247de77 | 2 | {
"blob_id": "9e31860e19f23ec540e66e8f9227fdc67247de77",
"branch_name": "refs/heads/master",
"committer_date": 1622224746000,
"content_id": "221eb35d910325c0b8cee61cd7584fca1c313c0e",
"detected_licenses": [
"MIT"
],
"directory_id": "c1b35d85144ef01e2b37d3554b67a2f98772bd4f",
"extension": "py",
"fi... | 2.484375 | stackv2 | import pickle
from datetime import timedelta, datetime
from os import path
from pathlib import Path
from src.data_generator.utils.core import daterange
def load_pse_data(start_day=None, end_day=datetime.now()):
if start_day is None:
start_day = end_day - timedelta(days=1)
pse_data_dict = dict()
f... | 26 | 35.27 | 77 | 15 | 228 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_bd6db61f76e1420d_be8f8fac", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
23
] | [
23
] | [
28
] | [
47
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | core.py | /src/data_generator/day_ahead_extractors/utils/core.py | BlooAM/Day-ahead-prices | MIT | |
2024-11-18T23:10:38.391437+00:00 | 1,676,139,610,000 | a32255db74386bbfb9ee577de36cf24df8a85e4b | 3 | {
"blob_id": "a32255db74386bbfb9ee577de36cf24df8a85e4b",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "85c03429f0e106f25e11b6c38316bfa6f566003c",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 2.671875 | stackv2 | def to_cli_args(*args, **kwargs):
cmd = []
for k, v in kwargs.items():
short = len(k) == 1
if short:
cmd.append('-' + k)
if v is not True:
cmd.append(v)
else:
if v is True:
cmd.append('--' + k)
else:
... | 37 | 23.95 | 58 | 18 | 228 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_24da0c64b4be2072_1115774d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
26
] | [
26
] | [
16
] | [
44
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | snippet.py | /dockerized-gists/7536335/snippet.py | gistable/gistable | MIT | |
2024-11-18T23:10:45.488658+00:00 | 1,452,831,148,000 | 116385f69fb069b57cc1f482a7de17d493ccb501 | 3 | {
"blob_id": "116385f69fb069b57cc1f482a7de17d493ccb501",
"branch_name": "refs/heads/master",
"committer_date": 1452831148000,
"content_id": "fa313bfb9e9c794ad1bab846f793f777b5b4a1d3",
"detected_licenses": [
"MIT"
],
"directory_id": "ab8a0ed7cacdf09b49828ab050bea8891baa9a6e",
"extension": "py",
"fi... | 2.546875 | stackv2 | import shelve
import os
# Many more at:
# http://www.garykessler.net/library/file_sigs.html
# http://www.garykessler.net/library/magic.html
smudges = {
'jpg': {
'offset': 0,
'magic': '\xFF\xD8\xFF'
},
'png': {
'offset': 0,
'magic': '\x89\x50\x4E\x47\x0D\x0A\x1A\x0A'
... | 53 | 18.04 | 53 | 11 | 372 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_f26d829394cd9da1_50b09407", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-shelve"
] | [
"security"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
44
] | [
44
] | [
10
] | [
30
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | populate.py | /filesmudge/populate.py | waghcwb/filesmudge | MIT | |
2024-11-18T23:10:47.930586+00:00 | 1,609,398,616,000 | 631b1f590c0c3a60a6daa6743da7dc4efd5e203c | 2 | {
"blob_id": "631b1f590c0c3a60a6daa6743da7dc4efd5e203c",
"branch_name": "refs/heads/main",
"committer_date": 1609398616000,
"content_id": "584368bc6edf7a7f50efb56b8e530c35eed34b01",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7465c37bc4c5757051f9a824f33750d559e46037",
"extension": "py"... | 2.5 | stackv2 | # -*- coding: utf-8 -*-
import argparse
import logging
import os
import signal
import subprocess
import sys
import time
from threading import Event, Thread
LOGGER = logging.getLogger('ROOT')
# shutdown event
_shutdown_... | 153 | 25.69 | 134 | 14 | 916 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_d393989211caa7e0_8ebd4fb7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 3 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
116,
116
] | [
116,
116
] | [
21,
67
] | [
72,
71
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | streams.py | /scripts/mock/streams.py | dantin/media-hub | BSD-3-Clause | |
2024-11-18T23:10:48.436110+00:00 | 1,490,941,161,000 | ef8857f867dbf9e5e3e50adeda00fcbca54c2254 | 3 | {
"blob_id": "ef8857f867dbf9e5e3e50adeda00fcbca54c2254",
"branch_name": "refs/heads/master",
"committer_date": 1490941161000,
"content_id": "509bfc4dc27462456303af659cf10d187e34417f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4ae21fac1a333cee68a1e027399a639e4a2171be",
"extension": "py"... | 2.609375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from CosmoAPIClient import CosmoAPIClient
from xml.etree import ElementTree
import openpyxl as opx
import os
class XnpExcel:
"""
Export IVBPF (CosmoDB) data to Excel file for excel2xoonips
"""
def __init__(self):
self.wb = opx.Workbook()
s... | 270 | 30.81 | 112 | 23 | 1,809 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_d61126011e4cb60e_5aed0c83", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
4
] | [
4
] | [
1
] | [
34
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | cosmoapi2xls.py | /ivbpf_manager/cosmoapi2xls.py | sc4brain/ivbpf_manager | Apache-2.0 | |
2024-11-18T23:10:50.656042+00:00 | 1,597,477,698,000 | 123f5aae1fddd9060d6b5e9e6291daf87b4fee78 | 2 | {
"blob_id": "123f5aae1fddd9060d6b5e9e6291daf87b4fee78",
"branch_name": "refs/heads/master",
"committer_date": 1597477698000,
"content_id": "6931d4b78ebb7e3959e4144156c7fc9b9c6e8dcf",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "eebc84dcedddd0dac5dbe5188e5b4e2e6bff09a9",
"extension": "py"... | 2.375 | stackv2 | import base64
import codecs
import os
from github import Github
from jinja2 import Template
from chanllenge.util.wayknew import *
template = Template('''
## {{api_name}}
**description**
```
{{desc}}
```
**method**
```
{{method}}
```
**URL**
```
{{url}}
```
**parameters**
```
{{parameters}}
```
**response**
```
... | 101 | 22.64 | 101 | 20 | 578 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_240ede56c35ad861_68780e4b", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
92
] | [
94
] | [
25
] | [
100
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | chanllenge_utils.py | /big-challenge/chanllenge/util/chanllenge_utils.py | ljm516/python-repo | Apache-2.0 | |
2024-11-18T23:10:51.157625+00:00 | 1,573,892,069,000 | 400fcfc87b1aceac842f8e177301820f2ebeeb6d | 2 | {
"blob_id": "400fcfc87b1aceac842f8e177301820f2ebeeb6d",
"branch_name": "refs/heads/master",
"committer_date": 1573892069000,
"content_id": "5c2d331c70c60a464f7d8147d9925dfd92644df3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a0f3c9156905357b6a7abf7efbb5d80f7b6f087f",
"extension": "py"... | 2.5 | stackv2 | import os
import sqlite3
from typing import List
from libs import config
from libs import backends
__user_visible_attrs = {'uid', 'username', 'fullname', 'email'}
__db_conn = None
def _get_db_path() -> str:
rel_path = config.get_value('SYSTEM', 'DB_PATH')
return os.path.join(os.path.dirname(__file__), '..... | 137 | 26.87 | 97 | 15 | 908 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_f7537793cfc7a03d_34f9b924", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 1 | true | [
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
99
] | [
99
] | [
11
] | [
93
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | db.py | /libs/db.py | george-kuanli-peng/accmng | Apache-2.0 | |
2024-11-18T23:10:51.514768+00:00 | 1,428,612,940,000 | 70d268242b0ca693e358f29a03279325fe0fb69a | 3 | {
"blob_id": "70d268242b0ca693e358f29a03279325fe0fb69a",
"branch_name": "refs/heads/master",
"committer_date": 1428612940000,
"content_id": "b18ea3020c51ed513d671d291c2faf24a7047044",
"detected_licenses": [
"MIT"
],
"directory_id": "7458a23c73ee8ff03fe996bf8d22b44a13142afd",
"extension": "py",
"fi... | 2.515625 | stackv2 | ''' Implements handler for /orders/{orderID}/items/{itemID}
To add an item to an order '''
import apiutil
import cherrypy
import mysql.connector
from mysql.connector import Error
import sys
sys.stdout = sys.stderr # Turn off console output; it will get logged by Apache
import json
from apiutil import errorJSON
from con... | 110 | 44.55 | 126 | 16 | 1,284 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_ae31df1ecb2be590_822a9e27", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 16 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.p... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
30,
30,
35,
35,
47,
47,
53,
53,
82,
82,
88,
88,
94,
94,
98,
98
] | [
30,
30,
35,
35,
47,
47,
53,
53,
82,
82,
88,
88,
94,
94,
98,
98
] | [
9,
9,
9,
9,
9,
9,
13,
13,
9,
9,
9,
9,
9,
9,
13,
13
] | [
26,
26,
26,
26,
26,
26,
30,
30,
26,
26,
26,
26,
26,
26,
30,
30
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01... | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | orderItems.py | /hw3/api/orderItems.py | zyz29/yzhou9-webapps | MIT | |
2024-11-18T22:29:32.570428+00:00 | 1,544,703,847,000 | b8b04012171518746390f37172d87c65144fe0bb | 3 | {
"blob_id": "b8b04012171518746390f37172d87c65144fe0bb",
"branch_name": "refs/heads/master",
"committer_date": 1544703847000,
"content_id": "33526925aae2234f934909a330fd1b8a395ffed6",
"detected_licenses": [
"MIT"
],
"directory_id": "2f491264e06b7d6d373cbbe3432b3790cac5df0d",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/ python
# File name: debcollector-aRMSD.py
# Last edit: 2018-11-28
"""
Motivation: Collection and installation of the *.deb needed to start
aRMSD may be put into a list Python works on.
Intended use on the CLI with
python debcollector-aRMSD.python
in the supervised shell of Debian 9 (Sid/buster) with a... | 103 | 30.55 | 95 | 10 | 816 | python | [{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.string-concat-in-list_116d485eab7999e7_052e96ae", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.string-concat-in-list", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Dete... | 7 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
88,
88,
98,
98
] | [
88,
88,
98,
98
] | [
9,
32,
9,
32
] | [
37,
36,
37,
36
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functio... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW"
] | debcollector-aRMSD.py | /debcollector-aRMSD.py | nbehrnd/aRMSD | MIT | |
2024-11-18T22:29:36.832388+00:00 | 1,630,637,147,000 | b59ab30c0e5a766fb952a246250ba8c994d3105a | 3 | {
"blob_id": "b59ab30c0e5a766fb952a246250ba8c994d3105a",
"branch_name": "refs/heads/main",
"committer_date": 1630637147000,
"content_id": "08e621837fbe4b145754bc0f0ae88438d3088d27",
"detected_licenses": [
"MIT"
],
"directory_id": "46b08f5fa691f66d33d23f2ade3b8a9ed27524d0",
"extension": "py",
"file... | 2.90625 | stackv2 | """Display classification results of trained model.
Results:
- actual_vs_pred: Scatter plot of predicted values vs. actual values
- resid_hist: Histogram of regression residuals
- resid_vs_pred_plot: Return plot containing residuals versus predictions
"""
# %% Imports
# Standard system imports
fro... | 338 | 41.14 | 79 | 16 | 3,106 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6ea5609378db27dd_0528e58b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
197
] | [
197
] | [
24
] | [
46
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | regression_results.py | /src/bokeh_server/results/plots/regression_results.py | AlexMGitHub/TheWholeEnchilada | MIT | |
2024-11-18T22:29:51.185261+00:00 | 1,517,814,299,000 | 14affaf674f35316590ccf22c63b146be4aa083f | 3 | {
"blob_id": "14affaf674f35316590ccf22c63b146be4aa083f",
"branch_name": "refs/heads/master",
"committer_date": 1517814299000,
"content_id": "f99d1d022e28f791f994bba9d4420b7bb3718e19",
"detected_licenses": [
"MIT"
],
"directory_id": "df948baaee29c7534f34ae0173a65c3560b6b495",
"extension": "py",
"fi... | 2.671875 | stackv2 | from django.db import models
import xml.etree.cElementTree as et
from django.contrib.auth.models import User
# Working with SVGs
def is_svg(f):
tag = None
try:
for event, el in et.iterparse(f, ('start',)):
tag = el.tag
break
except et.ParseError:
pass
return tag... | 101 | 26.94 | 104 | 15 | 630 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_4179eb49e834c8b3_df4d0253", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 1 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
2
] | [
2
] | [
1
] | [
36
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | models.py | /blog/models.py | egordon/ethankgordon.com_old | MIT | |
2024-11-18T22:29:51.660962+00:00 | 1,623,813,308,000 | aa3e28907ab13a3573eee271c10b313d6ca88422 | 3 | {
"blob_id": "aa3e28907ab13a3573eee271c10b313d6ca88422",
"branch_name": "refs/heads/main",
"committer_date": 1623813308000,
"content_id": "4571990bcb30488114963918700623d0d34e2e81",
"detected_licenses": [
"MIT"
],
"directory_id": "b16d0c5a090f30dbe5366faa5c24c31becc80daf",
"extension": "py",
"file... | 2.734375 | stackv2 | from os import system, path, _exit
from colorama import init, Fore
init()
def checkgit() -> bool:
return path.isdir('./.git/')
def add() -> None:
if checkgit() == True:
system('git add .')
else:
return
def commit(message: str) -> None:
if checkgit() == True and len(message) > 1:
... | 31 | 32.58 | 133 | 14 | 288 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_bbcfeaf3a9f8647c_986a64d5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
17
] | [
17
] | [
9
] | [
56
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | git.py | /git.py | AskoiDev/Arc | MIT | |
2024-11-18T22:29:51.929067+00:00 | 1,632,744,429,000 | 91d40c8e5eb003eeea7176f884208cf91ac4a04c | 3 | {
"blob_id": "91d40c8e5eb003eeea7176f884208cf91ac4a04c",
"branch_name": "refs/heads/main",
"committer_date": 1632744429000,
"content_id": "72accdc36c26486e013494e9a6030310804ec609",
"detected_licenses": [
"MIT"
],
"directory_id": "5298fbb8d6fdc7a8ca727939e502d76f02a11667",
"extension": "py",
"file... | 2.53125 | stackv2 | import torch
from torch.nn.parameter import Parameter
import torch_optimizer
import numpy as np
import math
import os
import tempfile
import maafa
from pendulum.dynamics import PendulumDynamics
from pendulum.params import PendulumParams
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
plt.st... | 107 | 33.76 | 102 | 14 | 982 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_0e216c03fde6c24c_b848e373", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 1 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
106
] | [
106
] | [
5
] | [
19
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | pendulum_q_learning.py | /examples/pendulum_q_learning.py | asadjadi/maafa | MIT | |
2024-11-18T22:29:52.172942+00:00 | 1,675,070,470,000 | 663ead6065a1d295d3b61374c100be517dea79ff | 3 | {
"blob_id": "663ead6065a1d295d3b61374c100be517dea79ff",
"branch_name": "refs/heads/master",
"committer_date": 1675070470000,
"content_id": "953cf70361f9141e9f1f4103eae4fec9905cecb4",
"detected_licenses": [
"MIT"
],
"directory_id": "1f61e06271f8e9582669686457c40336235d1eee",
"extension": "py",
"fi... | 3.234375 | stackv2 | import argparse
import cPickle as pickle
import numpy as np
from sklearn.ensemble import ExtraTreesClassifier
from sklearn import preprocessing
def build_arg_parser():
parser = argparse.ArgumentParser(description='Trains the classifier')
parser.add_argument("--feature-map-file", dest="feature_map_file", req... | 53 | 34.79 | 85 | 13 | 436 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_398e46210cc56307_20cab4d0", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 6 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-cPickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
41,
41,
52,
52
] | [
41,
41,
52,
52
] | [
23,
23,
13,
13
] | [
37,
37,
32,
32
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead t... | [
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | trainer.py | /Module 1/Chapter 9/trainer.py | PacktPublishing/Python-Real-World-Machine-Learning | MIT | |
2024-11-18T22:29:57.425746+00:00 | 1,587,222,196,000 | 6c0cba8b1e389054144e2bbb9d7d2a2b5d9bc6a3 | 2 | {
"blob_id": "6c0cba8b1e389054144e2bbb9d7d2a2b5d9bc6a3",
"branch_name": "refs/heads/master",
"committer_date": 1587222196000,
"content_id": "8412a96026ac5d3f770652f405bab4afbd580011",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4f9dbb74ee9a823c7ab9e2f41b65f94880126ce9",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import os
import sys
import re
import datetime
import six
MY_PATH = os.path.dirname(os.path.abspath(__file__))
CORE_PROC_VERSION = "0.1.006"
ARCADIA_ROOT_SIGN = '$S/'
class SourceRoot(object):
patterns = [
'/util/system/',
... | 530 | 28.61 | 117 | 18 | 3,754 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_598ea336d3f54326_6a286ad9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
337
] | [
337
] | [
5
] | [
87
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | core_proc.py | /library/python/coredump_filter/core_proc.py | NotDaqy/catboost | Apache-2.0 | |
2024-11-18T22:30:05.766537+00:00 | 1,653,523,272,000 | bc642b7142f59bec26f4f48b78cc13f7705d4ca5 | 3 | {
"blob_id": "bc642b7142f59bec26f4f48b78cc13f7705d4ca5",
"branch_name": "refs/heads/master",
"committer_date": 1653523272000,
"content_id": "1570905e1d3f92f005046d0f023685f8d00337d4",
"detected_licenses": [
"MIT"
],
"directory_id": "a66b3666ebd973883824094210caa54c69c6264b",
"extension": "py",
"fi... | 2.625 | stackv2 | import argparse
import os
import pickle
import json
import random
import third_party.midi_processor.processor as midi_processor
JSON_FILE = "maestro-v2.0.0.json"
# prep_midi
def prep_maestro_midi(maestro_root, output_dir):
"""
----------
Author: Damon Gwinn
----------
Pre-processes the maestro da... | 181 | 29.2 | 135 | 15 | 1,320 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_7454ae4c16ba4517_5b87c2a7", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
64,
127
] | [
64,
127
] | [
9,
9
] | [
39,
39
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | preprocess_midi.py | /preprocess_midi.py | gwinndr/MusicTransformer-Pytorch | MIT | |
2024-11-18T23:10:11.390410+00:00 | 1,558,809,334,000 | 27ccacc741c1cf541b6329a93c8c2258f2096cfa | 3 | {
"blob_id": "27ccacc741c1cf541b6329a93c8c2258f2096cfa",
"branch_name": "refs/heads/master",
"committer_date": 1558809334000,
"content_id": "bae0a085913a70837c6acdaeb845befe276c9b48",
"detected_licenses": [
"Unlicense"
],
"directory_id": "9f9a8ab48c8146a67258dd16cd65f3632551bc06",
"extension": "py",... | 3.109375 | stackv2 | """
cluster.py
"""
# Imports you'll need.
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import sys
import os
import time
from TwitterAPI import TwitterAPI
import configparser
from operator import itemgetter, attrgetter
from collections import Counter, defaultdict
import copy
import pickle
de... | 158 | 21.58 | 90 | 15 | 881 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fbc2461792ba9e3f_5a9f7620", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 5 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
21,
129
] | [
21,
129
] | [
10,
5
] | [
27,
58
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | cluster.py | /Social Network Assignments/a4/cluster.py | Swapnil2095/Machine-Learning | Unlicense | |
2024-11-18T23:10:11.759590+00:00 | 1,693,928,169,000 | ca05195c06b7018952e99987cfe0ee940c174ee5 | 3 | {
"blob_id": "ca05195c06b7018952e99987cfe0ee940c174ee5",
"branch_name": "refs/heads/main",
"committer_date": 1693928169000,
"content_id": "de64fc9590f61b79d1411fb4f6d2bba8aa5e2b8f",
"detected_licenses": [
"MIT"
],
"directory_id": "091a6200be74bf6577c86f623665bcc24e16b02b",
"extension": "py",
"file... | 2.53125 | stackv2 | # SPDX-FileCopyrightText: 2021 Melissa LeBlanc-Williams for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import os
import subprocess
import random
import json
import re
from datetime import datetime
import board
import displayio
import adafruit_dotstar
from adafruit_st7789 import ST7789
IMAGE_FOLDER = "images... | 116 | 28.01 | 113 | 15 | 891 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_4daab5fed36fe695_aea93957", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 3 | true | [
"CWE-78",
"CWE-78",
"CWE-96"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.dangerous-globals-use"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
80,
80,
93
] | [
80,
80,
93
] | [
13,
65,
13
] | [
95,
69,
33
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A03:2021 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5,
5
] | [
"LOW",
"HIGH",
"LOW"
] | [
"HIGH",
"LOW",
"MEDIUM"
] | demo.py | /Voice2Json_Edge_Detection/demo.py | adafruit/Adafruit_Learning_System_Guides | MIT | |
2024-11-18T23:10:14.179042+00:00 | 1,570,800,301,000 | 507ae43ca6031537990897a67ab200338e26ce74 | 3 | {
"blob_id": "507ae43ca6031537990897a67ab200338e26ce74",
"branch_name": "refs/heads/master",
"committer_date": 1570800301000,
"content_id": "93cf3e42288c95baee393d5ecc6113e99940fbce",
"detected_licenses": [
"MIT"
],
"directory_id": "12f50060c4b547dbe00cc1945e57646825733ad4",
"extension": "py",
"fi... | 3.21875 | stackv2 | """
A script for processing errors due to the accuracy of home country detection algorithms.
Some rows have been assigned with a wrong country. These rows will be updated with the
ground truth value (user given home location).
In addition, there are a few problematic home locations for some Twitter users. These
indivi... | 110 | 38.64 | 175 | 20 | 959 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8f9ce8e7a7e2b500_a079018c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
20
] | [
20
] | [
12
] | [
26
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | B_Home_handle_errors.py | /2_Analysis/2.1_Home_detection/B_Home_handle_errors.py | haavardaagesen/cross-border-mobility-twitter | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.