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:02:46.218385+00:00
1,470,418,060,000
7c07d99a1906c57a33cc851f48ea2fea35a9c307
3
{ "blob_id": "7c07d99a1906c57a33cc851f48ea2fea35a9c307", "branch_name": "refs/heads/master", "committer_date": 1470418060000, "content_id": "03bb874d353b844f1fddc04ca99abe7a1c20e43b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fbda2e3386e1342474c1c3f74b416fac37380377", "extension": "py"...
2.53125
stackv2
import os import math import re import cmath from collections import OrderedDict import xml.etree.ElementTree as ET def analyze_xml(result_xml, time_step): if not os.path.exists(result_xml): return None tree = ET.parse(result_xml) root = tree.getroot() total_loss_real = 0 for node in roo...
94
32.86
91
17
793
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_9d610f4a57ee16f8_de439995", "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" ]
[ 7, 13 ]
[ 7, 13 ]
[ 1, 12 ]
[ 35, 32 ]
[ "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" ]
xml_analyzer.py
/xml_analyzer.py
shawxiaozhang/PyGlm
Apache-2.0
2024-11-18T22:16:43.899762+00:00
1,692,646,065,000
ca09c43a643c9f489b4ac7686cb6a4d55b7896ce
3
{ "blob_id": "ca09c43a643c9f489b4ac7686cb6a4d55b7896ce", "branch_name": "refs/heads/master", "committer_date": 1692646065000, "content_id": "f30b17ec324ef5c0679b97e2db8a31f0045981a3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2bb7bc07df02a17735c2cacc7b2ba0c6de77b63c", "extension": "py"...
2.515625
stackv2
import logging import math import os import pickle import threading import time from collections import defaultdict from collections import OrderedDict import boto3 from tron.metrics import timer OBJECT_SIZE = 400000 MAX_SAVE_QUEUE = 500 log = logging.getLogger(__name__) class DynamoDBStateStore: def __init__(...
228
36.59
130
24
1,826
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_eca48d62d917ccdb_77bb3853", "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" ]
[ 98, 125 ]
[ 98, 125 ]
[ 34, 33 ]
[ 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" ]
dynamodb_state_store.py
/tron/serialize/runstate/dynamodb_state_store.py
Yelp/Tron
Apache-2.0
2024-11-18T22:27:41.043629+00:00
1,511,312,196,000
354acb2dc51866545671a5f31130e75911a1a4e7
3
{ "blob_id": "354acb2dc51866545671a5f31130e75911a1a4e7", "branch_name": "refs/heads/master", "committer_date": 1511312196000, "content_id": "ba8df299025251c7ba7e6400de1380c87ce92103", "detected_licenses": [ "MIT" ], "directory_id": "edcb007f0069ba7e19678748108ce7ba8b4cf553", "extension": "py", "fi...
2.75
stackv2
# Copyright (c) 2017 Jonathan Bredin # MIT license http://opensource.org/licenses/MIT import argparse import logging import os, select, subprocess, time from operator import xor class Mover: """ Monitor /proc/self/mounts or other mount table for changes, copying new image files upon updates. """ def __init...
120
30.27
83
18
927
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c6ad308f0a3e300a_37b2a7e9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 47 ]
[ 48 ]
[ 12 ]
[ 67 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
mover.py
/src/viewer/mover.py
jonathanlb/4velma
MIT
2024-11-18T22:27:43.072983+00:00
1,395,801,136,000
fc30b46ed8a85677560d3ab39f06f3a355e88f44
2
{ "blob_id": "fc30b46ed8a85677560d3ab39f06f3a355e88f44", "branch_name": "refs/heads/master", "committer_date": 1395801136000, "content_id": "172f5b68d8d5a24b9aaf545349b6df2b6f68ebfd", "detected_licenses": [ "MIT" ], "directory_id": "2d5fd89cec74d93c2821777c3c0a2e709f128448", "extension": "py", "fi...
2.375
stackv2
__author__ = 'francisl' import logging import os import json import socket from nose.plugins import Plugin log = logging.getLogger(__name__) ch = logging.StreamHandler() ch.setLevel(logging.INFO) log.addHandler(ch) class ReporterConnectionError(Exception): pass class ReporterMessenger: def __init__(self):...
127
31.16
115
18
996
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_ed0ab00518a890b0_4604c781", "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" ]
[ 113 ]
[ 113 ]
[ 9 ]
[ 70 ]
[ "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" ]
plugin.py
/plugins/EKGnose/EKGnose/plugin.py
francisl/EKG4Test
MIT
2024-11-18T22:27:52.684872+00:00
1,461,732,158,000
5018aac1786e23892bd65bbbd94e0e439265c6f8
3
{ "blob_id": "5018aac1786e23892bd65bbbd94e0e439265c6f8", "branch_name": "refs/heads/master", "committer_date": 1461732158000, "content_id": "5f347c2d81e85cf685187b3957dac8fa08a43502", "detected_licenses": [ "MIT" ], "directory_id": "bf48c55da154932c72ecf7109a6bfba671cbb0fb", "extension": "py", "fi...
3.015625
stackv2
import numpy as np def unpickle(file): ''' unpicke function to read the file into dictnary ''' import cPickle fo = open(file, 'rb') dict = cPickle.load(fo) fo.close() return dict def get_softmax_data(): ''' read The CIFAR-10 dataset and fetch the first three classes used fo...
49
23.18
63
11
362
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_f3b9004555eb6285_26ffd127", "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 ...
4
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 9 ]
[ 9 ]
[ 12 ]
[ 28 ]
[ "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." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
load_data.py
/exp/load_data.py
feynmanliang/firefly-monte-carlo
MIT
2024-11-18T22:27:52.797812+00:00
1,567,621,681,000
329d67b22afcc55394534d1c1888881fa18c67c7
2
{ "blob_id": "329d67b22afcc55394534d1c1888881fa18c67c7", "branch_name": "refs/heads/master", "committer_date": 1567621681000, "content_id": "15e37cf57e68a83b8141e95c56e5a6ae6eab1eed", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "e6492503f884b71c4d7d02cc1998193d763de29f", "extension": "p...
2.359375
stackv2
import argparse import multitask import numpy as np import os import pickle import scipy.stats import sklearn.metrics def parse_args(): parser = argparse.ArgumentParser(description='Runs a set of models on a holdout set across tasks') parser.add_argument('--output_directory', type=str, default=os.path.expandu...
129
45.34
119
16
1,349
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fdd91e4f2fab0136_ae4460bc", "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" ]
[ 38, 46, 102, 111 ]
[ 38, 46, 102, 111 ]
[ 20, 9, 27, 17 ]
[ 35, 32, 42, 41 ]
[ "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" ]
offgrid_pertask.py
/examples/offgrid_pertask.py
janvanrijn/openml-multitask
BSD-3-Clause
2024-11-18T22:27:54.953354+00:00
1,598,964,964,000
96adedc91b860a9ab38a33ea51907acfa6f8e0ba
2
{ "blob_id": "96adedc91b860a9ab38a33ea51907acfa6f8e0ba", "branch_name": "refs/heads/master", "committer_date": 1598964964000, "content_id": "250a17c67c6ebf60d8b06acf0c6e83ef9a0147be", "detected_licenses": [ "MIT" ], "directory_id": "980cd8272f75b16c974c625946415714d5302649", "extension": "py", "fi...
2.375
stackv2
# Copyright (c) 2020. from discord.ext.commands import Cog from discord.ext import commands import discord import sqlite3 def ydna_prefix(): async def decorator(ctx): return ctx.prefix == "ydna!" return commands.check(decorator) class Role(Cog): __doc__ = ["client", "conn", "c"] def __ini...
104
38.43
112
21
938
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_adae9021a85d81cf_9b9fe6e5", "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...
14
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" ]
[ "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" ]
[ "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" ]
[ 34, 34, 47, 47, 60, 60, 74, 74, 75, 75, 86, 86, 102, 102 ]
[ 35, 35, 47, 47, 60, 60, 74, 74, 75, 75, 86, 86, 102, 102 ]
[ 49, 49, 13, 13, 16, 16, 12, 12, 17, 17, 17, 17, 17, 17 ]
[ 71, 71, 80, 80, 85, 85, 85, 85, 90, 90, 88, 88, 88, 88 ]
[ "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 ]
[ "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" ]
Roles.py
/Roles.py
mmcheng55/ydna_bot
MIT
2024-11-18T22:28:02.125285+00:00
1,616,923,859,000
37dbeba26ffd6518a3e14d8188f4b0fb79d7c99f
3
{ "blob_id": "37dbeba26ffd6518a3e14d8188f4b0fb79d7c99f", "branch_name": "refs/heads/master", "committer_date": 1616923859000, "content_id": "d4cd70fc715af7ec4a65991bf59295d134579757", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c839bb0899fb6665f59e8ce8644d094035f3d3bc", "extension": "py"...
2.6875
stackv2
# Mongo DB : https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/ # PythonMongo: https://www.w3schools.com/python/python_mongodb_getstarted.asp # mySQL DB: https://dev.mysql.com/downloads/mysql/ # PythonMySQL: https://www.w3schools.com/python/python_mysql_getstarted.asp # pip install mysql-connector-pyth...
56
27.55
151
10
387
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_302776e1f3a53bbd_be555aea", "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" ]
[ 51, 51 ]
[ 51, 51 ]
[ 1, 1 ]
[ 137, 137 ]
[ "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" ]
main.py
/thomas/database/main.py
ThomasDerZweifler/pyPro
Apache-2.0
2024-11-18T22:28:17.583160+00:00
1,632,919,005,000
4bded1f7e57c3e409beab3a1f1a8bcee34b4a700
2
{ "blob_id": "4bded1f7e57c3e409beab3a1f1a8bcee34b4a700", "branch_name": "refs/heads/main", "committer_date": 1632919005000, "content_id": "eea57133274224879ffca87c61c09b4b9b27b063", "detected_licenses": [ "MIT" ], "directory_id": "d1dd67877ad506a7e0bf5bec147462094bd4ab57", "extension": "py", "file...
2.4375
stackv2
# max len = 56 from __future__ import absolute_import from __future__ import print_function import logging import os import sys import numpy as np import pandas as pd from keras import Sequential from keras.layers import Embedding, Dropout, Convolution1D, MaxPooling1D, Flatten, Dense, Activation from matplotlib impor...
176
32.82
100
13
1,716
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7f3216a77b443c88_f82c36bf", "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" ]
[ 86 ]
[ 86 ]
[ 44 ]
[ 80 ]
[ "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" ]
imdb_cnn.py
/imdb_cnn.py
HC-super/Word2Vec-Learning
MIT
2024-11-18T22:43:59.261624+00:00
1,498,795,878,000
7a3818c47b70d73a43133cb87ef122d6f17eb227
3
{ "blob_id": "7a3818c47b70d73a43133cb87ef122d6f17eb227", "branch_name": "refs/heads/master", "committer_date": 1498795878000, "content_id": "19f4dca6a88be092011acd397f9388c751ed7bc8", "detected_licenses": [ "MIT" ], "directory_id": "2a346dd1c213cb8307d7bda9410546a479d371f2", "extension": "py", "fi...
2.671875
stackv2
# -------------------------------------------------------- # Fast/er R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Bharath Hariharan # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ import pr...
337
29.89
85
20
3,162
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_d5c3591ddd91579f_7f646358", "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...
14
true
[ "CWE-611", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.use-defused-xml", "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.secur...
[ "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 10, 88, 93, 95, 224, 229, 231 ]
[ 10, 88, 93, 95, 224, 229, 231 ]
[ 1, 7, 16, 16, 7, 16, 16 ]
[ 35, 27, 30, 48, 27, 30, 48 ]
[ "A04:2017 - XML External Entities (XXE)", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "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.", "Avoid using `pickle`, which is known to lead to code execu...
[ 7.5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
uecfood256_eval.py
/lib/datasets/uecfood256_eval.py
pierre-ecarlat/tf-faster-rcnn
MIT
2024-11-18T22:43:59.863901+00:00
1,550,762,476,000
ec1b45fb15099660c60fbe10521ac08711b3c8c9
2
{ "blob_id": "ec1b45fb15099660c60fbe10521ac08711b3c8c9", "branch_name": "refs/heads/master", "committer_date": 1550762476000, "content_id": "82216af15ff77a092b04f4d794540a907bdae5c8", "detected_licenses": [ "MIT" ], "directory_id": "0b0bcc65b50cbfbee4176f733b834eb3236a27df", "extension": "py", "fi...
2.484375
stackv2
from __main__ import vtk, qt, ctk, slicer import string import numpy import collections class NodeInformation: def __init__(self, dataNode, labelNode, allKeys): self.nodeInformation = collections.OrderedDict() self.nodeInformation["Node"] = "self.nodeName(self.dataNode)" self.dataNode = dataNode ...
27
28.74
70
14
175
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_20f020261beacbc6_f9002b47", "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" ]
[ 26 ]
[ 26 ]
[ 35 ]
[ 66 ]
[ "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" ]
NodeInformation.py
/HeterogeneityCAD/FeatureExtractionLib/NodeInformation.py
vnarayan13/Slicer-OpenCAD
MIT
2024-11-18T22:44:04.600672+00:00
1,517,371,176,000
e82340905aa82b32246a61bda636844c7561ef79
2
{ "blob_id": "e82340905aa82b32246a61bda636844c7561ef79", "branch_name": "refs/heads/master", "committer_date": 1517371176000, "content_id": "6f65cb100f1326fab7133ab5631d68bc31bea906", "detected_licenses": [ "MIT" ], "directory_id": "ad2d518f5e4df160867bc728bd87c3ee9ecdc129", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import wx import base64 import urllib.parse import json import html import hashlib import os import sys import subprocess class UI(wx.Frame): """ A graphical interface tool, integrated web encoding/decoding method, hash method and the ASCII table. """ ...
276
34.56
75
28
2,432
python
[{"finding_id": "semgrep_rules.python.lang.security.insecure-hash-algorithm-md5_13fab3049978d59b_fa4e3b67", "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...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 273 ]
[ 273 ]
[ 13 ]
[ 37 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
UI.py
/coder/UI.py
emptyxl/coder
MIT
2024-11-18T22:44:08.825442+00:00
1,626,266,218,000
652658ed236d31f419ff6b9f15c19b00cc08099e
3
{ "blob_id": "652658ed236d31f419ff6b9f15c19b00cc08099e", "branch_name": "refs/heads/master", "committer_date": 1626266218000, "content_id": "2fd5872143d7ac16e23d1190857bb6d443ce8732", "detected_licenses": [ "MIT" ], "directory_id": "c4e6b3f7d6f79f5f07d477f75318fcc50124e4e7", "extension": "py", "fi...
3.015625
stackv2
import pandas as pd import numpy as np from sklearn.preprocessing import OneHotEncoder from sklearn.pipeline import FeatureUnion, Pipeline from datetime import datetime as dt from sklearn.compose import ColumnTransformer from sklearn.base import TransformerMixin, BaseEstimator from sklearn.model_selection import train...
242
30.93
144
17
1,995
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-assignment-keyed_1d1166120898cbfb_00303460", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-assignment-keyed", "finding_type": "maintainability", "severity": "low", "confidence": "medium", "message": "key `'route'` in `X` ...
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" ]
[ 238, 242 ]
[ 238, 242 ]
[ 5, 5 ]
[ 29, 28 ]
[ "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" ]
Preprocessing.py
/src/Preprocessing.py
coderkol95/Flight_price_estimation
MIT
2024-11-18T22:44:13.177894+00:00
1,548,701,892,000
1c036d01733570a7b866dbf1f3986c800777b985
3
{ "blob_id": "1c036d01733570a7b866dbf1f3986c800777b985", "branch_name": "refs/heads/master", "committer_date": 1548701892000, "content_id": "55343c8dbc42551413109cf17946bb2b9f471424", "detected_licenses": [ "MIT" ], "directory_id": "2ba6ca934f24bb388bccdb7c6c8af0acb0e50a7a", "extension": "py", "fi...
2.640625
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Nov 13 12:31:46 2018 @author: Simon """ import os from createLargerFeatureMatrix import simpleLargeMatrix import pickle from keras.models import Sequential from keras.layers import Dense, Dropout from keras import regularizers import numpy as np path ...
128
23.16
137
11
792
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0d0979cacd97290e_5eea1e78", "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" ]
[ 29, 47 ]
[ 29, 47 ]
[ 16, 24 ]
[ 39, 47 ]
[ "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" ]
L2_0_05.py
/Gamle scripts/systematic/L2_0_05.py
MadsAW/machine-learning-on-materials
MIT
2024-11-18T22:44:16.100083+00:00
1,553,483,517,000
445a38a98f5460fd5564381b98429523a9575242
3
{ "blob_id": "445a38a98f5460fd5564381b98429523a9575242", "branch_name": "refs/heads/master", "committer_date": 1553483517000, "content_id": "ea37646116c76b97d8d075a080ba5411ceb5386b", "detected_licenses": [ "MIT" ], "directory_id": "ccd2728e3d241c356e7af6b7aed1e1849d4c81ac", "extension": "py", "fi...
2.59375
stackv2
from flask import request, abort, make_response, current_app, jsonify, session from info.utils.captcha.captcha import captcha from info import redis_store, db from info import constants from . import passport_bp from info.response_code import RET import re, random from info.models import User from info.lib.yuntongxun.s...
340
27.4
101
15
3,439
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_5ffc156434998fcb_6f6dcadb", "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" ]
[ 334 ]
[ 334 ]
[ 16 ]
[ 41 ]
[ "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" ]
views.py
/information24/info/moduls/passport/views.py
LIJF13/information01
MIT
2024-11-18T22:44:17.570079+00:00
1,508,801,243,000
f256ab789ba376cefb8a5117fc3e5bedf5abff51
3
{ "blob_id": "f256ab789ba376cefb8a5117fc3e5bedf5abff51", "branch_name": "refs/heads/master", "committer_date": 1511158942000, "content_id": "9140ff053ccb7cc90baef30d34a50aafce35fbd9", "detected_licenses": [ "MIT" ], "directory_id": "1dfb2508f81228112a93b375caeb98616c031150", "extension": "py", "fi...
2.625
stackv2
import logging import os from subprocess import PIPE, Popen class TmuxSession(object): def __init__(self, name, cwd): self._name = name self._cwd = cwd @property def name(self): return self._name @property def cwd(self): return self._cwd def __enter__(self): ...
59
29.39
119
14
441
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_925e62be21cf2b2c_052c955c", "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" ]
[ 46 ]
[ 46 ]
[ 13 ]
[ 29 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
tmux_session.py
/termautomator/tmux_session.py
urbas/termautomator
MIT
2024-11-18T22:44:18.198551+00:00
1,687,836,112,000
fb21ca962608e4217d27c511c8f4205ac651815a
3
{ "blob_id": "fb21ca962608e4217d27c511c8f4205ac651815a", "branch_name": "refs/heads/master", "committer_date": 1687836112000, "content_id": "83ed9b70b89c9f0daa0f9f097740c9dedebe16ba", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a9dd35061f3275b44bf8aa7a4685bafa82f8b108", "extension": "p...
2.71875
stackv2
import os import numpy as np import xml.etree.ElementTree as ET def parse_xml_file(sFilename_xml_in): """ Parse an XML file Args: sFilename_xml_in (string): The XML filename Returns: dict: The content in the XML file """ if os.path.exists(sFilename_xml_in): pass e...
121
26.99
73
20
752
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_6116be0398c735b9_876832c2", "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-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 3, 21, 91 ]
[ 3, 21, 91 ]
[ 1, 12, 12 ]
[ 35, 38, 38 ]
[ "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 native Python `xml` library is vulnerable to XML Exter...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
parse_xml_file.py
/pyearth/toolbox/reader/parse_xml_file.py
changliao1025/pyearth
BSD-3-Clause
2024-11-18T22:44:19.234243+00:00
1,363,963,326,000
72dca74018304a9e86ccf4792c20d618c4ea6d79
2
{ "blob_id": "72dca74018304a9e86ccf4792c20d618c4ea6d79", "branch_name": "refs/heads/master", "committer_date": 1363963326000, "content_id": "cdf2d599c9cb61b730e914fe5e058d33c5dc2482", "detected_licenses": [ "MIT" ], "directory_id": "0a977a83692a94c84c4914064d9074bb60636631", "extension": "py", "fi...
2.4375
stackv2
import sys from os.path import join, dirname from lsp.parser import read from lsp.forms import eval from lsp.env import top def lsp(source, env=top): return eval(read('(do {0})'.format(source)), env=env) def _init(): # load prelude with open(join(dirname(__file__), 'prelude.lsp')) as f: lsp(f.re...
37
20.81
59
16
205
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_319881f6171c3520_81854387", "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 ...
3
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 10 ]
[ 10 ]
[ 12 ]
[ 58 ]
[ "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" ]
__init__.py
/lsp/__init__.py
lucian1900/lsp
MIT
2024-11-18T22:44:22.022912+00:00
1,459,022,128,000
6457ca714e2228ec361fca803cff12ee0f4be5f1
2
{ "blob_id": "6457ca714e2228ec361fca803cff12ee0f4be5f1", "branch_name": "refs/heads/master", "committer_date": 1459022128000, "content_id": "3535eed473f9994cc8e25ec24e45291680b9a96c", "detected_licenses": [ "MIT" ], "directory_id": "9538311f7a102bcd30d5f6d609be03017b979c55", "extension": "py", "fi...
2.375
stackv2
import logging logger = logging.getLogger() import subprocess def mountpoint(path): try: subprocess.check_call(['mountpoint', path], stdout=subprocess.PIPE, stderr=subprocess.PIPE) except subprocess.CalledProcessError: return False return True def unmount(path): subproces...
40
26.05
71
11
225
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1215715567509f7b_98efc568", "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" ]
[ 38 ]
[ 39 ]
[ 5 ]
[ 56 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
mount.py
/kiwi/mount.py
jakogut/KiWI
MIT
2024-11-18T22:44:23.772448+00:00
1,493,372,532,000
a07a5e93dd5e9c4b065aa5bb8dacc8b412650f0d
2
{ "blob_id": "a07a5e93dd5e9c4b065aa5bb8dacc8b412650f0d", "branch_name": "refs/heads/master", "committer_date": 1493372532000, "content_id": "0c4920d673d6f31a51cf02ca791a16f31ff3ff3d", "detected_licenses": [ "MIT" ], "directory_id": "4a10e16901e56c7a3e6388dadd3c7425052054d6", "extension": "py", "fi...
2.484375
stackv2
import torch.nn.functional as F import torch.optim as optim from ..metrics import Metric, CategoricalAccuracy, BinaryAccuracy def validate_metric_input(metric): if isinstance(metric, str): if metric.upper() == 'CATEGORICAL_ACCURACY': return CategoricalAccuracy() elif metric.upper() ...
44
30.95
99
14
272
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_db34253d0ace9ab6_d6b1ab48", "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 ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 25, 37 ]
[ 25, 37 ]
[ 23, 25 ]
[ 42, 53 ]
[ "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 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
_utils.py
/torchsample/modules/_utils.py
xrj-com/torchsample
MIT
2024-11-18T22:44:24.511823+00:00
1,619,341,226,000
1ff958fc6fcbbf13ce48b2415c1c0f32ac118ccf
3
{ "blob_id": "1ff958fc6fcbbf13ce48b2415c1c0f32ac118ccf", "branch_name": "refs/heads/master", "committer_date": 1619341226000, "content_id": "d99cc85ba7005b3eca792b21fd0db3119d9a293b", "detected_licenses": [ "MIT" ], "directory_id": "8a3c1c66828008941dffad983ad79936830045d7", "extension": "py", "fi...
2.734375
stackv2
# included from libs/readMap.py """ read map from stdin into one-dimension list with sentinel """ def dir9(): return [ -1 - WIDTH, -WIDTH, 1 - WIDTH, -1, 0, 1, WIDTH - 1, WIDTH, WIDTH + 1 ] def dir8(): return [ -1 - WIDTH, -WIDTH, 1 - WIDTH, -1, 1, WIDTH -...
162
18.75
75
14
1,003
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_1c14e7684eb1b766_c713ff4c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.dangerous-globals-use", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Found non static data as an index to 'globals()'...
1
true
[ "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 138 ]
[ 138 ]
[ 44 ]
[ 48 ]
[ "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" ]
e.py
/abc183/e.py
nishio/atcoder
MIT
2024-11-18T22:44:24.565244+00:00
1,623,503,297,000
d2c24686520d486fa2989bba778954593536d631
3
{ "blob_id": "d2c24686520d486fa2989bba778954593536d631", "branch_name": "refs/heads/master", "committer_date": 1623503297000, "content_id": "fdd0bf3608baf99f98be2533dd88c4b185181662", "detected_licenses": [ "Apache-2.0" ], "directory_id": "938e8d7f1961b8407370e80d0a84c479094d8d44", "extension": "py"...
2.609375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import os import sys import subprocess from mastodon import Mastodon API_URL = 'https://botsin.space/' sys.stdout = open(sys.stdout.fileno(), mode='w', encoding='utf8', buffering=1) def getEvents(): cmd = ['python3', '-m', 'onthisday'] if len(sys.argv) > 1: ...
43
30.05
91
12
332
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_30cd8368e92276c3_ddf975df", "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...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 17 ]
[ 17 ]
[ 15 ]
[ 84 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
onthisday-mastodon-bot.py
/mastodon-bot/onthisday-mastodon-bot.py
alberanid/onthisday
Apache-2.0
2024-11-18T22:44:43.697260+00:00
1,572,507,220,000
b9a1e8fb1e38d8cbaca64ad68eccaf8b0ba8255d
2
{ "blob_id": "b9a1e8fb1e38d8cbaca64ad68eccaf8b0ba8255d", "branch_name": "refs/heads/master", "committer_date": 1572507220000, "content_id": "506d9f53837abf9c2d60fb94991aa3e28a889a38", "detected_licenses": [ "MIT" ], "directory_id": "bcfc2e0cd3fb2697eecb54d9cf80fd53be6a72a8", "extension": "py", "fi...
2.328125
stackv2
from flask import Flask, flash, request, redirect, url_for, render_template, send_from_directory, send_file import requests import json import os app = Flask(__name__) OBS_TMP_OP_DIR = '//home/sairo/tmpmaster' app.config['OBS_TMP_OP_DIR'] = OBS_TMP_OP_DIR @app.route('/', methods=['GET', 'POST']) def index(): ...
97
31.2
118
18
774
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_24829967a284375a_32bea8c0", "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 ...
21
true
[ "CWE-22", "CWE-22" ]
[ "rules.python.flask.security.injection.path-traversal-open", "rules.python.flask.security.injection.path-traversal-open" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 38, 41 ]
[ 38, 41 ]
[ 14, 14 ]
[ 77, 78 ]
[ "A05:2017 - Broken Access Control", "A05:2017 - Broken Access Control" ]
[ "Found request data in a call to 'open'. Ensure the request data is validated or sanitized, otherwise it could result in path traversal attacks.", "Found request data in a call to 'open'. Ensure the request data is validated or sanitized, otherwise it could result in path traversal attacks." ]
[ 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
interface.py
/proxy/interface.py
AshirwadPradhan/sairo
MIT
2024-11-18T22:44:46.209840+00:00
1,584,644,109,000
1544d68f93cf153dd7bab6ddacc2eba089121b8f
3
{ "blob_id": "1544d68f93cf153dd7bab6ddacc2eba089121b8f", "branch_name": "refs/heads/master", "committer_date": 1584644109000, "content_id": "11650b19b5158002c85bdfdec9c1101bde6b2796", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "452c06b03e4f8cc30bec8f6b9340b4622a387f02", "extension": "p...
2.53125
stackv2
#!/usr/bin/python3 from subprocess import Popen,PIPE,STDOUT def run(cmd): with Popen(cmd,stdout=PIPE,stderr=STDOUT,bufsize=1,universal_newlines=True) as p: for line in p.stdout: yield line.strip() p.stdout.close() p.wait() def probe(file1): print("Scanning "+file1) dur...
55
27.38
99
21
394
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_3affdac0cc733cda_4aa13357", "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" ]
[ 6 ]
[ 6 ]
[ 10 ]
[ 80 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
probe.py
/common/probe.py
amirunpri2018/Smart-City-Sample
BSD-3-Clause
2024-11-18T22:44:49.163804+00:00
1,603,653,184,000
59386cb580400f8762805bbb3153866dfa9f1498
3
{ "blob_id": "59386cb580400f8762805bbb3153866dfa9f1498", "branch_name": "refs/heads/master", "committer_date": 1603653184000, "content_id": "2a70c0b8ae11b1d327bb97a8fd42349b2d3b6e28", "detected_licenses": [ "MIT" ], "directory_id": "c8ef25d3db454158af06371bf484f8edbf0ae6c5", "extension": "py", "fi...
3.140625
stackv2
#!/usr/bin/env python from datetime import datetime from jinja2 import Template from slugify import slugify import os import sys import csv class Book(object): title = '' isbn10 = '' isbn13 = '' authors = '' publisher = '' published = '' tags = [] @property def tags_as_css_class(...
82
24.35
99
15
529
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f00b7015db776f18_944ec9b8", "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-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 44 ]
[ 44 ]
[ 12 ]
[ 33 ]
[ "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" ]
generate_html.py
/generate_html.py
gustavohenrique/books
MIT
2024-11-18T20:24:11.829541+00:00
1,590,436,348,000
bd25d5746ebe8f2947e503d546267839c919f124
2
{ "blob_id": "bd25d5746ebe8f2947e503d546267839c919f124", "branch_name": "refs/heads/master", "committer_date": 1590436348000, "content_id": "d7630ebab6c83494fe8369ac48d2471a0357c077", "detected_licenses": [ "MIT" ], "directory_id": "0dff87ae74940f804a1bbb084b5040d4e3673b28", "extension": "py", "fi...
2.4375
stackv2
from django import forms from django.utils.safestring import mark_safe class ReCAPTCHA(forms.Widget): """ Default reCAPTCHA v2 widget. (with "I'm not robot" checkbox) """ def __init__(self, sitekey): """ :param sitekey: site key (public key) """ super(ReCAPTCHA, se...
52
25.04
76
13
316
python
[{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_04e284e70b8c9eb3_7db7c4bc", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-mark-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "'mark_safe()' is used to mark a string as \"...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.avoid-mark-safe", "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 23, 46 ]
[ 26, 52 ]
[ 16, 16 ]
[ 15, 10 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escaping and could therefore subject the content to XSS attacks. Use 'django.utils.html.format_html()' to build HTML for rendering instead.", "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escapi...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
widgets.py
/antispam/captcha/widgets.py
mixkorshun/django-antispam
MIT
2024-11-18T20:24:15.122513+00:00
1,400,490,340,000
808d395a5daa19b8352906893b05749fa14de72b
3
{ "blob_id": "808d395a5daa19b8352906893b05749fa14de72b", "branch_name": "refs/heads/master", "committer_date": 1400490340000, "content_id": "5cc97435bf14908975815e1f349830054f8a1d1f", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "821397aaab9e04c5ceae539231572a1cc3f0bdad", "extension": "p...
2.546875
stackv2
#!/usr/bin/env python2 # This file is part of DumpTruck. # Copyright (C) 2012 ScraperWiki Ltd. and other contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy of this # software and associated documentation files (the "Software"), to deal in the Software # without restriction, ...
102
33.96
95
15
866
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_4046c3efdf4b17c7_9c90a2fc", "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...
4
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-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" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "HIGH" ]
[ 46, 50, 70, 70 ]
[ 46, 50, 70, 70 ]
[ 26, 13, 5, 5 ]
[ 96, 83, 85, 85 ]
[ "A01:2017 - Injection", "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, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
removed.py
/dumptruck/removed.py
spendright/dumptruck
BSD-2-Clause
2024-11-18T20:24:16.447420+00:00
1,524,657,955,000
1a7340aec8345b3e1aa8eae8184d93af40c39157
3
{ "blob_id": "1a7340aec8345b3e1aa8eae8184d93af40c39157", "branch_name": "refs/heads/master", "committer_date": 1524657955000, "content_id": "16bc726fb8eb2a32030dda2bb5dda91bd2e3c3c6", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "8c7f4e90a827bb0eda30ecbeed00c15c665f98a0", "extension": "p...
3.015625
stackv2
"""Contains several algorithms for solving Minimal Hamiltonian Path problem: - Simulated annealing: python and C; - Lin-Kernigan-Helsgaun algorithm (only adapter for external C code); - Brute force (trivial and slightly optimized); - Greedy algorithm. """ from itertools import permutations import random import time i...
354
33.3
79
22
2,986
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_aad2a1c3562a5f53_9db3d150", "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-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 219, 251 ]
[ 219, 253 ]
[ 9, 16 ]
[ 64, 45 ]
[ "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 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
hamilton_path.py
/algo/arranging/hamilton_path.py
bigartm/visartm
BSD-3-Clause
2024-11-18T20:24:18.050321+00:00
1,608,714,958,000
4c54a9f5cde6be55bf38e96427518b35006c9a3d
2
{ "blob_id": "4c54a9f5cde6be55bf38e96427518b35006c9a3d", "branch_name": "refs/heads/main", "committer_date": 1608714958000, "content_id": "1e0e4225b15e0b5c6e9fe1a3aca6f78f7d2737c2", "detected_licenses": [ "MIT" ], "directory_id": "23834f1e48f344d6f8f0509b042514c1da8d371d", "extension": "py", "file...
2.46875
stackv2
import numpy import cv2 import pickle import openpyxl from datetime import date attendance_sheet = openpyxl.load_workbook('Attendance.xlsx') today = date.today() month_string = today.strftime("%B") sheet = attendance_sheet[month_string] roll_generator = sheet[1] roll_numbers = {} day_generator = sheet['A'] day_number...
75
21.64
77
15
510
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_38de76be79b9541d_173cba25", "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" ]
[ 41 ]
[ 41 ]
[ 22 ]
[ 36 ]
[ "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" ]
detection.py
/detection.py
abhijeet010304/Attendance-System-Using-Face-Recognition
MIT
2024-11-18T20:24:22.622509+00:00
1,658,277,291,000
00b0f652cb5b6a8c0e526be30985b5703fdfde2f
3
{ "blob_id": "00b0f652cb5b6a8c0e526be30985b5703fdfde2f", "branch_name": "refs/heads/main", "committer_date": 1658277291000, "content_id": "86b7eb274bd00ec48e5b17c4ba13a55db267f40f", "detected_licenses": [ "MIT" ], "directory_id": "2132ba9b4e3f743100d4eda99e4178f3c2ba192b", "extension": "py", "file...
2.546875
stackv2
import os from shutil import which from subprocess import call from time import sleep from snakypy.helpers import FG, printer from snakypy.helpers.catches import is_tool from snakypy.helpers.checking import shell, whoami from snakypy.helpers.files import read_file from snakypy.helpers.logging import Log from tomlkit i...
106
33.64
105
22
789
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_77bd3f1e779d0e32_1ede225b", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi...
16
true
[ "CWE-78", "CWE-78", "CWE-78", "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.subprocess-shell-true", "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...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 39, 39, 41, 41, 75, 75, 75, 81, 81 ]
[ 39, 39, 41, 41, 75, 75, 75, 81, 81 ]
[ 17, 64, 17, 75, 25, 30, 41, 21, 26 ]
[ 69, 68, 80, 79, 71, 33, 45, 47, 46 ]
[ "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" ]
[ "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, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "MEDIUM", "HIGH", "LOW", "MEDIUM" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "MEDIUM", "LOW", "HIGH", "MEDIUM" ]
process.py
/snakypy/zshpower/utils/process.py
snakypy/zshpower
MIT
2024-11-18T20:36:56.145981+00:00
1,613,404,171,000
c80dead5f09d97d6bc19cfeafbe525f11cb0f184
3
{ "blob_id": "c80dead5f09d97d6bc19cfeafbe525f11cb0f184", "branch_name": "refs/heads/master", "committer_date": 1613404171000, "content_id": "2dcfd95e26b9476cc96273b03ae240fc00d9a080", "detected_licenses": [ "MIT" ], "directory_id": "0279bad5cf7ba55c0c7c574734d081d1c8b089fa", "extension": "py", "fi...
2.59375
stackv2
import numpy as np import pandas as pd import pickle from sklearn.externals import joblib from sklearn.preprocessing import StandardScaler, OneHotEncoder import constants as const from sklearn.utils import shuffle # this will prevent TF from allocating the whole GPU from keras import backend as K import tensorflow as ...
69
42.45
130
13
711
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_764249e9976de49e_4b7f9fdd", "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" ]
[ 69 ]
[ 69 ]
[ 5 ]
[ 36 ]
[ "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" ]
train_model.py
/MachineLearning/train_model.py
dniklaus/dust-measurement-network
MIT
2024-11-18T20:59:34.371665+00:00
1,290,456,438,000
dfe9ff3735632344f195383bbc29f373994fadc5
3
{ "blob_id": "dfe9ff3735632344f195383bbc29f373994fadc5", "branch_name": "refs/heads/master", "committer_date": 1290461707000, "content_id": "dbd872f35a03637abd6d3da2e1f82150499a7212", "detected_licenses": [ "MIT" ], "directory_id": "67ff9257005ecd5aab61fc0a66e25a147803dcec", "extension": "py", "fi...
2.78125
stackv2
import re from django.utils.safestring import mark_safe import oembed from oembed.constants import URL_RE, STANDALONE_URL_RE from oembed.exceptions import OEmbedException from oembed.parsers.base import BaseParser class TextBlockParser(BaseParser): def parse_data(self, text, maxwidth, maxheight, template_dir, c...
104
39.33
99
21
805
python
[{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_a9e4b2e6ca408aed_ad6014d5", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-mark-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "'mark_safe()' is used to mark a string as \"...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.avoid-mark-safe", "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 61, 104 ]
[ 61, 104 ]
[ 16, 16 ]
[ 31, 44 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escaping and could therefore subject the content to XSS attacks. Use 'django.utils.html.format_html()' to build HTML for rendering instead.", "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escapi...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
text.py
/oembed/parsers/text.py
carljm/djangoembed
MIT
2024-11-18T20:59:39.865866+00:00
1,619,593,430,000
31cb4ba4e2d0d6f7b8449bf916841cdc140bcc6a
3
{ "blob_id": "31cb4ba4e2d0d6f7b8449bf916841cdc140bcc6a", "branch_name": "refs/heads/main", "committer_date": 1619593430000, "content_id": "930dd2b5a4d10656dc522a9dfeeea234098211d7", "detected_licenses": [ "MIT" ], "directory_id": "5fe89955082f46c647a505552eb409af8b3c1b21", "extension": "py", "file...
2.6875
stackv2
""" This script plots the TSC data for all experiments and saves it in the plotting folder """ import pickle import matplotlib.pyplot as plt import numpy as np # load TSC data file_address_load = (r"C:/Users/s1475174/Documents/Python_Projects/T" r"hermalRadiation_BREexperiments/processed_data/TS...
65
24.71
78
12
507
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e10aa30d097bbda6_7b8f2bf6", "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" ]
[ 15 ]
[ 15 ]
[ 16 ]
[ 35 ]
[ "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" ]
plot_tsc.py
/analysis/tsc/plot_tsc.py
simonsantama/ThermalRadiation_BREexperiments
MIT
2024-11-18T20:59:44.293104+00:00
1,627,998,461,000
bf48a1ad740a9b65b4cc778b4dffd40182a4a826
3
{ "blob_id": "bf48a1ad740a9b65b4cc778b4dffd40182a4a826", "branch_name": "refs/heads/main", "committer_date": 1627998461000, "content_id": "56e953dad338e600f01396309882198a7eaf49d9", "detected_licenses": [ "MIT" ], "directory_id": "ea29fb1bd5f544cdec8a6766be9cf3de00860ba3", "extension": "py", "file...
2.640625
stackv2
from strategy.astrategy import AStrategy from datetime import datetime, timedelta, timezone from sklearn.impute import SimpleImputer import numpy as np import math import pandas as pd import pickle class QuarterlyFinancialCategorical(AStrategy): def __init__(self): """ Quarterly Financials Strat ...
120
44.15
132
19
1,196
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_315cc1d1142bc949_6bbae7ca", "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" ]
[ 116 ]
[ 116 ]
[ 28 ]
[ 43 ]
[ "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" ]
quarterly_financial_categorical.py
/strategy/quarterly_financial_categorical.py
webclinic017/longshot
MIT
2024-11-18T21:00:00.068232+00:00
1,403,537,225,000
441ca05f35f45bae6ffb416f9bbe59b0b7f6057c
2
{ "blob_id": "441ca05f35f45bae6ffb416f9bbe59b0b7f6057c", "branch_name": "refs/heads/master", "committer_date": 1403537225000, "content_id": "702c44a1f48fa5d1b82f8aaf1882dca25cdd1aa4", "detected_licenses": [ "CC0-1.0" ], "directory_id": "de1df65331f8e8909b9f15973eebce0ad4114b8f", "extension": "py", ...
2.40625
stackv2
#!/usr/bin/python # -*- coding: utf -*- # framework from flask import Blueprint, session, render_template, redirect, request, flash, url_for from flask.ext.sqlalchemy import Pagination # presenters from presenters.auth import login_required # models from models.accounts import Accounts # utils from utils import * ...
273
37.47
124
28
2,014
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_0f10c82da39b6572_afd22ba7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.audit.exec-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 141, 195 ]
[ 141, 195 ]
[ 33, 37 ]
[ 69, 73 ]
[ "A03:2021 - Injection", "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.", "Detected the use of exec(). exec() can be dangerous if used...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
accounts.py
/presenters/accounts.py
radekstepan/FlaskBudget
CC0-1.0
2024-11-18T21:00:01.280079+00:00
1,572,017,070,000
650de036736df18fb3052d5929ed950e674a6ce7
2
{ "blob_id": "650de036736df18fb3052d5929ed950e674a6ce7", "branch_name": "refs/heads/master", "committer_date": 1572017070000, "content_id": "42dd6cb5e1519c36575d6124fcf9be3182104328", "detected_licenses": [ "MIT" ], "directory_id": "40da66170c9e99f33a9886eb9dae8206f25bd7aa", "extension": "py", "fi...
2.484375
stackv2
import sys sys.path.extend(['..']) import tensorflow as tf from trainers.trainer import Trainer from data_loader.data_generator import DataGenerator from utils.config import process_config from utils.utils import get_args from importlib import import_module def eval(): try: args = get_args() con...
44
26.18
80
11
276
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_46f56be34579ad22_a17e7241", "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...
3
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 44 ]
[ 44 ]
[ 5 ]
[ 11 ]
[ "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" ]
eval.py
/mains/eval.py
arshjot/Handwritten-Text-Recognition
MIT
2024-11-18T21:00:02.466276+00:00
1,500,274,299,000
b7baa30b5bad67ffa274743af3839668db79c4cb
3
{ "blob_id": "b7baa30b5bad67ffa274743af3839668db79c4cb", "branch_name": "refs/heads/master", "committer_date": 1500274299000, "content_id": "5f48aeb0983157ee24976f60e50cf87e42993248", "detected_licenses": [ "MIT" ], "directory_id": "147d46c9274299804536cd8cd55850d4b7141eae", "extension": "py", "fi...
2.859375
stackv2
#!/usr/bin/env python """ A program to make sense of pentaplex's outputs for receipt analysis @author: phdenzel """ import os import re from cv2 import imread from difflib import get_close_matches try: # Python 3 FileNotFoundError except NameError: # Python 2 FileNotFoundError = IOError class Recei...
457
27.85
79
23
2,837
python
[{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.string-is-comparison_900dd5bac1989283_ac0d1223", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.string-is-comparison", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Found st...
11
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" ]
[ 393, 405 ]
[ 393, 405 ]
[ 13, 13 ]
[ 70, 70 ]
[ "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()'.", "Detected subprocess funct...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
receipt.py
/receipt.py
Yutsoft/pentaplex
MIT
2024-11-18T21:00:08.571912+00:00
1,561,032,668,000
ef7508d0ca307611a2545baae175185afddfd3cf
2
{ "blob_id": "ef7508d0ca307611a2545baae175185afddfd3cf", "branch_name": "refs/heads/master", "committer_date": 1561032668000, "content_id": "46985534feb41395bd28a171418e9fb9c78d4597", "detected_licenses": [ "BSD-3-Clause", "MIT" ], "directory_id": "9352c267e49025bd7649f9d3f8ab52c815e0df38", "ext...
2.453125
stackv2
# -*- coding: utf-8 -*- """ Created on Fri May 22 10:28:35 2015 @author: wangwenya """ """ create tree structures from raw parses for training sentences accumulate vocabulary ignore lemmatization differentiate beginning and inside of aspects/opinions """ from dtree_util import * import gen_util as gen import sys, c...
179
31.2
139
30
1,218
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_90ce740fe4952eee_4b8d95ea", "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...
7
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 176 ]
[ 176 ]
[ 1 ]
[ 90 ]
[ "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." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
20dtreeLabel.py
/RNCRF/util/20dtreeLabel.py
qianrenjian/sohu2019-1
BSD-3-Clause,MIT
2024-11-18T21:00:29.821773+00:00
1,483,673,659,000
727c0a758559f06ff3fa95a173382c6475285faa
4
{ "blob_id": "727c0a758559f06ff3fa95a173382c6475285faa", "branch_name": "refs/heads/master", "committer_date": 1483673659000, "content_id": "26a695d34833ac95e7f0fd9e65a1fab6a4a73014", "detected_licenses": [ "MIT" ], "directory_id": "173efb57590c9b33c79bf11ccd683b03dc454e87", "extension": "py", "fi...
3.71875
stackv2
## SECANT METHOD. This progam will do n0 iterations of the secant method # method. This method is like the newton method but it does not need # the derivative of the function of interest. # Stopping criteria is iterations and toleratnce of the ERROR #################################################################...
71
24.34
72
12
391
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_b1a8fcbb7fc08281_7ccd4f35", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ...
1
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.exec-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 27 ]
[ 27 ]
[ 1 ]
[ 14 ]
[ "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" ]
CH2_3_Secant_Method.py
/CH2_3_Secant_Method.py
byronBarillas/NumericalAnalysis-Python
MIT
2024-11-18T21:00:36.017365+00:00
1,497,425,789,000
9f4d02a49fe2b097e1dd73b308d97ee27a9926c6
3
{ "blob_id": "9f4d02a49fe2b097e1dd73b308d97ee27a9926c6", "branch_name": "refs/heads/master", "committer_date": 1497425789000, "content_id": "09f6cb067ccc82b8faa411a7f63a44ae3a540d4a", "detected_licenses": [ "MIT" ], "directory_id": "b57559066f4f2ef1f56b7d6ac46645bcd5d9fbc3", "extension": "py", "fi...
2.96875
stackv2
""" run k-Nearest Neighbors classification on imdb dataset as a basis for comparison with the LSTM model results. """ import numpy as np import matplotlib.pyplot as plt import cPickle as pkl from sklearn import neighbors from matplotlib.colors import ListedColormap from keras.datasets import imdb from keras.preproce...
99
33.6
79
14
957
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_c949c6d6846d9ae1_f1699f0f", "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-cPickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 85, 86 ]
[ 85, 86 ]
[ 18, 17 ]
[ 75, 75 ]
[ "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" ]
run_classifiers.py
/Sentiment-Analysis/代码/Keras/imdb_experiments-master/run_classifiers.py
bancheng/Sentiment
MIT
2024-11-18T21:00:37.110977+00:00
1,616,783,436,000
4279c682b0aff9378bc9e8a148b5d564b45fad7d
2
{ "blob_id": "4279c682b0aff9378bc9e8a148b5d564b45fad7d", "branch_name": "refs/heads/master", "committer_date": 1616783436000, "content_id": "4c444e6688122d0765eff6d7ce00381ba152d35a", "detected_licenses": [ "MIT" ], "directory_id": "d8f38d0c5379a2cc08f448a42366861bcab1d59f", "extension": "py", "fi...
2.34375
stackv2
from setuptools import setup # Todo: Parse this from a proper readme file in the future description='Response Matrix Utilities' long_description = """ReMU - Response Matrix Utilities ReMU is a framework for response matrices in cross-section measurements and general counting experiments. It offers functions to build ...
64
37.88
109
15
597
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_31f6c53b17cea7dc_bcfc7c74", "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-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 24 ]
[ 24 ]
[ 24 ]
[ 39 ]
[ "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" ]
setup.py
/setup.py
alokekumardas/remu
MIT
2024-11-18T21:00:41.985552+00:00
1,638,799,157,000
fc333b674778c073b4b4094a66b35f3b9af98fc0
2
{ "blob_id": "fc333b674778c073b4b4094a66b35f3b9af98fc0", "branch_name": "refs/heads/main", "committer_date": 1638799157000, "content_id": "449176185814145beb3f7b11613054383d0a6057", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6616f70501a1646ae6c51e096b47c326ea88a9c4", "extension": "py", ...
2.3125
stackv2
import glob import os import shutil from pathlib import Path import geopandas as gpd import numpy as np import pandas as pd import shapefile # Define directory which will contain the wflow-sbm models for each basin in the camels dataset PARAMDIR = Path("/gpfs/home6/jaerts/eWaterCycle_example_data/wflow_camels_paramet...
189
32.46
131
34
1,686
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_8d7eb031a67c29a2_aa002806", "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", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 125, 189 ]
[ 125, 189 ]
[ 13, 9 ]
[ 32, 28 ]
[ "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 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
single_basin_hydromt_camels.py
/hydromt/single_basin_hydromt_camels.py
jeromaerts/eWaterCycle_example_notebooks
Apache-2.0
2024-11-18T21:00:44.379874+00:00
1,629,881,016,000
7c20ddeed3e6f1bb963a1f490d284fa72b0e2e15
3
{ "blob_id": "7c20ddeed3e6f1bb963a1f490d284fa72b0e2e15", "branch_name": "refs/heads/master", "committer_date": 1629881016000, "content_id": "b2138de1d7e86f1df1d72141273fbdc7c43e5022", "detected_licenses": [ "MIT" ], "directory_id": "5494c5ca241d8f2553875ae4bdfdb23866c4e752", "extension": "py", "fi...
2.78125
stackv2
import discord from discord.ext import commands import psycopg2 from bot import DB_NAME, DB_PASS, DB_HOST, DB_USER, logger, private_message class Server(commands.Cog): def __init__(self, bot): self.bot = bot logger.info("Server Cog loaded") def get_prefix(self, guild_id): conn = psyco...
54
37.37
115
20
467
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_0ee37a6774983059_fb7e32c5", "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...
6
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.lang.security.audit.sqli.psycopg-sqli", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.lang.security.audit.sqli.psycopg-sqli", "rules.python.sqlalch...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "HIGH", "MEDIUM", "MEDIUM", "HIGH" ]
[ 15, 15, 15, 33, 33, 33 ]
[ 15, 15, 15, 33, 33, 33 ]
[ 9, 9, 9, 13, 13, 13 ]
[ 86, 86, 86, 94, 94, 94 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Detected string concatenation with a non-literal variable in a psycopg2 Python SQL statement. This could lead to SQL injection if the variable is user-controlled and not properly sanitized. In order to prevent SQL injection, use paramet...
[ 5, 5, 7.5, 5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
server.py
/src/cogs/server.py
Cr4zi/SynatxBot
MIT
2024-11-18T21:00:44.972970+00:00
1,503,809,723,000
c92b018f1e4878e719abffe1ccb4163f5a881a06
3
{ "blob_id": "c92b018f1e4878e719abffe1ccb4163f5a881a06", "branch_name": "refs/heads/master", "committer_date": 1503809723000, "content_id": "c04f85ca6db4cde05922e913b27d5564161134ab", "detected_licenses": [ "MIT", "Python-2.0" ], "directory_id": "e08d96a9ae578a2f5270ea18fe6790336270ef93", "exten...
2.515625
stackv2
# coding:utf-8 import cv2 import time import os import sys import argparse from pydub import AudioSegment from threadpool import * start_played_time = 0 fps = 0 # 将色点转为字符 def get_char(color_point): if FLAGS.ascii_mode: # 优化过的ascii显示列表 ascii_char = list("$@B%8&WM#*oahkbdpqwmZO0QLCJUYXzcvunxrjft/\|(...
221
24.05
129
16
1,545
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_d56d8eeb58c35fc2_c6a976b2", "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" ]
[ 156 ]
[ 156 ]
[ 17 ]
[ 32 ]
[ "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" ]
main.py
/main.py
yp05327/PythonCharacterVideoPlayer
MIT,Python-2.0
2024-11-18T21:00:45.082333+00:00
1,691,628,472,000
13ac75c7ec843d6846b7f7e4e5b50a8da3737ff0
3
{ "blob_id": "13ac75c7ec843d6846b7f7e4e5b50a8da3737ff0", "branch_name": "refs/heads/master", "committer_date": 1691628472000, "content_id": "9aaa45227dd80cfa1d3a81d80bf6c3e75c44ca8c", "detected_licenses": [ "MIT" ], "directory_id": "13d42412e531f6304123675e3224fc574e080c2c", "extension": "py", "fi...
2.75
stackv2
#!/usr/bin/env python3 #################################################################################################### # Title: make_command_docs.py; Author Greg Propf; Date 2022-02-01 #################################################################################################### # Usage: './make_command_doc...
181
34.08
112
15
1,601
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_f989da3eedc4f787_86317bad", "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" ]
[ 46 ]
[ 46 ]
[ 5 ]
[ 97 ]
[ "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" ]
make_command_docs.py
/make_command_docs.py
vast-ai/vast-python
MIT
2024-11-18T21:00:48.474529+00:00
1,553,896,812,000
5a0d54f58800c6999404bcc50cea9b2fea9200bd
3
{ "blob_id": "5a0d54f58800c6999404bcc50cea9b2fea9200bd", "branch_name": "refs/heads/master", "committer_date": 1553896812000, "content_id": "6e8d8f5a3a9f741b08b517577441d910cc215311", "detected_licenses": [ "MIT" ], "directory_id": "33a6f2fda44bcd3dadda8179e24a3e432c0d9767", "extension": "py", "fi...
2.671875
stackv2
import requests import io import zipfile from collections import namedtuple import tempfile import os DownloaderContext = namedtuple('DownloaderContext', ['base_url', 'resources_path']) class Downloader: def __init__(self): self.base_url = 'https://deep-rl.herokuapp.com/resources/' self.resources ...
128
27.09
83
18
812
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_8c6ecd62d00cf9e7_944fca4e", "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 ...
3
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 84 ]
[ 84 ]
[ 5 ]
[ 38 ]
[ "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" ]
download.py
/download.py
jkulhanek/autocorrect-czech-pytorch
MIT
2024-11-18T21:00:53.657945+00:00
1,352,433,179,000
a5ae7efcf3e1018cd4718879783d6611c42edd6a
3
{ "blob_id": "a5ae7efcf3e1018cd4718879783d6611c42edd6a", "branch_name": "refs/heads/master", "committer_date": 1352433179000, "content_id": "0bdee89851801509ec4830d5c97fb65fdef23b72", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2d82d4c6574bd6d32f2cf1c781615f7951f55f66", "extension": "py"...
2.53125
stackv2
from decimal import Decimal import sys import re import os import xml.sax.handler import traceback from muntjac.api import * from mjextras import * class TreeBuilder(xml.sax.handler.ContentHandler): def __init__(self,parent): self.stack = [] self.root = DataNode() self.curr...
417
41.47
138
30
3,537
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_0a29f1f8d539c902_ec27baa3", "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" ]
[ 5 ]
[ 5 ]
[ 1 ]
[ 23 ]
[ "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" ]
qtui2mj.py
/muntjac/ui/qtui2mj.py
metaperl/muntjac
Apache-2.0
2024-11-18T21:01:01.683101+00:00
1,536,133,613,000
ceccc84d069d37a566551a1d054340ad1d6f4e4c
2
{ "blob_id": "ceccc84d069d37a566551a1d054340ad1d6f4e4c", "branch_name": "refs/heads/master", "committer_date": 1536133613000, "content_id": "c4c7c01e3779d0f6dbeb17cf3f959803c32448b0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dd93d11866bd7034244fb48d2793660064bc57e5", "extension": "py"...
2.3125
stackv2
# -*- coding: utf-8 -*- # @Author: xiweibo # @Date: 2018-09-04 16:13:26 # @Last Modified by: xiweibo # @Last Modified time: 2018-09-04 17:27:51 """ 服务端代码 """ from concurrent import futures from SimpleXMLRPCServer import SimpleXMLRPCServer from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler from SocketServe...
40
24.02
95
8
313
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_90e30fe8d3660cd1_250466b1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
2
true
[ "CWE-776", "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc", "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 10, 11 ]
[ 10, 11 ]
[ 1, 1 ]
[ 51, 59 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead.", "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead." ]
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
server.py
/server.py
youaresherlock/xml-rpc-for-python2
Apache-2.0
2024-11-18T21:01:05.610449+00:00
1,501,516,455,000
3f55394991e45c2c72ed1dc6c8b8e7922302e9b9
2
{ "blob_id": "3f55394991e45c2c72ed1dc6c8b8e7922302e9b9", "branch_name": "refs/heads/master", "committer_date": 1501516455000, "content_id": "836469248b860a325049a567a471bbddb01d2ef8", "detected_licenses": [ "MIT" ], "directory_id": "1df3f0d0253e740d87ddf44494ed83b6a36f6393", "extension": "py", "fi...
2.328125
stackv2
import markdown from django import template from django.template.defaultfilters import stringfilter from django.utils.encoding import force_text from django.utils.safestring import mark_safe from markdown.extensions.headerid import HeaderIdExtension register = template.Library() # 自定义filter时必须加上 @register.filter(i...
25
36.12
71
15
202
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.filter-with-is-safe_690af32c461e2c94_b907ba5c", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.filter-with-is-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected Django filters flag...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.xss.filter-with-is-safe", "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 12, 15 ]
[ 25, 25 ]
[ 1, 12 ]
[ 34, 34 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected Django filters flagged with 'is_safe'. 'is_safe' tells Django not to apply escaping on the value returned by this filter (although the input is escaped). Used improperly, 'is_safe' could expose your application to cross-site scripting (XSS) vulnerabilities. Ensure this filter does not 1) add HTML characte...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
custom_markdown.py
/blog/templatetags/custom_markdown.py
frey1186/Dsystem
MIT
2024-11-18T21:01:08.593470+00:00
1,552,214,394,000
67f7d14c21cfa60e98c79e49e0f59649b67ec690
3
{ "blob_id": "67f7d14c21cfa60e98c79e49e0f59649b67ec690", "branch_name": "refs/heads/master", "committer_date": 1552214394000, "content_id": "7f5828daeab01b749a3a74d7b2873dd1b6b45b22", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9c34bd340f40f29c611ecb5114ce7c82ca9f082c", "extension": "py"...
3.203125
stackv2
#!/usr/bin/env python import argparse import json import random import requests import time from urllib3.exceptions import InsecureRequestWarning # TODO: Make class for all api calls def change_lights_hue(api_url, light_numbers, new_hue): body = {"hue": new_hue} for light_number in light_numbers: r...
95
36.72
119
19
800
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_9162df1d8fcf9c37_2e7f02de", "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 ...
11
true
[ "CWE-295", "CWE-295", "CWE-295" ]
[ "rules.python.requests.security.disabled-cert-validation", "rules.python.requests.security.disabled-cert-validation", "rules.python.requests.security.disabled-cert-validation" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 17, 22, 37 ]
[ 17, 22, 37 ]
[ 9, 18, 9 ]
[ 110, 73, 110 ]
[ "A03:2017 - Sensitive Data Exposure", "A03:2017 - Sensitive Data Exposure", "A03:2017 - Sensitive Data Exposure" ]
[ "Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation.", "Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation.", "Certificate v...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "LOW", "LOW", "LOW" ]
lights.py
/lights.py
daveygit2050/lights
Apache-2.0
2024-11-18T21:01:08.859910+00:00
1,608,829,367,000
fd3f12c8c378119293eafb57fc946a70c05bf9d2
3
{ "blob_id": "fd3f12c8c378119293eafb57fc946a70c05bf9d2", "branch_name": "refs/heads/master", "committer_date": 1608829367000, "content_id": "706f45970b43791f3ca1d8eb50fd73a18c9f3c22", "detected_licenses": [ "MIT" ], "directory_id": "ada55236e206a8108080a53addeab5134aec0e12", "extension": "py", "fi...
2.734375
stackv2
# https://developers.google.com/calendar/quickstart/python from __future__ import print_function from datetime import datetime, timedelta import pickle from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request from os import pa...
138
37.6
117
18
1,138
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_09923595bd1aab17_3a310642", "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" ]
[ 32, 43 ]
[ 32, 43 ]
[ 25, 17 ]
[ 43, 42 ]
[ "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" ]
calendar_google.py
/evotm/calendar_google/calendar_google.py
alexhanganu/evotm
MIT
2024-11-18T21:01:11.510225+00:00
1,486,997,219,000
3d30d3caac0cfca47538b28135e4b84d60389d20
3
{ "blob_id": "3d30d3caac0cfca47538b28135e4b84d60389d20", "branch_name": "refs/heads/master", "committer_date": 1486997219000, "content_id": "6339a2e39b877dfd7b463bae9c30f074bab56e73", "detected_licenses": [ "MIT" ], "directory_id": "054ca10f4bed67d2934fa085df1ec15cfcb05c49", "extension": "py", "fi...
3.03125
stackv2
import sqlite3 import os class SQLiteDB: def __init__(self, schema, table): self._schema = schema self._table = table self.con = None self.cur = None def init_db(self, query): self.con = self.create_connection() self.cur = self.con.cursor() if not self...
50
26.16
110
15
293
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_289962f1a7b8e04d_8df95991", "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...
8
true
[ "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" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 31, 31, 34, 34, 42, 42, 48, 48 ]
[ 31, 31, 34, 34, 42, 42, 48, 48 ]
[ 9, 9, 9, 9, 9, 9, 9, 9 ]
[ 43, 43, 111, 111, 65, 65, 32, 32 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "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, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
SQLiteDB.py
/SQLiteDB/SQLiteDB.py
akahard2dj/CandleMap
MIT
2024-11-18T21:01:13.646264+00:00
1,456,156,423,000
fbca983ccf7572ac2fb1a05b397a571e5c5e8ea2
3
{ "blob_id": "fbca983ccf7572ac2fb1a05b397a571e5c5e8ea2", "branch_name": "refs/heads/master", "committer_date": 1456156423000, "content_id": "c6c45d3050a981822fd9291e7cd6ff911cbe0d10", "detected_licenses": [ "MIT" ], "directory_id": "3f7db59e8548782b12d6765d78142e7ee13b2889", "extension": "py", "fi...
2.6875
stackv2
#!/usr/bin/env python2 # Author: Jakub Cislo # http://cislo.net.pl # jakub@cislo.net.pl # License: MIT # Copyright (C) 2016 import utils from neuralnetwork import NeuralNetworkModel import autograd.numpy as np import pickle import matplotlib.pyplot as plt from utils import plt_image TRAINING_IMAGES_PATH = 'mnistset/t...
88
29.72
89
13
778
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fd51cea0866573f4_9d7df6bb", "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" ]
[ 53, 60 ]
[ 53, 60 ]
[ 9, 15 ]
[ 28, 29 ]
[ "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.py
/mnist.py
Cubix651/neuralnetwork
MIT
2024-11-18T21:01:19.442279+00:00
1,578,327,268,000
9e0f8838e8dd45effc0945fb0ffa2e90ec6c0911
2
{ "blob_id": "9e0f8838e8dd45effc0945fb0ffa2e90ec6c0911", "branch_name": "refs/heads/master", "committer_date": 1578327268000, "content_id": "aec0998a921f6a5647b12d0f0ca8fa610b10fa39", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "15922193566e815b79f3faf46a2cf1a027aadda8", "extension": "p...
2.375
stackv2
#!/usr/bin/env python """ BobSlide ======== :copyright: (c) 2014 by Kozea and contributors. :license: BSD, see LICENSE for more details. """ import os import shutil import tempfile from html.parser import HTMLParser from operator import itemgetter from flask import (Flask, Markup, abort, flash, redirect, render_te...
394
36.22
79
23
3,222
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b18b8649e18f859b_4f9f9ebd", "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...
39
true
[ "CWE-79", "CWE-79", "CWE-79", "CWE-79", "CWE-79", "CWE-96", "CWE-79", "CWE-79", "CWE-96", "CWE-79", "CWE-79", "CWE-96", "CWE-79", "CWE-79", "CWE-96", "CWE-79", "CWE-93", "CWE-93", "CWE-93", "CWE-79", "CWE-79" ]
[ "rules.python.django.security.injection.raw-html-format", "rules.python.flask.security.injection.raw-html-format", "rules.python.django.security.injection.raw-html-format", "rules.python.flask.security.injection.raw-html-format", "rules.python.flask.security.xss.audit.explicit-unescape-with-markup", "rule...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 162, 162, 165, 165, 281, 281, 282, 302, 302, 303, 309, 309, 310, 312, 312, 313, 369, 372, 374, 377, 377 ]
[ 162, 162, 166, 166, 284, 284, 282, 304, 304, 303, 310, 310, 310, 315, 315, 313, 369, 372, 374, 378, 378 ]
[ 22, 22, 17, 17, 23, 30, 17, 32, 39, 21, 32, 39, 21, 13, 20, 9, 13, 13, 13, 17, 17 ]
[ 61, 61, 46, 46, 40, 39, 34, 48, 47, 38, 65, 64, 38, 20, 19, 23, 47, 42, 45, 63, 63 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting...
[ "Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. To be sure this is safe, check that ...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "HIGH", "MEDIUM", "HIGH", "MEDIUM", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "MEDIUM", "MEDIUM", "MEDIUM", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
bobslide.py
/bobslide.py
Kozea/bobslide
BSD-3-Clause
2024-11-18T21:01:21.692240+00:00
1,529,834,810,000
544e59488b5c3437b228e7a91d7ce00c8813ebef
3
{ "blob_id": "544e59488b5c3437b228e7a91d7ce00c8813ebef", "branch_name": "refs/heads/master", "committer_date": 1529834810000, "content_id": "e397b977b69f5d6e75d8f9198cb5a7df8bcd9423", "detected_licenses": [ "MIT" ], "directory_id": "8594c8f97b7722ec45c77ca7e8364f3557dff0c3", "extension": "py", "fi...
2.78125
stackv2
from __future__ import absolute_import import cv2 import matplotlib.pyplot as plt import pickle class OutputSaver: def __init__(self): self.dist_pickle = [] self.images = {} def add_calibration(self, mtx, dist): self.dist_pickle = {'mtx':mtx, 'dist':dist} def save_images(sel...
36
27.58
78
16
247
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6888a844cb27887b_cef49840", "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" ]
[ 22 ]
[ 22 ]
[ 9 ]
[ 60 ]
[ "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" ]
output_saver.py
/src/output_saver.py
lauryndbrown/AdvancedLaneFinding
MIT
2024-11-18T21:01:23.659634+00:00
1,610,318,224,000
7868ec595860b12f0a7ab9033a43d7735a5fb17a
2
{ "blob_id": "7868ec595860b12f0a7ab9033a43d7735a5fb17a", "branch_name": "refs/heads/master", "committer_date": 1610318224000, "content_id": "b09504daf68e1936d8834e3c2dbacf2ee04b9d96", "detected_licenses": [ "MIT" ], "directory_id": "9835a06da49950fded7147f44265b5d7b3302986", "extension": "py", "fi...
2.3125
stackv2
import paho.mqtt.client as mqtt from dotenv import load_dotenv import os from urllib.parse import urlparse import logging import subprocess logging.basicConfig(level=logging.DEBUG) log = logging.getLogger() load_dotenv() service_name = "mqtt-usb-power-switch" device_name = os.environ['BALENA_DEVICE_NAME_AT_INIT'] mq...
101
27.76
81
14
688
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_edeb23abf200e20c_6295ffdd", "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.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 43, 56 ]
[ 43, 56 ]
[ 11, 11 ]
[ 42, 43 ]
[ "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" ]
subscribe.py
/subscribe.py
toschoch/docker-rpi-mqtt-usb-power-switch
MIT
2024-11-18T21:01:35.086406+00:00
1,630,473,769,000
1541e9fcb277d582a93fdb7a45500cddf281e2ee
2
{ "blob_id": "1541e9fcb277d582a93fdb7a45500cddf281e2ee", "branch_name": "refs/heads/master", "committer_date": 1630473769000, "content_id": "a4b926789a74e35600b7835ee1b9e7e580e8e5f3", "detected_licenses": [ "MIT" ], "directory_id": "1d92253efc98d03bf0f42ed5981428bab918e2dd", "extension": "py", "fi...
2.4375
stackv2
from Node3D.base.node import GeometryNode import numpy as np class GetAttributeData(GeometryNode): __identifier__ = 'Attribute' NODE_NAME = 'Get_Attribute_Data' def __init__(self): super(GetAttributeData, self).__init__(False) self.create_property('out data', None) self.add_input(...
304
37.5
120
19
2,494
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_7ce2b90efc32739d_31068e45", "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 ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 206, 207 ]
[ 206, 207 ]
[ 25, 33 ]
[ 36, 52 ]
[ "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 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
attribute_nodes.py
/Node3D/nodes/attribute_nodes.py
xzllxls/Node3D
MIT
2024-11-18T21:01:35.323592+00:00
1,555,636,127,000
4860f050f900a7ad8d83c3838367971d3de38c92
3
{ "blob_id": "4860f050f900a7ad8d83c3838367971d3de38c92", "branch_name": "refs/heads/master", "committer_date": 1555636127000, "content_id": "f5f2ddfe7caf880eb1be8ee997975b018b6009cc", "detected_licenses": [ "Apache-2.0" ], "directory_id": "99889b2f19906098116d40572f959a656848ce16", "extension": "py"...
2.6875
stackv2
# -*- coding:utf-8 -*- import face_recognition import cv2 import pickle model_path = "./../../c4/knn_resource/model/trained_knn_model.clf" knn_clf = None with open(model_path, 'rb') as f: knn_clf = pickle.load(f) print(knn_clf) def predict(frame,distance_threshold=0.45): # Load a trained KNN model (if ...
66
31.71
144
13
590
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e83d73ff8684d8d2_df9670e1", "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" ]
[ 10 ]
[ 10 ]
[ 15 ]
[ 29 ]
[ "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" ]
face_recogintiond_dlib.py
/pi/clound/face_recogintiond_dlib.py
lawhw/opencv_tf_py
Apache-2.0
2024-11-18T21:25:24.465743+00:00
1,632,401,151,000
a421a54d2785dd92775c0daac1578f5e1fdd5d97
3
{ "blob_id": "a421a54d2785dd92775c0daac1578f5e1fdd5d97", "branch_name": "refs/heads/master", "committer_date": 1632401151000, "content_id": "cbd4dc5e3c0003a58e84f5d01041ae61f3bd0742", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fe728b95a692c62c257e7743a1531eb9ccdd3eb4", "extension": "py"...
2.703125
stackv2
#!/usr/bin/python # Compatibility changes on slsXML.py file import xml.dom.minidom import datetime import sys from pytz import timezone class xml_doc: def __init__(self): # print "Init of object" # init object data, create base common doc. header, get current timestamp self.info = {} ...
116
42.09
108
16
1,101
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_5303eb3e35388275_573e2d20", "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" ]
[ 3 ]
[ 3 ]
[ 1 ]
[ 23 ]
[ "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" ]
kibanaXML.py
/harvester_service_monitoring/libs/kibanaXML.py
PanDAWMS/harvester_monitoring
Apache-2.0
2024-11-18T21:25:28.167983+00:00
1,535,424,066,000
38fab0bf74d6016f28613e406e354c17b2d3c515
2
{ "blob_id": "38fab0bf74d6016f28613e406e354c17b2d3c515", "branch_name": "refs/heads/master", "committer_date": 1535424066000, "content_id": "e8558fb6a5c33ac88f6adcc6c87376fb894f1eca", "detected_licenses": [ "MIT" ], "directory_id": "874271b0c0d270eb53ae2bc288df71e795992cf5", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/env python docstring=''' ./deepcontact/main_only_ccmpred.py ./tmp_pickle/feature.pkl ./tmp_output/prediction.pkl use ./tmp_pickle/feature.pkl as input feature, generate python pickle format contact prediction ./tmp_output/prediction.pkl ./deepcontact/main_only_ccmpred.py ./tmp_pickle/feature.pkl ./t...
57
42.47
107
15
585
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_d06cf90e0f848483_279c6215", "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-cPickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 28, 47 ]
[ 28, 47 ]
[ 50, 13 ]
[ 67, 43 ]
[ "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" ]
main_only_ccmpred.py
/deepcontact/main_only_ccmpred.py
kad-ecoli/deepcontact
MIT
2024-11-18T21:25:28.230076+00:00
1,556,574,986,000
4cc35933afb17f5507d7d7605670dc31fada2875
3
{ "blob_id": "4cc35933afb17f5507d7d7605670dc31fada2875", "branch_name": "refs/heads/master", "committer_date": 1556574986000, "content_id": "bc46a8ad99aedba28ae6c48b30f51b702f020fa7", "detected_licenses": [ "MIT" ], "directory_id": "a07772c1a131998bd9f1f0726a4afbaa8c695f2c", "extension": "py", "fi...
2.578125
stackv2
# -*- coding: utf-8 -*- ''' This model uses build deep features learned from the trained model known as Inception-V3 that was trained in the ImageNet competition. You can find the model here: https://github.com/tensorflow/models/tree/master/tutorials/image/imagenet How to use: model = CBIRWithDeepFeatures() # only do...
108
40.15
140
20
1,022
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_8241231682105a33_2010b895", "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-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 35, 36 ]
[ 35, 36 ]
[ 25, 23 ]
[ 60, 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" ]
CBIRWithDeepFeatures.py
/machineLearning/contentBasedRecommentdation/CBIRWithDeepFeatures.py
guilhermeKodama/Closetinn
MIT
2024-11-18T21:25:28.432609+00:00
1,551,231,625,000
dd3e4fddf036721825cc2af8aef3317a3e8ffd42
2
{ "blob_id": "dd3e4fddf036721825cc2af8aef3317a3e8ffd42", "branch_name": "refs/heads/master", "committer_date": 1551231625000, "content_id": "ae542f7ed3e4bbd6f64f77616f8111db996a8e91", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4125111fde4e51682050f2408736f73c3ab33708", "extension": "py"...
2.328125
stackv2
from __future__ import absolute_import import os import io import json import sys import logging import argparse from subprocess import Popen, PIPE from src.namespace_utils import Bunch, load_namespace, save_namespace def bool_flag(s): """ Parse boolean arguments from the command line. ..note:: ...
139
31.58
74
18
1,069
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0395c887918dc82f_8ab92e28", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
4
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" ]
[ 93, 101 ]
[ 94, 101 ]
[ 15, 15 ]
[ 70, 66 ]
[ "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()'.", "Detected subprocess funct...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
utils.py
/src/utils.py
codedecde/BiMPM
Apache-2.0
2024-11-18T21:25:34.813238+00:00
1,542,577,952,000
1545bb1971b0e2bc75d04d6a3c5ab53523976230
2
{ "blob_id": "1545bb1971b0e2bc75d04d6a3c5ab53523976230", "branch_name": "refs/heads/master", "committer_date": 1542577952000, "content_id": "a435b942757febe853453417666660b938c37239", "detected_licenses": [ "MIT" ], "directory_id": "10d62e4f42ef2178c39e27852414e53d42661b06", "extension": "py", "fi...
2.3125
stackv2
import uuid from flask import Flask, Markup, Response, redirect, render_template, request import markdown from config import set_app_config from utils import S3Interface, validate_form_data app = Flask(__name__) set_app_config(app) s3 = S3Interface(app) @app.route('/', defaults={'uuid': None}, methods=['GET']) @...
46
26.09
77
19
289
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_da192abc9257aef0_3ec363d6", "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-79" ]
[ "rules.python.flask.security.xss.audit.explicit-unescape-with-markup" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 21 ]
[ 21 ]
[ 22 ]
[ 58 ]
[ "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" ]
index.py
/index.py
scottx611x/anchor-aid
MIT
2024-11-18T21:25:38.143487+00:00
1,526,087,490,000
45c60e9dea7539bca866868f0c5ea3cd111c98bd
3
{ "blob_id": "45c60e9dea7539bca866868f0c5ea3cd111c98bd", "branch_name": "refs/heads/master", "committer_date": 1526087490000, "content_id": "3d9a3e775d1703d2244c2b8101c6162626bb1ab7", "detected_licenses": [ "MIT" ], "directory_id": "661f36d249f430e6e123e378c7b367b936a22c1b", "extension": "py", "fi...
3.28125
stackv2
import pickle from collections import defaultdict class AveragedPerceptron(object): def __init__(self, classes=None, lr=1.0): super().__init__() # weights a dict of dict, weights[feature][class] = float self.weights = defaultdict(lambda: defaultdict(float)) # Set of all the possib...
85
38.49
105
16
733
python
[{"finding_id": "semgrep_rules.python.lang.correctness.return-in-init_2353079f161c47ca_0d34e298", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.return-in-init", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "`return` should never appear inside a class __init__...
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" ]
[ 79, 84 ]
[ 79, 84 ]
[ 9, 40 ]
[ 74, 69 ]
[ "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" ]
perceptron.py
/sequence_tagging/perceptron.py
blester125/sequence_tagging
MIT
2024-11-18T21:51:15.366766+00:00
1,603,958,079,000
4a874587265aaea3f2d34c98b8bcdd0c7a46adc6
3
{ "blob_id": "4a874587265aaea3f2d34c98b8bcdd0c7a46adc6", "branch_name": "refs/heads/master", "committer_date": 1603958079000, "content_id": "8a996e94004795e3dfbd5e48fefdc91ada2449e1", "detected_licenses": [ "MIT" ], "directory_id": "630cb7195652a724e7d798979a8d9f8a7fc1330b", "extension": "py", "fi...
2.6875
stackv2
import cv2 import numpy as np import subprocess import os from tqdm import tqdm import wave # configure for encryption if not os.path.exists("enc"): os.mkdir("enc") if not os.path.exists("out"): os.mkdir("out") # path of cover video and secret video cover_path = "v1.mp4" secret_path = "v2.mp4" # counting the frame...
140
32.22
117
18
1,355
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5af1b5ee6dd8c4c6_cda0bd8f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
11
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.subprocess-shell-true", "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...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 56, 56, 57, 57, 137, 137 ]
[ 56, 56, 57, 57, 137, 137 ]
[ 1, 86, 1, 87, 1, 33 ]
[ 91, 90, 92, 91, 38, 37 ]
[ "A01:2017 - Injection", "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()'.", "Found 'subprocess' functio...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
encrypt.py
/encrypt.py
langemyh/Video-Steganography
MIT
2024-11-18T21:51:16.862366+00:00
1,572,003,993,000
ab3f480faa97e9771ef78479a8930d52ea2fa235
3
{ "blob_id": "ab3f480faa97e9771ef78479a8930d52ea2fa235", "branch_name": "refs/heads/master", "committer_date": 1572003993000, "content_id": "a238b04c53a5a0c0a5c4918020f6a1e7290efa85", "detected_licenses": [ "MIT" ], "directory_id": "6af721cab68ae17179df8a428975c4e4b3623656", "extension": "py", "fi...
2.609375
stackv2
#!/usr/bin/env python # coding: utf-8 # # Santander Customer Transaction Prediction # In[49]: import pandas as pd import numpy as np import pickle from sklearn.metrics import mean_squared_error, roc_auc_score, roc_curve, confusion_matrix train_df = pd.read_csv("project/data/train_small.csv", header=None) test_df =...
49
31.98
136
10
424
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_79eca9b8014dd931_33843869", "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" ]
[ 48, 49 ]
[ 48, 49 ]
[ 1, 1 ]
[ 73, 79 ]
[ "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" ]
berild.py
/project/berild.py
JakobGM/machine-learning-course
MIT
2024-11-18T21:51:17.609629+00:00
1,571,545,296,000
6b292cb1dbfac0ab55e1586547f3bd7fef43ce83
3
{ "blob_id": "6b292cb1dbfac0ab55e1586547f3bd7fef43ce83", "branch_name": "refs/heads/master", "committer_date": 1571545296000, "content_id": "9c91dedb545e46f6a6495a6a9b3ffa9b50a3a2de", "detected_licenses": [ "MIT" ], "directory_id": "c6266592800950ab24f6c4be83ee2d2f4e816cc2", "extension": "py", "fi...
2.828125
stackv2
import os import sqlite3 import time ##DB 読み込み USER_ID_DB_FILE_NAME = os.path.join(os.path.dirname(__file__), "user.db") TALK_DB_FILE = os.path.join(os.path.dirname(__file__), "talk.db") # print(USER_ID_DB_FILE_NAME,TALK_DB_FILE) ## make file mkflg = not (os.path.exists(USER_ID_DB_FILE_NAME)) class DB: ## Load ...
72
32.92
115
12
612
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_d6f67a6cdaa42063_819d31f9", "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...
4
true
[ "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" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 50, 50, 59, 59 ]
[ 50, 50, 59, 59 ]
[ 9, 9, 9, 9 ]
[ 92, 92, 33, 33 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "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, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
DB_apps.py
/HACKSON_LIB/Line_Bot_Server/DataBase/DB_apps.py
carlos-paniagua/KB_1903
MIT
2024-11-18T21:51:20.254849+00:00
1,509,848,485,000
16e2e6f8d63173e504b129100f927c5c3169d548
2
{ "blob_id": "16e2e6f8d63173e504b129100f927c5c3169d548", "branch_name": "refs/heads/master", "committer_date": 1509848485000, "content_id": "d90bc5f226e521a32ba2424efe5cd5f795172249", "detected_licenses": [ "Unlicense" ], "directory_id": "f4a96f160c41e0d1b0507c34ba7f0f981dc92376", "extension": "py",...
2.328125
stackv2
#!/usr/bin/python3 # Created by yosh778 PKG2ZIP='./pkg2zip' import os, sys import subprocess from urllib.request import urlopen DBURL='https://docs.google.com/spreadsheets/d/18PTwQP7mlwZH1smpycHsxbEwpJnT8IwFP7YZWQT7ZSs/export?format=tsv&id=18PTwQP7mlwZH1smpycHsxbEwpJnT8IwFP7YZWQT7ZSs&gid=' GAMES='1180017671' DLCS='7...
112
18.02
162
15
775
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ce7d175b56eed71d_a6d93bae", "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-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 106, 106 ]
[ 106, 106 ]
[ 2, 25 ]
[ 118, 85 ]
[ "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", "MEDIUM" ]
[ "HIGH", "MEDIUM" ]
getdlc.py
/getdlc.py
yosh778/NoPayStationGetDLCs
Unlicense
2024-11-18T21:51:20.656534+00:00
1,693,416,671,000
631ede0b77bc31c33e333a30a0e7513fa0086999
3
{ "blob_id": "631ede0b77bc31c33e333a30a0e7513fa0086999", "branch_name": "refs/heads/master", "committer_date": 1693416671000, "content_id": "18f556f065e6b3693e39b1b87631eca4437acfce", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "2337351b228818e41be3002bd38f68f77c2aa074", "extension": "p...
2.9375
stackv2
# --------------------------------------------------------------------- # Various GIS helpers # --------------------------------------------------------------------- # Copyright (C) 2007-2018 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # Python modu...
26
41.88
163
10
402
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_af5264a0c1e3d98c_3a71ef52", "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" ]
[ 9 ]
[ 9 ]
[ 1 ]
[ 23 ]
[ "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" ]
osm.py
/gis/utils/osm.py
nocproject/noc
BSD-3-Clause
2024-11-18T21:51:20.878228+00:00
1,533,021,524,000
4a6117690c7f56cdfa0c37344d105e6b093c1c57
3
{ "blob_id": "4a6117690c7f56cdfa0c37344d105e6b093c1c57", "branch_name": "refs/heads/master", "committer_date": 1533021524000, "content_id": "0994c049f43ee0e523fecc941e5078d14c7f327b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2b545a2337f9886d5bf8ad71993cb6aa0d3bb010", "extension": "py"...
2.546875
stackv2
# -*- coding: utf-8 -*- import subprocess from multiprocessing import Pool import itertools import os ''' このプログラムは実行スクリプトと同じディレクトリに入れてください. 実行されるコマンドは java SCRIPT USERNUM REGULARIZE RANK STEPSIZE です. 標準出は result_USERNUM_REGULARIZE_RANK_STEPSIZE.txt に出力されます.気に入らない場合は書き換えてください. ''' filter_width = [2, 4, 5, 8] filter_c...
50
21.28
139
17
420
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_df7bba3a6e368391_49d5a438", "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" ]
[ 39 ]
[ 39 ]
[ 13 ]
[ 140 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
executer.py
/executer.py
Vampsj/MyKWS
Apache-2.0
2024-11-18T21:51:25.086238+00:00
1,601,160,360,000
5684ef26b1f6aeaae18e60f8ec929222cb83a3e8
3
{ "blob_id": "5684ef26b1f6aeaae18e60f8ec929222cb83a3e8", "branch_name": "refs/heads/master", "committer_date": 1601160360000, "content_id": "9e2b32005b506cab2cfe217385716365778560e1", "detected_licenses": [ "MIT" ], "directory_id": "779400db17b65996a86050515ad0cc3b3362992c", "extension": "py", "fi...
3.078125
stackv2
from functools import partial # ===Executors=== def exec_py_func(actions, **kw): changes = [] for act in actions: func = act.render_py() change = func(**kw) changes.append(change) res = sum(changes) return res def exec_bash_shell(actions, **kw): import os changes = [...
109
26.07
72
12
698
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_bdfd60c32752d970_344332ce", "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" ]
[ 21 ]
[ 21 ]
[ 18 ]
[ 32 ]
[ "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" ]
dircmds.py
/apps/dictdir/dictdir/dircmds.py
ydzvulon/pydocflow
MIT
2024-11-18T21:51:25.680640+00:00
1,599,053,689,000
12de02688b52a3ca194b8b47dfea594faa1301a6
3
{ "blob_id": "12de02688b52a3ca194b8b47dfea594faa1301a6", "branch_name": "refs/heads/master", "committer_date": 1599053689000, "content_id": "868f1acceb933ad42fd5306f40758bb6da265528", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5fe72bb13baf3649058ebe11aa86ad4fc56c69ed", "extension": "py"...
2.96875
stackv2
# coding: utf-8 import urllib.parse import urllib.request import xml.etree.ElementTree as ET class Yahoo(object): response = None def __init__(self, appid=None): self.params = { "appid": appid } # APIを叩く def request(self, url, **kwargs): self.params.update(kwar...
133
21.69
78
15
727
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_7887b97a609d8e47_54d495ed", "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" ]
[ 6 ]
[ 6 ]
[ 1 ]
[ 35 ]
[ "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" ]
snippet.py
/hard-gists/7ef2ef722e4520fba09c9f4d83ecc453/snippet.py
dockerizeme/dockerizeme
Apache-2.0
2024-11-18T21:51:34.290558+00:00
1,609,875,680,000
53c89a4ad2c7bbce23160467856f7595f9812017
3
{ "blob_id": "53c89a4ad2c7bbce23160467856f7595f9812017", "branch_name": "refs/heads/master", "committer_date": 1609875680000, "content_id": "e0b40d6c363c9fc35aaa635f56ee77ad9df6e9de", "detected_licenses": [ "MIT" ], "directory_id": "de40e861acf4b4957910838f41c4f01526246ce5", "extension": "py", "fi...
3.171875
stackv2
#!/usr/bin/env python3 import sys, os, time, math from subprocess import Popen, PIPE class Module: def __init__(self, name): self.name = name self.last = self.out() self.active = False self.alive = 0 self.order = 0 def out(self): return Popen(self.name.split(...
105
22.56
94
19
683
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_e5ef20626aba01e2_d7d2a26a", "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" ]
[ 16 ]
[ 16 ]
[ 16 ]
[ 53 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
xbar.py
/examples/xbar/xbar.py
ForumPlayer/xtext
MIT
2024-11-18T21:51:35.198976+00:00
1,689,092,615,000
0197c35527b52bfc128a5fe99a31eec37587d462
3
{ "blob_id": "0197c35527b52bfc128a5fe99a31eec37587d462", "branch_name": "refs/heads/master", "committer_date": 1689092615000, "content_id": "1ba214f1693ba3a4e9c8b0351217bc484946add5", "detected_licenses": [ "MIT" ], "directory_id": "b465dac933d33c997d3b1f9b0f377b5b8831bf4c", "extension": "py", "fi...
2.625
stackv2
"""Third party programs configuration for MoviePy.""" import os import subprocess as sp from pathlib import Path from moviepy.tools import cross_platform_popen_params if os.name == "nt": import winreg as wr try: from dotenv import find_dotenv, load_dotenv DOTENV = find_dotenv() load_dotenv(DOTENV)...
124
32.48
88
23
1,055
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b65d1ad61862ac1c_e940ba44", "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-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 33, 75, 78 ]
[ 33, 80, 78 ]
[ 16, 42, 31 ]
[ 45, 22, 35 ]
[ "A01:2017 - Injection", "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()'.", "Detected subprocess funct...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "HIGH" ]
[ "HIGH", "HIGH", "LOW" ]
config.py
/moviepy/config.py
Zulko/moviepy
MIT
2024-11-18T21:51:36.746221+00:00
1,506,910,774,000
82773b262323cf3e1a0b183a03fe6d8089c60a57
2
{ "blob_id": "82773b262323cf3e1a0b183a03fe6d8089c60a57", "branch_name": "refs/heads/master", "committer_date": 1506910774000, "content_id": "38e0e0f9ea3e05c71107c24d809bb13b9a53e2f2", "detected_licenses": [ "MIT" ], "directory_id": "e2f284493157e709c7a416ffa0a65443e0651ad0", "extension": "py", "fi...
2.40625
stackv2
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import copy from collections import OrderedDict from hashlib import md5 from django.db.models.query import QuerySet from django.utils.safestring import mark_safe from table.columns import Column, BoundColumn, SequenceColumn from table.widge...
234
37
109
17
1,883
python
[{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_3f77f214af0a94e0_a8f3fb0b", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-mark-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "'mark_safe()' is used to mark a string as \"...
5
true
[ "CWE-79", "CWE-79", "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.avoid-mark-safe", "rules.python.django.security.audit.avoid-mark-safe", "rules.python.django.security.audit.avoid-mark-safe", "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 124, 142, 146, 149 ]
[ 124, 143, 147, 150 ]
[ 16, 22, 28, 28 ]
[ 30, 81, 87, 87 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escaping and could therefore subject the content to XSS attacks. Use 'django.utils.html.format_html()' to build HTML for rendering instead.", "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escapi...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
tables.py
/table/tables.py
vishalol/django-datatable
MIT
2024-11-18T21:51:37.914419+00:00
1,587,397,877,000
8f5b3df6c25d4dd33c4d338c935771ef248e2a02
3
{ "blob_id": "8f5b3df6c25d4dd33c4d338c935771ef248e2a02", "branch_name": "refs/heads/master", "committer_date": 1587397877000, "content_id": "707fb40359b95968cd0aae285d22c9f002fa8684", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e6179d02c2aca2a7420fd9f8449fdd54b2c45ca6", "extension": "py"...
2.96875
stackv2
import pickle import os import face_recognition import numpy as np dir = os.getcwd() with open('encoded_people.pickle', 'rb') as filename: people = pickle.load(filename) print("Put the photos of new person in a folder. Set the name of the folder as the person's name. Drop the folder to People Folder.") newPersonN...
47
33.87
133
11
405
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ed3e158e5d647601_aa093f8a", "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" ]
[ 8, 47 ]
[ 8, 47 ]
[ 14, 5 ]
[ 35, 34 ]
[ "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" ]
Add new person to trained data.py
/Add new person to trained data.py
AlirezaParchami/Multiple-Face-Recognition-in-Videos
Apache-2.0
2024-11-18T21:51:38.271330+00:00
1,684,770,190,000
7840b7114e6b8143f9268d3f5787b2984bd8bfc1
3
{ "blob_id": "7840b7114e6b8143f9268d3f5787b2984bd8bfc1", "branch_name": "refs/heads/master", "committer_date": 1684770190000, "content_id": "6f7419a5bd5d58ec7b9f22ab40b40ba63d1d698f", "detected_licenses": [ "MIT" ], "directory_id": "0e1484f780358debd8b9d5f9482753e7acf8e543", "extension": "py", "fi...
2.78125
stackv2
""" #=============================================================================== # Plot potential(z) # #=============================================================================== For each <simulation> in <research>, created for <folder>, the paral...
291
43.56
168
20
3,272
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_008c9004343990cf_5dc2cf0b", "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" ]
[ 213 ]
[ 213 ]
[ 19 ]
[ 106 ]
[ "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" ]
potential_vs_z.py
/stellapy/plot/linear/potential_vs_z.py
stellaGK/stella
MIT
2024-11-18T21:51:39.880651+00:00
1,522,152,287,000
1ca56293bbff1cabd8f54e9d248a826285ba8e92
3
{ "blob_id": "1ca56293bbff1cabd8f54e9d248a826285ba8e92", "branch_name": "refs/heads/master", "committer_date": 1522152287000, "content_id": "209bc1d7cbfe03c68496f517f226127bdfa0ee60", "detected_licenses": [ "MIT" ], "directory_id": "f4f1c9b8c1307ccc36d0162342157b786208c053", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python3 import subprocess import contextlib import logging import os import msbuild import datetime import PIL import multiprocessing from concurrent.futures import ThreadPoolExecutor from PIL import Image from pathlib import Path logging.basicConfig(level=logging.INFO) @contextlib.contextmanager de...
67
29.07
125
18
482
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_df168a9001127f95_00d53032", "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" ]
[ 62 ]
[ 62 ]
[ 9 ]
[ 35 ]
[ "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()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
video.py
/scripts/tmp/video.py
NickVoron/toolchain
MIT
2024-11-18T22:00:15.851226+00:00
1,631,019,640,000
d3d046dbe3268007eb157d9942a9030137711365
2
{ "blob_id": "d3d046dbe3268007eb157d9942a9030137711365", "branch_name": "refs/heads/master", "committer_date": 1631019640000, "content_id": "4965b4f3c90a08257887163e2d3208af3c3a7bd9", "detected_licenses": [ "MIT" ], "directory_id": "0eba12e0a5cd2cc80d36dadd85e7f3a25c2a052b", "extension": "py", "fi...
2.453125
stackv2
import argparse import torch import os import random import numpy as np import pickle import pandas as pd import json import copy from model import Multi2OIE, BERTBiLSTM from transformers import get_linear_schedule_with_warmup, AdamW def set_seed(seed): random.seed(seed) np.random.seed(seed) torch.manual_...
153
30.52
100
16
1,133
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_45bdd9e6cd9a18af_ffbb3ff1", "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" ]
[ 76, 81 ]
[ 76, 81 ]
[ 9, 16 ]
[ 29, 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" ]
utils.py
/utils/utils.py
YoursIvan/Multi2OIE
MIT
2024-11-18T22:00:22.487881+00:00
1,620,756,175,000
e6907db3aef6d875be5665c5f455d0bbb966bbe4
2
{ "blob_id": "e6907db3aef6d875be5665c5f455d0bbb966bbe4", "branch_name": "refs/heads/master", "committer_date": 1620756175000, "content_id": "9b8f2a78e7bb4c85a3283e35e397a150816b4168", "detected_licenses": [ "MIT" ], "directory_id": "7f4ae10be4174d861604f295b78947809932e6f7", "extension": "py", "fi...
2.46875
stackv2
# @author: Reno Bowen # Gunnar Schaefer """ SCU is a module that wraps the findscu and movescu commands, which are part of DCMTK. Usage involves the instantiation of an SCU object, which maintains knowledge of the caller and callee (data requester and data source, respectively). Specific Query objects are...
154
33.56
171
16
1,345
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_89a9293608aa6424_edb95bf9", "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" ]
[ 51, 66 ]
[ 51, 66 ]
[ 22, 22 ]
[ 89, 89 ]
[ "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" ]
scu.py
/nimsproc/scu.py
cni/nims
MIT
2024-11-18T22:00:22.539694+00:00
1,620,977,357,000
8793a32194ed8525fa1a121548ebb6dbf90e2977
2
{ "blob_id": "8793a32194ed8525fa1a121548ebb6dbf90e2977", "branch_name": "refs/heads/main", "committer_date": 1620977357000, "content_id": "dba48c1277996e532aa5eafee53d9b37cc107263", "detected_licenses": [ "MIT" ], "directory_id": "7f7ac5daa6102df4c7bc6a2a42e9cb8b377150ca", "extension": "py", "file...
2.390625
stackv2
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals __author__ = "Max Hahn-Klimroth, Tobias Kapetanopoulos" __copyright__ = "Copyright 2020, M. Hahn-Klimroth, T. Kapetanopoulos, J. Gübert, P. Dierkes" __credits__ = ["J. Gübert", "P. Dierkes"] __license__ = "MIT" _...
192
29.08
115
14
1,342
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6a9344c3744c6161_d6682c36", "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" ]
[ 175 ]
[ 175 ]
[ 9 ]
[ 41 ]
[ "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" ]
training_efficientnet.py
/mrcnn_based/training/training_efficientnet.py
Klimroth/Video-Action-Classifier-for-African-Ungulates-in-Zoos
MIT
2024-11-18T22:00:23.616404+00:00
1,436,819,200,000
55a8fd9e6cbda341f36840a778e45d2a318c474f
3
{ "blob_id": "55a8fd9e6cbda341f36840a778e45d2a318c474f", "branch_name": "refs/heads/master", "committer_date": 1436819200000, "content_id": "3af71ad3b80ccb6736fb4e1f8371bef37b4f03c8", "detected_licenses": [ "MIT" ], "directory_id": "fd05a200b8ddf94df1705f306e686ff4d8ae18aa", "extension": "py", "fi...
2.953125
stackv2
import xml.etree.ElementTree as ET from collections import namedtuple from .catalog import TDSCatalog from .http_util import BadQueryError, DataQuery, HTTPEndPoint, urljoin class RadarQuery(DataQuery): r'''An object representing a query to the THREDDS radar server. Expands on the queries supported by ``Data...
203
29.68
90
16
1,328
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2a3d58a8374c25d5_886ba93a", "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" ]
[ 1 ]
[ 1 ]
[ 1 ]
[ 35 ]
[ "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" ]
radarserver.py
/siphon/radarserver.py
wholmgren/siphon
MIT
2024-11-18T22:00:43.663860+00:00
1,461,837,828,000
5d916be251ee92584d6e533b8b89384c05679621
3
{ "blob_id": "5d916be251ee92584d6e533b8b89384c05679621", "branch_name": "refs/heads/master", "committer_date": 1461837828000, "content_id": "39152995a88c0ad8f43061045e4e060ae77f263c", "detected_licenses": [ "CC0-1.0" ], "directory_id": "031cb869cfbba404dcd39a30622b275e2395c2e9", "extension": "py", ...
2.921875
stackv2
# this script # annotation.py # version 0.0.1 # Author: Tran Minh Tri # Organization: CSI - CTRAD """ Usage: python3 annotation.py (in the directory of interest) Input file(s): *.toTranscriptome.out.bam Output file(s): step 1 (sort): *.toTranscriptome.sorted.bam step 2 (anno): *_toTranscriptome_cov.txt Tool(s):...
45
19.69
65
11
261
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_824030acd08f9123_c0493bbe", "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", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 38, 43 ]
[ 38, 43 ]
[ 2, 2 ]
[ 20, 20 ]
[ "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 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
genomecov_annotation.py
/projects/rna_seq/genomecov_annotation.py
tri-CSI/Bioinfo
CC0-1.0
2024-11-18T22:00:53.126133+00:00
1,522,682,757,000
930e3f9b00d20651bea3bd6927ac9646b62c5b44
3
{ "blob_id": "930e3f9b00d20651bea3bd6927ac9646b62c5b44", "branch_name": "refs/heads/master", "committer_date": 1522682757000, "content_id": "23bd879c42f161c6f0f3144d9eb65c9e0c2fa4ba", "detected_licenses": [ "MIT" ], "directory_id": "c76bb5eb930f16a1e7ed463ef24e3914c0219f9f", "extension": "py", "fi...
2.890625
stackv2
import pandas as pd import numpy as np from classifiers import * import pickle # Get classifier tuned previously using grid search def get_stacker_probs(model_func, X_train, y_train, X_test, split_index): # Split training data by index X_train_a = X_train[:split_index] X_train_b = X_train[split_index:] y_train_a ...
76
36.49
102
12
787
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_eae2f692f37211aa_3e0ae0ef", "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" ]
[ 76 ]
[ 76 ]
[ 2 ]
[ 78 ]
[ "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" ]
cnn_stacker.py
/EmotionCommotion/backend/classifiers/cnn_stacker.py
hmajid2301/EmotionCommotion
MIT
2024-11-18T22:00:56.219773+00:00
1,616,990,258,000
2b149a53be677e52cd522e61a083f730c2bc844e
3
{ "blob_id": "2b149a53be677e52cd522e61a083f730c2bc844e", "branch_name": "refs/heads/main", "committer_date": 1616990258000, "content_id": "e784cbe19c244a8d209a195d251f07d38a54e340", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a825119dd6339e132c0b6356e32e70f172a391ef", "extension": "py", ...
3.359375
stackv2
import math as mt import matplotlib.pyplot as mtp def Rungkuta(x,w): return (-2*(x**3))+(12*(x**2))-(20*x)+8.5 ### Exact Value### import sympy sympy.init_printing() y=sympy.Function('y') x=sympy.symbols('x') ode=sympy.Eq(y(x).diff(x),((-2*(x**3))+(12*(x**2))-(20*x)+8.5)) generalSolution=sympy.dsolve(ode,y(x)) value...
50
22.96
67
14
478
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_ece6ff7dd5ab9712_ca8b19cd", "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" ]
[ 24 ]
[ 24 ]
[ 3 ]
[ 37 ]
[ "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" ]
Runge-Kuttas Methode Orde 4.py
/Chapter 13/Runge-Kuttas Methode Orde 4.py
riqulaziz/Biomedical-Computing-Biomedical-Engineering-UNAIR
Apache-2.0
2024-11-18T22:00:56.459611+00:00
1,670,893,659,000
71709a2f57655e5fd53a731d749e158100029659
3
{ "blob_id": "71709a2f57655e5fd53a731d749e158100029659", "branch_name": "refs/heads/master", "committer_date": 1670893659000, "content_id": "75b6d8043e95b29a5b16a4f71d5b29f17acd1d28", "detected_licenses": [ "MIT" ], "directory_id": "323ad3131a03c5dada08a7fbe67ce4ee70c0efb7", "extension": "py", "fi...
3.296875
stackv2
import sys import argparse import math reset_report = None class Monkey: mod = 0 def __init__(self, num:int, items:[], inspect_func, divisible_by:int, monkey1:int, monkey2:int): self.num:int = num self.items:[] = items self.inspect_func = inspect_func self.divisible_by:int =...
161
25.21
110
18
1,007
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_71077132e9175e7a_454d27b2", "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" ]
[ 81 ]
[ 81 ]
[ 20 ]
[ 59 ]
[ "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" ]
day11.py
/2022/day11.py
smokeytheblair/adventcode
MIT
2024-11-18T22:01:06.865376+00:00
1,549,030,796,000
947237533a718ee2bf2ed5d2c17f2446220a821c
3
{ "blob_id": "947237533a718ee2bf2ed5d2c17f2446220a821c", "branch_name": "refs/heads/master", "committer_date": 1549030796000, "content_id": "1b982ad1ace019e40d9b752e61870b5983df684d", "detected_licenses": [ "MIT" ], "directory_id": "f86ab9cba9b346ecb6cb87c35d6a0dc01f9ec93a", "extension": "py", "fi...
2.71875
stackv2
import matplotlib.pyplot as plt import matplotlib.image as mpimg import cv2 import numpy as np import warper import utils import pickle class Lane: def __init__(self, img, is_left): self._img = img self.img_height = img.shape[0] self.img_width = img.shape[1] self.num_window = 9 ...
182
41.17
165
21
2,161
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_be8d3cf1c8608f00_5c01790f", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
7
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" ]
[ 93, 94 ]
[ 93, 94 ]
[ 22, 26 ]
[ 70, 75 ]
[ "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" ]
processing.py
/processing.py
kunato/CarND-Advanced-Lane-Lines
MIT
2024-11-18T22:01:07.106521+00:00
1,600,711,722,000
273182bfd513715dae6b2240c09a8e0b7188c5b2
2
{ "blob_id": "273182bfd513715dae6b2240c09a8e0b7188c5b2", "branch_name": "refs/heads/master", "committer_date": 1600711722000, "content_id": "08c13b00000637f786c22be24319ea4c78894019", "detected_licenses": [ "MIT" ], "directory_id": "61b7988b00085f575819116ff99232a154c55b43", "extension": "py", "fi...
2.375
stackv2
#!/usr/bin/python3 import os import re import hashlib from bs4 import BeautifulSoup import requests import shutil def updateFile(fileToUpdate, regPattern, newString): newContent = [] with open(fileToUpdate, 'r') as fHandle: for l in fHandle.readlines(): if re.search(regPattern, l): ...
80
25.39
85
15
602
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_4dd27f4e9531a214_4ff16bae", "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-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" ]
[ 53, 62, 69 ]
[ 53, 62, 69 ]
[ 1, 1, 5 ]
[ 86, 80, 52 ]
[ "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" ]
prepareToSubmitAUR.py
/prepareToSubmitAUR.py
troyp/gonhang
MIT
2024-11-18T22:01:08.297445+00:00
1,686,832,827,000
6f67570b67357639820bb0cabd06e02ff3031706
3
{ "blob_id": "6f67570b67357639820bb0cabd06e02ff3031706", "branch_name": "refs/heads/main", "committer_date": 1686832934000, "content_id": "2e44f1a6c2d68e8b42a6a76b07cafef1ec212037", "detected_licenses": [ "MIT" ], "directory_id": "25d59cc72e311f53b09aa85804d5b9e4f9ba9bea", "extension": "py", "file...
3.234375
stackv2
"""Find huge additions in Git history.""" __version__ = "0.1.3" import subprocess import sys import itertools from tqdm import tqdm import click from tabulate import tabulate def branch_exists(branch) -> bool: """Check if a branch exists.""" try: subprocess.check_output(f"git rev-parse --quiet --ve...
102
23.14
87
19
584
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_d748c3d2c94c54da_d371a625", "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.subprocess-shell-true", "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...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 17, 17, 25, 25, 33, 33 ]
[ 17, 17, 25, 25, 33, 33 ]
[ 9, 83, 9, 65, 9, 68 ]
[ 88, 87, 70, 69, 73, 72 ]
[ "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()'.", "Found 'subprocess'...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
huge.py
/huge.py
bast/huge
MIT
2024-11-18T22:01:09.194642+00:00
1,417,958,897,000
15e461e6824d0c9575d9d21729516384dfe7c45b
3
{ "blob_id": "15e461e6824d0c9575d9d21729516384dfe7c45b", "branch_name": "refs/heads/master", "committer_date": 1417958897000, "content_id": "c35089101859e9016a1eb005db44a28a0752c807", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "8047434d1c90cb677373b0397843562ef2c921e4", "extension": "p...
2.5625
stackv2
#! /usr/bin/env python """ Web demo (interactive web pages). Input: user screen name Output: tailored GT-JSON results """ import BaseHTTPServer import SimpleHTTPServer import xmlrpclib #import re FILE = 'geo.html' PORT = 9000 geolocator = xmlrpclib.ServerProxy("http://localhost:8999") #sname_validator = re.comiple("...
46
27.54
84
14
340
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_f9fab1f24b1cf54c_8768c7ac", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
1
true
[ "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 11 ]
[ 11 ]
[ 1 ]
[ 17 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
web_app.py
/web/web_app.py
tq010or/acl2013
BSD-2-Clause
2024-11-18T22:01:10.973055+00:00
1,629,386,396,000
1d7260c5613d464d688b04a70a7f0d1becd43bde
2
{ "blob_id": "1d7260c5613d464d688b04a70a7f0d1becd43bde", "branch_name": "refs/heads/main", "committer_date": 1629386396000, "content_id": "fd9944ffac7586275cbdb6c7c360a525ed12b7bc", "detected_licenses": [ "MIT" ], "directory_id": "2c3439d984e1f2ed351d2f8273bf41751a6e433d", "extension": "py", "file...
2.4375
stackv2
# Code taken from PointNetVLAD repo: https://github.com/mikacuy/pointnetvlad import pandas as pd import numpy as np import os import pandas as pd from sklearn.neighbors import KDTree import pickle import random BASE_DIR = os.path.dirname(os.path.abspath(__file__)) base_path = "../nuscenes_dataset/" runs_folder = "./...
67
37.37
123
16
627
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d32cb7bc492a72a5_dd2e6612", "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" ]
[ 45 ]
[ 45 ]
[ 9 ]
[ 71 ]
[ "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" ]
generate_training_tuples_baseline.py
/generating_queries/generate_training_tuples_baseline.py
ramdrop/minkloc3d_AutoPlace
MIT
2024-11-18T22:15:03.109437+00:00
1,633,736,906,000
fe68d4fa819ad21a4d156525a3fc96ef030f87c2
3
{ "blob_id": "fe68d4fa819ad21a4d156525a3fc96ef030f87c2", "branch_name": "refs/heads/master", "committer_date": 1633736906000, "content_id": "801111697ab85bdf9557bff624ad95fb0d06ef70", "detected_licenses": [ "MIT" ], "directory_id": "8fa22f78fdb6ea3a2ca0af6865ebed34ed005cc5", "extension": "py", "fi...
2.5625
stackv2
from django.shortcuts import render from django.http import HttpResponse, JsonResponse from rest_framework.parsers import JSONParser from django.views.decorators.http import require_POST,require_GET from django.views.decorators.csrf import csrf_exempt import datetime import pandas as pd from transactions.models import...
200
39.4
139
26
1,412
python
[{"finding_id": "semgrep_rules.python.django.security.audit.no-csrf-exempt_a8cb69a371895483_2fd30503", "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...
5
true
[ "CWE-352", "CWE-352", "CWE-352", "CWE-79", "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", "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.django.security.audit.no-csrf-exempt" ]
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 15, 29, 60, 89, 195 ]
[ 26, 57, 137, 89, 200 ]
[ 1, 1, 1, 20, 1 ]
[ 74, 60, 57, 123, 52 ]
[ "A01:2021 - Broken Access Control", "A01:2021 - Broken Access Control", "A01:2021 - Broken Access Control", "A07:2017 - Cross-Site Scripting (XSS)", "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, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
views.py
/fetch_coding_challenge/transactions/views.py
Jakearns95/fetch_challenge_kearns
MIT
2024-11-18T22:15:09.472877+00:00
1,458,587,446,000
75e7e33a57233886d55d9ffd268de9a24165b149
3
{ "blob_id": "75e7e33a57233886d55d9ffd268de9a24165b149", "branch_name": "refs/heads/master", "committer_date": 1458587446000, "content_id": "4ef4764f1be755ac4637f208838dc09a249651c6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0f72067064165a62ca81084743de2fbebd7b1242", "extension": "py"...
2.953125
stackv2
#! /usr/bin/env python import snmp_helper from pprint import pprint import pickle import email_helper def uptime(hsecs): ''' Accepts an integer as hundredths of seconds and converts it to seconds. ''' seconds = hsecs / 100 if seconds >= 60: minutes = seconds / 60 seconds = se...
112
26.79
141
14
885
python
[{"finding_id": "semgrep_rules.python.lang.correctness.file-object-redefined-before-close_a3cfed2d615765f8_ffa1c645", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.file-object-redefined-before-close", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected a...
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" ]
[ 76, 103 ]
[ 76, 103 ]
[ 17, 5 ]
[ 39, 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" ]
week3_lab1.py
/week3/week3_lab1.py
mdegasperis/pynet
Apache-2.0
2024-11-18T22:15:11.884361+00:00
1,595,359,125,000
800ad16439d00b520d29fe87c35c6023d48988aa
2
{ "blob_id": "800ad16439d00b520d29fe87c35c6023d48988aa", "branch_name": "refs/heads/master", "committer_date": 1595359125000, "content_id": "bda4038be2d6c0069c8fc971ade4ffdc69ee2845", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dde535d17e0431b4936a62313d4ffd3ca572ebed", "extension": "py"...
2.390625
stackv2
import os from abc import ABC, abstractmethod from copy import copy from distutils.dir_util import copy_tree from typing import List from pydub import AudioSegment from sklearn.model_selection import train_test_split import logging import pandas as pd logger = logging.root class AbstractDataTransformer(ABC): d...
111
41.95
119
17
1,184
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_f6fcb02871ed2fb5_fd039813", "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" ]
[ 88 ]
[ 88 ]
[ 9 ]
[ 85 ]
[ "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" ]
base_transformer.py
/espnet/dataset_utils/base_transformer.py
vladk17/Domain-specific-ESPnet
Apache-2.0
2024-11-18T22:26:00.063217+00:00
1,530,835,581,000
f257b4c03d4a6c0dedad49b240b10523788d780a
3
{ "blob_id": "f257b4c03d4a6c0dedad49b240b10523788d780a", "branch_name": "refs/heads/master", "committer_date": 1530835581000, "content_id": "c4e0a085d067eecd3665d8355f6d89d95f7741b6", "detected_licenses": [ "MIT" ], "directory_id": "58e02ae9792f2c21c02766a8c6ff1705e73bd8dc", "extension": "py", "fi...
3.4375
stackv2
#!/usr/bin/python # Importanto a biblioteca para comunicacao com o postgreSQL import psycopg2 import time import serial print "Teste" class Banco: con = None cur = None query = None def connection(self): try: print('Conectando com o banco de dados ...') self.con = psyco...
77
25.43
97
14
544
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_f89aad1fac94be3d_93f3f6a8", "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" ]
[ 26 ]
[ 26 ]
[ 9 ]
[ 88 ]
[ "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" ]
serialArduinoBanco.py
/docs/py/serialArduinoBanco.py
PauloCamargos/data-logger-arduino
MIT
2024-11-18T22:26:02.363306+00:00
1,541,017,419,000
a4af851026d1eff5d5aec4371c7c279a2cdd25d5
3
{ "blob_id": "a4af851026d1eff5d5aec4371c7c279a2cdd25d5", "branch_name": "refs/heads/master", "committer_date": 1541017419000, "content_id": "8909ecd5523d064452bb3f35f5930ed16b263224", "detected_licenses": [ "MIT" ], "directory_id": "e0b11a26c24f5016085e713617c0e46137bf0d35", "extension": "py", "fi...
2.578125
stackv2
##pytunes installer 0.6## import time import os import urllib.request def installer(): os.system("cls") print("Welcome to the PyTunes installer!") print("1} Install PyTunes Now") print("2} Update PyTunes") print("3} Uninstall PyTunes") print("4} Exit") install = input("") print("") ...
104
48.1
160
18
1,164
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_7030678c276811aa_50638f1a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value...
9
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit", "rules.python.lang.security.audit.dangerous-spawn-process-audit", "rules.python.lang.security.audit.dangerous-spawn-process-audit" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 39, 49, 77 ]
[ 39, 49, 77 ]
[ 13, 17, 17 ]
[ 39, 49, 49 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Found dynamic content when spawning a process. This is dangerous if external data can reach this functio...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
PyTunesInstaller.py
/PyTunesInstaller.py
SimLoads/PyTunes.py
MIT
2024-11-18T22:26:03.560661+00:00
1,536,674,321,000
f2c1db2b320a597d9607d1164fda53ef4189abb6
3
{ "blob_id": "f2c1db2b320a597d9607d1164fda53ef4189abb6", "branch_name": "refs/heads/master", "committer_date": 1536674321000, "content_id": "ddcd8779d3aafcff59cf6bd003bbe9008f33cf48", "detected_licenses": [ "MIT" ], "directory_id": "907f09b46536aafc79d45a10d7a88a74f93c8fea", "extension": "py", "fi...
2.609375
stackv2
import operator import pandas as pd import numpy as np from numpy import ma from scipy.misc import imresize import scipy.ndimage as ndimage from skimage.morphology import disk, dilation def get_truth(input_one, input_two, comparison): # too much abstraction ops = {'>': operator.gt, '<': operator.lt, ...
79
33.1
132
20
687
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_62c4ecb72882c852_2e0c46e5", "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" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 29 ]
[ 29 ]
[ 9 ]
[ 33 ]
[ "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" ]
utils.py
/utils.py
nicholaschris/landsatpy
MIT
2024-11-18T22:26:03.741324+00:00
1,592,296,472,000
2a083c5de30dc74f7e1fea9d587e1319bd6e3563
3
{ "blob_id": "2a083c5de30dc74f7e1fea9d587e1319bd6e3563", "branch_name": "refs/heads/master", "committer_date": 1592296472000, "content_id": "ca6aa5e4832c9ce53272a57593ee50907079b6d5", "detected_licenses": [ "MIT" ], "directory_id": "b9c50c491e36a2185f46d046f8b75f91420ee652", "extension": "py", "fi...
2.828125
stackv2
# -*- coding: utf-8 -*- import requests import json import pymysql import time '''0.5h运行一次''' # 心知天气api一分钟只能调用20次 KEY = 'SPKoKjIxGUayMeSyE' # API key UID = "PPytfST60CNf-MoBr" # 用户ID LOCATION = 'beijing' # 所查询的位置,可以使用城市拼音、v3 ID、经纬度等 API = 'https://api.seniverse.com/v3/weather/now.json?key=SPKoKjIxGUayMeSyE&langua...
101
29.76
136
14
855
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_d678c768358f3fdf_978c3710", "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 ...
4
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" ]
[ 53, 53 ]
[ 53, 53 ]
[ 5, 5 ]
[ 39, 39 ]
[ "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" ]
0719_TryCrapy.py
/OtherSpider/0719_TryCrapy.py
superlova/WeatherSpider
MIT
2024-11-18T22:26:04.993906+00:00
1,548,623,376,000
09e70b00419e0cb473c6d519e130e2edb1c8ae4e
3
{ "blob_id": "09e70b00419e0cb473c6d519e130e2edb1c8ae4e", "branch_name": "refs/heads/master", "committer_date": 1548623376000, "content_id": "e0ae25e3f4e53ce3314af0adb6859565fbb2b553", "detected_licenses": [ "MIT" ], "directory_id": "a5fc03c1ba125435a1d7a56aed2d6ec3c19b18f9", "extension": "py", "fi...
2.609375
stackv2
import pickle import torch from torch import nn, utils import torch.optim as optim import torch.utils.data import gym import numpy as np from run_expert_function import run_expert_with_rollouts ###################### # Settings envname = 'Ant-v2' expert_data_path = r'./expert_data/' # Behavioral model batch_siz...
175
26.81
167
16
1,178
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_6f6573fdfe5ee662_ac7a900c", "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...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 95 ]
[ 95 ]
[ 15 ]
[ 37 ]
[ "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" ]
RNN-BehavioralCloning.py
/HW1 - DAgger Behavioral Cloning/RNN-BehavioralCloning.py
AlexandreGuilbault/CS294-Hws
MIT
2024-11-18T22:26:12.221601+00:00
1,574,782,137,000
70ae338ac2e730e2916e61fc85f58d4417334a6d
3
{ "blob_id": "70ae338ac2e730e2916e61fc85f58d4417334a6d", "branch_name": "refs/heads/master", "committer_date": 1574782137000, "content_id": "59d2c774972e80a4f3453b0dd80c927380c926cf", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "daf8365ae1d51ae0cd552d3bf4a20c16763ea1e2", "extension": "p...
2.703125
stackv2
import json from pathlib import Path import os import subprocess def update_json_settings( template_settings_path: Path = Path("_config_scripts/user_config_templates/settings.json"), target_settings_path: Path = Path(os.environ["APPDATA"]) / "Code/User" / "settings.json" ): """Given a template and target s...
62
37.94
100
13
492
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2fe16c6f8b96f049_eb8d6132", "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...
7
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" ]
[ 59, 59, 59 ]
[ 59, 59, 59 ]
[ 9, 24, 71 ]
[ 76, 63, 75 ]
[ "A01:2017 - Injection", "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()'.", "Detected subprocess functio...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "HIGH" ]
[ "HIGH", "MEDIUM", "LOW" ]
vscode_tools.py
/brassicate/vscode_tools.py
ciaranjudge/brassicate
BSD-3-Clause