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-19T03:10:11.485962+00:00
1,526,349,268,000
17a7ddc1403d7f0f245c5d0a9b4dc4d45fb87c2d
2
{ "blob_id": "17a7ddc1403d7f0f245c5d0a9b4dc4d45fb87c2d", "branch_name": "refs/heads/master", "committer_date": 1526349268000, "content_id": "466911685523bd303601aa3c5b172c25c2080570", "detected_licenses": [ "MIT" ], "directory_id": "c10e5e7b4f7d55ed74c98b4c287ef11010361435", "extension": "py", "fi...
2.484375
stackv2
import tensorflow as tf import numpy as np import argparse import pickle import os parser = argparse.ArgumentParser() parser.add_argument( '--pkl_dir', type=str, default=None, help='pickle file directory') FLAGS, unparsed = parser.parse_known_args() with open(os.path.join(FLAGS.pkl_dir,"reverse_dicti...
51
28.47
75
15
360
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1e17ed4f69082aee_6f36116d", "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" ]
[ 17, 19 ]
[ 17, 19 ]
[ 26, 15 ]
[ 40, 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" ]
find_topk_sim.py
/find_topk_sim.py
Ada520/Word2Vec_saramin
MIT
2024-11-19T03:10:13.970515+00:00
1,600,446,990,000
3b49994a57fc8bc2ab1e56cca352f4dbf8710adf
2
{ "blob_id": "3b49994a57fc8bc2ab1e56cca352f4dbf8710adf", "branch_name": "refs/heads/master", "committer_date": 1600446990000, "content_id": "c908fa3f28857fcda29103b3182c9eaf54bfd8d9", "detected_licenses": [ "MIT" ], "directory_id": "7fcd0d3bab9479ccf113c875f2b494a143ae926a", "extension": "py", "fi...
2.453125
stackv2
import numpy as np from scipy.spatial.distance import cdist import ase import ase.io from sklearn.cluster import KMeans import os import subprocess import re from ml_dft.pykliep import DensityRatioEstimator to_bohr = 1.889725989 to_angstrom = 0.529177249 number_to_symbol_map = {1: 'H', 6: 'C', 8: 'O'} symbol_to_numbe...
358
26.23
93
16
2,815
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a705d4cccee7c765_7ddd16d7", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 303, 303 ]
[ 303, 303 ]
[ 11, 85 ]
[ 90, 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()'.", "Found 'subprocess'...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
dft_utils.py
/ml_dft/dft_utils.py
usccolumbia/ml-dft
MIT
2024-11-19T03:10:17.089070+00:00
1,593,038,082,000
01dc18f6b85121b78d3d36371964573ec6c45ac1
3
{ "blob_id": "01dc18f6b85121b78d3d36371964573ec6c45ac1", "branch_name": "refs/heads/master", "committer_date": 1593038082000, "content_id": "a8d2d236255303983f7d148e2526d7ed97415da8", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5d64af54f8eb12a5d12686f359b39fd68df85230", "extension": "py"...
2.515625
stackv2
""" By Vincent Derkinderen (DTAI lab KU Leuven, 2019) Small code example that was used to interactively extract information from previous maximisation experiments. """ import os import statistics import sys import pickle def main(args): results_constrained = dict() results_unconstrained = dict() progress...
136
57.16
171
16
1,981
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_76c42d7aa9f3f064_f940d351", "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", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 21, 27, 30 ]
[ 21, 27, 30 ]
[ 45, 47, 34 ]
[ 59, 61, 48 ]
[ "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 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
script_maximisation_report.py
/script_maximisation_report.py
GabVenturato/Paper-AC-Decisions-Learning
Apache-2.0
2024-11-19T03:10:22.016909+00:00
1,640,613,521,000
a1691a02d552dba47b6343f5762fd8d582c715d2
2
{ "blob_id": "a1691a02d552dba47b6343f5762fd8d582c715d2", "branch_name": "refs/heads/master", "committer_date": 1640613521000, "content_id": "f278489f072cc75c5751a1e6efa0d150f38bef7b", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "c41c7e3b7eb2bd694b0925f321bec636685567cb", "extension": "p...
2.453125
stackv2
"""Script to plot example2 model results.""" import matplotlib matplotlib.use("Agg") import numpy as np from numpy import array, average, mean from pylab import plot, gca, show, figure, subplots, gca, semilogy, legend, \ tight_layout, NullLocator, savefig, setp, tight_layout from pickle import load with_file = "wi...
163
41.53
123
17
2,317
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_131c4892635cbb85_9814ef6c", "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" ]
[ 22, 101 ]
[ 22, 101 ]
[ 8, 8 ]
[ 32, 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" ]
plot_figure5.py
/studies/plot_figure5.py
vishalbelsare/pycopancore
BSD-2-Clause
2024-11-19T03:10:28.467359+00:00
1,478,888,813,000
b7048d4d8adcbee8eb311972b425116b465564da
3
{ "blob_id": "b7048d4d8adcbee8eb311972b425116b465564da", "branch_name": "refs/heads/master", "committer_date": 1478888813000, "content_id": "eb6f9978d53a10e83ce24cbbd297cd6f8c681746", "detected_licenses": [ "MIT" ], "directory_id": "4bde7e5714c905f4c78a0f8f586968d3bd72704e", "extension": "py", "fi...
2.53125
stackv2
import sys import xml.etree.ElementTree import gpxpy.gpx from dateutil import parser import files def parse_file(path): return xml.etree.ElementTree.parse(path) def identify_file(etree): r = etree.getroot().tag if r == "OCPNDraw": return 'draw' elif r == "gpx": return 'gpx' input_...
76
34.26
115
19
697
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_1acd04fa5f1d1674_d99cba42", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
4
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 2, 10 ]
[ 2, 10 ]
[ 1, 12 ]
[ 29, 45 ]
[ "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" ]
parseGPX.py
/parseGPX.py
aayaffe/gpxConvertor
MIT
2024-11-19T03:10:35.825748+00:00
1,599,505,705,000
f60900071efb32c8556bf1d92b0e587466be7373
3
{ "blob_id": "f60900071efb32c8556bf1d92b0e587466be7373", "branch_name": "refs/heads/master", "committer_date": 1599505705000, "content_id": "22f348f89d1a79c2a9807ce6fa6baa344450e615", "detected_licenses": [ "MIT" ], "directory_id": "0a0e9bb45be94a1312a8a51a698baa6cb0903334", "extension": "py", "fi...
2.640625
stackv2
#!/usr/bin/python3 import multiprocessing as mp import shlex import json import subprocess as sp import sys import os import signal class LocationNotFoundError(Exception): def __init__(self, dict_struct=None): print() def print_out(results): print("".join([x if x is not None else "" for x in results...
107
27.02
99
16
623
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_a69556c28bb408d2_7626f635", "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...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 97 ]
[ 97 ]
[ 26 ]
[ 56 ]
[ "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" ]
main.py
/config/lighthouse/main.py
JonasRSV/lighthouse
MIT
2024-11-19T03:22:33.300279+00:00
1,668,531,191,000
ee90b6caf9e55fca2c5046d0bfbcedeace66746a
3
{ "blob_id": "ee90b6caf9e55fca2c5046d0bfbcedeace66746a", "branch_name": "refs/heads/main", "committer_date": 1668531617000, "content_id": "5f2ce116d56c8f90b5f7d505c41bed8c9e9c98e2", "detected_licenses": [ "MIT" ], "directory_id": "bd913c2efca72c8c5ffa49d4f9683c0a04041bf7", "extension": "py", "file...
2.53125
stackv2
from __future__ import annotations import subprocess import logging from pathlib import Path import shutil EXE = shutil.which("github-linguist") if not EXE: raise ImportError("GitHub Linguist not found, did you install it per README?") GIT = shutil.which("git") if not GIT: raise ImportError("Git not found") ...
69
23.99
111
13
442
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_14fe30840a6a097d_53dfa9a9", "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" ]
[ 24, 53 ]
[ 24, 53 ]
[ 11, 11 ]
[ 63, 94 ]
[ "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" ]
__init__.py
/src/ghlinguist/__init__.py
scivision/linguist-python
MIT
2024-11-19T03:22:34.875141+00:00
1,532,308,343,000
d55a440f83fadf8bdbad85b5ca14aa8a0e043cd3
2
{ "blob_id": "d55a440f83fadf8bdbad85b5ca14aa8a0e043cd3", "branch_name": "refs/heads/master", "committer_date": 1532308343000, "content_id": "289c9e12de870d97f0ea4ecb59d9f586745e0da4", "detected_licenses": [ "MIT" ], "directory_id": "e71508afad6e55d4c819525c1b1a142619d5c7a4", "extension": "py", "fi...
2.5
stackv2
from datahandler import DataHandler from utils import * from utils.compute_stock_features import * class StockDataHandler(DataHandler): def __init__(self): super(StockDataHandler, self).__init__() def add(self, data: pd.DataFrame, name: str): self.data = data self.rel_stats = {} ...
39
36.67
85
16
308
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_72d05e8319570648_51c4e29f", "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 ]
[ 34 ]
[ 55 ]
[ "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" ]
stock.py
/datahandler/stock.py
z772/Chase
MIT
2024-11-19T03:22:36.142248+00:00
1,587,134,606,000
3e86a721661072c95276aaf5e8769b44d196321a
3
{ "blob_id": "3e86a721661072c95276aaf5e8769b44d196321a", "branch_name": "refs/heads/master", "committer_date": 1594135985000, "content_id": "6f765e9ac69a71d7d1dfb26d39b99e9fd61de1e9", "detected_licenses": [ "MIT" ], "directory_id": "6b054b1163e9f526dae59f6b86e45dca3af023cc", "extension": "py", "fi...
2.96875
stackv2
from django.shortcuts import render from django.template import loader from django.http import HttpResponse, JsonResponse from .models import YoutubeMetadata import json import requests from django.core.paginator import Paginator import time from threading import Thread # This function corresponds to the endpoint /you...
108
38
108
16
904
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_c3865602e223d264_2aa4f00b", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ...
7
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 45, 45 ]
[ 45, 45 ]
[ 12, 25 ]
[ 75, 74 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.", "Detected direct use of jinja2. If not done properly, this ma...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
views.py
/youtube/views.py
Akshat-Jain/django-fetch-youtube
MIT
2024-11-19T03:22:37.282972+00:00
1,679,007,869,000
0d0cb6c7ab19a1bc24932840a6bcd68bc0de3b76
3
{ "blob_id": "0d0cb6c7ab19a1bc24932840a6bcd68bc0de3b76", "branch_name": "refs/heads/master", "committer_date": 1679007869000, "content_id": "472100757b2873647f887db4c0a2c0bb79ca6070", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fd1272dfa8b42b15bbcd17cfdb82a869d8fa874f", "extension": "py"...
2.828125
stackv2
""" Migrate yoyo's internal table structure """ from datetime import datetime from . import v1 from . import v2 #: Mapping of {schema version number: module} schema_versions = {0: None, 1: v1, 2: v2} #: First schema version that supports the yoyo_versions table USE_VERSION_TABLE_FROM = 2 def needs_upgrading(bac...
72
26.58
88
14
411
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_26821f7bffdcb61a_6d78c10b", "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...
3
true
[ "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "HIGH" ]
[ 52, 52, 69 ]
[ 56, 56, 72 ]
[ 18, 18, 5 ]
[ 10, 10, 6 ]
[ "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, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
__init__.py
/yoyo/internalmigrations/__init__.py
chalbersma/yoyo-database-migrations
Apache-2.0
2024-11-19T03:22:41.524859+00:00
1,552,733,431,000
e6d084a2d7d089966ee34373e854d87db6a93290
3
{ "blob_id": "e6d084a2d7d089966ee34373e854d87db6a93290", "branch_name": "refs/heads/master", "committer_date": 1552733431000, "content_id": "015b78f9c6c9f9ca714d32d4bd6376325c43584a", "detected_licenses": [ "MIT" ], "directory_id": "b83e1fb34ae2d917e2ba99cf4ff8ca9436219ea7", "extension": "py", "fi...
2.53125
stackv2
""" * @plot latent space * @Author: Zhihui Lu * @Date: 2018/09/04 """ import os import numpy as np import argparse from keras.models import load_model, Model import matplotlib.pyplot as plt import pickle from model import Variational_auto_encoder import dataIO as io # os.environ["CUDA_VISIBLE_DEVICES"] = "-1" def pl...
62
29.71
104
12
474
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_6fa43c10ebb1f4cd_66b70772", "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" ]
[ 57 ]
[ 57 ]
[ 5 ]
[ 31 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
plot_latent_space.py
/vae/ResVAE.ver3/plot_latent_space.py
Silver-L/keras_projects
MIT
2024-11-19T03:22:42.917485+00:00
1,569,390,088,000
6092321e9ccd8683468d6132e6ce4dfb5e816144
3
{ "blob_id": "6092321e9ccd8683468d6132e6ce4dfb5e816144", "branch_name": "refs/heads/master", "committer_date": 1569390088000, "content_id": "88a3bef2f055270212c6e69b5bfb5c6062808590", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0e76f9d734ea49fe69e3edd76166dabe686284e6", "extension": "py"...
2.546875
stackv2
# I followed ImageNet data loading convention shown in: # https://github.com/pytorch/examples/blob/master/imagenet/main.py import os import numpy as np import torch import torchvision.transforms as transforms from torchvision import datasets def create_dataloader(hp, args, train): normalize = transforms.Normaliz...
126
34.41
100
17
1,161
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a2ad06462eefecfd_e542e012", "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" ]
[ 125 ]
[ 125 ]
[ 16 ]
[ 49 ]
[ "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" ]
dataloader.py
/RandWireNN/dataset/dataloader.py
forestnoobie/RandomWire-NSGA
Apache-2.0
2024-11-19T03:22:44.897022+00:00
1,627,657,488,000
2ba3d8b08a1b039a91e6ab3ffdfbfc9eb82a0a8d
3
{ "blob_id": "2ba3d8b08a1b039a91e6ab3ffdfbfc9eb82a0a8d", "branch_name": "refs/heads/master", "committer_date": 1627657488000, "content_id": "b91d23103b3b7a92aeaf43de65e474e672d0a0de", "detected_licenses": [ "MIT" ], "directory_id": "96c4cc744bc4f11b1eb9bfc1783748a0d45611f9", "extension": "py", "fi...
3.09375
stackv2
import sys import pickle def main(): """ # creat connectedPerson.pkl file dictionary2 = {} file = open("connectedPerson.pkl", "wb") pickle.dump(dictionary2, file) file.close() """ if sys.argv[1] == 'Nickname': changeName(sys.argv[2], sys.argv[3]) elif sys.argv[1] == 'Us...
106
23.79
85
17
573
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3b8086b41e6662b1_f04370e2", "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...
9
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 26, 31, 44, 53, 65, 73, 79, 100 ]
[ 26, 31, 44, 53, 65, 73, 79, 100 ]
[ 25, 23, 17, 16, 5, 21, 19, 5 ]
[ 51, 40, 43, 30, 25, 47, 33, 28 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserial...
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
Test.py
/21-fs-ias-lec/16-nicknames-forward/Test.py
cn-uofbasel/BACnet
MIT
2024-11-19T03:22:46.928478+00:00
1,435,580,900,000
f8737480019f0909a460c4fb6095a5c719520008
2
{ "blob_id": "f8737480019f0909a460c4fb6095a5c719520008", "branch_name": "refs/heads/master", "committer_date": 1435580900000, "content_id": "56c960017c9e3e9298fcaab7507dd5d5a5c5cdd7", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "48894ae68f0234e263d325470178d67ab313c73e", "extension": "p...
2.328125
stackv2
# -*- coding: utf-8 -*- ##---------------------------------------------------------------------- ## Version Control System support ##---------------------------------------------------------------------- ## Copyright (C) 2007-2009 The NOC Project ## See LICENSE for details ##--------------------------------------------...
106
30.04
98
15
760
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_bf2ec6ac95bf470c_89560eda", "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" ]
[ 81, 86 ]
[ 81, 86 ]
[ 9, 11 ]
[ 79, 99 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess ...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
__init__.py
/cm/vcs/__init__.py
DreamerDDL/noc
BSD-3-Clause
2024-11-19T03:22:52.188866+00:00
1,606,402,914,000
e8f4729a5ec533d14da7ea7924f65deb57a94436
3
{ "blob_id": "e8f4729a5ec533d14da7ea7924f65deb57a94436", "branch_name": "refs/heads/master", "committer_date": 1606402936000, "content_id": "c8df0452f3829af65cb4cdca28bc4f0d40c70a52", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "a0a6c99c7971696f3142ec095c8ee88ad9fbbc69", "extension": "p...
2.578125
stackv2
import pickle from dbispipeline.base import TrainValidateTestLoader import numpy as np from sklearn.preprocessing import MultiLabelBinarizer class AcousticBrainzLoader(TrainValidateTestLoader): """ Loads the AcousticBrainz features provided by the task organizers and the labels for both the training and ...
98
32.14
82
15
724
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_91357f1192c18f0d_8ce3d96f", "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" ]
[ 80 ]
[ 80 ]
[ 16 ]
[ 49 ]
[ "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" ]
acousticbrainz.py
/src/loaders/acousticbrainz.py
dbis-uibk/MediaEval2019
BSD-2-Clause
2024-11-19T03:22:55.229253+00:00
1,553,852,305,000
e2a8c5d23570909d08ad54aff3ace0a8c8540a59
3
{ "blob_id": "e2a8c5d23570909d08ad54aff3ace0a8c8540a59", "branch_name": "refs/heads/master", "committer_date": 1553852305000, "content_id": "cbb596d7c013f8c43e8d31e07b2e2b63c07ad1a5", "detected_licenses": [ "MIT" ], "directory_id": "aac196796bf6fc80c96cc55182ecf03f56867b45", "extension": "py", "fi...
2.8125
stackv2
from typing import Optional, Tuple, List, Dict import pickle from ..tom import Credential, Endpoint from .encrypted_file import EncryptedFile from .keys import Key, Keys class KeyStore: __unlocked: bool = False __filename: str __master_key: str __keys: Keys def __init__(self, filename: str): ...
177
33.3
105
17
1,353
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_059614848d5a68be_fd382821", "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" ]
[ 45, 171 ]
[ 45, 171 ]
[ 23, 27 ]
[ 52, 52 ]
[ "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" ]
key_store.py
/src/key/key_store.py
SEIAROTg/Mail.im
MIT
2024-11-19T03:22:55.505581+00:00
1,622,038,658,000
daef1a412180e5fbbf8d2c48ac424e7ddf9b4019
2
{ "blob_id": "daef1a412180e5fbbf8d2c48ac424e7ddf9b4019", "branch_name": "refs/heads/master", "committer_date": 1622038658000, "content_id": "122a45aaa0d3e7b03b21d36e211dbc2de52dc913", "detected_licenses": [ "MIT" ], "directory_id": "0da11109c105bd289a0bfb4a851162e8e355a380", "extension": "py", "fi...
2.421875
stackv2
#!/usr/bin/env python import argparse import pickle if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--log-det', action='store_true') parser.add_argument('--baseline', action='store_true') parser.add_argument('--free-axis', action='store_true') parser.add_argumen...
19
30.74
76
11
140
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_dfd158ea67ba85ad_8428fd03", "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" ]
[ 17 ]
[ 17 ]
[ 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" ]
plot-det.py
/scripts/oov-clustering/plot-det.py
entn-at/BrnoLM
MIT
2024-11-19T03:22:55.710779+00:00
1,623,660,407,000
00913db974920c2f76c86b220eaaf22296b9c029
3
{ "blob_id": "00913db974920c2f76c86b220eaaf22296b9c029", "branch_name": "refs/heads/main", "committer_date": 1623660407000, "content_id": "7228071c23879d97accd05f72c635d88b8569612", "detected_licenses": [ "MIT" ], "directory_id": "2471af521b9db25ce28429d36b30c543a3b132fd", "extension": "py", "file...
2.90625
stackv2
import numpy as np def read_square_matrix(): d = [int(e) for e in input().split()] m = [d] for k in range(len(d)-1): m.append([int(e) for e in input().split()]) return np.array(m) def min_in_each_row(m): # หาวิธีเขียนแค่ค าสั่งเดียว return np.array([min(r) for r in m]) def max_in_each_column...
24
37.96
88
18
355
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_6df0f35a6deba1f3_a5db247b", "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" ]
[ 24 ]
[ 24 ]
[ 1 ]
[ 22 ]
[ "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" ]
11_P5.py
/11/11_P5.py
endowp/Python101
MIT
2024-11-19T03:23:07.465171+00:00
1,598,182,314,000
d2920eeed329f8d3494a67fba571e525b7ed16b1
3
{ "blob_id": "d2920eeed329f8d3494a67fba571e525b7ed16b1", "branch_name": "refs/heads/master", "committer_date": 1598182314000, "content_id": "26147c6238728a3fbe9cbfce83c5f68358bd4d28", "detected_licenses": [ "MIT" ], "directory_id": "09fe0bf9467ed270f25ac41c5b3bfa1c8546c61b", "extension": "py", "fi...
2.65625
stackv2
# Read reviews and extract issues, including memory, CPU, battery, and traffic. # Use word2vec and kmeans to find the similar words # -*- coding: utf-8 -*- # __author__ = "Cuiyun Gao" # __version__ = "1.0" import os import logging import itertools import json import re import numpy as np from nltk.corpus import stop...
138
37.13
157
15
1,351
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2c239873156b55f3_b14b6905", "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-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 135 ]
[ 135 ]
[ 5 ]
[ 56 ]
[ "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" ]
build_wv.py
/src/build_wv.py
armor-ai/MERIT
MIT
2024-11-19T03:23:07.595815+00:00
1,565,075,444,000
c823111b9b6d589cc0688c36e04e01e15a68ab73
3
{ "blob_id": "c823111b9b6d589cc0688c36e04e01e15a68ab73", "branch_name": "refs/heads/master", "committer_date": 1565075444000, "content_id": "c050047a631d10892559a118828ae308f4a5f06f", "detected_licenses": [ "MIT" ], "directory_id": "53aa5480260cf16f2b748071872a3147d880c459", "extension": "py", "fi...
2.8125
stackv2
# -*- coding: utf-8 -*- from __future__ import print_function from collections import Counter import click import os import re import face_recognition.api as face_recognition import face_recognition.config as config import face_recognition.model as model import multiprocessing import itertools import sys import PIL...
194
40.22
159
24
1,937
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_2788c43fc98ff305_d990fb4f", "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" ]
[ 119, 119 ]
[ 119, 119 ]
[ 13, 13 ]
[ 34, 34 ]
[ "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" ]
face_recognition_cli_v2.py
/face_recognition/face_recognition_cli_v2.py
vicrobert/face_recognition
MIT
2024-11-19T03:31:48.350780+00:00
1,551,069,492,000
e99acedabf286d559afa095ec1040de7908909d9
3
{ "blob_id": "e99acedabf286d559afa095ec1040de7908909d9", "branch_name": "refs/heads/master", "committer_date": 1551069492000, "content_id": "85edc672f5ace885ac1a2a770495e66131aa950e", "detected_licenses": [ "MIT" ], "directory_id": "ff38fb8f04f06373679ea71a06ba899f3a0d4043", "extension": "py", "fi...
2.953125
stackv2
import abc import tempfile import pickle from os.path import isfile from os.path import join as pathjoin def _diff(old, new): ''' Compares two different data structures. - old is a dictionary {key: value} - new is a list of tupes: (key, value) We want anything in new where the key or value does...
98
24.4
71
15
572
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6d58c0f6110f34a7_37688135", "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" ]
[ 80, 87, 91, 98 ]
[ 80, 87, 91, 98 ]
[ 13, 20, 13, 20 ]
[ 38, 34, 37, 34 ]
[ "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" ]
stores.py
/sdgrabber/stores.py
btimby/sdgrabber
MIT
2024-11-19T03:44:14.626870+00:00
1,661,533,456,000
5ea707eaa94f1bfed6a8b65b9725c5d318d8703c
2
{ "blob_id": "5ea707eaa94f1bfed6a8b65b9725c5d318d8703c", "branch_name": "refs/heads/master", "committer_date": 1661533456000, "content_id": "4d8adb699cd8497b50172c4e872909044d117bf9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "83c395f0e630064cbcaaa0f8818898454581ddc8", "extension": "py"...
2.5
stackv2
''' Les podcasts à dl : e-dixit : https://www.radiokawa.com/episode/e-dixit-1/ Comics outcast : https://www.radiokawa.com/culture-et-arts/comics-outcast/ Morceaux choisis : https://www.radiokawa.com/musique/morceaux-choisis/ Faster Than Light : https://www.radiokawa.com/jeux-video/faster-than-light/ Les démons du Midi ...
249
36.33
128
20
2,399
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_1cddb329665e13f4_047520d5", "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 ...
13
true
[ "CWE-295", "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", "rules.python.requests.security.disabled-cert-validation" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 105, 115, 157, 175 ]
[ 105, 115, 157, 175 ]
[ 15, 19, 16, 23 ]
[ 50, 58, 54, 78 ]
[ "A03:2017 - Sensitive Data Exposure", "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, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "LOW", "LOW", "LOW", "LOW" ]
main.py
/main.py
Blaireau/radioKawa
Apache-2.0
2024-11-19T03:44:31.345574+00:00
1,616,789,940,000
fde28bed3865ec53fd886daa9ddceecc3b1931a8
3
{ "blob_id": "fde28bed3865ec53fd886daa9ddceecc3b1931a8", "branch_name": "refs/heads/master", "committer_date": 1616789940000, "content_id": "3d3a1d100a95d7f484a09558ea3e4cecfc9d74ad", "detected_licenses": [ "MIT" ], "directory_id": "eb09cfed10f7b9e919f4abf515bad38305128f2c", "extension": "py", "fi...
2.546875
stackv2
# -*- coding: utf-8 -*- import pandas as pd import matplotlib.pyplot as plt from os import chdir, listdir from pandas import read_csv from os import path from random import randint, sample, seed from collections import OrderedDict from pandas import DataFrame, Series import numpy as np import csv import codecs chdir(...
52
41.69
132
12
551
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_40e5e9a0d581a70a_ce0173ca", "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" ]
[ 40 ]
[ 40 ]
[ 20 ]
[ 29 ]
[ "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" ]
full_db_1 (dantzig07's conflicted copy 2016-03-09).py
/3_create_database/scripts/full_db_1 (dantzig07's conflicted copy 2016-03-09).py
ReyhaneAskari/SLA_violation_classification
MIT
2024-11-19T03:44:41.891680+00:00
1,618,860,296,000
d2a67543241f2cf795b7c784b0ec84450189f162
3
{ "blob_id": "d2a67543241f2cf795b7c784b0ec84450189f162", "branch_name": "refs/heads/master", "committer_date": 1618860296000, "content_id": "8e7c0a950687cf7e4fd248dc9d6981cf53838d15", "detected_licenses": [ "MIT" ], "directory_id": "ebba19c671eb241e9363700aac0f3f91489fc4bf", "extension": "py", "fi...
2.609375
stackv2
import datetime from os import listdir, mkdir from json import JSONEncoder, JSONDecoder, dumps, loads, load, dump from os.path import join as union from random import random, randint from pickle import dumps as morph from pickle import loads as cargar try: mkdir("secure_db") mkdir("secure_db/usr") mkdir("s...
140
24.4
117
21
897
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a3311af17f301a15_6f56f64e", "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-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 127, 139 ]
[ 127, 139 ]
[ 23, 18 ]
[ 33, 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" ]
main.py
/Actividades/AC13/main.py
FarDust/FarDust-IIC2233
MIT
2024-11-19T01:34:46.487477+00:00
1,406,746,208,000
6626e8e085b77e72c56a16f812ad673781424e4b
3
{ "blob_id": "6626e8e085b77e72c56a16f812ad673781424e4b", "branch_name": "refs/heads/master", "committer_date": 1406746208000, "content_id": "50e9cb337fb086a98583918cbd4f15f338294c5a", "detected_licenses": [ "MIT", "BSD-3-Clause" ], "directory_id": "3f2ff6b97c35da18c6c4fdebf8bea588c3c03f7c", "ext...
2.5625
stackv2
import sys from zipfile import ZipFile from os.path import join, splitext, exists ZIP_PATH = "Document.zip" FOLDER_PATH = "Document" TOC_PATH = "TOC.xml" import xml.etree.ElementTree as ET META_ATTRIBUTES = { "ISSUE_DATE" : "issue_date", "PUBLICATION" : "publication"} DEFAULT_DATE = "2013-01-01"...
157
31.96
131
23
1,297
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_026db51b8c7dc37c_5c9872dd", "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" ]
[ 9, 89, 136 ]
[ 9, 89, 136 ]
[ 1, 12, 12 ]
[ 35, 33, 54 ]
[ "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" ]
sitemap_generator.py
/engine/sitemap-generator/sitemap_generator.py
shafranm/OpenPress
MIT,BSD-3-Clause
2024-11-19T01:34:46.927772+00:00
1,615,459,104,000
872a992debda811a4918b0519d752904c4fcda13
3
{ "blob_id": "872a992debda811a4918b0519d752904c4fcda13", "branch_name": "refs/heads/master", "committer_date": 1615459104000, "content_id": "cfcb4f03015f8d6cda5a905f45ac2f004860579b", "detected_licenses": [ "MIT" ], "directory_id": "3bc627cda8e5c21c6ec71180a04afc44fc65bf95", "extension": "py", "fi...
2.515625
stackv2
#!/usr/bin/env pyturbubox import box import ulz import pickle import argparse from pathlib import Path import scipy.optimize import numpy as np from matplotlib import pylab as plt ## ------------------------------------------------------------------------- # pp = argparse.ArgumentParser(description = 'Plotting PDF')...
130
22.84
116
13
878
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6340e7a20b28d858_f08d9c5c", "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" ]
[ 38 ]
[ 38 ]
[ 20 ]
[ 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" ]
density-pdf.py
/sandbox/plot/StirTurb_CGM/density-pdf.py
jmark/turbubox
MIT
2024-11-19T01:34:49.074221+00:00
1,570,525,592,000
d52f9eeebbe249c83b14b7ef514610c410a31321
3
{ "blob_id": "d52f9eeebbe249c83b14b7ef514610c410a31321", "branch_name": "refs/heads/master", "committer_date": 1570525592000, "content_id": "7e22dab56c651743c7dba5dfae878ce0ec075b13", "detected_licenses": [ "MIT" ], "directory_id": "3b27a968cc6138a25a0c0438ce8b72c43c4d4feb", "extension": "py", "fi...
2.859375
stackv2
from xml.etree import ElementTree as et from xml.etree.ElementTree import tostring from svglib.svglib import svg2rlg from reportlab.graphics import renderPDF from textwrap import wrap import sys from utils import log RATIOS = { 18: { 'size': '66px', 'init': (421,298) }, 25: { ...
132
24.2
117
13
952
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8798a767457fa70e_d0d610a1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
4
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 2, 3 ]
[ 2, 3 ]
[ 1, 1 ]
[ 40, 43 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The Python documentation recommends using `defusedxml` ins...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
place_text.py
/place_text.py
elena20ruiz/random-scripts
MIT
2024-11-19T01:34:50.451746+00:00
1,461,852,933,000
dc8a1ee9873025afcb18e7ed91eb075de8fa0266
2
{ "blob_id": "dc8a1ee9873025afcb18e7ed91eb075de8fa0266", "branch_name": "refs/heads/master", "committer_date": 1461852933000, "content_id": "190f695d3af5945438125448dd0ec3241d92406a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ddfc8f1c95b51eb9c1c7db3cd9fb6a52fb69476f", "extension": "py"...
2.453125
stackv2
#!/usr/bin/env python # # dewadl # # Turn WADL XML into Python API. # # Matt Kubilus 2015 # # This is written to support the uDeploy WADL specifically. Your mileage may vary with other WADLs. # # import os import re import cmd import json import urlparse import urllib2 from types import FunctionType import x...
371
31.31
141
20
2,804
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_76d476784b05a048_fa959139", "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" ]
[ 22, 233 ]
[ 22, 233 ]
[ 1, 20 ]
[ 35, 39 ]
[ "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" ]
dewadl.py
/dewadl.py
kubilus1/dewadl
Apache-2.0
2024-11-19T01:34:53.838867+00:00
1,551,654,041,000
af45266a73b3e5e6ad29c298a0a371913df2e787
3
{ "blob_id": "af45266a73b3e5e6ad29c298a0a371913df2e787", "branch_name": "refs/heads/master", "committer_date": 1551654041000, "content_id": "1288d580938c77e9d2f3335bebd4acb14f5f344f", "detected_licenses": [ "MIT" ], "directory_id": "a1714f70993266f0c4ebaecb3779f73eadd12446", "extension": "py", "fi...
2.890625
stackv2
import os import asyncio import queue import threading import time def convert_video(Q): while (not Q.empty()): f = Q.get() start_time = time.time() async def covert_720p(): os.system("./ffmpeg -i ./in/{} -b:v 2000k -bufsize 2000k -r 30 -strict -2 -s 1280x720 \ ./ou...
54
28.48
100
15
434
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_c7d8f7d747d6fb55_44f5501b", "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" ]
[ 12, 20 ]
[ 13, 21 ]
[ 13, 13 ]
[ 44, 44 ]
[ "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" ]
main.py
/main.py
ec500-software-engineering/exercise-2-ffmpeg-ZhibinHuang
MIT
2024-11-19T01:34:56.068055+00:00
1,490,121,980,000
65a81d52a1446458a24b5158a8fea5061374941f
3
{ "blob_id": "65a81d52a1446458a24b5158a8fea5061374941f", "branch_name": "refs/heads/master", "committer_date": 1490121980000, "content_id": "d469007d9aa70c75aaa5b64864dbf9691bb73a96", "detected_licenses": [ "MIT" ], "directory_id": "2355b1917cad210ae70378d6c6178782a3ec9536", "extension": "py", "fi...
3.140625
stackv2
#!/usr/bin/env python ''' Pickle greengenes taxonomies. This makes taxonomy lookups fast & easy. ''' import argparse, cPickle as pickle def taxonomy_file_to_dict(fn): '''tab-separated taxonomy table to dictionary''' d = {} with open(fn) as f: for line in f: otu, tax = line.strip().sp...
31
26.81
115
14
206
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_5d94d53c8269599e_58c26964", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 31, 31 ]
[ 31, 31 ]
[ 9, 9 ]
[ 33, 33 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead t...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
pickle_taxonomies.py
/tools/setup_tools/pickle_taxonomies.py
spacocha/SmileTrain
MIT
2024-11-19T01:35:02.479637+00:00
1,620,621,249,000
ccdcbc68c960747cdd080350fce5ec0ef9bfb553
2
{ "blob_id": "ccdcbc68c960747cdd080350fce5ec0ef9bfb553", "branch_name": "refs/heads/master", "committer_date": 1620621249000, "content_id": "fc3a3c4b5ecdf2fd0461736321321aa79caae630", "detected_licenses": [ "MIT" ], "directory_id": "ecedd97cb6e5f1ca3571e381a149f451bdb7a19c", "extension": "py", "fi...
2.328125
stackv2
from mimic_mf_analysis import mydb cursor = mydb.cursor(buffered=True) def encounterOfInterest(debug=False, N=100): """ Define encounters of interest. The method is not finalized yet. Currently, it will use all encounters in our database. @param debug: set to True to select a small subset for testing ...
254
42.15
178
11
2,489
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_03ed3df1a9e9e01d_9a7f839f", "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.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" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 18, 18, 198, 198, 232, 232 ]
[ 26, 26, 220, 220, 254, 254 ]
[ 5, 5, 5, 5, 5, 5 ]
[ 35, 35, 84, 84, 84, 84 ]
[ "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 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
preparation.py
/src/main/python/mimic_mf_analysis/preparation.py
kingmanzhang/mimic_mf_analysis
MIT
2024-11-19T01:35:02.547899+00:00
1,536,505,252,000
ef016b369743327d103f61f78e6d346452b6d8d1
3
{ "blob_id": "ef016b369743327d103f61f78e6d346452b6d8d1", "branch_name": "refs/heads/master", "committer_date": 1536505252000, "content_id": "8bcca23e4de678d8e885698bad87c77878a42fbb", "detected_licenses": [ "Unlicense" ], "directory_id": "48962b91c1fd933b44ecad9e69453ad0b5ea935e", "extension": "py",...
3.109375
stackv2
#!/usr/bin/python3 ''' mysql CRUD (pymysql) ''' import pymysql import urllib.request j=10 i=0 try: # 打开数据库连接 db = pymysql.connect("localhost","root","root","db1",charset='utf8') # 使用 cursor() 方法创建一个游标对象 cursor cursor = db.cursor() # 使用 execute() 方法执行 SQL 查询 cursor.execute("SELECT V...
55
16.76
72
11
285
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_03ddbd2a5b6a64bf_cf6d0a96", "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" ]
[ 33, 33 ]
[ 33, 33 ]
[ 9, 9 ]
[ 28, 28 ]
[ "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" ]
T_mysql.py
/mysql_demo/T_mysql.py
wuyongmao/python3_6_learning
Unlicense
2024-11-19T01:35:02.619518+00:00
1,453,948,439,000
1d14a149633b7faa0b6c231ad63045447ed6e421
2
{ "blob_id": "1d14a149633b7faa0b6c231ad63045447ed6e421", "branch_name": "refs/heads/master", "committer_date": 1453948439000, "content_id": "13679929846bfa8600ddad86e7229e904ae61063", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fcef61eb41a587c4006be5bcd1428f06dafb1a06", "extension": "py"...
2.46875
stackv2
#!/usr/bin/env python # # Copyright 2015 Rafael Ferreira da Silva # http://www.rafaelsilva.com/tools # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
119
29.88
87
15
864
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_4c0abe56a8f692a8_3dacfee0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
3
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 26 ]
[ 26 ]
[ 1 ]
[ 34 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
ieee.py
/operations/search/ieee.py
bibxpert/bibxpert
Apache-2.0
2024-11-19T01:45:41.576530+00:00
1,677,337,932,000
c0d64d5a1a355d6dccb1c387e9aabc9e406339f1
3
{ "blob_id": "c0d64d5a1a355d6dccb1c387e9aabc9e406339f1", "branch_name": "refs/heads/master", "committer_date": 1677337932000, "content_id": "ba2be550fe203b912eca67d76971df9c709c01b8", "detected_licenses": [ "MIT" ], "directory_id": "fb0a51e44387146946b85cb3be6ff0640054a9e9", "extension": "py", "fi...
3.203125
stackv2
"""Maintains information about a partial observation the follower has throughout a game.""" import pickle from typing import Dict, List, Optional, Set, Tuple from agent.environment import agent from agent.environment import card from agent.environment import position from agent.environment import rotation from agent....
166
47.43
119
16
1,524
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_83c3cac5b4713c52_35861c12", "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" ]
[ 14 ]
[ 14 ]
[ 98 ]
[ 117 ]
[ "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" ]
partial_observation.py
/agent/data/partial_observation.py
lil-lab/cerealbar
MIT
2024-11-19T01:55:42.186922+00:00
1,521,533,101,000
0b48213632e447a9ae5486a8d5e94593cc76a55c
2
{ "blob_id": "0b48213632e447a9ae5486a8d5e94593cc76a55c", "branch_name": "refs/heads/master", "committer_date": 1521533101000, "content_id": "0fcffb143bc8dbbbff14626b37f9184e8c07ae03", "detected_licenses": [ "MIT" ], "directory_id": "440cd35c5241e6b6a8c8d4d06d3cc85f1c26c472", "extension": "py", "fi...
2.328125
stackv2
import features import os import xml.etree.ElementTree as ET import prepare_documents import random import svm import pickle import config functionCollection = features.documentFunctionCollection() mypath=os.path.dirname(os.path.abspath(__file__)) ap_path=mypath+'/ap/' DTD='''<?xml version="1.1"?> <!DOCTYPE apxml [ <!...
140
34.03
148
19
1,270
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_07a3662d9fdc36f0_c6706a34", "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-502", "CWE-502" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
[ 3, 41, 49 ]
[ 3, 41, 49 ]
[ 1, 8, 3 ]
[ 35, 22, 22 ]
[ "A04:2017 - XML External Entities (XXE)", "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 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
ap.py
/ap.py
webis-de/authorship-threetrain
MIT
2024-11-19T01:55:42.361680+00:00
1,426,089,490,000
753b7692c9014deb8fd4de500afad2b1b4ccd675
3
{ "blob_id": "753b7692c9014deb8fd4de500afad2b1b4ccd675", "branch_name": "refs/heads/master", "committer_date": 1426089490000, "content_id": "8e850dfedb55e56b829b54f87636056ad7243429", "detected_licenses": [ "MIT" ], "directory_id": "7349143c61e6c052fa62af3976ef48144f7766f4", "extension": "py", "fi...
2.875
stackv2
#!/usr/bin/env python from scipy.io import wavfile from scipy.signal import resample from os.path import basename import numpy as np import wave import os import sys import subprocess #debugging #LAME_CMD = ['/usr/bin/env', 'lame'] LAME_CMD = ['/course/cs4500f14/bin/lame'] OGGDEC_CMD = ['/usr/bin/env', 'oggdec'] RES...
235
27.66
114
14
1,689
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_c6b1784bd4427820_66726a1d", "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...
4
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 205, 235 ]
[ 207, 235 ]
[ 11, 9 ]
[ 52, 40 ]
[ "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 dynamic content used...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
read_audio.py
/src/read_audio.py
dcalacci/shazamalam
MIT
2024-11-19T01:55:43.088258+00:00
1,328,186,685,000
61aec8d7f3c71ab7067e8c832917de4db16308a4
2
{ "blob_id": "61aec8d7f3c71ab7067e8c832917de4db16308a4", "branch_name": "refs/heads/master", "committer_date": 1328186685000, "content_id": "5816b6240ea380439a448da1e516c7887dd0b9c5", "detected_licenses": [ "MIT" ], "directory_id": "a502d682a9df7d5f775d2556606b2386d0e64076", "extension": "py", "fi...
2.3125
stackv2
from webob import Request from webob.dec import wsgify from webdispatch import URLDispatcher from webdispatch.mixins import URLMapperMixin class MyRequest(Request, URLMapperMixin): pass app = URLDispatcher() @wsgify(RequestClass=MyRequest) def index(request): url = request.generate_url("hello", xname="webdis...
27
25.11
60
11
198
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.directly-returned-format-string_79429106a80010b6_d45a20fc", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.directly-returned-format-string", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected Fl...
3
true
[ "CWE-79", "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.audit.directly-returned-format-string", "rules.python.django.security.injection.raw-html-format", "rules.python.flask.security.audit.directly-returned-format-string" ]
[ "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 14, 14, 18 ]
[ 14, 14, 18 ]
[ 5, 12, 5 ]
[ 45, 45, 49 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'.", "Detected user input flowing into a manually constructed HTML string. You may be accid...
[ 5, 5, 5 ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
hello.py
/examples/hello.py
shimizukawa/WebDispatch
MIT
2024-11-19T01:55:44.451876+00:00
1,581,011,380,000
20e58825c8f611b4f079392a72b21f21abfb3ddb
3
{ "blob_id": "20e58825c8f611b4f079392a72b21f21abfb3ddb", "branch_name": "refs/heads/master", "committer_date": 1581011380000, "content_id": "0f825e78ee21063d75613d9938cd305c364f633a", "detected_licenses": [ "Apache-2.0", "MIT" ], "directory_id": "613d9b4259e63e6b5ee4f85131c93389569e3f17", "exten...
2.625
stackv2
import copy import os import logging import pickle try: import sigopt as sgo except ImportError: sgo = None from ray.tune.suggest.suggestion import SuggestionAlgorithm logger = logging.getLogger(__name__) class SigOptSearch(SuggestionAlgorithm): """A wrapper around SigOpt to provide trial suggestions. ...
153
35.27
79
18
1,160
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e953dff2b6f20352_afae64d1", "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" ]
[ 147, 151 ]
[ 147, 151 ]
[ 13, 29 ]
[ 51, 51 ]
[ "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" ]
sigopt.py
/python/ray/tune/suggest/sigopt.py
stephanie-wang/ray
Apache-2.0,MIT
2024-11-19T01:55:45.994948+00:00
1,463,517,310,000
576d902ef678f5766b2df81579b1c915d9479b3c
2
{ "blob_id": "576d902ef678f5766b2df81579b1c915d9479b3c", "branch_name": "refs/heads/master", "committer_date": 1463517310000, "content_id": "f740bb2a40e9bb5271037b110ef77b798f7b39c9", "detected_licenses": [ "MIT" ], "directory_id": "64333e1820f55ffb72bcf8e57ddd9127c15133f2", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import sys import shlex from subprocess import Popen, PIPE, \ check_call, CalledProcessError def run_cmd(cmd, ignore_error=False, exargs=[]): cmd = shlex.split(cmd) cmd.extend(exargs) p = Popen(cmd, stdout=PIPE, std...
115
25.81
91
14
772
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1864d77c28e80007_b1014d85", "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 ]
[ 9 ]
[ 45 ]
[ "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" ]
gitstatus-fast.py
/oh-my-zsh/custom/plugins/vcs-prompt/lib/gitstatus-fast.py
grantr/dotfiles
MIT
2024-11-19T02:07:49.863123+00:00
1,644,398,247,000
5206d51db9f0fe7c48f03bb8d4f22fcaf259f7a5
3
{ "blob_id": "5206d51db9f0fe7c48f03bb8d4f22fcaf259f7a5", "branch_name": "refs/heads/master", "committer_date": 1644398247000, "content_id": "bdebbde952e648de85d57048affd51890bf466e4", "detected_licenses": [ "MIT" ], "directory_id": "8d9b683456c7c0373ba8f651139d1ca7f9970fe7", "extension": "py", "fi...
2.59375
stackv2
import time from nltk.tokenize import RegexpTokenizer import csv from nltk.tokenize import word_tokenize from nltk.util import ngrams import math from sklearn.feature_extraction.text import TfidfVectorizer import pickle from src.data_access import * from setup import * tokenizer = RegexpTokenizer(r'\w+') def load_mo...
143
28.66
90
21
1,051
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_966469dddb395d41_265b8e1d", "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" ]
[ 18, 111 ]
[ 18, 111 ]
[ 17, 13 ]
[ 31, 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" ]
tfidf.py
/src/tfidf.py
loilethanh/extract_keywords
MIT
2024-11-19T02:07:50.841055+00:00
1,629,979,379,000
99b3644344a0096d73207af56ba8f2777576609b
3
{ "blob_id": "99b3644344a0096d73207af56ba8f2777576609b", "branch_name": "refs/heads/master", "committer_date": 1629979379000, "content_id": "9a32cb12be62409efe02f143296c86118fb4375e", "detected_licenses": [ "MIT" ], "directory_id": "f51aff57f826aeea1be21e2d0c03cce0adaadefc", "extension": "py", "fi...
2.90625
stackv2
"""Shared functionality by call scripts among sub-experiments.""" import subprocess import torch def bisect(f, left, right): """Determine largest value where ``f`` returns ``True``. If this values lies to the left of the search interval, return ``left - 1``. If this values lies to the right of the sear...
101
22.13
82
15
560
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8704882d8daf65cf_eae54460", "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" ]
[ 35 ]
[ 35 ]
[ 12 ]
[ 81 ]
[ "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" ]
shared_call.py
/exp/exp01_performance/shared_call.py
zv5dmjq5/vivit
MIT
2024-11-19T02:07:51.273890+00:00
1,533,038,061,000
5069317f1068dfcdbdadea038cd18b81b129abc6
2
{ "blob_id": "5069317f1068dfcdbdadea038cd18b81b129abc6", "branch_name": "refs/heads/master", "committer_date": 1533038061000, "content_id": "588dfff1186fcba312b857752909150495920afe", "detected_licenses": [ "MIT" ], "directory_id": "e3d233b8a881448417403cc4a0bafa07850d358b", "extension": "py", "fi...
2.453125
stackv2
import imgaug as ia from imgaug import augmenters as iaa import cv2 import sys import os from PIL import Image from lxml import etree from xml.dom import minidom from shutil import copyfile from xml.dom import minidom import glob from scipy import ndimage ##############################################################...
315
42.03
143
21
3,600
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_bc0dbfa95b01f021_f8877d9a", "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" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 8, 10 ]
[ 8, 10 ]
[ 1, 1 ]
[ 28, 28 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The Python documentation recommends using `defusedxml` ins...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
generate_augs.py
/Detector/imgaug/generate_augs.py
HappyAdjustableSpanners/detector
MIT
2024-11-19T02:07:59.822076+00:00
1,676,235,648,000
745fe13c09544af13b297477339573416d9e6312
3
{ "blob_id": "745fe13c09544af13b297477339573416d9e6312", "branch_name": "refs/heads/master", "committer_date": 1676235780000, "content_id": "a298a32f417fccc24f9d993e309bf071e1f05590", "detected_licenses": [ "MIT", "BSD-3-Clause" ], "directory_id": "1b159e9237b2417b7964effc63f1266ad6d88385", "ext...
2.875
stackv2
"""Input/output functions for IRIS magnetotelluric data.""" __all__ = ["read_xml", "read_1d_usgs_profile", "get_1d_site"] import glob import datetime import xml.etree.ElementTree as ET import numpy as np import pandas as pd import pkg_resources from .site import Site1d, Site3d from .datalogger import DataLogger DAT...
248
32.44
94
20
1,930
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2eb7e177a523002a_76a96762", "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" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 7, 93 ]
[ 7, 93 ]
[ 1, 12 ]
[ 35, 27 ]
[ "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" ]
io.py
/bezpy/mt/io.py
greglucas/bezpy
MIT,BSD-3-Clause
2024-11-19T02:08:09.198316+00:00
1,578,644,412,000
6087b739520148e8a126900848748ddd709bc2c1
2
{ "blob_id": "6087b739520148e8a126900848748ddd709bc2c1", "branch_name": "refs/heads/master", "committer_date": 1578644412000, "content_id": "18175083b48ea71e7650590d8fec38ddd8466c57", "detected_licenses": [ "MIT" ], "directory_id": "d99dd5e7511c247f523bc2fcce348ff45ea5dc09", "extension": "py", "fi...
2.359375
stackv2
import hashlib import os import platform import subprocess import sys import time from clint.textui import progress from lxml import html import requests ####################################### # Global variables # ####################################### # TODO: Determine the installation location ...
214
40.55
145
16
2,011
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0652584c1f8d4f93_2cbb803a", "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...
14
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" ]
[ 134, 148 ]
[ 134, 148 ]
[ 12, 12 ]
[ 119, 109 ]
[ "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 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
causus.py
/src/causus.py
ryanc16/Causus-vipre-updater
MIT
2024-11-19T02:17:13.096725+00:00
1,613,177,624,000
35e040d17f2724b6976c6276afd3f003d81511a6
3
{ "blob_id": "35e040d17f2724b6976c6276afd3f003d81511a6", "branch_name": "refs/heads/master", "committer_date": 1613177624000, "content_id": "5de28e1a67cd92bf230657ee5d7068f6c06485d8", "detected_licenses": [ "MIT" ], "directory_id": "7240ef10124a94f4d6dd3c25a98a42b2a03a14e5", "extension": "py", "fi...
2.609375
stackv2
import json import logging import requests from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from config.settings.local import salary_index_name from search.salary.us_city_state import city_to_state_dict, us_states from search.salary.es_helper import query_builder, search_in_e...
90
36.88
115
19
674
python
[{"finding_id": "semgrep_rules.python.django.security.audit.no-csrf-exempt_885d4699d2814a94_4c5d88c4", "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...
4
true
[ "CWE-352", "CWE-918" ]
[ "rules.python.django.security.audit.no-csrf-exempt", "rules.python.django.security.injection.ssrf.ssrf-injection-requests" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "HIGH" ]
[ 20, 70 ]
[ 63, 80 ]
[ 1, 5 ]
[ 107, 110 ]
[ "A01:2021 - Broken Access Control", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "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.", "Data from request object is passed to a new server-side request. T...
[ 5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "HIGH" ]
views.py
/search/salary/views.py
Morvarid/django_elasticsearch_docker
MIT
2024-11-19T02:17:17.936808+00:00
1,640,251,835,000
f1eca68848b32f7aa0d3b46b89a22dcf433585e7
3
{ "blob_id": "f1eca68848b32f7aa0d3b46b89a22dcf433585e7", "branch_name": "refs/heads/master", "committer_date": 1640251835000, "content_id": "0b3b2fa0cae4690b1ca04f110927ded43ea8d94e", "detected_licenses": [ "MIT" ], "directory_id": "7e583c4b0323c5ab693719e6b48ed265e6174f4e", "extension": "py", "fi...
2.890625
stackv2
""" Generates LaTeX, Markdown, and HTML copies of my résumé. More information is available in the README file. """ import copy import glob import hashlib import os import posixpath import re import shutil import subprocess import time import git import jinja2 import tqdm import yaml import config from contexts impo...
559
28.6
80
22
3,247
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_e023ba585b424916_194d1c59", "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...
8
true
[ "CWE-78", "CWE-79", "CWE-116" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
[ 256, 365, 365 ]
[ 257, 365, 365 ]
[ 13, 26, 26 ]
[ 76, 61, 61 ]
[ "A01:2017 - Injection", "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected direct use of jin...
[ 7.5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
resume_generator.py
/resume_generator.py
masasin/resume
MIT
2024-11-19T02:17:21.536606+00:00
1,660,187,902,000
5c1cde9b90f492cb17ad99fbbf266d83ed45dc37
3
{ "blob_id": "5c1cde9b90f492cb17ad99fbbf266d83ed45dc37", "branch_name": "refs/heads/master", "committer_date": 1660187902000, "content_id": "260d0c0497cd1cd9d75980ef4b55344287aaa526", "detected_licenses": [ "MIT" ], "directory_id": "8afb5afd38548c631f6f9536846039ef6cb297b9", "extension": "py", "fi...
2.78125
stackv2
import psycopg2 import sqlite3 as sql # connection = psycopg2.connect( # dbname="rphzklxx", # user="rphzklxx", # password="J0i83etc3hsiBVaNQ5F999zzJJcFxluM", # host="rajje.db.elephantsql.com", # port="5432", # ) # curs = connection.cursor() # curs.execute(""" # CREATE TABLE test_table ( # id ...
89
20.78
69
11
536
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_5a230511fe0262c2_e4f985fc", "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...
3
true
[ "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" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "HIGH" ]
[ 82, 82, 82 ]
[ 88, 88, 88 ]
[ 5, 5, 5 ]
[ 6, 6, 6 ]
[ "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 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
LambdaPostgres.py
/MY_REPOS/Lambda-Resource-Static-Assets/1-projects/lambda/LambdaSQL/LambdaSQL-master/LambdaPostgres.py
bgoonz/UsefulResourceRepo2.0
MIT
2024-11-19T02:17:23.053065+00:00
1,576,557,191,000
2575f5bcb46937bf079ae6c053f2a46148068b7f
3
{ "blob_id": "2575f5bcb46937bf079ae6c053f2a46148068b7f", "branch_name": "refs/heads/master", "committer_date": 1576557191000, "content_id": "d925b7d7274aabaa783a6a6b383b343ff0254137", "detected_licenses": [ "MIT" ], "directory_id": "6029ec7653095a024453343d079b5b781c661870", "extension": "py", "fi...
2.65625
stackv2
import torch import torch.nn as nn from torch.utils import data as tds # linear elman rnn, class ControllableElmanGenerator(): def __init__(self, vocab_size, hdim, read_inputs=True, out_mult = 5): self.hdim = hdim outmap = torch.randn(vocab_size, hdim) out...
84
36.99
87
15
768
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0dc8ecf560551582_fa818b6a", "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" ]
[ 83 ]
[ 83 ]
[ 5 ]
[ 25 ]
[ "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_task_embed_dataset.py
/fairseq/data/rnn_task_embed_dataset.py
lajanugen/fairseq
MIT
2024-11-19T02:17:25.200894+00:00
1,633,443,203,000
5b78201c02eae25b556f196244260e48fba2fef0
3
{ "blob_id": "5b78201c02eae25b556f196244260e48fba2fef0", "branch_name": "refs/heads/master", "committer_date": 1633443203000, "content_id": "288cad828634759cabfe91d04709fb8d50157288", "detected_licenses": [ "MIT" ], "directory_id": "41d36d51c86d87e1dcc8e999539a9f1835f37714", "extension": "py", "fi...
2.9375
stackv2
# This imphook module implements "arrow functions", similar to JavaScript. # (a, b) => a + b ---> lambda a, b: a + b import tokenize import imphook class TokBuf: def __init__(self): self.tokens = [] def append(self, t): self.tokens.append(t) def clear(self): self.tokens.cle...
65
25.62
81
16
413
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_29f6ab8cf146e9bd_79433d15", "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.exec-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 61 ]
[ 61 ]
[ 5 ]
[ 28 ]
[ "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" ]
mod_arrow_func.py
/mod_arrow_func.py
timotheuslin/python-imphook
MIT
2024-11-19T02:17:29.920881+00:00
1,612,976,201,000
3c4318baa6f06b348fe6575a6c0dd51803d152ef
2
{ "blob_id": "3c4318baa6f06b348fe6575a6c0dd51803d152ef", "branch_name": "refs/heads/master", "committer_date": 1612976201000, "content_id": "625f7512d152d0bdc1403487aef39c2ba33df55c", "detected_licenses": [ "MIT" ], "directory_id": "0a7a8a62ba734dbd5325b0a2b0eb9fb6e6a48fcd", "extension": "py", "fi...
2.46875
stackv2
# !/usr/bin/env python # -*- coding: utf-8 ######################################################################################### # # Break down multiprocessing jobs across sub-datasets # example: python run_all.py -config config_sct_run_batch.yml # ###################################################################...
113
34.6
137
18
932
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_bc29a800261ebfae_f7ecd28b", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 109 ]
[ 109 ]
[ 9 ]
[ 48 ]
[ "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" ]
run_all.py
/run_all.py
sct-pipeline/csa-atrophy
MIT
2024-11-19T02:17:30.142250+00:00
1,550,954,337,000
6994d4895b06a94d9383de8c63fda0c41909aa9f
2
{ "blob_id": "6994d4895b06a94d9383de8c63fda0c41909aa9f", "branch_name": "refs/heads/master", "committer_date": 1550954337000, "content_id": "0c505bb4590a93e1acf6b57cdb93d5bc3b64ba4f", "detected_licenses": [ "MIT" ], "directory_id": "f97a74c1eae6c59cacb5eec60dba135cda1e6916", "extension": "py", "fi...
2.421875
stackv2
# # Imports # if True: import os,sys,inspect pwd = os.getcwd() # get the parent directory currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from pprint import pprint ...
163
35.22
176
21
1,342
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_e04cb225ac108ad8_fbfe50e7", "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 ...
8
true
[ "CWE-95", "CWE-95", "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.audit.exec-detected" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 46, 90, 149, 152 ]
[ 60, 90, 149, 152 ]
[ 9, 50, 60, 47 ]
[ 5, 67, 77, 64 ]
[ "A03:2021 - Injection", "A03:2021 - Injection", "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, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
flask_template.py
/server/boilerplate/flask_template.py
jeff-hykin/SimpleStack
MIT
2024-11-19T02:17:31.359038+00:00
1,642,058,305,000
3d90421bafc7f5d162361052a2c2a3a681e29796
2
{ "blob_id": "3d90421bafc7f5d162361052a2c2a3a681e29796", "branch_name": "refs/heads/master", "committer_date": 1642058305000, "content_id": "7cfe9bf9fa6770cd9c5ee895eedeba7876eb892e", "detected_licenses": [ "MIT" ], "directory_id": "4a96e3c942bc8f80cb0d8c17125f3d1fe9d88e3a", "extension": "py", "fi...
2.40625
stackv2
import os import resource import signal import subprocess def run_subprocess(cmd, timeout=2): with subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, preexec_fn=os.setsid) as process: try: output, unused_error = process.communicate(timeout=timeout) if...
103
32.1
124
16
849
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_e9cd5ed325e969af_dbbd9fc7", "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.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 8, 8, 15 ]
[ 8, 8, 15 ]
[ 10, 38, 19 ]
[ 113, 42, 58 ]
[ "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()'.", "Found 'subprocess' functi...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW" ]
[ "HIGH", "LOW", "HIGH" ]
core.py
/checker/core.py
arcturus5340/julia
MIT
2024-11-19T02:17:37.468806+00:00
1,517,710,117,000
3e3494631c74e06921ae1507c4b48a6f25b40e15
3
{ "blob_id": "3e3494631c74e06921ae1507c4b48a6f25b40e15", "branch_name": "refs/heads/master", "committer_date": 1517710117000, "content_id": "c136dd50dc6e186b1cf215afb7d8aaf78492c575", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "1e014116205cb29679c59e525c7fce9ec93a4f3a", "extension": "p...
2.546875
stackv2
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import re import sys import getopt import xml.dom.minidom import logging import requests logger = logging.getLogger('trips') drum_url = 'http://trips.ihmc.us/parser/cgi/drum' drum_dev_url = 'http://trips.ihmc.us/pa...
135
28.22
99
14
988
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_015250730b0b4f47_9e96e15b", "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...
7
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 6 ]
[ 6 ]
[ 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" ]
trips_client.py
/indra/sources/trips/trips_client.py
djmilstein/indra
BSD-2-Clause
2024-11-19T02:17:39.535848+00:00
1,497,198,562,000
ba58b5f2479891c1eb22931f666475e69d8ad069
3
{ "blob_id": "ba58b5f2479891c1eb22931f666475e69d8ad069", "branch_name": "refs/heads/master", "committer_date": 1497198562000, "content_id": "ad10b459e828c5dc16d3f2fa4ca1b7967a6413c9", "detected_licenses": [ "MIT" ], "directory_id": "9ae4736e85815ffa1aad04886bf020d709801e4d", "extension": "py", "fi...
2.78125
stackv2
# -*- coding: utf-8 -*- from vlc_player.myvlc import VLC, FileNotFoundException import requests import time import datetime import sched import json import os import platform import shutil import subprocess import psutil import logging """The client is responsible for playing the ads as a video loop continuously. It...
431
33.36
96
22
3,018
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_c6356a47f179dde3_1c071cfa", "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...
17
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 204 ]
[ 208 ]
[ 22 ]
[ 61 ]
[ "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" ]
http_client.py
/client/http_client.py
nakamura9/deploy_ad_server
MIT
2024-11-19T02:17:42.139131+00:00
1,557,337,246,000
eb812c2a5805ac6683317c7aaab9461ccd7d9d3b
3
{ "blob_id": "eb812c2a5805ac6683317c7aaab9461ccd7d9d3b", "branch_name": "refs/heads/master", "committer_date": 1557337246000, "content_id": "85f777712dd3ff9c39cff63406a52f6ce403b85b", "detected_licenses": [ "MIT" ], "directory_id": "c62765b9ac76ddaf7011e3fa4e7185d3a018a154", "extension": "py", "fi...
2.90625
stackv2
# -*- coding: utf-8 -*- """ Created on Wed Jan 9 17:00:39 2019 @author: TVA8FE """ import numpy as np import matplotlib.pyplot as plt import pickle from itertools import product def plot_confusion_matrix(cm, classes, normalize=False, title='Confusion matrix', ...
89
26.58
96
15
563
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0ff39101eeee88cf_d2797580", "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", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 54, 57, 60 ]
[ 54, 57, 60 ]
[ 12, 13, 15 ]
[ 31, 32, 34 ]
[ "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 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
plotConfMat.py
/Scripts/plotConfMat.py
VietTralala/DeepLearning_PlantDiseases
MIT
2024-11-19T02:17:42.204910+00:00
1,409,176,333,000
5e397667e29a1bc06b52c841ad4bfd7f93944f25
3
{ "blob_id": "5e397667e29a1bc06b52c841ad4bfd7f93944f25", "branch_name": "refs/heads/master", "committer_date": 1409176333000, "content_id": "de638e9941101bd5af080752705e597a5f567461", "detected_licenses": [ "MIT" ], "directory_id": "c13b2476828f3b1af6a4b4cc81ac0d6b3577cb0e", "extension": "py", "fi...
2.96875
stackv2
import re class FSM: rule_pattern = re.compile(r'\((\d+),(\w+),\(((\d+,)*\d+)\)\)') #despite a few checks fsm could still be invalid after this def file_init(self, f): try: self.num_states = int(f.readline()) self.start_state = 0 self.accept_state = self.num_sta...
181
33.75
134
24
1,372
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_4947b96cecee4dfe_d1c9f51d", "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" ]
[ 28 ]
[ 28 ]
[ 29 ]
[ 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" ]
FSM.py
/FSM.py
Irishmanluke/FSMGraphSimulator
MIT
2024-11-19T02:17:44.715870+00:00
1,596,189,140,000
1f965075486188f2120192a1ac53a561dd3347ec
3
{ "blob_id": "1f965075486188f2120192a1ac53a561dd3347ec", "branch_name": "refs/heads/master", "committer_date": 1596189140000, "content_id": "9fa942dfabe3e318180f802a870a0200fa7f5ccd", "detected_licenses": [ "MIT" ], "directory_id": "6ca9a7ed179ed96857c86dd91d5f81ad07be4690", "extension": "py", "fi...
2.765625
stackv2
import requests import time import json import pymysql from constant import city2code_dict def timestamp2date(timestamp): return time.strftime("%Y%m%d", time.localtime(timestamp)) querystring = { "defaultCityName": "北京", "districtName": "", "region": "", "block": "", "keyword": "巷上嘉园" } hea...
75
27.79
126
14
584
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_f7849ed0b8544dac_26909dbe", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-fn", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of function save_data. Consid...
7
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" ]
[ 60, 60 ]
[ 60, 60 ]
[ 9, 9 ]
[ 30, 30 ]
[ "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" ]
api.py
/KnowledgeMapping/SpiderExp/1-Code/房价网/api.py
nickliqian/keep_learning
MIT
2024-11-19T02:18:12.606436+00:00
1,554,250,587,000
160876f522511e44f4c5c8bd64297b5f8a3c1068
3
{ "blob_id": "160876f522511e44f4c5c8bd64297b5f8a3c1068", "branch_name": "refs/heads/master", "committer_date": 1554250587000, "content_id": "ed77b9dd4fec7807ea7e1b28954939a992ab0583", "detected_licenses": [ "MIT" ], "directory_id": "d7302868267c41389d38d57b9bfa7841466bbe1f", "extension": "py", "fi...
2.5625
stackv2
import numpy as np import time import glob import os import csv import pickle from sklearn.neighbors import KNeighborsClassifier from sklearn.metrics import classification_report, confusion_matrix class knn: def __init__(self): self.knclassifier = KNeighborsClassifier(n_neighbors=3) def tra...
51
32.76
104
15
404
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8629d5ee24c258a7_87e2c32f", "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" ]
[ 38, 47 ]
[ 38, 47 ]
[ 9, 29 ]
[ 61, 65 ]
[ "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" ]
knn.py
/src/learningModels/knn.py
berkott/SciFair
MIT
2024-11-19T02:18:12.659440+00:00
1,507,257,659,000
1fc3b6af53ce540022b482f21d27052bacda6d16
3
{ "blob_id": "1fc3b6af53ce540022b482f21d27052bacda6d16", "branch_name": "refs/heads/master", "committer_date": 1507257659000, "content_id": "a8e7613e4923237fee6540418cd430ef118294c3", "detected_licenses": [ "MIT" ], "directory_id": "101eb18d421c4fd558a805b980f0556570d3041b", "extension": "py", "fi...
2.859375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Album downloader for /r/CuteKorean subreddit @author: You Ver. 0.04 10/01/2017 - Need fix folder issue, and add try/except for TypeError 10/02/2017 - Fixed folder and TypeError, next create "a la carte" version 10/03/2017 - Need fix a-la-carte download issue. 10/04/2...
55
30.75
76
16
441
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_48033d2eddf2b78e_88a14390", "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-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 47 ]
[ 47 ]
[ 17 ]
[ 38 ]
[ "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" ]
cqrssdl_ala.py
/cqrssdl_ala.py
yudataguy/ck-downloader
MIT
2024-11-19T02:18:12.856802+00:00
1,629,484,486,000
4f99f3a11e9f458f01040259e7f6b974e397306d
3
{ "blob_id": "4f99f3a11e9f458f01040259e7f6b974e397306d", "branch_name": "refs/heads/main", "committer_date": 1629484486000, "content_id": "0a5b1a8016add408b43801499f72dc4cacfec6cd", "detected_licenses": [ "ISC" ], "directory_id": "9948e51bd93454e71052b97b9c1507d5e16b0a9e", "extension": "py", "file...
2.828125
stackv2
# Copyright (c) 2018, Toby Slight. All rights reserved. # ISC License (ISCL) - see LICENSE file for details. import curses import os import re import subprocess import time from columns import prtcols from yorn import ask from treepick import pick def chkdir(path): """ Check if a directory exists and if not...
176
30.65
79
18
1,315
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0e36bd21b2c73f7d_0348c8d8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
10
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" ]
[ 33, 34, 127, 127, 140, 140 ]
[ 35, 34, 127, 127, 140, 140 ]
[ 16, 39, 5, 32, 5, 32 ]
[ 57, 43, 37, 36, 37, 36 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "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()'.", "Found 'subprocess' functi...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
pyrap.py
/pyrap/pyrap.py
tslight/pyrap
ISC
2024-11-19T02:18:14.950222+00:00
1,608,451,009,000
c4cc9be5178f0cbb18394c7a8853053789732d2e
3
{ "blob_id": "c4cc9be5178f0cbb18394c7a8853053789732d2e", "branch_name": "refs/heads/main", "committer_date": 1608451009000, "content_id": "00ffe77cac8df06fa432a700d2baf633af853497", "detected_licenses": [ "MIT" ], "directory_id": "6874d2c953c01acf775164f85c1b52615e03109b", "extension": "py", "file...
2.640625
stackv2
#!/usr/bin/python # -*- coding: UTF-8 -*- # pip install pyyaml,uuid import os, time, json, yaml, uuid, platform class Management(): def __init__(self) -> None: with open('config.yaml',encoding='utf-8') as f: config = yaml.safe_load(f) try: pwdList = [] clash_ch...
111
37.19
148
22
1,117
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_267c5756a2bd3bb4_77e3a307", "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...
8
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 95 ]
[ 95 ]
[ 17 ]
[ 57 ]
[ "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" ]
clash+v2ray+trojan多用户管理脚本.py
/clash+v2ray+trojan多用户管理脚本.py
1eo1/Multi-Users-Management-Script-for-Clash-Trojan-and-V2ray
MIT
2024-11-19T02:18:17.096891+00:00
1,588,214,616,000
4098ed6494c009b3a619864bf0c53d5ef33e365d
3
{ "blob_id": "4098ed6494c009b3a619864bf0c53d5ef33e365d", "branch_name": "refs/heads/master", "committer_date": 1588214616000, "content_id": "db8fec9c11feadceb764060053e34d5ac9485d2a", "detected_licenses": [ "MIT" ], "directory_id": "5c0780c9ee671a8481f26fec452da392b9e1be51", "extension": "py", "fi...
2.734375
stackv2
################################################################################################### # Made with ♥️ by Carlos Paredes (github: CarloGauss33) # # MIT LICENCE 2020 # # ...
88
37.24
100
18
660
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3a02e0f8f74ded80_e61a542e", "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" ]
[ 37, 47 ]
[ 37, 47 ]
[ 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" ]
drive.py
/server/getter/drive.py
CarloGauss33/ldv-app
MIT
2024-11-19T02:18:18.235313+00:00
1,561,654,660,000
e767ad0d7a6d2c8170127c97e2df98bfaa8be1f2
3
{ "blob_id": "e767ad0d7a6d2c8170127c97e2df98bfaa8be1f2", "branch_name": "refs/heads/master", "committer_date": 1561654660000, "content_id": "1b48d750e3279a380870ae232b1ca740ca4502cb", "detected_licenses": [ "MIT" ], "directory_id": "a0b6189b656f121ad3352ab20efdb1fd758feff7", "extension": "py", "fi...
2.609375
stackv2
import time import os # sqlite-based cache class cache_sqlite: connection = None cursor = None tables = [] def __init__(self): # in-memory sqlite based cache self.connection = sqlite3.connect(':memory:', check_same_thread=False, isolation_level=None) self.cursor = self.connec...
96
28.62
167
16
684
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_4548e3d7668f6f27_7b4f0194", "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...
9
true
[ "CWE-89", "CWE-89", "CWE-502", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-502" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "HIGH", "MEDIUM" ]
[ 31, 41, 48, 55, 55, 56, 56, 60, 60 ]
[ 31, 41, 48, 55, 55, 56, 56, 60, 60 ]
[ 13, 18, 16, 13, 13, 13, 13, 9, 84 ]
[ 103, 96, 39, 129, 129, 94, 94, 168, 103 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A08:2017 - Insecure Deserialization", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A08:2017 - Insecure Deserialization" ]
[ "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, 5, 7.5, 5, 7.5, 7.5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "MEDIUM" ]
cache.py
/stock_Dash/cache.py
labs13-stock-price/data-science
MIT
2024-11-19T02:18:22.281145+00:00
1,388,187,359,000
d6e544ae68ff79b2c2b956a20d6303bb59cdaa63
3
{ "blob_id": "d6e544ae68ff79b2c2b956a20d6303bb59cdaa63", "branch_name": "refs/heads/master", "committer_date": 1388187359000, "content_id": "f90e6e05f451cc23bc089f8551a6e66ba61d80f1", "detected_licenses": [ "Zlib" ], "directory_id": "a05fc652bbc854b39767d7fd56116bf775b471c9", "extension": "py", "f...
3.015625
stackv2
# Copyright (c) 2013 Connor Sherson # # This software is provided 'as-is', without any express or implied # warranty. In no event will the authors be held liable for any damages # arising from the use of this software. # # Permission is granted to anyone to use this software for any purpose, # including commercial appl...
52
38.71
94
14
505
python
[{"finding_id": "semgrep_rules.python.lang.correctness.dict-del-while-iterate_6873de2ce9573844_a01de6d2", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.dict-del-while-iterate", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "It appears that `self.nodes[eachKe...
1
true
[ "" ]
[ "rules.python.lang.correctness.dict-del-while-iterate" ]
[ "correctness" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 50 ]
[ 52 ]
[ 9 ]
[ 40 ]
[ "" ]
[ "It appears that `self.nodes[eachKey]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration" ]
[ 5 ]
[ "" ]
[ "" ]
aipathgraph.py
/modules/stockclasses/aipathgraph.py
Occuliner/ThisHackishMess
Zlib
2024-11-19T02:18:22.797370+00:00
1,693,928,169,000
c0f8b6fb281079dc66d9df2f2e51a1757c41d8bf
3
{ "blob_id": "c0f8b6fb281079dc66d9df2f2e51a1757c41d8bf", "branch_name": "refs/heads/main", "committer_date": 1693928169000, "content_id": "32d538d61ddfcbe536c9631fa223d710da511e5f", "detected_licenses": [ "MIT" ], "directory_id": "091a6200be74bf6577c86f623665bcc24e16b02b", "extension": "py", "file...
3.078125
stackv2
# SPDX-FileCopyrightText: 2019 Melissa LeBlanc-Williams for Adafruit Industries # # SPDX-License-Identifier: MIT """ CircuitPython library to handle the input and calculations * Author(s): Melissa LeBlanc-Williams """ # pylint: disable=eval-used def calculate(number_one, operator, number_two): result = eval(numb...
140
33.76
95
19
1,060
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_c4c10e33a304018f_ea221666", "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" ]
[ 13 ]
[ 13 ]
[ 14 ]
[ 54 ]
[ "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" ]
calculator.py
/PyPortal_Calculator/calculator.py
adafruit/Adafruit_Learning_System_Guides
MIT
2024-11-19T02:18:25.979891+00:00
1,607,973,891,000
b0864d0e964d7ffb196dad00aa9bfda7dc7bdac2
3
{ "blob_id": "b0864d0e964d7ffb196dad00aa9bfda7dc7bdac2", "branch_name": "refs/heads/master", "committer_date": 1607973891000, "content_id": "b200b91e228427229424be7051bf5db16d79a71b", "detected_licenses": [ "MIT" ], "directory_id": "3c279bde31a5fde7599d529cead82662e4173462", "extension": "py", "fi...
2.953125
stackv2
''' Uses Stanford's NLP library to analyze and the sentiment of a block of text and provides functions to stop and start the server. ''' import os import numpy from pycorenlp import StanfordCoreNLP __author__ = "Finn Frankis" __copyright__ = "Copyright 2019, Crypticko" STANFORD_NLP_LOCATION = '~/stanford-corenlp-4...
99
43.55
173
15
1,040
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_fcf51a244ee0b29f_92bbb0b2", "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-95" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.exec-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "MEDIUM" ]
[ 27, 60 ]
[ 28, 60 ]
[ 4, 4 ]
[ 48, 48 ]
[ "A01:2017 - Injection", "A03:2021 - 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.", "Detected the use of...
[ 7.5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
nlp.py
/finndex/sentiment/nlp.py
FinnitoProductions/finndex
MIT
2024-11-19T02:18:30.863640+00:00
1,590,751,574,000
98fbc7380e9402f241e76c208ca535d075dd9a4a
3
{ "blob_id": "98fbc7380e9402f241e76c208ca535d075dd9a4a", "branch_name": "refs/heads/master", "committer_date": 1590751574000, "content_id": "0c314ea4bd462839e58579c3022a8e1e80cdae3f", "detected_licenses": [ "MIT" ], "directory_id": "d193d3b0c332694ed847aa5f301f9710fe437b03", "extension": "py", "fi...
2.515625
stackv2
import re import tekore as tk import pathlib import pickle import argparse import inquirer def get_config(): conf_path = pathlib.Path.home().joinpath('.spotify.cnf') return tk.config_from_file(conf_path.as_posix()) def get_user_token(): config = get_config() token_path = pathlib.Path.home().joinpat...
131
30.47
120
16
1,013
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_883b9118d2938d20_0dd15918", "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" ]
[ 19, 22 ]
[ 19, 22 ]
[ 13, 17 ]
[ 66, 31 ]
[ "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" ]
zpotify.py
/zpotify.py
fhvilshoj/zpotify
MIT
2024-11-19T02:29:53.772031+00:00
1,584,230,191,000
a7eccd8128e0003f7647e2c293e4ace2d28f9165
2
{ "blob_id": "a7eccd8128e0003f7647e2c293e4ace2d28f9165", "branch_name": "refs/heads/master", "committer_date": 1584230191000, "content_id": "de740b77fadb4aa501afa552385d88ec110acda4", "detected_licenses": [ "MIT" ], "directory_id": "94e85f3d888247107b3a75906a5eb35b3157c4d0", "extension": "py", "fi...
2.34375
stackv2
import spotipy import spotipy.util as util from sklearn.neighbors import NearestNeighbors from sklearn.preprocessing import StandardScaler, MinMaxScaler from flask import request import pandas as pd from pandas.io.json import json_normalize from flask import jsonify from joblib import load import pickle def instantia...
74
29.38
70
13
502
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_00b75264e32f51b1_09d8331e", "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" ]
[ 66 ]
[ 66 ]
[ 20 ]
[ 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" ]
predict.py
/Flask_ECS/ECSTEST_v1/models/predict.py
zwarshavsky/datascience
MIT
2024-11-19T02:29:58.144227+00:00
1,634,130,912,000
83267483ebd3a41bd02e0d78a01b480b6fb31519
2
{ "blob_id": "83267483ebd3a41bd02e0d78a01b480b6fb31519", "branch_name": "refs/heads/master", "committer_date": 1634130912000, "content_id": "bdd3ad45e9a5a8c1d66d69ddfbb9446099fc7a23", "detected_licenses": [ "MIT" ], "directory_id": "aa88548d729211428b3d5d7cfb9c3ba5881e168a", "extension": "py", "fi...
2.375
stackv2
# -*- coding: utf-8 -*- # (c) Copyright IBM Corp. 2019. All Rights Reserved. # pragma pylint: disable=unused-argument, no-self-use import requests import logging from resilient import is_env_proxies_set, get_and_parse_proxy_env_var, constants as res_constants from resilient_lib.components.integration_errors import Int...
267
44.64
170
20
2,517
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_d1fd7e2a02b92393_6181234c", "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()'...
6
true
[ "CWE-96", "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use", "rules.python.lang.security.dangerous-globals-use" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 126, 127 ]
[ 126, 127 ]
[ 54, 52 ]
[ 66, 64 ]
[ "A03:2021 - Injection", "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()'.", "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
requests_common.py
/resilient-lib/resilient_lib/components/requests_common.py
svetterIO/resilient-python-api
MIT
2024-11-19T02:29:59.111646+00:00
1,486,858,027,000
e46e2c1d2959cda3d2c51b21e73a7edda856b21e
2
{ "blob_id": "e46e2c1d2959cda3d2c51b21e73a7edda856b21e", "branch_name": "refs/heads/master", "committer_date": 1486858915000, "content_id": "49e4a9427abecec803c84824851607dceeed8bee", "detected_licenses": [ "MIT" ], "directory_id": "a2d578d11cefe4de07343d7d74834c460ff93475", "extension": "py", "fi...
2.3125
stackv2
import sqlite3 from db import get_connection, get_from_datamaster from db.tables import equip_slot_types requirements = [equip_slot_types] def build(): with get_connection() as con: con.row_factory = sqlite3.Row cur = con.cursor() cur.execute("SELECT EquipSlotTypeName, Id FROM EquipSlotT...
45
36.24
80
17
342
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_5aabcbe26e124ac7_cddcd0eb", "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" ]
[ 26, 26 ]
[ 30, 30 ]
[ 13, 13 ]
[ 59, 59 ]
[ "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" ]
equip_slots.py
/db/tables/equip_slots.py
jpludens/quartrmastr
MIT
2024-11-19T02:30:01.242130+00:00
1,557,495,890,000
effbfe8f3df229f1702cf108c118c18b4533581e
3
{ "blob_id": "effbfe8f3df229f1702cf108c118c18b4533581e", "branch_name": "refs/heads/master", "committer_date": 1557495890000, "content_id": "e8db9e93b64447dc38f78bf78161785b513f5ec6", "detected_licenses": [ "MIT" ], "directory_id": "d89fca2416c4c01fc0ce2120db7741a65be19bc5", "extension": "py", "fi...
3.03125
stackv2
import re import helpers class SimpleExcel: _cells = {} tools = {} _deps = {} def __init__(self): pass def __setitem__(self, key, formula): self._cells[key] = helpers.convert_reverse_polish_to_infix(formula) # self.__check_deps__() def __check_deps__(self): p...
42
27.12
107
20
280
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_e965597ec5493f8c_bc04b3b9", "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" ]
[ 35 ]
[ 35 ]
[ 16 ]
[ 63 ]
[ "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" ]
models.py
/simpleexel/models.py
diendv96/simple-excel
MIT
2024-11-19T02:30:03.543669+00:00
1,600,946,358,000
e48c02f577230f3a0a4013b73f72200af01f6ef3
2
{ "blob_id": "e48c02f577230f3a0a4013b73f72200af01f6ef3", "branch_name": "refs/heads/master", "committer_date": 1600946358000, "content_id": "ede92bc78a697f20e4d10e5e677360044b885ece", "detected_licenses": [ "MIT" ], "directory_id": "324b9677b38473906b3ace7ec9d337f55e6e386c", "extension": "py", "fi...
2.40625
stackv2
"""Handlers for Eagle Finance.""" import os import jinja2 import webapp2 from models.link import Link template_dir = os.path.join(os.path.dirname(__file__), '../templates') jinja_env = jinja2.Environment( loader=jinja2.FileSystemLoader(template_dir), autoescape=True) def render_str(template, *args, **param...
32
24.53
70
14
184
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_65bf602292d4b48b_da78df90", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 10, 19 ]
[ 12, 19 ]
[ 13, 12 ]
[ 21, 38 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected direct use of jinja2. If n...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
__init__.py
/handlers/__init__.py
saymorec/pyshortener
MIT
2024-11-19T02:30:07.503146+00:00
1,523,821,987,000
b2d0945b07af126fcf47aec96b493792a73f3c9a
3
{ "blob_id": "b2d0945b07af126fcf47aec96b493792a73f3c9a", "branch_name": "refs/heads/master", "committer_date": 1523821987000, "content_id": "05c5b00a8ab08810dba0d190461911c051d9480b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "58a96e3df2003eb89e6931d6d7b2685b01d5900b", "extension": "p...
2.546875
stackv2
# Copyright (C) 2016 New York University # This file is part of Data Polygamy which is released under the Revised BSD License # See file LICENSE for full license details. import os import sys import math import matplotlib matplotlib.use('Agg') matplotlib.rc('font', family='sans-serif') import matplotlib.pyplot as plt ...
186
29.87
134
18
1,575
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_50fbd882edc7ae90_d72dfbbf", "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" ]
[ 28 ]
[ 28 ]
[ 15 ]
[ 32 ]
[ "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" ]
pruning.py
/sigmod16/performance-evaluation/nyc-urban/pruning/pruning.py
awuyz0214/data-polygamy
BSD-3-Clause
2024-11-19T02:30:07.873570+00:00
1,634,564,231,000
6d10a455d355b366ef3b3857ab3a049b2535f471
2
{ "blob_id": "6d10a455d355b366ef3b3857ab3a049b2535f471", "branch_name": "refs/heads/master", "committer_date": 1634564231000, "content_id": "0d33f5d1d590eb71eb3991a342af6fd73da6c517", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e70ecf62f7ec3d3ead8ee690c3a03155f70d2bf3", "extension": "py"...
2.328125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # ############################################################################### # Copyright 2014 OCLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the Lic...
70
32.4
123
13
557
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_78dabc9e9df5f246_761d5349", "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" ]
[ 24 ]
[ 24 ]
[ 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" ]
hmac_request_example.py
/examples/hmac_authentication/hmac_request_example.py
OCLC-Developer-Network/oclc-auth-python
Apache-2.0
2024-11-19T02:30:14.146716+00:00
1,570,235,335,000
41163215ea7cc2f02280ca2b9be01e6b30ffb07f
3
{ "blob_id": "41163215ea7cc2f02280ca2b9be01e6b30ffb07f", "branch_name": "refs/heads/master", "committer_date": 1570235335000, "content_id": "b8415e23a077fb51f3d40a71153c8c57c2e1d962", "detected_licenses": [ "Apache-2.0" ], "directory_id": "568e680b634e8f41083e5ec79e75729e5cb8df01", "extension": "py"...
2.65625
stackv2
""" ///////////////////////////////////////////////////////////////////////////// Parameters: Input graph path (-i:) Output graph path (-o:) Number of dimensions. Default is 128 (-d:) Length of walk per source. Default is 80 (-l:) Number of walks per source. Default is 10 (-r:) Context size for optimization. Default i...
191
40.84
140
18
2,000
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_6f700ed6d0ec84b6_d46bf252", "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" ]
[ 119 ]
[ 122 ]
[ 13 ]
[ 112 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
node2vec_manager.py
/cerenkov3_classifier/node2vec_manager.py
ramseylab/cerenkov3
Apache-2.0
2024-11-19T02:30:14.732488+00:00
1,634,650,663,000
99d50186087d8e29f6d447a724a06c41ade2188c
2
{ "blob_id": "99d50186087d8e29f6d447a724a06c41ade2188c", "branch_name": "refs/heads/master", "committer_date": 1634650663000, "content_id": "6fed38cdbef512239973a0ed82eb99b3f062895b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "31bedf88d8ff2f59259e1a7891e5f7252a7a066c", "extension": "p...
2.46875
stackv2
# This code is a part of XMM: Generate and Analyse (XGA), a module designed for the XMM Cluster Survey (XCS). # Last modified by David J Turner (david.turner@sussex.ac.uk) 09/06/2021, 16:34. Copyright (c) David J Turner from functools import wraps from multiprocessing.dummy import Pool from subprocess import Popen, ...
260
53.29
120
22
3,044
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c47274bf6ef0e496_fcc165a9", "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.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 33, 33 ]
[ 33, 33 ]
[ 16, 33 ]
[ 64, 37 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
run.py
/xga/sas/run.py
LBJ-Wade/XGA
BSD-3-Clause
2024-11-19T02:30:15.134826+00:00
1,628,788,526,000
9b406932ce29026943f2ff850a106161bd85aa5c
2
{ "blob_id": "9b406932ce29026943f2ff850a106161bd85aa5c", "branch_name": "refs/heads/master", "committer_date": 1628788526000, "content_id": "1a0b586d161d497198e9c916c7d4ad770ef19119", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f31defedf071932ef34b655880f5a554bf4312a1", "extension": "py"...
2.40625
stackv2
import pickle import numpy as np import sys with open(sys.argv[1], 'rb') as handle: dict_out = pickle.load(handle) f2 = open(sys.argv[2],'r') var = f2.readlines() var = [x.strip() for x in var] index = list(range(3,3+len(var))) for idx, item in enumerate(var): dataValues = dict_out[item]['values'] data...
20
22.1
41
11
132
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c2e4f035797c32f2_b60706f1", "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" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 6 ]
[ 6 ]
[ 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" ]
adjustFormat.py
/WINGSWorkflowComponents/GeneralDataPreparation/deprecated/netCDF_simple/code/library/adjustFormat/adjustFormat.py
mintproject/MINT-WorkflowDomain
Apache-2.0
2024-11-19T02:30:15.949205+00:00
1,534,652,978,000
a2e5b93ed590cf79c55f2632b24f73ef1a348cd2
3
{ "blob_id": "a2e5b93ed590cf79c55f2632b24f73ef1a348cd2", "branch_name": "refs/heads/master", "committer_date": 1534652978000, "content_id": "2130f73bcaed44d5e1495f06926293e1840208af", "detected_licenses": [ "MIT" ], "directory_id": "3b423d2d42d39ca61760afdb41cf389e34404a39", "extension": "py", "fi...
3.109375
stackv2
''' Module that defines the Matroska class and its member methods. The Matroska class describes a mkv video. It holds the current path, filename and title of a video and the corresponding values set by the user while editing the video. Requires - mediainfo, mkvpropedit ''' import os import subprocess from _logs imp...
94
34.17
79
15
673
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_afdb537ed0122cf6_312312c2", "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", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 32, 35, 63, 66 ]
[ 37, 35, 68, 66 ]
[ 25, 19, 18, 19 ]
[ 10, 23, 10, 23 ]
[ "A01:2017 - Injection", "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()'.", "Found 'subprocess' function...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW" ]
file_mkv.py
/src/file_mkv.py
pranau97/VidRenamer
MIT
2024-11-19T02:30:18.970547+00:00
1,605,055,750,000
d7f5cb823bd0abd343a880cb1469fc06c1961994
3
{ "blob_id": "d7f5cb823bd0abd343a880cb1469fc06c1961994", "branch_name": "refs/heads/main", "committer_date": 1605055750000, "content_id": "1f2de7c6bc468945070075d83c2a2865a9351ce8", "detected_licenses": [ "Python-2.0" ], "directory_id": "bec5887ce083082808da3f14c1105901c0c356cc", "extension": "py", ...
2.625
stackv2
# downloads and untars model to saved_models directory given hub url import wget import tarfile from absl import app, flags import ssl FLAGS = flags.FLAGS flags.DEFINE_string('url', 'https://tfhub.dev/tensorflow/ssd_mobilenet_v2/2', 'hub url for model') flags.DEFINE_string('directory', './saved_models/', 'directory t...
22
33.5
98
12
187
python
[{"finding_id": "semgrep_rules.python.lang.security.unverified-ssl-context_0bb1b4aae98c4143_e6d823b1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.unverified-ssl-context", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Unverified SSL context detected. This will pe...
2
true
[ "CWE-295" ]
[ "rules.python.lang.security.unverified-ssl-context" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 13 ]
[ 13 ]
[ 5 ]
[ 71 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "Unverified SSL context detected. This will permit insecure connections without verifying SSL certificates. Use 'ssl.create_default_context' instead." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
save_model.py
/save_model.py
thomasmatt88/tfhub-od-easy
Python-2.0
2024-11-19T02:30:22.750750+00:00
1,609,227,789,000
215a607c5c271c86a86fe2a34643a6033c8d4ecb
2
{ "blob_id": "215a607c5c271c86a86fe2a34643a6033c8d4ecb", "branch_name": "refs/heads/main", "committer_date": 1609227789000, "content_id": "0a320a5bece0e7f522b63b84d1759cb889d14245", "detected_licenses": [ "MIT" ], "directory_id": "b99843c1580cb90e3e4fb273688331a4b2eec8e3", "extension": "py", "file...
2.5
stackv2
"""View functions of the Posts app.""" from django.http import HttpResponse from django.shortcuts import render, get_object_or_404 from .models import Quiz def index(request): """ Display all quizes :model:'quiz.Quiz' on the main page. """ quiz_list = Quiz.objects.all() return render( re...
94
31.61
79
19
674
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_6838e52bf4d6e189_95a9a5cf", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
3
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 93 ]
[ 93 ]
[ 16 ]
[ 47 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
views.py
/quiz/views.py
koshelevd/quizus
MIT
2024-11-19T02:30:26.309277+00:00
1,495,090,382,000
f6ebf5ca51b2fa7b9ecce21b0f00f163ead8a829
3
{ "blob_id": "f6ebf5ca51b2fa7b9ecce21b0f00f163ead8a829", "branch_name": "refs/heads/master", "committer_date": 1495090382000, "content_id": "dea8f794e6396cf6e0f83486b03861f8458ccfc6", "detected_licenses": [ "MIT" ], "directory_id": "4ae19617d8d2bcf989d4d72f767ab343db5e2dc5", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/env python """ Python indicator applet to show the status of several git repositories Behaviour --------- When first opened, all repo's in `~/.batchgit` are checked against the remote. A label is assigned of the form ahead, diverged, behind, up-to-date or no-state is recorded for each repo. The menu is the...
306
32.32
79
17
2,219
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_d56b228a7d5bdc7d_763e1883", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
9
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" ]
[ 150, 150, 159, 159, 171, 171 ]
[ 150, 150, 159, 159, 171, 171 ]
[ 26, 66, 18, 58, 18, 58 ]
[ 71, 70, 63, 62, 63, 62 ]
[ "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" ]
checkgit.py
/checkgit/checkgit.py
Python3pkg/CheckGit
MIT
2024-11-19T02:30:35.109935+00:00
1,590,768,039,000
aee2a7e64095f438498b04db2129732ba8f20fec
2
{ "blob_id": "aee2a7e64095f438498b04db2129732ba8f20fec", "branch_name": "refs/heads/master", "committer_date": 1590768039000, "content_id": "3e3543cbbf6e05e12526eeb8ecc4f04dc07198d3", "detected_licenses": [ "MIT" ], "directory_id": "35a3633cd4cba9371d3b7533b1480a43337d2dc1", "extension": "py", "fi...
2.328125
stackv2
import discord import sqlite3 import urllib.request import json import sys from datetime import datetime import time from dateutil import parser from threading import Thread client = discord.Client() try: cnxn = sqlite3.connect("users.db") except: print('missing db') sys.exit(0) crsr = cnxn.cursor() org_repos_u...
149
29.02
150
30
1,261
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_39ab6d2c9bd4dff0_c595458a", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
2
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 24 ]
[ 24 ]
[ 2 ]
[ 90 ]
[ "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
main.py
/v3_py/main.py
Hexadoon/Hexagoon
MIT
2024-11-19T02:30:38.913514+00:00
1,546,232,837,000
0f1103d6ed0415168dac8f47bf2db106db4618d1
2
{ "blob_id": "0f1103d6ed0415168dac8f47bf2db106db4618d1", "branch_name": "refs/heads/master", "committer_date": 1546232837000, "content_id": "6c8f05453d4752111c7a8c09fcefef50333814d8", "detected_licenses": [ "MIT" ], "directory_id": "171cf243fd92ec0179d6a06e45213aaee25d79ac", "extension": "py", "fi...
2.5
stackv2
#! /usr/bin/env python import argparse import os import pickle import numpy as np import tensorflow as tf from tensorflow.contrib import learn from model_config import PRED_CONFIG from text_cnn import load_model def load_data(eval_unknown, data_dir, model_dir, model_number): # CHANGE THIS: Load data. Load your ...
97
29.74
77
16
699
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_208c820a8b8ee266_8d39926e", "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" ]
[ 17, 22, 23, 93 ]
[ 18, 22, 23, 93 ]
[ 18, 18, 18, 5 ]
[ 66, 77, 75, 73 ]
[ "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" ]
pred.py
/src/pred.py
donaldchi/TextCNN
MIT
2024-11-19T02:41:39.052532+00:00
1,507,646,272,000
d3381f2d4906a2d6fd6eda16fe92f39b69310e39
2
{ "blob_id": "d3381f2d4906a2d6fd6eda16fe92f39b69310e39", "branch_name": "refs/heads/master", "committer_date": 1507646272000, "content_id": "4f5fe1d75efb0bf3df02f1b07abe6f9263abed14", "detected_licenses": [ "MIT" ], "directory_id": "cdedf21e95f8071fba0d4c013875a6b035da116c", "extension": "py", "fi...
2.484375
stackv2
import os import csv import numpy as np from matplotlib import pyplot as plt equalise_x = [] equalise_y = [] equalise_benevolence = [] cautious_x = [] cautious_y = [] cautious_benevolence = [] NoTrophallaxis_x = [] NoTrophallaxis_y = [] # First find the data for root, dirs, files in os.walk("/media/"): for file i...
79
36.52
100
26
752
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_f995a2990159e222_c36c3fe0", "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.exec-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 37 ]
[ 37 ]
[ 33 ]
[ 68 ]
[ "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" ]
plotting.py
/untitled/src/plotting.py
hphilamore/merge_test
MIT
2024-11-19T02:41:39.294172+00:00
1,567,708,924,000
1977140592ec36380375aa897e3417bcbdc1ab3a
3
{ "blob_id": "1977140592ec36380375aa897e3417bcbdc1ab3a", "branch_name": "refs/heads/master", "committer_date": 1567708924000, "content_id": "9fefeaa6da4d109d92557b4cd86d8dfc39481699", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "dacbde8336148e190c78bbb9c38657b333cdebea", "extension": "p...
3.265625
stackv2
""" Created on Nov 11, 2012 @author: jcg """ from itertools import product from collections import OrderedDict import logging logger = logging.getLogger(__name__) class Design(object): """ Abstract Class defining experimental design to be used featuresObj is a dictionary containing relevant info about d...
90
29.4
128
24
605
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_edf77ae1e2095a7b_9b94fdac", "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" ]
[ 71 ]
[ 72 ]
[ 35 ]
[ 106 ]
[ "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" ]
Design.py
/dtailor/DesignOfExperiments/Design.py
nmih/d-tailor
BSD-2-Clause
2024-11-19T02:41:44.925724+00:00
1,663,676,965,000
3e973b8302d5a6919861d9e0043698f5a09a2978
3
{ "blob_id": "3e973b8302d5a6919861d9e0043698f5a09a2978", "branch_name": "refs/heads/master", "committer_date": 1663678234000, "content_id": "61d321aa80e9e35964504ea9fe59adb6ece9acec", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "6ed0fb8f24adea16bfbb1dade7e6c668001bd53f", "extension": "p...
2.6875
stackv2
import hashlib import inspect import json import pickle import re import time from functools import wraps import arrow import redis from loguru import logger class CacheJSONEncoder(json.JSONEncoder): """JSON encoder that transforms Arrow objects to their string representation.""" def default(self, o): ...
295
36.97
120
22
2,275
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cf8310a0ea21b2f2_774f1b7a", "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" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 73, 91, 148 ]
[ 73, 93, 148 ]
[ 34, 41, 37 ]
[ 65, 22, 88 ]
[ "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 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
redis_cache.py
/depc/utils/redis_cache.py
ovh/depc
BSD-3-Clause
2024-11-19T02:41:45.426363+00:00
1,629,224,077,000
0adddbafc239ec3bc336484bd360b3e2fef19ff0
2
{ "blob_id": "0adddbafc239ec3bc336484bd360b3e2fef19ff0", "branch_name": "refs/heads/master", "committer_date": 1629224077000, "content_id": "cac9255aab7edcdf4f41ad9e48007994764c3487", "detected_licenses": [ "MIT" ], "directory_id": "11dc443441df9e8659dd6f949d0a36d42804eb51", "extension": "py", "fi...
2.453125
stackv2
from sys import argv from shutil import rmtree from os import system git_mode = False if "git" in argv: git_mode = True print("Cloning in git mode...") projects = open("projects").readlines() print(projects) for project in projects: project = project.strip("\n") try: rmtree(project) excep...
24
23.88
68
11
152
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3018426b3d7f7b97_aabb8a4b", "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-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 23 ]
[ 23 ]
[ 5 ]
[ 41 ]
[ "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" ]
setup-env.py
/setup-env.py
bluemediaapp/dockerfiles
MIT
2024-11-19T02:41:46.883193+00:00
1,531,170,754,000
7cfbc9677a6c97f44fe1129eebe2cf9294aaea2e
3
{ "blob_id": "7cfbc9677a6c97f44fe1129eebe2cf9294aaea2e", "branch_name": "refs/heads/master", "committer_date": 1531170754000, "content_id": "596b6d3009f65ebb8c4d4dd254433054e3bc7ea8", "detected_licenses": [ "MIT" ], "directory_id": "2bbcc780265742f1b502383a14f95327a57c255f", "extension": "py", "fi...
2.703125
stackv2
import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__))) from modules import ssh_device, SQL_Query from modules.SQL_Connection import SQLConnection from multiprocessing import Pool from threading import Thread def audit(device, deviceStatus): # Used to keep track of data in myThreads(). ...
78
38.17
115
16
692
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_6da5696a4c763f6e_bd027d74", "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" ]
[ 33, 33 ]
[ 33, 33 ]
[ 9, 9 ]
[ 89, 89 ]
[ "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" ]
Reachability_Audit.py
/Reachability_Audit.py
chrisotter92/ssh_loop
MIT
2024-11-19T02:41:48.894436+00:00
1,605,781,086,000
010a0e0059c267266ab76d87e653da49e66adf6f
3
{ "blob_id": "010a0e0059c267266ab76d87e653da49e66adf6f", "branch_name": "refs/heads/master", "committer_date": 1605781086000, "content_id": "bcd284c3854b2096b971fa2cbf562d4ee06c7a81", "detected_licenses": [ "MIT" ], "directory_id": "0eaf08a7bf7127d9652dee7201cea794a2204f1a", "extension": "py", "fi...
2.609375
stackv2
import subprocess import sys try: import idx2numpy except ImportError: print('installing idx2numpy...') subprocess.call([sys.executable, "-m", "pip", "install", 'idx2numpy']) from nn_functions import NeuralNetwork, pre_processing # Import data train_images, train_labels, test_images, test_labels = pre_pr...
21
28.81
74
10
156
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cc05810157f4afdf_390bf10d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 8 ]
[ 8 ]
[ 5 ]
[ 75 ]
[ "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" ]
install_network.py
/build/lib/install_network.py
Mittenbuhler/digit_recognition
MIT
2024-11-19T02:41:51.584305+00:00
1,456,477,853,000
e91cec508d247edd61bbc44fbf72e4d223c572c5
2
{ "blob_id": "e91cec508d247edd61bbc44fbf72e4d223c572c5", "branch_name": "refs/heads/master", "committer_date": 1456477853000, "content_id": "9235d46559f8ebf02c7f9c72be927a3d461e93a5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d0e02ca59414f3853da8afc8061677e1e766c823", "extension": "py"...
2.5
stackv2
#!/usr/local/bin/python # # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
151
24.48
74
16
923
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_d750f481f031b2dd_a3f76b36", "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 ...
8
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 41, 41, 45, 45, 51, 51, 60, 60 ]
[ 41, 41, 45, 45, 51, 51, 60, 60 ]
[ 14, 14, 5, 5, 12, 12, 17, 17 ]
[ 28, 28, 50, 50, 26, 26, 31, 31 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserial...
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead t...
[ 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
solutions.py
/solutions.py
nagyistge/cfircohen.airport
Apache-2.0
2024-11-19T02:41:53.114799+00:00
1,581,118,953,000
021d9ce09136a9a11615cd2399e9cdc7f0327b3a
3
{ "blob_id": "021d9ce09136a9a11615cd2399e9cdc7f0327b3a", "branch_name": "refs/heads/master", "committer_date": 1581118953000, "content_id": "e380a08f23aeda68c44c81dc4b1598d51af90bf9", "detected_licenses": [ "MIT" ], "directory_id": "fb9d1a0eb6a6ea017de12530eefc4a73852ecd44", "extension": "py", "fi...
2.734375
stackv2
import tkinter as tk from tkinter import ttk from tkinter import BOTH, END, LEFT, YES, ACTIVE from bs4 import BeautifulSoup import requests import time import re import os #Change download directory to desktop os.chdir(os.path.join(os.getenv('userprofile'),'Desktop')) def popupmsg(msg): popup = tk.Tk() popup.wm_ti...
299
29.99
75
20
2,573
python
[{"finding_id": "semgrep_rules.python.lang.correctness.return-in-init_0f419a5ba4da9ced_d8bd1c22", "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__...
34
true
[ "CWE-93", "CWE-93", "CWE-93" ]
[ "rules.python.django.security.injection.request-data-write", "rules.python.django.security.injection.request-data-write", "rules.python.django.security.injection.request-data-write" ]
[ "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 213, 262, 282 ]
[ 213, 262, 282 ]
[ 5, 6, 7 ]
[ 29, 30, 31 ]
[ "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Found user-controlled request data passed into '.write(...)'. This could be dangerous if a malicious actor is able to control data into sensitive files. For example, a malicious actor could force rolling of critical log files, or cause a denial-of-service by using up available disk space. Instead, ensure that requ...
[ 5, 5, 5 ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
app.py
/app.py
RichardLuc/Khinsider-Download-GUI
MIT
2024-11-19T02:41:54.815259+00:00
1,570,162,956,000
c400904c4e9e1e46f0147456a81bec49f946bc9a
2
{ "blob_id": "c400904c4e9e1e46f0147456a81bec49f946bc9a", "branch_name": "refs/heads/master", "committer_date": 1570162956000, "content_id": "f1450e70f91efcde60e726405bcd57b966f9883d", "detected_licenses": [ "MIT" ], "directory_id": "aa3f670fcc2b43d8a5eb8a131082510bed2eb4d8", "extension": "py", "fi...
2.34375
stackv2
""" Generate the dailyb spam, run from RUN_12Z.sh """ from __future__ import print_function import subprocess import smtplib import os import datetime from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart import psycopg2.extras import requests import pytz from pyiem.util import exponenti...
277
31.43
79
19
2,443
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_4c471a55638b0caf_5ba3ad36", "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...
9
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" ]
[ 160, 160 ]
[ 164, 164 ]
[ 5, 5 ]
[ 50, 50 ]
[ "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" ]
spammer.py
/scripts/dailyb/spammer.py
jamayfieldjr/iem
MIT
2024-11-19T02:41:56.893712+00:00
1,596,641,731,000
2849e4fe251ee6193756937c6c7b0a149ae7d5d1
3
{ "blob_id": "2849e4fe251ee6193756937c6c7b0a149ae7d5d1", "branch_name": "refs/heads/master", "committer_date": 1596641731000, "content_id": "68448cc4eb6eaf0a1f26498a00bfc25dc731b516", "detected_licenses": [ "Apache-2.0" ], "directory_id": "38b42430391fa58ec726d77c08b08daa8f8445a7", "extension": "py"...
2.71875
stackv2
# -*- coding: utf-8 -*- from wide_resnet import WideResNet import numpy as np import cv2 import dlib import pickle depth = 16 width = 8 img_size = 64 model = WideResNet(img_size, depth=depth, k=width)() model.load_weights('weights.hdf5') detector = dlib.get_frontal_face_detector() cap = cv2.VideoCapture('../data/vid...
67
26.27
98
16
591
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_11c1cbae26134948_28601624", "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" ]
[ 64 ]
[ 64 ]
[ 5 ]
[ 25 ]
[ "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" ]
age_detect.py
/CycleGAN/video_gender/age-gender-estimation/age_detect.py
RacleRay/Have_Fun
Apache-2.0
2024-11-19T02:41:58.457940+00:00
1,480,200,018,000
fcaa41e551a0b3481abcc565bf280025676e7c5e
3
{ "blob_id": "fcaa41e551a0b3481abcc565bf280025676e7c5e", "branch_name": "refs/heads/master", "committer_date": 1480200018000, "content_id": "2944e0a92f380ed6d193d37f34e4eb05305bc5ff", "detected_licenses": [ "MIT" ], "directory_id": "55fd63b7c1e692660e6bd3fc2edc3bc85175c3bf", "extension": "py", "fi...
2.671875
stackv2
# -*- coding: utf-8-*- """ A Speaker handles audio output from Jasper to the user Speaker methods: say - output 'phrase' as speech play - play the audio in 'filename' is_available - returns True if the platform supports this implementation """ import platform import tempfile import subprocess import pipes ...
64
27.47
76
16
415
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_93bc2883ccbf7272_743e98b6", "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" ]
[ 39, 50 ]
[ 39, 50 ]
[ 13, 13 ]
[ 53, 53 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functi...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
macos.py
/jessy/tts/macos.py
isbm/jessy
MIT
2024-11-19T02:41:59.669893+00:00
1,486,756,500,000
6bfde7e60a73c9b2295a273a2ae061334a50eb52
3
{ "blob_id": "6bfde7e60a73c9b2295a273a2ae061334a50eb52", "branch_name": "refs/heads/master", "committer_date": 1486756500000, "content_id": "fc7f7150f00179ee4785ecd395315bd850d40731", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "fca3dba8614322e504814096fb65a872bf3e854e", "extension": "p...
2.921875
stackv2
"""Core files for Felt. Handles browser instances """ import os import time from threading import Thread import json from Queue import Queue, Empty import subprocess __license__ = "MIT" __maintainer__ = "Samuel Vandamme" __email__ = "samuel@sava.be" __author__ = "Samuel Vandamme" __credits__ = ["Stijn Polfliet", "Sa...
160
25.8
75
18
841
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_99f7cb48e0223888_3db6891e", "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...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 141 ]
[ 146 ]
[ 19 ]
[ 10 ]
[ "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" ]
core.py
/core.py
spsingham1902/felt
BSD-3-Clause
2024-11-19T02:42:21.515622+00:00
1,685,013,366,000
8b7c2c90ecfe34c31d3f51d55668184190a6d1f3
2
{ "blob_id": "8b7c2c90ecfe34c31d3f51d55668184190a6d1f3", "branch_name": "refs/heads/master", "committer_date": 1685013366000, "content_id": "a50de0747a480e95c6b4caa30f1e2b303cb8dc5c", "detected_licenses": [ "MIT" ], "directory_id": "b90d7584e827c2d05be2ca47096c3b81d7d1eedb", "extension": "py", "fi...
2.484375
stackv2
# script to make count tables for the consensus reads of mtDNA import os import pysam import pandas as pd import re import glob import numpy as np import pickle import argparse # read command line inputs if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--tables_directory", "-t", ...
50
28.44
147
10
350
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_63f2d8ed8b4540eb_ddf41bb2", "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-78", "CWE-78" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "HIGH", "HIGH" ]
[ 31, 35, 50, 50 ]
[ 31, 35, 50, 50 ]
[ 15, 5, 5, 5 ]
[ 44, 68, 23, 23 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "HIGH", "HIGH" ]
merge_count_tables.py
/library_processing/mitochondria/scripts/merge_count_tables.py
veltenlab/CloneTracer
MIT
2024-11-19T02:42:23.877884+00:00
1,430,835,463,000
23b7f8396109d3176586e0aaec66964baa7dc2b3
2
{ "blob_id": "23b7f8396109d3176586e0aaec66964baa7dc2b3", "branch_name": "refs/heads/master", "committer_date": 1430835463000, "content_id": "07af46a98ed552e94266dd1a361f883511d7cfd8", "detected_licenses": [ "MIT" ], "directory_id": "4ed323e767745d579d19e8c0179220de2f7cd9bf", "extension": "py", "fi...
2.421875
stackv2
""" Represents a server instance """ import datetime import os import os.path import socket import subprocess import tarfile from mcserver import base, config, reflection, rcon, query class Server(object): """ A server object, its configs, and parts of its state and functions. """ # TODO: maybe make this take a...
269
21.75
92
15
1,571
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c021af12100f3355_13102d38", "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.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 68, 68 ]
[ 68, 68 ]
[ 14, 59 ]
[ 64, 63 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
server.py
/mcserver/server.py
cadyyan/mcserver-tools
MIT
2024-11-19T02:42:28.788026+00:00
1,599,575,262,000
98f5e07fb8c4690775f267a2c28232511f9c0f56
3
{ "blob_id": "98f5e07fb8c4690775f267a2c28232511f9c0f56", "branch_name": "refs/heads/master", "committer_date": 1599575262000, "content_id": "4f1b4f04e28faf05baf3559f2aa27c79ca559924", "detected_licenses": [ "MIT" ], "directory_id": "99f5248998041f1b8afcdb73c3ba079d971f6208", "extension": "py", "fi...
3.234375
stackv2
""" Misc utilities """ import pickle import sys # ====================================================================================================== # Classes # ====================================================================================================== class PersistentObject: def __init__(self...
119
29.72
108
15
832
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_4a3ac824f687d52a_ea6b8fc1", "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" ]
[ 27, 42 ]
[ 27, 42 ]
[ 19, 13 ]
[ 70, 58 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
misc.py
/src/misc.py
chanzuckerberg/concept_discovery
MIT
2024-11-19T02:50:46.823761+00:00
1,630,115,738,000
92e8a395f9e69f2813baf6fd4940bad8d6a561ab
2
{ "blob_id": "92e8a395f9e69f2813baf6fd4940bad8d6a561ab", "branch_name": "refs/heads/master", "committer_date": 1630115738000, "content_id": "09146a1dbd9ffba4e5db788a40a136939812b4fa", "detected_licenses": [ "MIT" ], "directory_id": "8beecf4c9a8e3a2fe5316e9ae3ae06f8ba8de1ab", "extension": "py", "fi...
2.4375
stackv2
import os import shutil import asyncio import json from datetime import datetime, timezone from sqlitedict import SqliteDict from discord import Embed, PermissionOverwrite, Member from discord.ext import commands from discord.ext.commands import Context from discordbot.core.discord_bot import DiscordBot from discordb...
296
34.4
90
23
2,175
python
[{"finding_id": "semgrep_rules.python.lang.correctness.dict-del-while-iterate_73e4bea155685d46_85be35a2", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.dict-del-while-iterate", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "It appears that `self.db[sid][grou...
2
true
[ "" ]
[ "rules.python.lang.correctness.dict-del-while-iterate" ]
[ "correctness" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 35 ]
[ 71 ]
[ 13 ]
[ 75 ]
[ "" ]
[ "It appears that `self.db[sid][group]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration" ]
[ 5 ]
[ "" ]
[ "" ]
groups.py
/src/discordbot/plugins/groups.py
CodeBizarre/discord-bot
MIT
2024-11-18T18:05:43.839743+00:00
1,687,782,834,000
dc88cdc17a7eab82bf7eff37dfdcc8698c7f1432
2
{ "blob_id": "dc88cdc17a7eab82bf7eff37dfdcc8698c7f1432", "branch_name": "refs/heads/master", "committer_date": 1687782834000, "content_id": "5ee482a5ff2288923f51a816cbf90ec7586c23b5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "18e174d7cc7d0dd967eef1574c953f94eed38637", "extension": "py"...
2.5
stackv2
## # # File: PdbxContainers.py # Original: 02-Feb-2009 jdw # # Update: # 23-Mar-2011 jdw Added method to rename attributes in category containers. # 05-Apr-2011 jdw Change cif writer to select double quoting as preferred # quoting style where possible. # 16-Jan-2012 jdw Create base...
330
31.24
143
16
2,366
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_7d6a0e31dc9067cc_e8be2d62", "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" ]
[ 318 ]
[ 318 ]
[ 9 ]
[ 54 ]
[ "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" ]
PdbxContainers.py
/mmcif/api/PdbxContainers.py
rcsb/py-mmcif
Apache-2.0