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-18T20:11:01.262660+00:00
1,614,619,985,000
6f8866afa7c7f6d571169fe09d409a67413a5542
3
{ "blob_id": "6f8866afa7c7f6d571169fe09d409a67413a5542", "branch_name": "refs/heads/main", "committer_date": 1614619985000, "content_id": "0f2f680395e8f3d8ee3841eb911f9b02441b0a27", "detected_licenses": [ "MIT" ], "directory_id": "c70a8172869d2568c7b7472a32c08af24037d28a", "extension": "py", "file...
2.640625
stackv2
import os import glob from PIL import Image, ImageDraw import scipy.io import xml.etree.ElementTree import random def Celeba(): """ Crop CelebA images to bounding box annotations :return: """ dataset_dir = '../Datasets/CelebA/' image_dir = os.path.join(dataset_dir, 'Images-aligned', 'img_celeb...
193
35.55
104
19
1,830
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_04e027d09d73c66d_47933408", "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...
10
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" ]
[ 5, 180 ]
[ 5, 180 ]
[ 1, 9 ]
[ 29, 42 ]
[ "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" ]
preprocess_datasets.py
/preprocess_datasets.py
pb2377/PyTorch-Disentangling-Content-and-Style-Unsupervised
MIT
2024-11-18T20:11:03.615986+00:00
1,684,884,731,000
ba1778b44d1c7b695befff3cff17b86279468f12
2
{ "blob_id": "ba1778b44d1c7b695befff3cff17b86279468f12", "branch_name": "refs/heads/master", "committer_date": 1684884731000, "content_id": "a34cc26a5fe7842979a520b6e45d9dbb7b3ff343", "detected_licenses": [ "MIT" ], "directory_id": "6854245cb990954015e91a98604b7f9355d631a7", "extension": "py", "fi...
2.359375
stackv2
#-------------------------------------------- # Copyright 2013-2018, Grant Viklund # @Author: Grant Viklund # @Date: 2017-02-20 13:50:51 # @Last Modified by: Grant Viklund # @Last Modified time: 2018-12-21 15:47:12 #-------------------------------------------- import re, os.path import ast import pprint import logg...
288
29.47
125
16
2,020
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3e805c4785c414d2_d2395607", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 206 ]
[ 206 ]
[ 18 ]
[ 46 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
__init__.py
/stubtools/core/__init__.py
renderbox/django-stubtools
MIT
2024-11-18T20:26:02.541873+00:00
1,398,123,468,000
a45ed77cdd28ba8a8c72abd47b7c9e84237a285b
3
{ "blob_id": "a45ed77cdd28ba8a8c72abd47b7c9e84237a285b", "branch_name": "refs/heads/master", "committer_date": 1398123468000, "content_id": "45aa2a79456c13e38a3d9d1fca5838f1205954ea", "detected_licenses": [ "Apache-2.0" ], "directory_id": "72b5046f9a1bf097752b3653cefba5014d01afb1", "extension": "py"...
2.515625
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- try: import cPickle as pickle except ImportError: import pickle class db: def __init__(self, filename, i=None): self.filename=filename def open_db(self): try: fichero = file("%s.dat" % self.filename ) fichero = pickle.load(fichero) return fichero except ...
33
21.76
47
14
226
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_51485e6d0ca4bf75_8c3d7ecd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
6
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "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" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 14, 14, 28, 28, 32, 32 ]
[ 14, 14, 28, 28, 32, 32 ]
[ 14, 14, 3, 3, 3, 3 ]
[ 34, 34, 31, 31, 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" ]
[ "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 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
db.py
/API/db.py
IsmaeRLGV/Modular-UserBot-
Apache-2.0
2024-11-18T20:26:04.201678+00:00
1,537,524,307,000
7484cef7fc9c9eaa75ffc09a4aeebc54bd03919b
3
{ "blob_id": "7484cef7fc9c9eaa75ffc09a4aeebc54bd03919b", "branch_name": "refs/heads/master", "committer_date": 1537524307000, "content_id": "7a8851a6d4405ab15b6ce0354bbc89ac99be7fd3", "detected_licenses": [ "MIT" ], "directory_id": "664be60f0ba57674ccc30d4f79d6a7c353ca40f9", "extension": "py", "fi...
2.9375
stackv2
from phone import Phone import pymysql class PhoneData: """按照运营商批量生成手机号,并根据归属地存储到数据库""" def __init__(self, host, port, user, database, password): self.p = Phone() self.db = pymysql.connect(host=host, port=port, user=user, database=database, password=password) self.cursor = self.db.cur...
99
31.85
118
23
1,017
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_db39bf3e89105d01_e8569824", "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" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "HIGH" ]
[ 54, 54 ]
[ 54, 54 ]
[ 13, 13 ]
[ 37, 37 ]
[ "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" ]
tphone.py
/tphone.py
fgetwewr/tphone
MIT
2024-11-18T20:26:09.771148+00:00
1,547,919,780,000
f9567faa14dee2d3cdfacf005c26148fdcf10ffe
3
{ "blob_id": "f9567faa14dee2d3cdfacf005c26148fdcf10ffe", "branch_name": "refs/heads/master", "committer_date": 1547919780000, "content_id": "a15af79361085f52a8df3570da65824934ed63ac", "detected_licenses": [ "Apache-2.0" ], "directory_id": "467c7811ef2de5474e779da0e0324311ab91670c", "extension": "py"...
2.703125
stackv2
from flask import Flask, jsonify import numpy as np from sklearn.externals import joblib import pickle from sklearn.preprocessing import LabelEncoder app = Flask(__name__) one_model = joblib.load('knn_one_v1.pkl') one_model_3 = joblib.load('svm_one_v1.pkl') one_model_2 = None # loading the encoders gender_label = ...
62
28.06
108
18
450
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6d09b57333b1aa7a_2df33d8f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 22 ]
[ 22 ]
[ 10 ]
[ 51 ]
[ "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" ]
problem_one_server.py
/web_service/problem_one_server.py
DatabrainsDz/BI4SS-ML
Apache-2.0
2024-11-18T20:26:12.528576+00:00
1,457,650,956,000
6a9c37e58e495ec2f3dfe5c3f8798e78392bda42
3
{ "blob_id": "6a9c37e58e495ec2f3dfe5c3f8798e78392bda42", "branch_name": "refs/heads/master", "committer_date": 1457650956000, "content_id": "610e8dcf6471ac89d5aedb2b1d090b0b15ab5118", "detected_licenses": [ "MIT" ], "directory_id": "4400b76ddd6dab489fa0cd0bd368e783883d6989", "extension": "py", "fi...
2.921875
stackv2
import xml.etree.ElementTree as Xml class JUnitXMLReader: """ JUnit XML files reader. """ @staticmethod def read_testsuite(file): """ Parse the specified XML file and compute tests suite results. :param file: XML report to read :return: tests suite results """ ...
46
29.89
75
18
300
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_b4bdb54bf8a91707_ea41c445", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 1, 15 ]
[ 1, 15 ]
[ 1, 16 ]
[ 36, 31 ]
[ "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" ]
junitxmlreader.py
/Mr.Statapython/statapython/stataxml/junitxmlreader.py
Lydwen/Mr.Statamutation
MIT
2024-11-18T20:26:19.759957+00:00
1,529,059,913,000
e6e68297d8b035ba53014d6d8182dd6814e243b2
3
{ "blob_id": "e6e68297d8b035ba53014d6d8182dd6814e243b2", "branch_name": "refs/heads/master", "committer_date": 1529059913000, "content_id": "2a148ef613ea50d08d78cece57bb524d6a538e2b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "637004f4feba963185f438380b401b03bfdc0ea0", "extension": "py"...
2.578125
stackv2
from subprocess import Popen, PIPE __author__ = 'Ahmed G. Ali' def execute_command(cmd, user=None, interactive=False): """ Executes shell command with the capability of specifying executing user. :param cmd: The command to be executed. could be more than one command separated by ``;`` :type cmd: st...
45
29.56
108
10
406
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1be428bef73a7b8b_220f8095", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 26 ]
[ 26 ]
[ 9 ]
[ 59 ]
[ "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" ]
common.py
/utils/common.py
emmyneutron/ae_auto
Apache-2.0
2024-11-18T20:26:22.270023+00:00
1,460,623,368,000
ac55fa0bbd98beadec4618bbc56350fe4621646a
2
{ "blob_id": "ac55fa0bbd98beadec4618bbc56350fe4621646a", "branch_name": "refs/heads/master", "committer_date": 1460623368000, "content_id": "b674d1def5b3b2c22dac066ce41a63de370e8d73", "detected_licenses": [ "MIT" ], "directory_id": "15fd75d8b7bfa0b6d1107bc3ea2614657037e07e", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- import glob import os import sys import xml.etree.ElementTree as et ANSI_BOLD = '\033[1m' ANSI_RED = '\033[31m' ANSI_GREEN = '\033[32m' ANSI_YELLOW = '\033[33m' ANSI_BLUE_BOLD = '\033[34;1m' ANSI_GRAY = '\033[37m' ANSI_GRAY_BOLD = '\033[37;1m' ANSI_RESET = '\033[0m' ANSI_CLEA...
202
27.08
76
18
1,433
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c5794e1e8a17194e_0e7e9e40", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 7, 164 ]
[ 7, 164 ]
[ 1, 21 ]
[ 35, 40 ]
[ "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" ]
junit_xml_prettfier.py
/lib/junit_xml_prettfier.py
HPI-BP2015H/smalltalkCI
MIT
2024-11-18T20:26:23.000736+00:00
1,568,879,526,000
d20575758650dd412acee0700e044cf3db7de1b4
3
{ "blob_id": "d20575758650dd412acee0700e044cf3db7de1b4", "branch_name": "refs/heads/master", "committer_date": 1568879526000, "content_id": "cec65db4b69e7f360af8316f9f7efe71967b8136", "detected_licenses": [ "MIT" ], "directory_id": "ae35395500c9bd12d2bc91bba8d42c2bcbae7096", "extension": "py", "fi...
2.75
stackv2
#coding UTF-8 #TkinterでGUI化 import os import tkinter.messagebox import tkinter.font as font from tkinter import filedialog as tkFileDialog import shelve import yodobashic_photo_maker as ypm #基本設定 app_name = "某家電量販店っぽく画像に文字入れするやつ" app_size = "400x280" #rootウィンドウの設定 root = tkinter.Tk() root.title(app_name) root.geome...
214
35.31
161
17
2,275
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_d50b5cac0376e022_b5ccd65f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-shelve", "rules.python.lang.security.deserialization.avoid-shelve" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 59, 176 ]
[ 59, 176 ]
[ 16, 25 ]
[ 41, 50 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `shelve`, whic...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
ypm_gui.py
/ypm_gui.py
ddg171/yodobahic_photo_maker
MIT
2024-11-18T20:26:28.241707+00:00
1,520,983,342,000
7b350af18d32539cae52f5b571ff3487685537e5
3
{ "blob_id": "7b350af18d32539cae52f5b571ff3487685537e5", "branch_name": "refs/heads/master", "committer_date": 1520983342000, "content_id": "79ef62475648e74b36bca73e96c64c065541d2c1", "detected_licenses": [ "MIT" ], "directory_id": "8021df5b5ffa200e4806bc846e868ad4c0228ce6", "extension": "py", "fi...
2.671875
stackv2
import redis import csv import pickle import logging import os from pprint import pformat class DictCache(object): """ Persistent dict caching """ def delete(self, id, *args, **kwargs): raise NotImplementedError def get(self, id, *args, **kwargs): raise NotImplementedError de...
285
24.53
89
17
1,726
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_110a603b01c824e8_db48aebb", "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" ]
[ 129, 133 ]
[ 129, 133 ]
[ 26, 13 ]
[ 40, 39 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
dcache.py
/DianaFuture/dcache.py
jmartens/DIANA
MIT
2024-11-18T20:26:28.576406+00:00
1,683,458,807,000
dbb5348480d4b7934b59ff3804e4817dfc44a724
2
{ "blob_id": "dbb5348480d4b7934b59ff3804e4817dfc44a724", "branch_name": "refs/heads/master", "committer_date": 1683458807000, "content_id": "315a18e6a18be96e64d17f4aa43354db3a035d90", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1522ea608f6c79c7f44389b3270bd931e132ca33", "extension": "py"...
2.34375
stackv2
import json from functools import wraps from flask import Flask, make_response, redirect, url_for, request, jsonify from flask.json import JSONEncoder from flask import Response # project configuration wrapper: yaml formatted file from misc.config import settings as conf from quiver import quiver from quiver import unp...
239
26.08
76
17
1,375
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_dd59e09a58bf2283_5039dba5", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "...
1
true
[ "CWE-79" ]
[ "rules.python.flask.security.audit.xss.make-response-with-unknown-content" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 54 ]
[ 54 ]
[ 20 ]
[ 53 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ...
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
bow.py
/bow.py
jasset75/apollo
Apache-2.0
2024-11-18T20:26:34.797835+00:00
1,626,007,233,000
b744de18eaf0c23980323ac1db49205ac81c03a8
3
{ "blob_id": "b744de18eaf0c23980323ac1db49205ac81c03a8", "branch_name": "refs/heads/main", "committer_date": 1626007233000, "content_id": "df0a04f047e65af3c01419d5855a934f662d352b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "33f89e3f76a5988cb4b9360a12d6202b46283414", "extension": "py"...
2.703125
stackv2
import random import os import requests from flask import Flask, render_template, abort, request from QuoteEngine import Ingestor from MemeEngine import MemeGenerator app = Flask(__name__) meme = MemeGenerator('./static') def setup(): """ Load all resources """ quote_files = ['./_data/DogQuotes/DogQuotesT...
76
23.45
75
12
445
python
[{"finding_id": "semgrep_rules.python.django.security.injection.ssrf.ssrf-injection-requests_0aaf7f67345935e2_5bcbc460", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.ssrf.ssrf-injection-requests", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from...
4
true
[ "CWE-918", "CWE-918" ]
[ "rules.python.django.security.injection.ssrf.ssrf-injection-requests", "rules.python.flask.security.injection.ssrf-requests" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 59, 60 ]
[ 60, 60 ]
[ 5, 16 ]
[ 52, 52 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox...
[ 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
app.py
/src/app.py
svd-007/Meme-Generator
BSD-3-Clause
2024-11-18T20:26:35.052167+00:00
1,631,939,320,000
9bb5660c0e94d247983f740806bb8f7704fe0537
2
{ "blob_id": "9bb5660c0e94d247983f740806bb8f7704fe0537", "branch_name": "refs/heads/master", "committer_date": 1631939320000, "content_id": "7a02d4707149d09beb692cd50091924ba6ad4f77", "detected_licenses": [ "MIT" ], "directory_id": "7a1e37329585c2a8b3b3aa6719ec1635ef9b4c9d", "extension": "py", "fi...
2.5
stackv2
''' Created on May 29, 2019 Ch07 @author: Burkhard A. Meier ''' import mysql.connector import Ch07_Code.GuiDBConfig as guiConf GUIDB = 'GuiDB' # unpack dictionary credentials conn = mysql.connector.connect(**guiConf.dbConfig) cursor = conn.cursor() try: cursor.execute("CREATE DATABASE {} \ ...
23
21.87
78
11
128
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_8854258e940c0e52_55f0556f", "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" ]
[ 18, 18 ]
[ 19, 19 ]
[ 5, 5 ]
[ 65, 65 ]
[ "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" ]
MySQL_create_DB.py
/open_source/Python-GUI-Programming-Cookbook-Third-Edition/Ch07_Code/MySQL_create_DB.py
liuwenye2010/prj_python
MIT
2024-11-18T20:26:36.058497+00:00
1,600,159,840,000
503edb23aca57577605827702d4bbb106482d53f
3
{ "blob_id": "503edb23aca57577605827702d4bbb106482d53f", "branch_name": "refs/heads/master", "committer_date": 1600159840000, "content_id": "cbba2e93a7cf8e6829742f00807fe3e948af3137", "detected_licenses": [ "MIT" ], "directory_id": "4f52658d498fd854e7030d2b4b69d08cfde814b1", "extension": "py", "fi...
2.984375
stackv2
import threading import queue import subprocess from subprocess import * from subprocess import check_output as __check_output try: getattr(subprocess, 'TimeoutExpired') except AttributeError: # Timeout exception class TimeoutExpired(CalledProcessError): def __init__(self, cmd, timeout, output): ...
68
26.28
71
17
381
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_64689292c4af0dc0_0559d977", "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" ]
[ 27, 37 ]
[ 27, 37 ]
[ 20, 24 ]
[ 51, 57 ]
[ "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 subproc...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
__future_subprocess.py
/klausuromat/__future_subprocess.py
seecurity/klausuromat
MIT
2024-11-18T20:26:41.000691+00:00
1,391,537,973,000
1f21f09a65c20b0230ddeb497c6eed3fca898acd
3
{ "blob_id": "1f21f09a65c20b0230ddeb497c6eed3fca898acd", "branch_name": "refs/heads/master", "committer_date": 1391537973000, "content_id": "a5cc523c041f8938d3661a38f96740e76b24a69e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "d0678e09f453561cf6443409b2fa73e0797afff9", "extension": "p...
2.71875
stackv2
from .datalog2sql.datalog2sqlconverter import Datalog2SqlConverter from .sql_engine.query_evaluator import QueryEvaluator from .sql_engine.db_state_tracker import DBStateTracker from colorama import * from .interpreter.interpreter_parse import * from .interpreter.syntax_highlighter import SyntaxHighlight import sys imp...
196
30.64
112
18
1,516
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_546bdefc9b134c08_1be33709", "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-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 115, 121 ]
[ 115, 121 ]
[ 9, 9 ]
[ 65, 74 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
yadi.py
/yadi/yadi.py
saltzm/yadi
BSD-3-Clause
2024-11-18T20:26:44.270926+00:00
1,578,876,984,000
57741b81426fb958ac999e0bce8b3ff6bf7872c3
3
{ "blob_id": "57741b81426fb958ac999e0bce8b3ff6bf7872c3", "branch_name": "refs/heads/master", "committer_date": 1578876984000, "content_id": "72068364085dcfc3ecbead06503fe900dae6ac82", "detected_licenses": [ "MIT" ], "directory_id": "8f4316990a92478acb8210442ae450653ad700d4", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python3 from collections import defaultdict from types import SimpleNamespace from pywup.services.system import read_csv, Args from pywup.services.general import find_column #import matplotlib.colors as mcolors import matplotlib.pyplot as plt import numpy as np import colorcet import math import sys ...
313
23.98
88
21
1,956
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_15649fa7211dedfd_bcc1ddf9", "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 ...
6
true
[ "CWE-95", "CWE-95", "CWE-95", "CWE-95", "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 39, 131, 140, 149, 168, 180 ]
[ 39, 131, 140, 149, 168, 180 ]
[ 20, 21, 28, 28, 30, 14 ]
[ 34, 34, 41, 41, 44, 32 ]
[ "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Detected the use of eval(). eval() can be dangerous if used...
[ 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
bars.py
/pywup/cmdtools/bars.py
diegofps/pywup
MIT
2024-11-18T20:26:44.423667+00:00
1,622,421,401,000
aa95fc34ec5a434af9075d3a4f5cbbb903abbcc2
3
{ "blob_id": "aa95fc34ec5a434af9075d3a4f5cbbb903abbcc2", "branch_name": "refs/heads/main", "committer_date": 1622421401000, "content_id": "5b1939433a5859ae536fd795ca2fff9602e2b8be", "detected_licenses": [ "MIT" ], "directory_id": "df07014d2519dd085fbd78240e7a46aa9240be19", "extension": "py", "file...
2.703125
stackv2
"""Main functions for the use by end users. """ import pandas as pd from pathlib import Path from wbib import queries, render from wikidata2df import wikidata2df from jinja2 import Environment, PackageLoader env = Environment( loader=PackageLoader("wbib", "templates"), ) DEFAULT_QUERY_OPTIONS = { "map of in...
232
31.71
124
14
1,770
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_cadea1ef27b7dff1_9588f29c", "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...
5
true
[ "CWE-79", "CWE-116", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 11, 11, 170 ]
[ 13, 13, 178 ]
[ 7, 7, 25 ]
[ 2, 2, 6 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected a Jinja2 environment witho...
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
wbib.py
/wbib/wbib.py
lubianat/wbib
MIT
2024-11-18T20:26:44.481788+00:00
1,686,846,949,000
bcae5d8d0f884381ba8239abd251bc80fb630630
3
{ "blob_id": "bcae5d8d0f884381ba8239abd251bc80fb630630", "branch_name": "refs/heads/master", "committer_date": 1686846949000, "content_id": "3d473252ce797b72a69d712b1be92435333838d0", "detected_licenses": [], "directory_id": "4727fa4397a2f1da2827dfbebe24f0b79fa5c9c1", "extension": "py", "filename": "mak...
2.984375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- """Create a multi-channel signed distance field map. Use https://github.com/Chlumsky/msdfgen/ You need in this directory: * msdfgen executable * SourceCodePro-Regular.ttf Just run this script to (re)create the font map directly in phy/plot/static/ in npy.gz format. """...
88
31.17
98
15
741
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_e8c2b7a66f72a534_2e668107", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 64 ]
[ 64 ]
[ 9 ]
[ 23 ]
[ "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" ]
makefont.py
/tools/makefont.py
cortex-lab/phy
2024-11-18T20:26:45.614586+00:00
1,667,194,029,000
c05d35f7defe25b29e47a68a1f286b29cea5c5e1
3
{ "blob_id": "c05d35f7defe25b29e47a68a1f286b29cea5c5e1", "branch_name": "refs/heads/master", "committer_date": 1667194029000, "content_id": "d182e32af02f7188c445ad909f16a4e6192bd0bd", "detected_licenses": [ "MIT" ], "directory_id": "8966830bd2b5a637f43bdfe0574bb389ced80cb9", "extension": "py", "fi...
2.8125
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Dec 26 19:52:22 2021 Not finished script! @author: shlomi """ import click from loguru import logger from pathlib import Path upload_path = Path('/home/axis-gps') historic_path = Path('/home/axis-gps/historic/Axis-Gps/T02') @click.command() @click.op...
56
29.52
98
14
432
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_00ae1364a7e924c1_5c1078e1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
3
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 51, 51 ]
[ 51, 51 ]
[ 13, 40 ]
[ 45, 44 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
move_older_T02_to_historic_script.py
/move_older_T02_to_historic_script.py
ZiskinZiv/PW_from_GPS
MIT
2024-11-18T20:26:45.737008+00:00
1,623,097,392,000
7d9130eeec9ddbc95dd18472911da824e88349ec
2
{ "blob_id": "7d9130eeec9ddbc95dd18472911da824e88349ec", "branch_name": "refs/heads/master", "committer_date": 1623097392000, "content_id": "ef6aa56238f2c1f5b26e7a323248dfd9de3dbaa6", "detected_licenses": [], "directory_id": "d1b19473d84c099c3d979927ede0d12e9d6f3ee5", "extension": "py", "filename": "vie...
2.359375
stackv2
from api.models import User from django.shortcuts import get_object_or_404 from rest_framework import authentication, generics, permissions, status from rest_framework.authtoken.views import ObtainAuthToken from rest_framework.response import Response from rest_framework.settings import api_settings from django.contrib...
104
37.31
120
17
776
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_0fd09d51f8f88f1f_b56f8716", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'self.object' is b...
2
true
[ "CWE-521", "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password", "rules.python.django.security.audit.unvalidated-password" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 65, 99 ]
[ 65, 99 ]
[ 13, 13 ]
[ 51, 74 ]
[ "A07:2021 - Identification and Authentication Failures", "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'self.object' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information.", "The password on 'self.objec...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
views.py
/accounts/views.py
l4z0-space/Eureka
2024-11-18T20:26:49.778980+00:00
1,617,896,327,000
e85eae8a0440fcee30b460cc5ba6bb2ce8fd9004
2
{ "blob_id": "e85eae8a0440fcee30b460cc5ba6bb2ce8fd9004", "branch_name": "refs/heads/master", "committer_date": 1617896327000, "content_id": "f6a1d0375f15e079808f5af4f7bd1e6e26478e1b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "08817ef9b06c8d1aedd517268bb427e0a109758b", "extension": "p...
2.453125
stackv2
import argparse import os import time import numpy as np import tensorflow as tf from six.moves import cPickle from mnist_data import * from model import CPPNResnet """ cppn vae: compositional pattern-producing generative adversarial network LOADS of help was taken from: https://github.com/carpedm20/DCGAN-tensorf...
232
33.4
89
20
1,899
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_5ab08b2aa65b2974_ff2d363b", "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 ...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 80 ]
[ 80 ]
[ 9 ]
[ 30 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
train.py
/train.py
andrewlook/cppn-resnet-gan-tensorflow
BSD-3-Clause
2024-11-18T20:26:50.609132+00:00
1,578,836,311,000
5a5d13b866253fb467d78c5bf0093bb7b0e5b9b5
2
{ "blob_id": "5a5d13b866253fb467d78c5bf0093bb7b0e5b9b5", "branch_name": "refs/heads/master", "committer_date": 1578836311000, "content_id": "57249e5549d00cbca5eca61968971311cc6ff84d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9e800912fb82c70db48b5a2ab87a21e80caab2d1", "extension": "py"...
2.34375
stackv2
# 先找到明显正例和明显负例集合,再使用训练好的FRCN模型计算正例中心和负例中心 import os import json import pickle import torch import numpy as np from tqdm import tqdm from detectron2.engine import DefaultPredictor from detectron2.structures import BoxMode from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.config import get_cfg...
163
35.88
107
20
1,670
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0c1f6ff9ea69e125_672956bb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-502", "CWE-502", "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" ]
[ 30, 71, 140 ]
[ 30, 71, 140 ]
[ 13, 5, 5 ]
[ 47, 46, 92 ]
[ "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" ]
get_center.py
/caltech_detection/get_center.py
PKULiuHui/PedestrianDetectron2
Apache-2.0
2024-11-18T20:26:51.962289+00:00
1,693,339,200,000
133931037738b972fea8a90b09b3be13d6122a4e
2
{ "blob_id": "133931037738b972fea8a90b09b3be13d6122a4e", "branch_name": "refs/heads/master", "committer_date": 1693339200000, "content_id": "e8a7271e2a58439a9c1171f53befcc34a999c7c6", "detected_licenses": [ "Unlicense" ], "directory_id": "0fa00ecf2dd671515dc001d4b14049ec6a0c1f1c", "extension": "py",...
2.453125
stackv2
""" Use Jinja and data from Home Assistant to generate your README.md file For more details about this component, please refer to https://github.com/custom-components/readme """ from __future__ import annotations import asyncio import json import os from shutil import copyfile from typing import Any, Dict, List impo...
251
28.04
91
20
1,537
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_425c69c4b6bc98a9_75c40c73", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 168 ]
[ 168 ]
[ 22 ]
[ 48 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
__init__.py
/custom_components/readme/__init__.py
bacco007/HomeAssistantConfig
Unlicense
2024-11-18T20:26:53.556773+00:00
1,598,377,201,000
15cc8a34ef80c3af2906b04bc2cf5c11aebba0cd
2
{ "blob_id": "15cc8a34ef80c3af2906b04bc2cf5c11aebba0cd", "branch_name": "refs/heads/master", "committer_date": 1598377201000, "content_id": "9fda682785b6dd22f1ec99f9539828cca9cb0354", "detected_licenses": [ "MIT" ], "directory_id": "1ddb3af252da9fad3ef5e58d9cd27bdcb0365bdb", "extension": "py", "fi...
2.4375
stackv2
from flask import Flask from flask import request from artsci2019.displaybackend.backend import Backend import pickle def create_app(stack_size, thread_count, stable_points, directory): """Returns a flask app provinding two api endpoints. The server communicates with the RemoteBackend in client.py.""" app...
31
31.65
73
13
216
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_a83acc0afbd9d31d_e12edc9f", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `update` is def...
7
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.django.security.audit.avoid-insecure-deserialization", "rules.python.flask.security.insecure-deserialization", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.flask.security.insecure-deserialization", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security", "security", "security" ]
[ "MEDIUM", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "HIGH", "MEDIUM" ]
[ 22, 22, 22, 28, 28 ]
[ 22, 22, 22, 28, 28 ]
[ 29, 29, 29, 13, 13 ]
[ 56, 56, 56, 49, 49 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using insecure deserialization library, backed by `pickle`, `_pickle`, `cpickle`, `dill`, `shelve`, or `yaml`, which are known to lead to remote code execution vulnerabilities.", "Detected the use of an insecure deserialization library in a Flask route. These libraries are prone to code execution vulnerabi...
[ 7.5, 7.5, 5, 7.5, 5 ]
[ "MEDIUM", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
server.py
/artsci2019/displaybackend/rpc/server.py
fhennig/face-of-the-crowd
MIT
2024-11-18T20:26:54.071886+00:00
1,386,855,355,000
69b90f47dfbf9205e60e26c105b91d21f40fc6ab
2
{ "blob_id": "69b90f47dfbf9205e60e26c105b91d21f40fc6ab", "branch_name": "refs/heads/master", "committer_date": 1386855355000, "content_id": "a63a0b99905ee3554372fe65b694095e5a602a44", "detected_licenses": [ "MIT" ], "directory_id": "2734dfdb47f00628c3f815cfe553a2861fd179b7", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/env python import web, redis, shelve, hashlib, json,urllib2 from Pubnub import Pubnub import time pubnub = Pubnub( "pub-56806acb-9c46-4008-b8cb-899561b7a762", ## PUBLISH_KEY "sub-26001c28-a260-11e1-9b23-0916190a0759", ## SUBSCRIBE_KEY "sec-MGNhZWJmZmQtOTZlZS00ZjM3LWE4ZTYtY2Q3OTM0MT...
94
32.02
108
17
973
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_44abd125daa0bde2_8fc28626", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use...
5
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-shelve", "rules.python.lang.security.deserialization.avoid-shelve" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 44, 76 ]
[ 44, 76 ]
[ 10, 10 ]
[ 29, 29 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `shelve`, whic...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
cloudboard.py
/cloudboard.py
hgeg/cloudboard
MIT
2024-11-18T20:26:54.721904+00:00
1,527,956,918,000
117ca17ace1f5d1aad0ca8dc268292ea5afcfbe7
3
{ "blob_id": "117ca17ace1f5d1aad0ca8dc268292ea5afcfbe7", "branch_name": "refs/heads/master", "committer_date": 1527956918000, "content_id": "f52a67697cb400d20e1166b4bc3231e7c93214a9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1c8dbd9ae60061defbe7f56fd638ae34941a3127", "extension": "py"...
2.8125
stackv2
#!/usr/bin/python from player import Player import cPickle from ui import UI from economy import Economy from training import TrainingSession from soldiers import * from buildings import Barracks import os class SinglePlayerGame: gameStates = ['strategy', 'foraging', 'scoreScreen'] allowedBuildings = """Barracks...
163
25.51
161
16
1,136
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_633cde5db7013aae_62b22797", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
4
true
[ "CWE-502", "CWE-502", "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 52, 57, 97, 110 ]
[ 52, 57, 97, 110 ]
[ 5, 12, 17, 13 ]
[ 49, 50, 39, 47 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `cPickle`, which is known to lead ...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "HIGH", "HIGH" ]
singlePlayerGame.py
/singlePlayerGame.py
ggianna/Foragers
Apache-2.0
2024-11-18T20:26:58.573622+00:00
1,633,546,141,000
d03d058c719bbfa7ba9e6687f9037f6e8981fa85
2
{ "blob_id": "d03d058c719bbfa7ba9e6687f9037f6e8981fa85", "branch_name": "refs/heads/main", "committer_date": 1633546141000, "content_id": "c8c5c3d9181fbbf1392c99949260ea4a25985b95", "detected_licenses": [ "MIT" ], "directory_id": "920939ddcf9ae6751be15c00cd28f91a528b9d66", "extension": "py", "file...
2.359375
stackv2
import atexit import logging import os import shutil import subprocess import time from typing import List, Callable, Optional from alpyne.client.http_client import HttpClient from alpyne.client.model_run import ModelRun from alpyne.client.utils import resolve_model_jar, \ get_wildcard_paths, shorten_by_relativene...
191
39.07
128
20
1,601
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c8ed87a5f0de8c74_e060ba22", "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" ]
[ 92 ]
[ 95 ]
[ 20 ]
[ 60 ]
[ "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" ]
alpyne_client.py
/alpyne/client/alpyne_client.py
jfleonUOC/Alpyne
MIT
2024-11-18T20:27:02.831722+00:00
1,625,152,573,000
796fdadd900a7445dc62a9a4d69811a91c155efd
3
{ "blob_id": "796fdadd900a7445dc62a9a4d69811a91c155efd", "branch_name": "refs/heads/main", "committer_date": 1625152573000, "content_id": "91d919d75c5ae539db62e6333fbf1d6609794a48", "detected_licenses": [ "Unlicense" ], "directory_id": "15829d87695e6c83bb691d74a7faeff41a125335", "extension": "py", ...
2.75
stackv2
from flask import Flask, render_template, request from pandas.core.frame import DataFrame from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.linear_model import PassiveAggressiveClassifier import pickle import pandas as pd from sklearn.model_selection import train_test_split appl = Flask(__name__...
41
34.85
112
13
314
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b43a634215e438ba_a85f2af1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 11 ]
[ 11 ]
[ 15 ]
[ 50 ]
[ "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" ]
FakeNewsDetection.py
/FakeNewsDetection.py
Beagleman87/Fake_News_Detection
Unlicense
2024-11-18T20:27:05.109266+00:00
1,619,979,366,000
feb32737c0d606e0aef971e62ccca71d2b3381f3
2
{ "blob_id": "feb32737c0d606e0aef971e62ccca71d2b3381f3", "branch_name": "refs/heads/master", "committer_date": 1619979366000, "content_id": "4909b8b537146b8d8d245223eafb0170cdde39eb", "detected_licenses": [ "MIT" ], "directory_id": "bfd2f13ca38e0630b6dda30b9c34c6ed023419f6", "extension": "py", "fi...
2.328125
stackv2
import docker import os import json import shutil import datetime from container_builder.src.exceptions import BuildException class Build: test_flag = True push_flag = False build_dir = "/tmp/container-builder" def __init__(self, logger, user_env_var, pass_env_var, **kwargs): self.client = do...
138
38.33
104
21
1,179
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_de53416724f36ba5_466c2ff9", "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" ]
[ 115 ]
[ 115 ]
[ 28 ]
[ 87 ]
[ "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" ]
build.py
/container_builder/src/build.py
bandit145/container-builder
MIT
2024-11-18T20:52:02.564743+00:00
1,676,139,610,000
9febc36378f79e1d83b34ba0592e48be4ce5d213
2
{ "blob_id": "9febc36378f79e1d83b34ba0592e48be4ce5d213", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "237b43af321620937f133be2f3e8919647d39a29", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/python import requests import json import re import sys import time import os import subprocess username = 'jkominek' testing = True testing = False def dumplastseen(): with open("lastseen.json", "w") as f: json.dump(lastseen, f) def parselink(link): parts = re.split("\s*,\s*", link) ...
77
23.79
77
15
509
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_94b2f16f0e238b43_5b99602e", "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...
12
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" ]
[ 68, 72 ]
[ 68, 72 ]
[ 9, 9 ]
[ 35, 35 ]
[ "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" ]
snippet.py
/all-gists/fda9212a29e48678fb61/snippet.py
gistable/gistable
MIT
2024-11-18T20:52:05.320279+00:00
1,601,070,509,000
590923a0cf64d0ae8e9adb067c6b7795d9f7aaa5
2
{ "blob_id": "590923a0cf64d0ae8e9adb067c6b7795d9f7aaa5", "branch_name": "refs/heads/master", "committer_date": 1601070509000, "content_id": "79b24ff2031705095a0831b088c9bff83f438cc9", "detected_licenses": [ "MIT" ], "directory_id": "24c59216e5315a1ad1626caaad6ff8617517e41b", "extension": "py", "fi...
2.46875
stackv2
import keras import os, json, sys, pickle import tensorflow as tf from quart import Quart, jsonify, request, make_response from keras.preprocessing.sequence import pad_sequences from sklearn.externals import joblib sys.path.insert(0, '../code/') from text_cleaning import TextClean # https://github.com/tensorflow/tens...
63
30.48
133
15
476
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_0b6c9e203571d5d7_86e81deb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 20 ]
[ 20 ]
[ 17 ]
[ 36 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
pos_rev_service.py
/pos_rev_service/pos_rev_service.py
samroon2/app_rating_predictions
MIT
2024-11-18T20:52:06.494598+00:00
1,513,575,915,000
7fa293118346e532f7fe050eb8ed0c5de4296fbb
3
{ "blob_id": "7fa293118346e532f7fe050eb8ed0c5de4296fbb", "branch_name": "refs/heads/master", "committer_date": 1513575915000, "content_id": "9fce7b21b6edb5913e8401ccca3d7c2ff3f3be2d", "detected_licenses": [ "MIT" ], "directory_id": "747ffe00fd06d35d57d339c3737cb0f0aab4119d", "extension": "py", "fi...
2.828125
stackv2
#!/usr/bin/env python3 import numpy as np import physx import simulation import argparse import time def main(): parser = argparse.ArgumentParser() parser.add_argument("trajectory_csv", type=str, help="Trajectory file as a csv of 7 angles per line") args = parser.parse_args() # grab the trajectory wit...
30
24.93
72
17
193
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d6bf83bb5c988ca3_dde0f2b4", "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-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 16 ]
[ 16 ]
[ 29 ]
[ 36 ]
[ "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" ]
trajectory.py
/ArmRL-master/python/trajectory.py
rbcommits/RobotLearning
MIT
2024-11-18T20:52:09.688005+00:00
1,454,516,861,000
de9576747068b7e6e610de7acdb3a0b7cd6a8e7c
2
{ "blob_id": "de9576747068b7e6e610de7acdb3a0b7cd6a8e7c", "branch_name": "refs/heads/master", "committer_date": 1454516861000, "content_id": "7675213bf63909f5814c6e3e65e72103f1c4e2f2", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "91688fc7c6152a026835c1c252bbbbebc01d950c", "extension": "p...
2.359375
stackv2
import pickle import numpy as np import sys from pysb import Parameter, Observable, Rule from pysb.integrate import Solver import pysb.core from indra.pysb_assembler import * def get_base_state(mon): sdict = {} for s in mon.sites: if s in mon.site_states: sdict[s]=mon.site_states[s][0] ...
85
35.04
71
14
890
python
[{"finding_id": "semgrep_rules.python.lang.correctness.list-modify-while-iterate_6d6a9921cef6ac90_5940fdc6", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.list-modify-while-iterate", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "It appears that `model.initial...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 85 ]
[ 85 ]
[ 5 ]
[ 26 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
RAS_build_model.py
/models/ras_demo/RAS_build_model.py
gberriz/indra
BSD-2-Clause
2024-11-18T20:52:12.599578+00:00
1,616,328,799,000
4d23fb0ca9d6b6713a947351497cee0badebd984
2
{ "blob_id": "4d23fb0ca9d6b6713a947351497cee0badebd984", "branch_name": "refs/heads/master", "committer_date": 1616328799000, "content_id": "ad82c093a20aaffc3863bef205b665e62cb5483f", "detected_licenses": [ "MIT" ], "directory_id": "52e441d026d3aeb2e48c72351b5e21b6c50880fe", "extension": "py", "fi...
2.390625
stackv2
import csv import pdb import pickle as pkl import sys from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import numpy as np def plot(filename, pdf_loc="training.pdf", csv_loc="training_progress.csv"): filename = "models/2016-01-15_14-36-05" if filename is None else filename ...
71
34.3
83
16
722
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_b668805733044e8f_bdfdaf52", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.python-debugger-found", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Importing the python debugger;...
4
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 25 ]
[ 25 ]
[ 14 ]
[ 76 ]
[ "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_learning.py
/option_critic/plot_learning.py
elsa-lab/option_critic
MIT
2024-11-18T20:52:14.259418+00:00
1,407,356,242,000
3a339701e1f5fa940336a0e097c8db51bf345cb1
3
{ "blob_id": "3a339701e1f5fa940336a0e097c8db51bf345cb1", "branch_name": "refs/heads/master", "committer_date": 1407356242000, "content_id": "010930262d3b1fd50d442a18972f0ca8c150325d", "detected_licenses": [ "MIT" ], "directory_id": "158d3ac39cbbe3cfeac66ce7c677e2d75b91c280", "extension": "py", "fi...
3.40625
stackv2
# -*- coding: utf-8 -*- """ ============================================ Spreadsheet directive for reStructuredText ============================================ Register a simplespreadsheet directive to do calculations in a table. Install ======= :: pip install rst_simplespreadsheet # or easy_install rst_s...
333
28.1
93
22
2,310
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_519a9febff008bfc_bda74f46", "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" ]
[ 147 ]
[ 147 ]
[ 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" ]
rst_simplespreadsheet.py
/rst_simplespreadsheet.py
davidlesieur/simplespreadsheet
MIT
2024-11-18T20:52:18.724373+00:00
1,460,372,740,000
e4b4280f14867e0a1a15bf8846e8cb85fc8a6f4c
2
{ "blob_id": "e4b4280f14867e0a1a15bf8846e8cb85fc8a6f4c", "branch_name": "refs/heads/master", "committer_date": 1460372740000, "content_id": "f30190e9571c122fc5a0552c573b7785477a6032", "detected_licenses": [ "MIT" ], "directory_id": "38bf48a1acc262f9fb2d021088640eedfa137240", "extension": "py", "fi...
2.375
stackv2
# import os # import sys import sublime import sublime_plugin class HaroopadCommand(sublime_plugin.WindowCommand): def run(self): filename = self.window.active_view().file_name() if filename is None: return s = sublime.load_settings("Haroopad Markdown.sublime-settings") ...
25
28.76
123
15
153
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_62b185a600bdc330_579a067c", "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" ]
[ 20 ]
[ 20 ]
[ 17 ]
[ 50 ]
[ "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" ]
haroopad.py
/haroopad.py
liuhewei/haroopad-markdown-sublime
MIT
2024-11-18T20:52:24.152013+00:00
1,401,641,550,000
38bd03ddbc08a2a3657b4b0a6e99fb7722ae4f46
3
{ "blob_id": "38bd03ddbc08a2a3657b4b0a6e99fb7722ae4f46", "branch_name": "refs/heads/master", "committer_date": 1401641765000, "content_id": "f20b7abe1ff4f3db0efd4192d46749ddcd8b41ff", "detected_licenses": [ "MIT" ], "directory_id": "3c9df204c8b38c4269f16128e2cd35bc80c382b0", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/env python2 import subprocess import threading import readline import atexit import sys import os from multiprocessing import Pipe class PhpProcessor(): COMMAND = 'php -a' MAGIC = os.urandom(8).encode('hex') def __init__(self): self.process = subprocess.Popen(self.COMMAND.split(' '), stdin=subpro...
92
26.46
83
22
565
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_0817a6eb24b719d4_1015036e", "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" ]
[ 15 ]
[ 16 ]
[ 20 ]
[ 66 ]
[ "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" ]
phpshell.py
/phpshell.py
Kasalehlia/phpshell
MIT
2024-11-18T20:52:28.735383+00:00
1,393,392,186,000
a97de1deeacaac11fff5a53d65c7e668097345f7
3
{ "blob_id": "a97de1deeacaac11fff5a53d65c7e668097345f7", "branch_name": "refs/heads/master", "committer_date": 1393392309000, "content_id": "a24063db9c31521f3a1ea1350792369317e0db7f", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "b09d2af60e25d647efc76a70bbd02ed96b50545d", "extension": "p...
2.9375
stackv2
from itertools import chain from fabric.api import env, local, task, runs_once from fabric.colors import green,blue,cyan,yellow,magenta,red import subprocess import sys import time # -------------- Logging helpers ------------------ def _log_(level,msg,colorFunc = lambda x: x): "Logs message, prefixed with curren...
88
39.47
162
24
826
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_748283b982f9d6c5_db562122", "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 ]
[ 9 ]
[ 77 ]
[ "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" ]
__init__.py
/__init__.py
Multifarious/fabulous
BSD-2-Clause
2024-11-18T20:52:30.366414+00:00
1,631,081,393,000
6fc2a7fd7534f61a945f964e4c83ead9af572fc2
3
{ "blob_id": "6fc2a7fd7534f61a945f964e4c83ead9af572fc2", "branch_name": "refs/heads/main", "committer_date": 1631081393000, "content_id": "9b63f41e2fe6a77a7d6cad7fb3f036433f7df552", "detected_licenses": [ "MIT" ], "directory_id": "fa27a457e0633af374d5c07a05bb7b6ee85d4187", "extension": "py", "file...
2.6875
stackv2
import pickle import sys import numpy as np import math import tensorflow.compat.v1 as tf print(tf.__version__) # from tensorflow.models.RNNModel import RNNModel # from tf.nn.rnn_cell import BasicLSTMCell, LSTMCell, GRUCell, RNNCell, BasicRNNCell, DropoutWrapper, MultiRNNCell tf.disable_v2_behavior() def load_pkl(path...
86
34.21
114
23
769
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_1821eccc875c5733_a91a1284", "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" ]
[ 13 ]
[ 13 ]
[ 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" ]
RNN.py
/baselines/RNN.py
k0y0c/COVID-19_TLSTM
MIT
2024-11-18T20:52:30.777317+00:00
1,642,954,764,000
42fbc65cf87ad477506c9a25a33964d13dfe5a0b
3
{ "blob_id": "42fbc65cf87ad477506c9a25a33964d13dfe5a0b", "branch_name": "refs/heads/master", "committer_date": 1642955980000, "content_id": "64afc05f82ebfe45830d8b65887be3dd542d80d1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7b1793f277fbaef6a7d51608d336e2d3fc546fec", "extension": "py"...
2.65625
stackv2
#! /usr/bin/python """Tiny init tool. """ from __future__ import print_function import argparse import errno import fcntl import logging import os import os.path import signal import sys import psutil cli = argparse.ArgumentParser() cli.add_argument('--debug', action='store_const', dest='loglevel'...
134
29.58
75
19
938
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-spawn-process-audit_9a569bb4eb3d41f0_10bcd32e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-spawn-process-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content ...
3
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit", "rules.python.lang.security.audit.dangerous-spawn-process-tainted-env-args", "rules.python.lang.security.dangerous-spawn-process" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 116, 116, 116 ]
[ 116, 116, 116 ]
[ 15, 39, 39 ]
[ 61, 51, 51 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Found user controlled content when spawning a process. This is dangerous because it allows a malicious a...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "MEDIUM" ]
init.py
/init.py
RKrahl/tiny-init
Apache-2.0
2024-11-18T20:52:37.057648+00:00
1,610,128,108,000
073bcb4524b05caa588bcbf52a7804fdcff0b00c
3
{ "blob_id": "073bcb4524b05caa588bcbf52a7804fdcff0b00c", "branch_name": "refs/heads/master", "committer_date": 1610128108000, "content_id": "00fa5f052fc6f59a31e2fe38028f527a890e9efb", "detected_licenses": [ "MIT" ], "directory_id": "11bca8021e3478eb31b621c078a14bb7ac28c4d1", "extension": "py", "fi...
2.75
stackv2
'create a bigram phone-loop model' import argparse import pickle import sys import torch import beer def build_categorical_2g(size, unigram): mean = torch.ones(size, size) / size return beer.CategoricalSet.create(mean, prior_strength=1) def build_hsb(size, unigram): return beer.SBCategoricalSet.creat...
55
28.84
77
13
373
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b628f69a0fcdf8a8_b1696cf7", "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, 49 ]
[ 38, 49 ]
[ 17, 9 ]
[ 31, 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" ]
mkphoneloopbigram.py
/beer/cli/subcommands/hmm/mkphoneloopbigram.py
bolajiy/beer
MIT
2024-11-18T20:52:38.853103+00:00
1,667,235,087,000
4fd3257d482c2e1938e00a99309acb283f7445ed
3
{ "blob_id": "4fd3257d482c2e1938e00a99309acb283f7445ed", "branch_name": "refs/heads/master", "committer_date": 1667235087000, "content_id": "800caf191938f218d9c1c484f63813902a24d186", "detected_licenses": [ "MIT" ], "directory_id": "3541af9b92b936514b4c918ce8ec3c2af7a04a51", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/env python3 ''' This script performs database dumps of all postgres databases in seperate zipped files. Prereqesites: linux :) python 3.4 psql pg_dump Usage: postgres.py [-h] [--dir DIR] [--date | --datetime] [--keep KEEP] [--debug] [--dry] This script performs da...
85
35.41
97
19
703
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_a4597d82795ab32b_37ee0284", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 79, 79, 79 ]
[ 79, 79, 79 ]
[ 13, 29, 40 ]
[ 45, 32, 44 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functi...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "HIGH" ]
[ "HIGH", "MEDIUM", "LOW" ]
postgres.py
/postgres.py
jochenklar/dump
MIT
2024-11-18T20:52:39.220153+00:00
1,574,804,954,000
bef91368af1912f6aab8a18f2111f2d71b79f7b4
2
{ "blob_id": "bef91368af1912f6aab8a18f2111f2d71b79f7b4", "branch_name": "refs/heads/master", "committer_date": 1574804954000, "content_id": "18e7078d77ac654724cf2d9d3f81d6467f4b074a", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "b7218c8e9c5538defaa9ef48825e36955296ca5e", "extension": "p...
2.359375
stackv2
from django.http import HttpResponse from django.shortcuts import render, redirect from django.http import JsonResponse from django.contrib.auth.models import User # STEP 1: Import the user from foundation.models import Instrument,TimeSeriesDatum,Sensor from rest_framework import status, response, views from res...
207
22.84
90
14
966
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defusedcsv_0ce403d4ef462b7e_f9343559", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defusedcsv", "finding_type": "security", "severity": "low", "confidence": "low", "message": "Detected the generation of a CSV file using the built-in `csv` mo...
2
true
[ "CWE-1236" ]
[ "rules.python.django.security.injection.csv-writer-injection" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 162 ]
[ 162 ]
[ 9 ]
[ 87 ]
[ "A01:2017 - Injection" ]
[ "Detected user input into a generated CSV file using the built-in `csv` module. If user data is used to generate the data in this file, it is possible that an attacker could inject a formula when the CSV is imported into a spreadsheet application that runs an attacker script, which could steal data from the importi...
[ 7.5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
views.py
/indoorair_back/api/views.py
zhengjiejiang/indoorair-back
BSD-3-Clause
2024-11-18T20:52:39.992338+00:00
1,676,139,610,000
d4980c18e82c9029a5102783480cb30dc518398d
3
{ "blob_id": "d4980c18e82c9029a5102783480cb30dc518398d", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "d9d4b930485112f3c7a222a1f212fff81e001131", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
3.21875
stackv2
from itertools import groupby from operator import itemgetter def first(length): return itemgetter(slice(None, length)) def remove_indent(group, n): return (line[n:] for line in group) def combine(lines, sep): return sep.join(lines) + sep def indented_sections(text): """ >>> example = 'One:\n abc\n def\nTw...
23
30.39
64
14
184
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_3c6099f36290294a_023120c3", "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" ]
[ 23 ]
[ 23 ]
[ 7 ]
[ 20 ]
[ "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" ]
snippet.py
/all-gists/890758/snippet.py
gistable/gistable
MIT
2024-11-18T20:52:42.716773+00:00
1,424,040,236,000
4e2079bb51d7b41e9c65be4fef272607eca6b086
2
{ "blob_id": "4e2079bb51d7b41e9c65be4fef272607eca6b086", "branch_name": "refs/heads/master", "committer_date": 1424040236000, "content_id": "050718423757f4f16b03a51002e72f97bea77e21", "detected_licenses": [ "Apache-2.0" ], "directory_id": "59d50bc751b5755b0a3d8fae25d7224ebb106e81", "extension": "py"...
2.375
stackv2
#!/usr/bin/env python from __future__ import print_function from twython import Twython import json import argparse import io import sys, os import os.path from datetime import datetime, timedelta from email.utils import parsedate_tz bio_text = """The One From Sun Race. Tweets collected works of H.P.Lovecraft. Run b...
132
31.46
110
19
1,083
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3b537af215ef0560_50fb060d", "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-os-exec-audit", "rules.python.lang.security.audit.dangerous-os-exec-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 119, 119 ]
[ 119, 119 ]
[ 9, 9 ]
[ 36, 36 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here.", "Found user controlled content when spawning a process. This is dangerous because it allows a malicious a...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
booktweeter.py
/booktweeter.py
timokoola/textsplitter
Apache-2.0
2024-11-18T20:52:47.109301+00:00
1,687,512,383,000
c381d86bcfdd773b2846c4a65182aeba03e6d127
3
{ "blob_id": "c381d86bcfdd773b2846c4a65182aeba03e6d127", "branch_name": "refs/heads/master", "committer_date": 1687512383000, "content_id": "a6306179fb3cb9b4bfc21175b05f6ba9b04ec88a", "detected_licenses": [ "MIT" ], "directory_id": "4451004745b7594c53f2cc82fec6660bbd51a039", "extension": "py", "fi...
2.859375
stackv2
import requests import pandas as pd import sys import subprocess import tempfile import webbrowser import os import platform from io import BytesIO from functools import reduce from .cache import UnpywallCache class Unpywall: """ Base class that contains useful functions for retrieving information from t...
510
29.03
79
19
3,038
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_fb7ddb695be62ea5_e6c65756", "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 ...
14
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-spawn-process-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 466 ]
[ 466 ]
[ 21 ]
[ 43 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content when spawning a process. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Ensure no external data reaches here." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
__init__.py
/unpywall/__init__.py
unpywall/unpywall
MIT
2024-11-18T20:52:47.557793+00:00
1,559,592,143,000
566519e95262c27ac79a8eef1f7c9ce372550f7b
2
{ "blob_id": "566519e95262c27ac79a8eef1f7c9ce372550f7b", "branch_name": "refs/heads/master", "committer_date": 1559592143000, "content_id": "584d32b46ed3277a58ae5c20a6421b8870f1f585", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "00ce227f326d6fff6d98b34c3907267627b9a40b", "extension": "p...
2.328125
stackv2
try: from osgeo import gdal, osr, ogr except: import gdal, osr, ogr from gdalconst import * import shlex import subprocess import os import numpy #The following functions will download daymet mosaic or tile datasets for the years range passed #The mosaic files are each for the entire CONUS for each year #be a...
215
39.66
124
29
2,427
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_eb1268f9be62f37f_aa0803dd", "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-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 203 ]
[ 203 ]
[ 16 ]
[ 55 ]
[ "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" ]
climatevarsFunctions.py
/usu_data_service/servicefunctions/climatevarsFunctions.py
tsga/Hydro-DS
BSD-3-Clause
2024-11-18T20:52:51.653899+00:00
1,631,028,260,000
a2889bbb9d68d45cbdd419e822a88a1791c57ee5
3
{ "blob_id": "a2889bbb9d68d45cbdd419e822a88a1791c57ee5", "branch_name": "refs/heads/master", "committer_date": 1631028260000, "content_id": "9267a30e01134496655ce126200a4a26cb363a73", "detected_licenses": [ "Apache-2.0" ], "directory_id": "04cfe6740712cfe3968a94aac2d1c1df003a945e", "extension": "py"...
2.703125
stackv2
import os import base64 import typing import logging from urllib import request from .utils import Singleton root = os.path.dirname(os.path.abspath(__file__)) if not os.path.exists(root): os.makedirs(root) gfwlist_path = os.path.join(root, "gfwlist.txt") whitelist_path = os.path.join(root, "whitelist.txt") cac...
135
27.79
93
17
929
python
[{"finding_id": "semgrep_rules.python.django.security.injection.ssrf.ssrf-injection-urllib_b9544641f5834b1f_5b1ba9fb", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.ssrf.ssrf-injection-urllib", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from req...
5
true
[ "CWE-918", "CWE-918" ]
[ "rules.python.django.security.injection.ssrf.ssrf-injection-urllib", "rules.python.django.security.injection.ssrf.ssrf-injection-urllib" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 32, 44 ]
[ 33, 45 ]
[ 9, 9 ]
[ 36, 36 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)", "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF), which could result in attackers gaining access to private organization data. To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the us...
[ 7.5, 7.5 ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
rule.py
/websocks/rule.py
webclinic017/websocks
Apache-2.0
2024-11-18T20:52:52.650835+00:00
1,683,581,593,000
de18c8198f0cc5198264b5159735c7722ca1f311
2
{ "blob_id": "de18c8198f0cc5198264b5159735c7722ca1f311", "branch_name": "refs/heads/master", "committer_date": 1683581593000, "content_id": "406a5fecdb4d202e1e8850645baafa25c0467f94", "detected_licenses": [ "MIT" ], "directory_id": "cca0778ccc49e4b7faef114874fa3620e2779c21", "extension": "py", "fi...
2.46875
stackv2
######################################################################### # _________ ___. ______________________ ___ # \_ ___ \___.__.\_ |__ ___________ / _____/\______ \ \/ / # / \ \< | | | __ \_/ __ \_ __ \/ \ ___ | _/\ / # \ \___\___ | | \_\...
85
40.2
101
15
906
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_9ca235dc0d15879f_0263d8d1", "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" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 17 ]
[ 17 ]
[ 1 ]
[ 40 ]
[ "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" ]
export.py
/examples/xml-export/export.py
CyberGRX/api-connector-bulk
MIT
2024-11-18T20:52:56.977455+00:00
1,429,023,878,000
afddb6750d997e7eb5a933006f4d43f2918abade
2
{ "blob_id": "afddb6750d997e7eb5a933006f4d43f2918abade", "branch_name": "refs/heads/master", "committer_date": 1429023878000, "content_id": "8a3b598a5c52eb161f5ae98d006e49cbdf7f0493", "detected_licenses": [ "MIT" ], "directory_id": "7245e1124fb6b3a96cc1691f54b275bf39a90a4a", "extension": "py", "fi...
2.40625
stackv2
#!/usr/bin/env python """ Based on Matt Weber es2graphite https://github.com/mattweber/es2graphite """ import re import sys import json import time import pickle import struct import socket import thread import urllib2 import argparse from pprint import pprint from datetime import datetime NODES = {} CLUSTER_NAME = ...
202
41.73
160
23
2,041
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d9b4ebe65cd94912_dc31a655", "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" ]
[ 134 ]
[ 134 ]
[ 19 ]
[ 40 ]
[ "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" ]
es2graphite.py
/elasticsearch/files/es2graphite.py
ministryofjustice/elasticsearch-formula
MIT
2024-11-18T19:02:29.469464+00:00
1,690,220,844,000
4fafcfaab6b08fe1ec97507233d38fcc73e27336
2
{ "blob_id": "4fafcfaab6b08fe1ec97507233d38fcc73e27336", "branch_name": "refs/heads/main", "committer_date": 1690220844000, "content_id": "465d971a158353a68e6fcd26f536388a163300c7", "detected_licenses": [ "MIT" ], "directory_id": "de0fb6700e6de80c5a9f6bf2aa797c679fc5f059", "extension": "py", "file...
2.328125
stackv2
import functools import os.path import subprocess import sys from pyperf._utils import shell_quote, popen_communicate from pyperf._worker import WorkerTask def bench_command(command, task, loops): path = os.path.dirname(__file__) script = os.path.join(path, '_process_time.py') run_script = [sys.executabl...
55
31.25
70
14
390
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b92840686f79740f_b6d32371", "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 ]
[ 19 ]
[ 12 ]
[ 53 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
_command.py
/pyperf/_command.py
psf/pyperf
MIT
2024-11-18T19:02:31.593633+00:00
1,417,517,473,000
54793a434a700d1a3416d3ffdca90387c3fe5253
3
{ "blob_id": "54793a434a700d1a3416d3ffdca90387c3fe5253", "branch_name": "refs/heads/master", "committer_date": 1417517473000, "content_id": "169538e187731fde45250437b3ca01c9b29f5e90", "detected_licenses": [ "MIT" ], "directory_id": "baae94bc843ef2d93a95d8c63b10f7033f3c974f", "extension": "py", "fi...
2.5625
stackv2
#!/usr/bin/env python # encoding: utf-8 import os import sys dir_list = [] root_dir = '/home/jimmy/dataset/ClassFile/' for dir_name in os.listdir(root_dir): dir_list.append(os.path.join(root_dir, dir_name)) def convert(): for dir_path in dir_list: for file_name in os.listdir(dir_path): fi...
27
29.04
76
15
199
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_94fa493c2e1a3f3c_4811843d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 13 ]
[ 31 ]
[ "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" ]
generate_file.py
/sougou_expr/generate_file.py
Jacobi2017/cppjieba
MIT
2024-11-18T19:02:35.689400+00:00
1,481,541,910,000
4fa9339ce17aef89c2f739d4909aafb2c830ab75
3
{ "blob_id": "4fa9339ce17aef89c2f739d4909aafb2c830ab75", "branch_name": "refs/heads/master", "committer_date": 1481541910000, "content_id": "0588a3014d9aa6685d0fc9d37d17afa4a5cbc7c5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "04d3efa98d41afe86ea05eec74884bd1bc9c3c9e", "extension": "py"...
2.90625
stackv2
# -*- coding: utf-8 -*- import os import sqlite3 # 读取关键字列表 keyWordsArray = [] try: for line in open('searchKeyWords.txt'): keyWordsArray.append(line) print('读取文件成功') except IOError: print("fail to open file") # 删除原来的db dbName = 'keyWordsHistory.db' if os.path.exists(dbName): os.remove(dbName)...
44
18.57
55
12
241
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d9ac22ec8dddb5e3_7b37aa96", "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-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" ]
[ 32, 32 ]
[ 35, 35 ]
[ 9, 9 ]
[ 10, 10 ]
[ "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" ]
initKeyWordsHistoryDB.py
/initKeyWordsHistoryDB.py
iamdaiyuan/1688
Apache-2.0
2024-11-18T19:02:50.520442+00:00
1,677,115,999,000
6ad40409f54ca4575502a4a9193ba40d6ed4848a
3
{ "blob_id": "6ad40409f54ca4575502a4a9193ba40d6ed4848a", "branch_name": "refs/heads/master", "committer_date": 1677115999000, "content_id": "6aa30158343d3737bab9a156fc6649b2a1af5402", "detected_licenses": [ "MIT" ], "directory_id": "7034e934af2e85b8b996af040da67fea6a64bfa9", "extension": "py", "fi...
2.5625
stackv2
from django.http import HttpResponse from django.conf.urls import patterns, include, url import re class Trappist(object): STATUS_INT = re.compile('^\d+') def __init__(self, app): self.app = app def mounted_at(self, prefix): regex, pattern = self.__regex_and_pattern_from(prefix) ...
54
30.94
74
15
367
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_f5c38abc7847e132_02c897ba", "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 ...
1
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 35 ]
[ 35 ]
[ 20 ]
[ 53 ]
[ "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" ]
trappist.py
/trappist.py
Fluxx/trappist
MIT
2024-11-18T19:02:53.649952+00:00
1,475,724,377,000
11bb264dd2647b283fbb094d7e409e99d549c663
3
{ "blob_id": "11bb264dd2647b283fbb094d7e409e99d549c663", "branch_name": "refs/heads/master", "committer_date": 1475724377000, "content_id": "9c2e38bd3b10eaba8ac7a1a55965c4922aba7e89", "detected_licenses": [ "MIT" ], "directory_id": "aba6a7834e16814767085ae3a8a0d306f7593f12", "extension": "py", "fi...
2.625
stackv2
import os import subprocess import docker class Executor(object): def execute(self, codefile, test_io, **kwargs): # pipe the input and output into the code files # to be run inside a docker container proc = subprocess.Popen(['python', codefile], stdin=subpr...
74
34.64
99
17
518
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c8d3f57175f70004_42df35cf", "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" ]
[ 11 ]
[ 14 ]
[ 16 ]
[ 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" ]
executor.py
/compilation_builder/executor.py
nma/coding-pytest-extension
MIT
2024-11-18T19:02:53.756629+00:00
1,645,914,002,000
ca2eab63b71548162e0cd5ee9bc9e630f366ea3e
2
{ "blob_id": "ca2eab63b71548162e0cd5ee9bc9e630f366ea3e", "branch_name": "refs/heads/master", "committer_date": 1645914002000, "content_id": "760d7ee2d41a5f86c160425f7d04807c3bc27370", "detected_licenses": [ "MIT" ], "directory_id": "ebef08dead816b75e0d5e5da683516ffd67bc59c", "extension": "py", "fi...
2.328125
stackv2
from flask import Flask, request, jsonify, abort import json app = Flask("aberbrowser") with open("zones.json", "r") as z: zones = json.load(z) @app.route("/") def all(): return jsonify(zones) @app.route("/<entity>/properties") def properties(entity): if entity not in zones: abort(404) re...
71
24.23
78
18
402
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_eec6628518d33dff_4e31e119", "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-704" ]
[ "rules.python.flask.security.injection.nan-injection" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 30 ]
[ 30 ]
[ 15 ]
[ 48 ]
[ "" ]
[ "Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ...
[ 7.5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
app.py
/aberbrowser/app/app.py
jasonmay/twitch-jarsonmud
MIT
2024-11-18T19:02:58.783255+00:00
1,474,386,881,000
ec83fffaeee832e48f334237d14f4136c50c2794
2
{ "blob_id": "ec83fffaeee832e48f334237d14f4136c50c2794", "branch_name": "refs/heads/master", "committer_date": 1474386881000, "content_id": "ba934b7198204ac59d606adc7782c9430d068f59", "detected_licenses": [ "MIT" ], "directory_id": "22649b823f75bec5080fc28c7f40986df5c20f2c", "extension": "py", "fi...
2.40625
stackv2
# -*- coding: utf-8 -*- import sqlite3 def get_db(db_path): db = None if db is None: db = sqlite3.connect(db_path) db.row_factory = sqlite3.Row try: init_db(db) except Exception as e: pass return db def make_dicts(cursor, row): return dict((curs...
44
32.05
92
12
324
python
[{"finding_id": "semgrep_rules.python.lang.correctness.common-mistakes.identical-is-comparison_ac7701d2a61c7190_483ba188", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.common-mistakes.identical-is-comparison", "finding_type": "correctness", "severity": "high", "confidence": "medium", "message": "Fo...
3
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" ]
[ 21, 21 ]
[ 21, 21 ]
[ 5, 5 ]
[ 93, 93 ]
[ "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" ]
db_handler.py
/Service_Components/db_handler.py
enzosav/mydata-sdk
MIT
2024-11-18T19:03:02.887059+00:00
1,553,151,435,000
1e59dc2f7d2431eedb8afead59145d75206cae1f
3
{ "blob_id": "1e59dc2f7d2431eedb8afead59145d75206cae1f", "branch_name": "refs/heads/master", "committer_date": 1553151435000, "content_id": "1e6c857fb8c7e7afd5254d9c3b6c2aaedd38a0fb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1cd75a213c79bc92d734edb5b07cef50240e41ab", "extension": "py"...
2.5625
stackv2
import logging import sys import json import base64 import signal # import threading from http import HTTPStatus """ Implement the logic to connect to kafka and consume messages. kafkaWrapper is a wrapper around kafka-python KafkaConsumer. kafkaWrapper relies on it in order to consume messages from kafka....
125
32.67
97
16
841
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_cfc8ac89e1454a10_645231e6", "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" ]
[ 125 ]
[ 125 ]
[ 16 ]
[ 49 ]
[ "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" ]
wrapper.py
/kafkaWrapper/wrapper.py
teguh87/kafkaWrapper
Apache-2.0
2024-11-18T19:03:04.259722+00:00
1,646,116,329,000
05b98b1e02be46c12510bf1379bd99c179924f95
2
{ "blob_id": "05b98b1e02be46c12510bf1379bd99c179924f95", "branch_name": "refs/heads/master", "committer_date": 1646116329000, "content_id": "73a4230fd4d4277a91538e9e2251769fadbfd6d0", "detected_licenses": [ "MIT" ], "directory_id": "6aa6fbb3f3d971d3a0217b94c9a8e26a417f6758", "extension": "py", "fi...
2.390625
stackv2
import os import time from typing import List from constant import const from utils.decorator import singleton from utils.random_tools import Random from core.element.CharImg import CharImg from core.element.TextImg import create, gen_batch_char_obj, TYPE_ORIENTATION_HORIZONTAL, TYPE_ORIENTATION_VERTICAL, \ TYPE_AL...
251
38.75
118
17
2,111
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_8aea033d0af17dd7_b62646b0", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 74, 142 ]
[ 74, 142 ]
[ 34, 20 ]
[ 57, 75 ]
[ "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Detected the use of eval(). eval() can be dangerous if used...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
TextImgProvider.py
/service/provider/TextImgProvider.py
BboyHanat/TextGenerator
MIT
2024-11-18T19:14:26.508601+00:00
1,531,116,833,000
1820e80a52acadb9fd4d08496ac22e8e1d1f62f9
3
{ "blob_id": "1820e80a52acadb9fd4d08496ac22e8e1d1f62f9", "branch_name": "refs/heads/master", "committer_date": 1531116833000, "content_id": "e9289eb3cc38295b012a7a304572eada1a036f4b", "detected_licenses": [ "MIT" ], "directory_id": "636eabdb15c380de1b506ed741eb4981fdfceb09", "extension": "py", "fi...
3.25
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from subprocess import call from argparse import ArgumentParser from re import sub class voice: def __init__(self): """ :param text : файл(путь/имя), начальная страница, финальная страница :type text : text ...
162
28.39
153
14
1,167
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ce08a5fa43cfec48_a8d4e252", "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...
22
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "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", "security" ]
[ "LOW", "MEDIUM", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 127, 127, 134, 157, 157 ]
[ 127, 127, 134, 157, 157 ]
[ 13, 35, 41, 23, 95 ]
[ 40, 39, 45, 100, 99 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "LOW", "HIGH", "LOW" ]
voice.py
/voice.py
dzino/Voice-PDF-Linux-
MIT
2024-11-18T19:14:28.437957+00:00
1,577,501,475,000
51a366a95de75d150b7356c811e8fe7438335276
3
{ "blob_id": "51a366a95de75d150b7356c811e8fe7438335276", "branch_name": "refs/heads/master", "committer_date": 1577501475000, "content_id": "72f14222c7f92fdf84d4f4c141204cf1c1c12763", "detected_licenses": [ "MIT" ], "directory_id": "ea939b4f85a70220026c99523860b1aaefa81e0c", "extension": "py", "fi...
2.75
stackv2
# -*- coding: utf-8 -*- import os import re def get_pid_and_kill(): all_pid_info = os.popen('ps -ef | grep wsgi:app') pid_list = all_pid_info.readlines() pids = [] for each in pid_list: if 'wsgi' in each and 'grep' not in each: wsgi_pid_info = each.strip() wsgi_pid = re...
22
24.73
56
15
158
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_680a6655839503b7_4ad6d22e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 9 ]
[ 31 ]
[ "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" ]
shutdown_app.py
/shutdown_app.py
GuoTengda1993/flask-demo
MIT
2024-11-18T19:14:33.904748+00:00
1,539,308,810,000
c3bec92820023a873bc4f8f32a1574e2522a14ef
4
{ "blob_id": "c3bec92820023a873bc4f8f32a1574e2522a14ef", "branch_name": "refs/heads/master", "committer_date": 1539308810000, "content_id": "4f5fc6c20760fadc59cde9816f7d105d04a7c6f7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "76ebb0e2dc620547294de4517bd89220dfa18a00", "extension": "py"...
4.03125
stackv2
''' #1.摄氏温度转换为华式温度 c=float(input("Enter a degree in Celsius:")) f=(9/5)*c+32 print('{} Celsius is {} Fathrenheit'.format(c,f)) ''' ''' #2.园柱体的体积 r,h=eval(input("Enter the radius and length of a cylinder:")) area=r*r*3.1415 volume=area*h print("The area is %.4f,the volume %.1f"%(area,volume)) ''' ''' #3.英尺数转换为米数 a=ev...
59
17.59
75
9
432
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_e1ca4068f4915270_66e0e352", "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" ]
[ 54 ]
[ 54 ]
[ 3 ]
[ 52 ]
[ "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" ]
作业1.py
/作业1.py
LiuYanYun123/test
Apache-2.0
2024-11-18T19:14:39.528065+00:00
1,631,279,892,000
99c3648a91f18f70c629d80a77113c11e97c7ffa
3
{ "blob_id": "99c3648a91f18f70c629d80a77113c11e97c7ffa", "branch_name": "refs/heads/main", "committer_date": 1631279892000, "content_id": "d829fbd37d124253a6456fb9d8f0be0a55df2198", "detected_licenses": [ "MIT" ], "directory_id": "25d6a52ba4162c6a67df7715a09d05406bd036fe", "extension": "py", "file...
3.328125
stackv2
# coding=UTF-8 """ MF XSD Extractor Extracts documented restrictions from XSD files created by Polish Ministry of Finance. Currently (Jul 2021) valid link to the mentioned XSD files: https://www.podatki.gov.pl/e-deklaracje/dokumentacja-it/struktury-dokumentow-xml/ Use case: If you need e.g. list of tax offices with ...
259
34.95
112
18
1,866
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2ca41a44baf4c249_60694948", "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" ]
[ 49, 73 ]
[ 49, 73 ]
[ 1, 16 ]
[ 35, 35 ]
[ "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" ]
xsd_extractor.py
/jpk_v7m/external_tools/mf_xsd_extractor/xsd_extractor.py
Semiranis/jpk_v7m
MIT
2024-11-18T19:14:43.015892+00:00
1,679,251,903,000
c5cd0ac0af38ac5b954b43ec81a7dccbd2a04bdd
2
{ "blob_id": "c5cd0ac0af38ac5b954b43ec81a7dccbd2a04bdd", "branch_name": "refs/heads/master", "committer_date": 1679251903000, "content_id": "541caf6f079ed79c99e31993c98abd0eb90757cd", "detected_licenses": [ "Apache-2.0" ], "directory_id": "995cb3a14ea2fee05b3afd06413f0eb65d065296", "extension": "py"...
2.390625
stackv2
#!/usr/bin/env python import os import sys from multiprocessing import cpu_count from getpass import getpass # check python version if sys.version_info[0] != 3: print("") print("========================================================================") print("|BioQueue requires Python 3.x ...
305
36.26
112
21
2,407
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a3ea2cbed9cfa3c0_3f47ed55", "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...
15
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-c...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 70, 92, 284, 285, 293, 301 ]
[ 70, 92, 284, 285, 293, 301 ]
[ 8, 8, 5, 5, 5, 5 ]
[ 30, 44, 71, 56, 78, 64 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
install.py
/install.py
liyao001/BioQueue
Apache-2.0
2024-11-18T19:14:44.746390+00:00
1,423,571,230,000
3035dc247a42fee46c4df1bb61067ea20871e7b4
2
{ "blob_id": "3035dc247a42fee46c4df1bb61067ea20871e7b4", "branch_name": "refs/heads/master", "committer_date": 1423571230000, "content_id": "db1cdb670f73ce3d5ca874afdc9c6097bbbab360", "detected_licenses": [ "MIT" ], "directory_id": "c3a50274e2eb1263271d38d1b5fa08e8c10ca06e", "extension": "py", "fi...
2.453125
stackv2
#!/usr/bin/env python # # Plot sentence bleu for APE experiments # from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt import pandas import subprocess import moses import tune_test def get_sentence_bleu(ref_file, hyp_file): sbleu_bin = moses.bin_dir + "/sentence-bleu" sbleu_scor...
96
30.43
103
20
900
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b75bf56af5b79854_b774226c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
6
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 18 ]
[ 18 ]
[ 10 ]
[ 95 ]
[ "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" ]
sbleu.py
/code/sbleu.py
accept-project/automatic-post-editing
MIT
2024-11-18T19:14:45.189682+00:00
1,561,639,946,000
6fd6c58fb6890b60b1f32a3faa87a7c82ed91d4d
3
{ "blob_id": "6fd6c58fb6890b60b1f32a3faa87a7c82ed91d4d", "branch_name": "refs/heads/master", "committer_date": 1561639946000, "content_id": "276b1be3f536291753d55bb68785f5c0e97b09f4", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9f4de388674d2d5251bf234706539a2dd1b01fde", "extension": "py"...
2.765625
stackv2
#!/usr/bin/python3.6 ''' Detects non-landmark images. ''' import os import pickle import numpy as np import pandas as pd import matplotlib.pyplot as plt from PIL import Image from cv2 import resize from tqdm import tqdm # Placeholders for predictions p0, p1, p2 = [], [], [] # Places365 Model topn = 5 all_images ...
128
27.78
135
14
1,023
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_524392561a0f1b96_7c2b7301", "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" ]
[ 59, 63 ]
[ 59, 63 ]
[ 9, 16 ]
[ 33, 30 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
non_landmark_detector.py
/non_landmark_detector.py
artyompal/google_landmark_2019
Apache-2.0
2024-11-18T19:14:49.697246+00:00
1,693,805,612,000
70d8d3ef8dd9301f6f3f0ffcd218a1762694afa6
2
{ "blob_id": "70d8d3ef8dd9301f6f3f0ffcd218a1762694afa6", "branch_name": "refs/heads/main", "committer_date": 1693805612000, "content_id": "9bd364ec1f6f4fe1ea86856a830ca84cef5bc025", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "3d74f759ee48d383aa82eeff0a55864a93a001ba", "extension": "py"...
2.484375
stackv2
#!/usr/bin/env vpython3 # Copyright 2013 The Flutter Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import subprocess import sys # This script parses the JSON output produced by malioc about GPU ...
101
22.69
75
15
655
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_4a7b8358838e1c31_11c98ec9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
3
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 43, 55 ]
[ 46, 58 ]
[ 18, 17 ]
[ 4, 4 ]
[ "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" ]
malioc_cores.py
/impeller/tools/malioc_cores.py
flutter/engine
BSD-3-Clause
2024-11-18T19:14:49.965049+00:00
1,678,133,167,000
68892cda3709f1d5d2867917032d15bc9718f62a
2
{ "blob_id": "68892cda3709f1d5d2867917032d15bc9718f62a", "branch_name": "refs/heads/main", "committer_date": 1678133167000, "content_id": "97a98a363beffc97ad2700a3e5edd2074aced833", "detected_licenses": [ "MIT" ], "directory_id": "13c2f729b435b99d531a739b1ff1173b1c36261f", "extension": "py", "file...
2.34375
stackv2
import sys import os import getopt from config import * from dnsdumpster.DNSDumpsterAPI import DNSDumpsterAPI ## # # Authors (GitHub Profiles) : # - @mxcezl # - @squ3D # # Installation : # - DNS-Dumpster : https://github.com/PaulSec/API-dnsdumpster.com # - Perl : https://www.perl.org/get.html # - Nikto ...
71
24.92
131
18
543
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_993e5eea4eafd02e_b8c097cd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 68 ]
[ 68 ]
[ 3 ]
[ 99 ]
[ "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" ]
scan_domain.py
/src/scan_domain.py
mxcezl/SubsCanner
MIT
2024-11-18T19:27:35.188869+00:00
1,577,019,166,000
486fd6d6dcd2c31d050bde3f104716895b01a0c3
3
{ "blob_id": "486fd6d6dcd2c31d050bde3f104716895b01a0c3", "branch_name": "refs/heads/master", "committer_date": 1577019166000, "content_id": "1e7cb5ace99f76bff953a6a39f63ad1edfbeb366", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d61a6df81bca12df0b743053643bc386d15a4b56", "extension": "py"...
2.9375
stackv2
''' @Date: 2019-08-20 09:35:10 @Author: ywyz @LastModifiedBy: ywyz @Github: https://github.com/ywyz @LastEditors: ywyz @LastEditTime: 2019-08-20 09:35:10 ''' import turtle side = eval(input("Enter the side of pentagram: ")) turtle.right(72) turtle.forward(side) turtle.right(144) turtle.forward(side) turtle.right(144) ...
23
17.87
51
9
160
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_16b938c6fa94f496_cc83b14c", "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" ]
[ 11 ]
[ 11 ]
[ 8 ]
[ 52 ]
[ "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" ]
3-12.py
/Exercise03/3-12.py
ywyz/IntroducingToProgrammingUsingPython
Apache-2.0
2024-11-18T19:27:41.053636+00:00
1,524,469,300,000
f196f528472c676de29a002e8e324279e34505b6
3
{ "blob_id": "f196f528472c676de29a002e8e324279e34505b6", "branch_name": "refs/heads/master", "committer_date": 1524469300000, "content_id": "b5d44b6e1f2916269e859472c8cdc2a994a0c25f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2790a7aa21a804813dc9bf0b1329f1f4118f2c38", "extension": "py"...
2.6875
stackv2
import datetime import folium import math import pandas as pd import numpy as np import pickle import requests import time from datetime import timedelta from folium.plugins import HeatMap from Util import * from Networks import * default_tree = "oak" def calculate_tree_benefit_score(startts, endts, sample_loc, deb...
139
29.37
85
17
1,185
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_38b9aa89a84714e3_c3b16949", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
5
true
[ "CWE-502", "CWE-502", "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" ]
[ 47, 72, 98 ]
[ 47, 72, 98 ]
[ 5, 14, 14 ]
[ 43, 50, 50 ]
[ "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" ]
get_heatmap.py
/data/get_heatmap.py
leopangchan/Treety
Apache-2.0
2024-11-18T19:27:41.393430+00:00
1,604,095,726,000
342c9e23db662eb7b6033608c56adacba84ff387
3
{ "blob_id": "342c9e23db662eb7b6033608c56adacba84ff387", "branch_name": "refs/heads/master", "committer_date": 1604095726000, "content_id": "ee68a5fbd393cb7898b6361a473dd9fa9e140f1d", "detected_licenses": [ "MIT" ], "directory_id": "cfd02db924235ba21681f0d1fdf0cf2cf3f766df", "extension": "py", "fi...
2.546875
stackv2
import pickle import numpy as np tree = pickle.load(open('../../models/tree.sav', 'rb')) mlp = pickle.load(open('../../models/mlp.sav', 'rb')) rf = pickle.load(open('../../models/rf.sav', 'rb')) models = { 'tree': tree, 'mlp': mlp, 'rf': rf } def predict(X, model: str = 'rf', prob...
49
28.06
81
14
537
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_84443703cde9f705_08c0d7b8", "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" ]
[ 5, 6, 7 ]
[ 5, 6, 7 ]
[ 8, 7, 6 ]
[ 56, 54, 52 ]
[ "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" ]
predict_models.py
/src/models/predict_models.py
miquelescobar/bugdetector
MIT
2024-11-18T19:27:44.143592+00:00
1,480,442,395,000
9013618cae2ec37fb09bbdacc24a7c8a6fc517e4
2
{ "blob_id": "9013618cae2ec37fb09bbdacc24a7c8a6fc517e4", "branch_name": "refs/heads/master", "committer_date": 1480442395000, "content_id": "bf6f48962f8609d942e8b4ef5e5c20d075a9c52a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d0a20644219574450858cd12096102510f143396", "extension": "py"...
2.5
stackv2
# coding: utf-8 import cPickle as pickle import re import string from spacy.en import English from sklearn.feature_extraction.stop_words import ENGLISH_STOP_WORDS STOPLIST = English.Defaults().stop_words STOPLIST |= ENGLISH_STOP_WORDS STOPLIST |= set(["n't", "'s", "'m", "ca"]) SYMBOLS = set(" ".join(string.punctuat...
56
36.39
94
13
663
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_77e6f9e35807a71e_4d38497f", "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 ...
20
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-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", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 49, 49, 50, 50, 51, 51 ]
[ 38, 38, 39, 39, 40, 40, 41, 41, 42, 42, 43, 43, 45, 45, 49, 49, 50, 50, 51, 51 ]
[ 44, 44, 44, 44, 44, 44, 42, 42, 42, 42, 42, 42, 5, 5, 51, 51, 49, 49, 5, 5 ]
[ 89, 89, 89, 89, 89, 89, 85, 85, 85, 85, 85, 85, 48, 48, 94, 94, 90, 90, 69, 69 ]
[ "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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
preprocess.py
/preprocess.py
charlieyou/data-science-final-project
Apache-2.0
2024-11-18T19:27:46.680072+00:00
1,596,012,591,000
ac82f5d479706cd29755e539bebfd058cd37c7b9
3
{ "blob_id": "ac82f5d479706cd29755e539bebfd058cd37c7b9", "branch_name": "refs/heads/master", "committer_date": 1596012591000, "content_id": "8877167745ceb09ab8f7da41d28601bc1a7ecd82", "detected_licenses": [ "MIT" ], "directory_id": "bd8f2458bf2ee0c8d4df81327cfbe532026f00bb", "extension": "py", "fi...
2.65625
stackv2
import os import subprocess import select import time import threading import Queue def enqueue_output(out, queue): c = out.read(1) while 0 < len(c): queue.put(c) c = out.read(1) class pexpect: def __init__(self): commandLine = ["java", "-cp", ...
64
29.22
123
14
415
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ad7de8cedf5ea896_ce5bc6e1", "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" ]
[ 21 ]
[ 24 ]
[ 24 ]
[ 66 ]
[ "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" ]
pexpect.py
/Assigments/Assigment8/Tests/pexpect.py
mevljas/Testing-and-Quality
MIT
2024-11-18T19:27:46.862329+00:00
1,508,562,190,000
fbef43a16eefd50eb72936bbe2fbe281b38e6926
2
{ "blob_id": "fbef43a16eefd50eb72936bbe2fbe281b38e6926", "branch_name": "refs/heads/master", "committer_date": 1508562190000, "content_id": "9b2c325e3942388ea2817e6275543558098af4e5", "detected_licenses": [ "MIT" ], "directory_id": "e34f1072382f6f96e5c46fc7fff2b1523f7b78d2", "extension": "py", "fi...
2.34375
stackv2
from xml.etree.ElementTree import parse as _parse, ParseError as _ParseError from ...common import BaseModel as _BaseModel, ModelStatus as _ModelStatus from .base import SolutionReader class CplexSolutionReader(SolutionReader): __STATUS__ = { "optimal": _ModelStatus.OPTIMAL } def __init__(self, ...
34
34.74
96
19
256
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_70aa214d679740c1_a61c8551", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
2
true
[ "CWE-611", "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.use-defused-xml-parse" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 1, 19 ]
[ 1, 19 ]
[ 1, 28 ]
[ 77, 51 ]
[ "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" ]
cplex.py
/src/main/mosi/format/solution/cplex.py
alexbahnisch/mosi
MIT
2024-11-18T19:27:48.145497+00:00
1,579,475,529,000
2c0487e9f6bc875afee978b882b1a89d9bb388fe
3
{ "blob_id": "2c0487e9f6bc875afee978b882b1a89d9bb388fe", "branch_name": "refs/heads/master", "committer_date": 1579659343000, "content_id": "c117052b6518a8eb806e13523f1540c5b0cde2df", "detected_licenses": [ "MIT" ], "directory_id": "0911eef4f271bbe014e3027457574fd9297c6865", "extension": "py", "fi...
2.8125
stackv2
""" util.py Provides the following utilities: - Logging - INI Config files - Progress Bars - Data appending to HDF5 files - User kwargs for common tasks """ from configparser import ConfigParser from datetime import timedelta from logging import Formatter, getLogger, FileHandler, StreamHandler from os import makedir...
207
31.52
120
20
1,606
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_1909cf4eda04abf7_16d51930", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
4
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 81, 91 ]
[ 81, 91 ]
[ 60, 19 ]
[ 100, 28 ]
[ "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.", "Detected the use of eval(). eval() can be dangerous if used...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
util.py
/clustering/util.py
bernhardtj/DetectorChar
MIT
2024-11-18T19:27:49.919264+00:00
1,469,531,285,000
01ae2212e1801bb1cd7657452e0905344fde93bd
3
{ "blob_id": "01ae2212e1801bb1cd7657452e0905344fde93bd", "branch_name": "refs/heads/master", "committer_date": 1469531285000, "content_id": "b19da45a17045b7cbc671556ffc430b1c80a5a3a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "85550d94a02496dbe6720e53b2f40fb8cbc28a74", "extension": "py"...
2.609375
stackv2
# coding: utf-8 """ flask_weixin ~~~~~~~~~~~~ Weixin implementation in Flask. :copyright: (c) 2013 by Hsiaoming Yang. :license: BSD, see LICENSE for more detail. """ import time import hashlib try: from lxml import etree except ImportError: from xml.etree import cElementTree as etree exc...
334
28.39
75
16
2,172
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_dc4f41a99babf976_aee8478a", "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" ]
[ 18, 20 ]
[ 18, 20 ]
[ 5, 5 ]
[ 48, 47 ]
[ "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" ]
flask_weixin.py
/site-packages/Flask_Weixin-0.1.0-py2.7.egg/flask_weixin.py
davidvon/pipa-pay-server
Apache-2.0
2024-11-18T19:27:51.057069+00:00
1,690,480,722,000
a956816a20939c92087ebdfdb6e6920e27bc920a
3
{ "blob_id": "a956816a20939c92087ebdfdb6e6920e27bc920a", "branch_name": "refs/heads/master", "committer_date": 1690480722000, "content_id": "6cc480bfd0f7be82b83cad016d0fde9c02a7d360", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f509ab9825c542e09b0c6591d86ef1f9feb540a6", "extension": "py"...
2.59375
stackv2
import logging import re log = logging.getLogger(__name__) # Unicon from unicon.core.errors import SubCommandFailure def verify_portfast_state(device, interface): ''' Verify portfast is enabled or not on interface Args: device ('obj'): device object interface ('str'): interface to check ...
98
32.53
119
13
698
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_374a78aa87e20587_9312cfd7", "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" ]
[ 25, 25, 56, 56, 86, 86 ]
[ 25, 25, 56, 56, 86, 86 ]
[ 31, 31, 23, 23, 23, 23 ]
[ 50, 50, 42, 42, 42, 42 ]
[ "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" ]
verify.py
/pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/spanning_tree/verify.py
CiscoTestAutomation/genielibs
Apache-2.0
2024-11-18T19:38:25.223194+00:00
1,651,058,345,000
1e9cfcbedb3615505adc4af00f1f1d20220f2b3c
3
{ "blob_id": "1e9cfcbedb3615505adc4af00f1f1d20220f2b3c", "branch_name": "refs/heads/master", "committer_date": 1651058345000, "content_id": "e21ca63d109ce63dd04eba0bea3a7af5aa5d9632", "detected_licenses": [ "MIT" ], "directory_id": "a3236cdaf17ad69c5fa0df71ffa140fbcbe90577", "extension": "py", "fi...
2.734375
stackv2
import os import sys import jwt import pam import socket import sqlite3 import getpass import platform from os.path import expanduser from keyring.backend import KeyringBackend ENCRYPTION_TYPE = 'HS512' SECRET_KEY = socket.getfqdn().upper() SQLITE_DB = "{0}/.jwtkeyring.db".format(expanduser("~")) class JWTKeyring(Ke...
206
31.92
77
14
1,435
python
[{"finding_id": "semgrep_rules.python.jwt.security.audit.jwt-python-exposed-data_97471d4dc9830806_c184c446", "tool_name": "semgrep", "rule_id": "rules.python.jwt.security.audit.jwt-python-exposed-data", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The object is passed strictly to j...
1
true
[ "CWE-522" ]
[ "rules.python.jwt.security.audit.jwt-python-exposed-data" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 54 ]
[ 54 ]
[ 16 ]
[ 77 ]
[ "A02:2017 - Broken Authentication" ]
[ "The object is passed strictly to jwt.encode(...) Make sure that sensitive information is not exposed through JWT token payload." ]
[ 5 ]
[ "LOW" ]
[ "LOW" ]
jwt_backend.py
/jwt_backend.py
krazybean/keyring_jwt_sql_backend
MIT
2024-11-18T19:38:26.524385+00:00
1,628,102,400,000
727ed262f1e093063de6cfd22c84469a30abe45a
3
{ "blob_id": "727ed262f1e093063de6cfd22c84469a30abe45a", "branch_name": "refs/heads/main", "committer_date": 1628102400000, "content_id": "422671955a3d48fa997b0f0ce94272b1045850a4", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ae932b2c5db91e9562b90db6b8ff2f730804acde", "extension": "py", ...
2.703125
stackv2
import multiprocessing as mp import pickle from douzero.env.game import GameEnv def load_card_play_models(card_play_model_path_dict): players = {} for position in ['landlord', 'landlord_up', 'landlord_down']: if card_play_model_path_dict[position] == 'rlcard': from .rlcard_agent import RL...
88
32.99
127
14
705
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_2867d56a5b6a2595_c72209be", "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" ]
[ 48 ]
[ 48 ]
[ 31 ]
[ 45 ]
[ "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" ]
simulation.py
/douzero/evaluation/simulation.py
Vincentzyx/DouZero
Apache-2.0
2024-11-18T19:38:27.262579+00:00
1,627,550,637,000
576867d3f9071d18b34253661d02a5c89871cb55
2
{ "blob_id": "576867d3f9071d18b34253661d02a5c89871cb55", "branch_name": "refs/heads/master", "committer_date": 1627550637000, "content_id": "b60ddfb4250e0aed94b7e79f7bc837f6e494a33d", "detected_licenses": [ "MIT" ], "directory_id": "3884a8fc81520e2eaee5f5439eedd3001555063a", "extension": "py", "fi...
2.46875
stackv2
import os import numpy as np import torch import pickle as pkl from torchvision.datasets import VisionDataset class PklDataset(VisionDataset): def __init__( self, pkl_file, root, transforms=None, transform=None, target_transform=None, ): super().__init__(root, transforms, transform, target_tra...
28
30.43
85
13
186
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a42aa6d8eba53458_070679ef", "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 ]
[ 23 ]
[ 34 ]
[ "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" ]
pkl_dataset.py
/nntransfer/dataset/dataset_classes/pkl_dataset.py
KaiHCohrs/nntransfer
MIT
2024-11-18T19:38:28.370002+00:00
1,601,626,085,000
c08c7a6da3c5ea190bc783c52aed0ee1e9196483
3
{ "blob_id": "c08c7a6da3c5ea190bc783c52aed0ee1e9196483", "branch_name": "refs/heads/master", "committer_date": 1601626085000, "content_id": "ee8ad73bb13ae1456e4361c9e699b1ca5923b6a5", "detected_licenses": [ "MIT" ], "directory_id": "978a542b0b55a1a53b0409370b4515b29a34223f", "extension": "py", "fi...
3
stackv2
import numpy as np from scipy.io import loadmat import pickle def load_data(mat_file_path, width=28, height=28, max_=None, verbose=True): ''' Load data in from .mat file as specified by the paper. Arguments: mat_file_path: path to the .mat, should be in sample/ Optional Arguments: ...
88
37.76
102
18
897
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_d73168711339312a_78781027", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `display` is de...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 42 ]
[ 42 ]
[ 5 ]
[ 58 ]
[ "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" ]
emnist.py
/emnist.py
marmooo/keras-emnist-digits
MIT
2024-11-18T19:38:33.995170+00:00
1,645,135,202,000
78df43cbbd09f45cd0efc32f674eb01d2b536964
3
{ "blob_id": "78df43cbbd09f45cd0efc32f674eb01d2b536964", "branch_name": "refs/heads/master", "committer_date": 1645135202000, "content_id": "e5fb6d1c02fe827eff63242b90b737efbc67fabe", "detected_licenses": [], "directory_id": "2d9f4c6186e1c1f23c87ed39f1018fca4fd32d78", "extension": "py", "filename": "dat...
2.78125
stackv2
# 02_create_schema.py import sqlite3 import os import lzma from six.moves import cPickle import numpy as np import io """ """ COLUNAS = ["experiment_id","algorithm","dataset","gen","accumulativeTime", "fitness_max","fitness_min","fitness_avg","fitness_std","fitness_25_percentile","fitness_50_percentile","fitness_...
222
39.97
140
20
2,182
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_07f7245d3b92805e_1abed818", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
14
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-502", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "HIGH", "MEDIUM", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "HIGH", "HIGH" ]
[ 42, 42, 45, 45, 55, 55, 58, 105, 149, 149, 165, 165, 176, 216 ]
[ 42, 42, 52, 52, 55, 55, 80, 105, 149, 149, 168, 168, 176, 216 ]
[ 1, 1, 5, 5, 1, 1, 5, 23, 9, 9, 17, 17, 9, 9 ]
[ 111, 111, 39, 39, 99, 99, 17, 41, 76, 76, 58, 58, 43, 42 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A08:2017 - Insecure Deserialization", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Inj...
[ "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, 7.5, 5, 5, 7.5, 5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "MEDIUM", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
dataset_storage copy.py
/examples/dataset_storage copy.py
gonzalesMK/MetaHeuristic
2024-11-18T19:38:34.673754+00:00
1,557,343,824,000
5169386e83f7329ff6cc3f22c99704a55c97c726
3
{ "blob_id": "5169386e83f7329ff6cc3f22c99704a55c97c726", "branch_name": "refs/heads/master", "committer_date": 1557343824000, "content_id": "77ad79f7b3300ddfa16b1c96563430b13ff7d479", "detected_licenses": [ "MIT" ], "directory_id": "28ebadd9c355824ef141dce137ebab8e65f8d307", "extension": "py", "fi...
2.671875
stackv2
####################################################################### # This file is part of Pyblosxom. # # Copyright (c) 2003-2005 Ted Leung # Copyright (c) 2010, 2011 Will Kahn-Greene # # Pyblosxom is distributed under the MIT license. See the file # LICENSE for distribution details. ##############################...
126
24.73
79
15
964
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_523a54789fbf54b3_2ed22c2c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 87 ]
[ 87 ]
[ 5 ]
[ 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" ]
w3cdate.py
/Pyblosxom/plugins/w3cdate.py
daemonfreaks/pyblosxom
MIT
2024-11-18T19:38:45.163329+00:00
1,588,147,589,000
e68e950122dabfcce7e20a3e0de9778898772338
3
{ "blob_id": "e68e950122dabfcce7e20a3e0de9778898772338", "branch_name": "refs/heads/master", "committer_date": 1588147589000, "content_id": "596590eb765fe461399721b715d973fd62b7193f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b7846cfcfb878129a8109f6520adc3468764fa03", "extension": "py"...
2.859375
stackv2
# -*- coding: utf-8 -*- # # SigTAR: Creates a TAR archive and a file containing the md5 sums of each of # the archive's contents. # # Project: https://www.codetrax.org/projects/veritar # # Copyright 2007 George Notaras <gnot [at] g-loaded.eu>, CodeTRAX.org # # Licensed under the Apache License, Version 2.0...
145
24.06
120
15
929
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_44b57ed11d290161_20e0cad5", "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" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 87 ]
[ 87 ]
[ 9 ]
[ 59 ]
[ "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" ]
sigtar.py
/veritar/sigtar.py
gazzar/veritar
Apache-2.0
2024-11-18T19:38:55.221860+00:00
1,578,308,575,000
406131049df721bff0dda07b8c574074588bd99c
3
{ "blob_id": "406131049df721bff0dda07b8c574074588bd99c", "branch_name": "refs/heads/master", "committer_date": 1578308575000, "content_id": "d09af6a9689e4cbbd12140357320bafc95944eb6", "detected_licenses": [ "MIT" ], "directory_id": "a24dd565736d153ffe8161cf0c2801db982f7ceb", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- from xmlrpc.server import SimpleXMLRPCServer as Server def fak(n): """ Berechnet die Fakultaet der ganzen Zahl n. """ erg = 1 for i in range(2, n+1): erg *= i return erg def quad(n): """ Berechnet das Quadrat der Zahl n. """ return n*n sr...
21
20.57
54
8
133
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_78083b2c25a5ad01_e10429d2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
1
true
[ "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 4 ]
[ 4 ]
[ 1 ]
[ 55 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
multicall_server.py
/00_Original/34_Netzwerkkommunikation/XML-RPC/multicall_server.py
felixdittrich92/Python3_book
MIT
2024-11-18T20:06:05.703030+00:00
1,555,920,692,000
b10cc856debba47e63671c00ab9e6cddb4e1ef62
3
{ "blob_id": "b10cc856debba47e63671c00ab9e6cddb4e1ef62", "branch_name": "refs/heads/master", "committer_date": 1555920692000, "content_id": "9e07fd8758f4f6ae83c4109f1bb8012c4100f6d9", "detected_licenses": [ "MIT" ], "directory_id": "602d4023040e343724b444814d7386fa22b09ffa", "extension": "py", "fi...
3.015625
stackv2
# import the necessary packages import numpy as np import cv2 import os from xml.dom.minidom import Document def oval2box(image, center_x, center_y, major_axis_radius, minor_axis_radius, angle, w, h): mask = np.zeros((w, h, 3), dtype=np.uint8) cv2.ellipse(mask, (center_x, center_y), (major_axis_radius, minor_...
141
33.94
120
20
1,814
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e26e20e203af82c6_c944e4d7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 5 ]
[ 5 ]
[ 1 ]
[ 37 ]
[ "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" ]
main.py
/main.py
kevincao91/FDDB2VOC
MIT
2024-11-18T20:06:06.686301+00:00
1,512,756,678,000
c99a2d562d9c07d1d614600b210c79e320aa0f83
2
{ "blob_id": "c99a2d562d9c07d1d614600b210c79e320aa0f83", "branch_name": "refs/heads/master", "committer_date": 1512756678000, "content_id": "cccd27c2fe4f7644088a21ca8497886d57e6895b", "detected_licenses": [ "MIT" ], "directory_id": "0017ad36fb1d5f80924fc6631bd59b4d4f7b55d2", "extension": "py", "fi...
2.359375
stackv2
""" Code to run the primary node. """ from __future__ import division from os.path import join, dirname, abspath import os import sys import math from socket import * def main_function(): """ This is a stub for testing the unit testing layout. """ return 1 def run(host, sampleTableLoc, spinupTableLoc...
96
39.32
150
16
1,002
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_c313c8ae3c766c93_0a072dc9", "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...
9
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-c...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 37, 43, 81, 90, 95, 95 ]
[ 37, 45, 83, 92, 95, 95 ]
[ 5, 5, 13, 13, 9, 9 ]
[ 91, 68, 55, 98, 47, 47 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
main.py
/aether/primary/main.py
kosticlab/aether
MIT
2024-11-18T20:06:10.666519+00:00
1,610,788,165,000
1ec369e894eb7995de749a08cb39ec5259f6c5e5
2
{ "blob_id": "1ec369e894eb7995de749a08cb39ec5259f6c5e5", "branch_name": "refs/heads/master", "committer_date": 1610788165000, "content_id": "94ee5d3df9e5cb3d91860f1df47408b93bf3a438", "detected_licenses": [ "MIT" ], "directory_id": "df0afd5c143fbd799e47b2c1113c75edd16861dc", "extension": "py", "fi...
2.484375
stackv2
import pickle import torch from collections import defaultdict from sentiment_analysis_model import TextClassificationModel def read_metadata(metadata_path): print('Reading metadata') with open(metadata_path, 'rb') as f: metadata = pickle.load(f) model_params = metadata['model_params'] ...
52
30.9
71
13
365
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_606859d7d45f324d_a1c6e533", "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" ]
[ 11 ]
[ 11 ]
[ 20 ]
[ 34 ]
[ "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" ]
sentiment_analysis.py
/inference/infer/sentiment_analysis.py
amitkayal/Flash
MIT
2024-11-18T20:06:13.397001+00:00
1,371,067,068,000
d28b34782d370c8b1ec996d0b82144eb67f7e311
3
{ "blob_id": "d28b34782d370c8b1ec996d0b82144eb67f7e311", "branch_name": "refs/heads/master", "committer_date": 1371067068000, "content_id": "a8a22b2b815b3ee2f18139f73dc6c403df80c0c5", "detected_licenses": [ "MIT" ], "directory_id": "581a288153bfa0e05883b3c7def067bd8dba46aa", "extension": "py", "fi...
2.71875
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ammonite.py Copyright (c) 2013 Alex J Burke. All rights reserved. """ import os FILE_MANIFEST = '_manifest' SCRIPT_EXT = '.sql' TABLE_NAME = 'schema_changelog' TABLE_STRUCTURE = { 'mysql': """ CREATE TABLE `{0}` ( `id` int(11) unsigned NOT NULL, `applied` tim...
241
32.27
111
18
1,651
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_c00bd019d76bcae2_d31bd09f", "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...
7
true
[ "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.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "HIGH", "MEDIUM", "HIGH" ]
[ 57, 57, 62, 67, 67 ]
[ 57, 57, 62, 67, 67 ]
[ 9, 9, 9, 13, 13 ]
[ 35, 35, 35, 77, 77 ]
[ "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, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
SimpleUpgrader.py
/ammonite/SimpleUpgrader.py
alexjeffburke/ammonite
MIT
2024-11-18T20:06:22.839169+00:00
1,579,725,312,000
16ff6528aad3732cf6369ef9be584ae969d0f480
3
{ "blob_id": "16ff6528aad3732cf6369ef9be584ae969d0f480", "branch_name": "refs/heads/master", "committer_date": 1579725312000, "content_id": "cfbadb035b0d712661b308ce2a80efa4b6b05a40", "detected_licenses": [ "MIT" ], "directory_id": "470a22121db5bc4d4004b5b83628c15b18258a2a", "extension": "py", "fi...
3.296875
stackv2
__author__ = 'Andrés Perez Domínguez' import sqlite3 import urllib.request from tkinter import * from datetime import datetime from tkinter import messagebox from bs4 import BeautifulSoup def extract_threads_from_pages(number_of_pages): res = [] for n in range(number_of_pages): res.extend(extract_thre...
220
29.01
142
17
1,648
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_d701f35988481af6_b59b5b2b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value...
2
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 127 ]
[ 127 ]
[ 5 ]
[ 96 ]
[ "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" ]
BeautifulSoup_1.py
/BSoup/BeautifulSoup_1.py
josperdom1/AII
MIT
2024-11-18T20:06:25.215139+00:00
1,403,192,860,000
6120424e660b09a613513e53db9c167362ba8d56
3
{ "blob_id": "6120424e660b09a613513e53db9c167362ba8d56", "branch_name": "refs/heads/master", "committer_date": 1403192860000, "content_id": "23682a351f6823d2182e3f3ebcc885138ecd15e7", "detected_licenses": [ "MIT" ], "directory_id": "f6a577437b49d6a1f4f44d74b67f98d5e5fe0fc6", "extension": "py", "fi...
2.71875
stackv2
#!/usr/local/bin/python import sys, subprocess from subprocess import call MIN_ARGS = 5 def usage(): close('USAGE: Exec_original Exec2_optimized NUM_EXECS NUM_PARAMS [PRAM 1] [PARAM 2] ...') def close(message): print message + "\n" sys.exit(1) def getExecTime(string): line = string.split('\n', 1)[0] parts = l...
113
28.34
156
22
1,005
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_2e73882f827928aa_5d75c510", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
11
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args", "rules.python.lang...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 41, 41, 46, 46, 71, 71, 89, 89 ]
[ 41, 41, 46, 46, 71, 71, 89, 89 ]
[ 8, 25, 8, 25, 9, 26, 9, 26 ]
[ 99, 62, 99, 62, 153, 92, 157, 96 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess funct...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM" ]
script_speedup.py
/lab4_session/script_speedup.py
metbosch/PCA-Lab
MIT
2024-11-18T20:06:25.912116+00:00
1,522,076,984,000
12c156c0d32bcc553f58b8171f60c056a466381e
3
{ "blob_id": "12c156c0d32bcc553f58b8171f60c056a466381e", "branch_name": "refs/heads/master", "committer_date": 1522076984000, "content_id": "0f16592f976c0249bb7db07c1f49894e395aa26f", "detected_licenses": [ "MIT" ], "directory_id": "59391e10af51fc68f72bd4e6709b005588484872", "extension": "py", "fi...
2.609375
stackv2
try: from httplib import HTTPSConnection except ImportError: from http.client import HTTPSConnection try: from urllib import urlencode except ImportError: from urllib.parse import urlencode import json from .constants import ACCEPT, VERSION, PATHNAME_COMPANY, PATHNAME_CONTACT, URL from .common import excepti...
54
23.37
99
15
301
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.httpsconnection-detected_de100e651bfb91f2_a1bc6044", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.httpsconnection-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The HTTPSConnection API has ch...
1
true
[ "CWE-295" ]
[ "rules.python.lang.security.audit.httpsconnection-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 29 ]
[ 29 ]
[ 12 ]
[ 32 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "The HTTPSConnection API has changed frequently with minor releases of Python. Ensure you are using the API for your version of Python securely. For example, Python 3 versions prior to 3.4.3 will not verify SSL certificates by default. See https://docs.python.org/3/library/http.client.html#http.client.HTTPSConnecti...
[ 5 ]
[ "LOW" ]
[ "LOW" ]
client.py
/api_libs/python/fasttrack_client/client.py
juliensalinas/python-django-api-reactjs-frontend-slate-documentation-various-client-libs
MIT
2024-11-18T20:06:32.562629+00:00
1,529,669,750,000
8e703680bff8b74081138bcba903e33f128427fd
3
{ "blob_id": "8e703680bff8b74081138bcba903e33f128427fd", "branch_name": "refs/heads/master", "committer_date": 1529669750000, "content_id": "d8fd727f5b3781f41d2dd5627c396583549c158c", "detected_licenses": [ "MIT", "BSD-3-Clause" ], "directory_id": "b6d0113b8ac273421841b3069f1bba041b85a956", "ext...
3.359375
stackv2
# coding: utf-8 """Generic class to handle dynamic csv storage records flows.""" from shutil import copyfileobj import pickle import os from abc import ABCMeta, abstractmethod from yaptools.logger import LoggedObject, loggedmethod CSV_WRITER_DOCSTRING = """ The task resolved here is to store dynamically some d...
232
38.68
79
18
1,991
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_710919a2c2ea0ac3_e5fd1b33", "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" ]
[ 184 ]
[ 184 ]
[ 17 ]
[ 54 ]
[ "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" ]
_csv_writer.py
/csvtools/_csv_writer.py
pandrey-fr/csvtools
MIT,BSD-3-Clause
2024-11-18T20:06:33.097632+00:00
1,635,163,601,000
31594bae3db90f2f3f04038d2a16be0bcd938675
2
{ "blob_id": "31594bae3db90f2f3f04038d2a16be0bcd938675", "branch_name": "refs/heads/main", "committer_date": 1635163601000, "content_id": "8fa4d77eefc1cd09116e4c22819832632ab3655f", "detected_licenses": [ "MIT" ], "directory_id": "0dd9171579c9e741559f667a7f4ac515a3cfbcec", "extension": "py", "file...
2.421875
stackv2
from sklearn.datasets import make_moons, make_circles, make_classification import numpy as np import matplotlib.pyplot as plt import time import pickle as pkl import os import sys import tensorflow as tf syspath = os.path.dirname(os.path.realpath(__file__)) + '/..' sys.path.insert(0, syspath) from vbsw_module.models.f...
181
29.71
129
21
1,678
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_4403fab974658ede_e962e8c4", "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...
8
true
[ "CWE-78", "CWE-78", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "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", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 27, 57, 103, 111, 120, 164, 172, 181 ]
[ 27, 57, 103, 111, 120, 164, 172, 181 ]
[ 17, 5, 23, 13, 13, 23, 13, 13 ]
[ 130, 59, 34, 33, 33, 34, 33, 33 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "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, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
double_moon.py
/paper_experiments/double_moon.py
paulnovello/vbsw
MIT
2024-11-18T20:18:10.857221+00:00
1,692,190,234,000
6d1d3baf418d2eec94609820b5cccbab042552ae
2
{ "blob_id": "6d1d3baf418d2eec94609820b5cccbab042552ae", "branch_name": "refs/heads/master", "committer_date": 1692190234000, "content_id": "43af7de5132b41f0da2c17cb132323f853bafa1a", "detected_licenses": [ "MIT" ], "directory_id": "c772843fdbb20770e122128ddcd301ae0a6ef6db", "extension": "py", "fi...
2.3125
stackv2
#!/usr/bin/env python3 """ Build the containerd images for The Combine. This script currently supports using 'docker' or 'nerdctl' to build the container images. 'nerdctl' is recommended when using Rancher Desktop for the development environment and 'docker' is recommended when using Docker Desktop with the 'contain...
325
31.32
96
17
2,318
python
[{"finding_id": "semgrep_rules.python.lang.compatibility.python36-compatibility-Popen2_04d4f281fe4345e1_ee82c1fd", "tool_name": "semgrep", "rule_id": "rules.python.lang.compatibility.python36-compatibility-Popen2", "finding_type": "compatibility", "severity": "high", "confidence": "medium", "message": "the `encoding` a...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 76 ]
[ 82 ]
[ 29 ]
[ 14 ]
[ "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" ]
build.py
/deploy/scripts/build.py
sillsdev/TheCombine
MIT
2024-11-18T20:18:12.433173+00:00
1,617,357,106,000
a3b60da610d4ff9337e41c15a23d0695a1dfdbcc
2
{ "blob_id": "a3b60da610d4ff9337e41c15a23d0695a1dfdbcc", "branch_name": "refs/heads/main", "committer_date": 1617357106000, "content_id": "e991641a2508705ea86a29f799b90b5671f3c5eb", "detected_licenses": [ "MIT" ], "directory_id": "d39abf30b6f373573982c88e42f18c8d712824a0", "extension": "py", "file...
2.375
stackv2
import os from os import listdir from os.path import isfile, join from xml.dom import minidom home = os.path.expanduser("~") mypath=home+'/.local/share/bijiben' onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))] for file in onlyfiles: fullfile = os.path.abspath(os.path.join(mypath, file)) mydoc = m...
20
30.7
67
11
160
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_23d17149ffc21c33_d9f3bb04", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 4 ]
[ 4 ]
[ 1 ]
[ 28 ]
[ "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" ]
printgnomenotes.py
/printgnomenotes.py
Pshemas/gnotes_in_cli
MIT
2024-11-18T20:18:15.858761+00:00
1,581,937,062,000
afcd10c7fa91cba22cfed13fbe7a52e5b66f18c1
3
{ "blob_id": "afcd10c7fa91cba22cfed13fbe7a52e5b66f18c1", "branch_name": "refs/heads/master", "committer_date": 1581937062000, "content_id": "7616585371bdb7d0399a56582ccb5df3025ad630", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "1e13803bbb6851299e2655b3ef0a6c43d664f1e9", "extension": "p...
2.875
stackv2
#!/usr/bin/env python3 # if system version of python is python3, then above can simply be 'python' """ csv2sqlite.py: Extract records from CSV files and insert into Sqlite3 database Usage: csv2sqlite.py [-h] [-d] [-p PKi1,PKi2,..] [-b dbfile] csvfile1 [csvfile2 ...] Description: Create an Sqlite3 database from p...
323
32.38
108
17
2,791
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_a339d84bf5521dea_735c6f9b", "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...
5
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" ]
[ 43, 43, 73 ]
[ 43, 43, 73 ]
[ 5, 5, 5 ]
[ 50, 50, 35 ]
[ "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" ]
csv2sqlite.py
/python/csv2sqlite.py
jaleephd/misc-data-processing
BSD-3-Clause
2024-11-18T20:18:22.785423+00:00
1,606,703,239,000
06952be4e5db1c7676da6fe6edc80f2c6427ca09
2
{ "blob_id": "06952be4e5db1c7676da6fe6edc80f2c6427ca09", "branch_name": "refs/heads/master", "committer_date": 1606703239000, "content_id": "cc5d60fc80a091a0269cd6e30132c87637c33b3d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "767456da54a8ebb4db846f66985cef00bd6eae0b", "extension": "py"...
2.5
stackv2
from worker import TrainWorker import os install_command = 'pip3 install -r ./model/'+os.environ.get('MODEL_FOLDER','model')+'/requirements.txt' try_count = 0 while True: exit_code = os.system(install_command) if exit_code == 0: break else: try_count += 1 if try_count == 10: ...
17
27.76
103
15
122
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_69bb8de726a75b6f_4da02135", "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-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 7, 7 ]
[ 7, 7 ]
[ 17, 17 ]
[ 43, 43 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
run.py
/image_define/src/train/run.py
airlovelq/Sugar-easy
Apache-2.0
2024-11-18T20:31:07.847823+00:00
1,505,189,833,000
bf46429607804dd7c6a2d1a8edde4b80fd257100
2
{ "blob_id": "bf46429607804dd7c6a2d1a8edde4b80fd257100", "branch_name": "refs/heads/master", "committer_date": 1505189833000, "content_id": "1765a361e9256cf4776f2face9c200c384cfe0f7", "detected_licenses": [ "MIT" ], "directory_id": "09542ca6f698059ec3cfe1a3b9caa15f92c7659b", "extension": "py", "fi...
2.359375
stackv2
import pickle from gensim import models, corpora import pandas as pd import numpy as np from tqdm import tqdm data_filename = '/home/e06315e/Data/2017 DATA/AN_2017.csv' model_out_location = 'auto_result_data/autoLDAData0106.p' data = pd.read_csv(data_filename) data.columns = [c.lower() for c in data.columns] data =...
32
34.38
117
10
306
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_70fb15900532c6c7_4ca659a4", "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" ]
[ 19 ]
[ 19 ]
[ 16 ]
[ 62 ]
[ "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" ]
get_new_dist.py
/reference/auto_prod/get_new_dist.py
aniruddhasanyal/auto_wrk
MIT
2024-11-18T20:31:13.641915+00:00
1,624,397,652,000
6704842b44bdd407400e1c68aa26ad066a409d81
2
{ "blob_id": "6704842b44bdd407400e1c68aa26ad066a409d81", "branch_name": "refs/heads/main", "committer_date": 1624397652000, "content_id": "ea5e5ccdf3c312a1c42450a2ee30e5f72a4d726b", "detected_licenses": [ "MIT" ], "directory_id": "020f4e9bcddd69c4e90ff1e8e262c22522e95a0a", "extension": "py", "file...
2.375
stackv2
# # Copyright (c) 2020 Russell Smiley # # This file is part of build_harness. # # You should have received a copy of the MIT License along with build_harness. # If not, see <https://opensource.org/licenses/MIT>. # # https://gitlab.com/ci-cd-devops/build_harness/-/blob/main/build_harness/_utility.py """General supp...
39
24.72
85
11
235
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_5fbfe9336db22b2a_8730076a", "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" ]
[ 37 ]
[ 37 ]
[ 14 ]
[ 47 ]
[ "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" ]
utility.py
/foodx_devops_tools/utility.py
blueskyjunkie/foodx_devops_tools
MIT