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:10:37.786286+00:00
1,692,976,388,000
f11911a93da97dc51a5996d8a1daea669ef0ceaa
2
{ "blob_id": "f11911a93da97dc51a5996d8a1daea669ef0ceaa", "branch_name": "refs/heads/master", "committer_date": 1692976388000, "content_id": "85fbc210d2cfb4c3d291b2d25d9f19b3ee20ce8a", "detected_licenses": [ "MIT" ], "directory_id": "7f0acb6ce41afb89ae526d3a699ad9570438215b", "extension": "py", "fi...
2.3125
stackv2
#!/usr/bin/env python3 from xml.dom import minidom import urllib3 import urllib.parse import requests # configure package (disable warning for self-signed certificate) urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # some consts WEBDAV_URL_HOST = 'http://localhost:8080' WEBDAV_URL_PATH = '/remot...
49
33.51
94
14
457
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c7adbbe1b8a209e0_97273dde", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
1
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 3 ]
[ 3 ]
[ 1 ]
[ 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" ]
webdav_ls.py
/webdav/webdav_ls.py
sourceperl/sandbox
MIT
2024-11-18T20:23:09.028426+00:00
1,506,038,973,000
95bed077cebe5093304ee56fac9470b9d3bde4ff
2
{ "blob_id": "95bed077cebe5093304ee56fac9470b9d3bde4ff", "branch_name": "refs/heads/master", "committer_date": 1506038973000, "content_id": "f117324b2a7397533bd7e4e36b2a9dc7a0494acf", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "fc1816393a64a87a66332ac01a3f64f9d3bbc10b", "extension": "p...
2.34375
stackv2
# -*- coding: utf-8 -*- # Helper script for substitution of paths, independent of cmd or powershell # copyright: # Hannah von Reth <vonreth [AT] kde [DOT] org> import argparse import collections import subprocess from CraftCompiler import craftCompiler from CraftConfig import * from CraftDebug import craftDebug from ...
284
45.3
145
21
2,872
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_914a550b0fb5d886_3cc32ca0", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python...
10
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.danger...
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 38, 155, 167, 178, 179 ]
[ 38, 156, 167, 180, 180 ]
[ 26, 20, 30, 30, 17 ]
[ 61, 146, 83, 78, 77 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'getstatusoutput' 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 subpro...
[ 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "MEDIUM" ]
CraftSetupHelper.py
/bin/CraftSetupHelper.py
hipolipolopigus/craft
BSD-2-Clause
2024-11-18T20:23:13.528307+00:00
1,482,238,385,000
0267a55fa19b4dd2dcd3eb1ba3aefe4d0947407d
3
{ "blob_id": "0267a55fa19b4dd2dcd3eb1ba3aefe4d0947407d", "branch_name": "refs/heads/master", "committer_date": 1482238385000, "content_id": "48017a4aed5c4a3d2e35f77a69d3c9a6c6c3ed7c", "detected_licenses": [ "MIT" ], "directory_id": "aae890389b214e48c784687184a2d084afd857d3", "extension": "py", "fi...
2.625
stackv2
#!usr/bin/env python # -*- coding: utf-8 -*- from gi.repository import Gtk import sqlite3 #Introducimos los datos del formulario en la ventana de diálogo def aceptar_registro(button): window2.show_all() resultado_usuario.set_text(usuario.get_text()) resultado_password.set_text(password.get_text()) resultado_corre...
113
33.5
114
21
880
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_727905c2e3da8c8e_054c2b66", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
1
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 31 ]
[ 32 ]
[ 9 ]
[ 79 ]
[ "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" ]
P1_3_AdrianDavia.py
/2/P1_3_AdrianDavia.py
carmedevis/PYTHON---GLADE
MIT
2024-11-18T20:23:13.697879+00:00
1,663,535,443,000
71e7a9086631d08b977fd65bd3d3ad401cac13a7
3
{ "blob_id": "71e7a9086631d08b977fd65bd3d3ad401cac13a7", "branch_name": "refs/heads/master", "committer_date": 1663535443000, "content_id": "b7b0a8df6fb9d2a34769403ae681b46450380d57", "detected_licenses": [ "Apache-2.0" ], "directory_id": "bda1141a3038fb0cc026a3060ba79cf8c22de0ab", "extension": "py"...
3.40625
stackv2
""" Purpose The purpose of the configWrapper module is to create an easy way to use the native ConfigParser module from python distribution in order to load parameters from configuration file. Description It contains a simple wrapper for the ConfigParser module, exposing a load_configu...
113
39.63
136
22
866
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_b6aa2ecad464b0d3_6e0b1cba", "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" ]
[ 103 ]
[ 103 ]
[ 39 ]
[ 84 ]
[ "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" ]
configWrapper.py
/web/labio/configWrapper.py
WalterPaixaoCortes/DB-InhA
Apache-2.0
2024-11-18T20:23:14.703126+00:00
1,535,658,654,000
8e33246aab78a9a4ff4066facaf184381a38a577
2
{ "blob_id": "8e33246aab78a9a4ff4066facaf184381a38a577", "branch_name": "refs/heads/master", "committer_date": 1535659205000, "content_id": "576ac018a68c69fe43c05f4ad5b91fb1d28c4e37", "detected_licenses": [ "MIT" ], "directory_id": "a8e74e0b9a885def1cf8a8ef58e26848725690f6", "extension": "py", "fi...
2.5
stackv2
import numpy as np import cv2 import matplotlib.image as mpimg import pickle from show_original_and_result import * def get_perspective_points( mtx, dist, distace_from_center = 1.9, # distance from the center of the lines distance_meters = 30.0, # distance in the road ahead tvec_x_meters = 0, # ...
75
29.41
130
11
775
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6eabdcfe9a281e3e_72e0aa00", "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" ]
[ 50 ]
[ 50 ]
[ 19 ]
[ 87 ]
[ "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_perspective_points.py
/get_perspective_points.py
apollo2030/CarND-Advanced-Lane-Lines
MIT
2024-11-18T20:23:17.087642+00:00
1,435,107,499,000
119971b784738ba0ab9a8c295a9da1365ec5cd92
2
{ "blob_id": "119971b784738ba0ab9a8c295a9da1365ec5cd92", "branch_name": "refs/heads/master", "committer_date": 1435107499000, "content_id": "eca95c0465367533b9e89bd4b72e33b67ae5b65b", "detected_licenses": [ "MIT" ], "directory_id": "486820178701ecb337f72fd00cd2e281c1f3bbb2", "extension": "py", "fi...
2.390625
stackv2
import logging import os import subprocess import tempfile import yaml from .config import config from .contextutil import safe_while from .misc import decanonicalize_hostname, get_distro, get_distro_version from .lockstatus import get_status log = logging.getLogger(__name__) def downburst_executable(): """ ...
231
35.02
79
23
1,792
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_1e28580164962b55_7a80ce78", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
4
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 106, 121 ]
[ 107, 122 ]
[ 16, 16 ]
[ 56, 57 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess funct...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
provision.py
/teuthology_master/teuthology/provision.py
hgichon/anycloud-test
MIT
2024-11-18T20:23:18.095432+00:00
1,587,808,794,000
e91ccd992f7e12da7a2e09a94ed165b5d6a74234
3
{ "blob_id": "e91ccd992f7e12da7a2e09a94ed165b5d6a74234", "branch_name": "refs/heads/master", "committer_date": 1587808794000, "content_id": "7985640f2084c234203e4aae7302b1af72668360", "detected_licenses": [ "MIT" ], "directory_id": "9ec8586c43ab6ae6b79e427c43be93f1911f2e5f", "extension": "py", "fi...
2.59375
stackv2
import pymysql from Bxin.settings import logger '''图片上传到fastdfs并且将返回的file_id存入mysql的image_file_id字段''' # 建立连接 conn = pymysql.connect(host='localhost', port=3306,user='root', password='mysql', database='bxin', charset='utf8') # 游标 cur = conn.cursor() ## 1. 导入FastDFS客户端扩展 from fdfs_client.client import Fdfs_client...
42
22.31
114
11
307
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_7fce4a3787f273bf_9e20973e", "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" ]
[ 30, 30 ]
[ 30, 30 ]
[ 21, 21 ]
[ 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" ]
upload_fdfs_image.py
/Bxin/utils/fastdfs/upload_fdfs_image.py
Wang-TaoTao/Bxin
MIT
2024-11-18T20:23:21.148768+00:00
1,535,450,058,000
f904063c8c98fbd3e207481ac886028c40cf6fc4
3
{ "blob_id": "f904063c8c98fbd3e207481ac886028c40cf6fc4", "branch_name": "refs/heads/master", "committer_date": 1535450058000, "content_id": "730fd88275536536d274416742a93b3fd0260963", "detected_licenses": [ "BSD-3-Clause", "BSD-2-Clause" ], "directory_id": "58aa436f321ffeecaa0b2ba9fd4e4eed323edd93...
2.515625
stackv2
import pickle as pickle from functools import partial from pprint import pprint from defs.meta import get_params as get_params_c from defs.meta import try_params as try_params_c from defs_regression.meta import get_params as get_params_r from defs_regression.meta import try_params as try_params_r from hyperband import...
63
29.59
83
13
486
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a7ff1342682748b6_cf834f30", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 34, 61 ]
[ 34, 61 ]
[ 9, 9 ]
[ 32, 32 ]
[ "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" ]
meta_models.py
/meta_models.py
j6e/hyperband
BSD-3-Clause,BSD-2-Clause
2024-11-18T20:23:21.460255+00:00
1,632,884,834,000
570436b4099ccd87596a582cdcc29dab086cd857
2
{ "blob_id": "570436b4099ccd87596a582cdcc29dab086cd857", "branch_name": "refs/heads/master", "committer_date": 1632884834000, "content_id": "4fe638ac2585b91178ec45f4b182d94476048c74", "detected_licenses": [ "MIT" ], "directory_id": "49849a84b0424ba9fb3d5218a43fb3867c489ddf", "extension": "py", "fi...
2.34375
stackv2
""" Copyright 2018 Autonomous Vision Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
169
32.72
129
17
1,540
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_edff608644c8f33f_b1522a15", "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...
25
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "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", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 58, 58, 63, 63, 110, 110, 113, 113, 118, 118, 124, 124, 126, 126, 148, 148, 151, 151, 156, 156, 159, 159 ]
[ 58, 58, 63, 63, 110, 110, 115, 115, 119, 119, 124, 124, 126, 126, 148, 148, 152, 152, 156, 156, 160, 160 ]
[ 3, 3, 3, 3, 12, 12, 4, 4, 4, 4, 5, 5, 5, 5, 12, 12, 4, 4, 12, 12, 4, 4 ]
[ 82, 82, 87, 87, 85, 85, 58, 58, 51, 51, 92, 92, 92, 92, 125, 125, 47, 47, 130, 130, 35, 35 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01...
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
create_db.py
/create_db.py
yotofu/kitti360LabelTool
MIT
2024-11-18T20:23:23.291911+00:00
1,590,712,244,000
b3dd5cac369cecd88dfe1a49f5ee458d6b0e9ab4
3
{ "blob_id": "b3dd5cac369cecd88dfe1a49f5ee458d6b0e9ab4", "branch_name": "refs/heads/master", "committer_date": 1590712244000, "content_id": "c4785c58265eebafcaca5e676b7fd80c0f0c62b1", "detected_licenses": [ "MIT" ], "directory_id": "3dec61f1afb546564e34a765ac3236a4fb17a3ff", "extension": "py", "fi...
2.9375
stackv2
import os import re import json # Commands file # Values, modified by settings.json basecommand = "catt" volume_increment = 10 rewind_amount = 15 seek_amount = 15 saved_volume = 100 # Loads settings into values from settings.json def load_settings(): global basecommand, volume_increment, rewind_amount, seek_amou...
103
22.83
74
13
637
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_76baff7588e7200c_ed56b2be", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 89 ]
[ 89 ]
[ 12 ]
[ 34 ]
[ "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" ]
commands.py
/src/commands.py
jakobkhansen/CattCommand
MIT
2024-11-18T20:23:24.658324+00:00
1,601,317,445,000
3dc30a486241a0546112e1aff7a36957bb8e5910
3
{ "blob_id": "3dc30a486241a0546112e1aff7a36957bb8e5910", "branch_name": "refs/heads/master", "committer_date": 1601317445000, "content_id": "8705d904f7e43edfa28b0249d99fcbeebac74894", "detected_licenses": [ "MIT" ], "directory_id": "48fc12461c8465543398fb1af73e1a78239da704", "extension": "py", "fi...
3.09375
stackv2
import psycopg2 import asyncio from api import get_rate POSTGRES_CONFIG = { 'database': 'flextock', 'host': 'localhost', 'user': 'ahmedsamir', 'password': 'postgres' } def database_connection(): ''' function that connect to database if: the database connected success...
79
22.91
102
14
406
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_07e066da2272f980_a446ab77", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
4
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 33, 33, 56, 56 ]
[ 36, 36, 57, 57 ]
[ 5, 5, 9, 9 ]
[ 64, 64, 103, 103 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
database.py
/src/database.py
a-samir97/Flextock-task
MIT
2024-11-18T20:23:25.187070+00:00
1,688,679,991,000
8fce41314257dcbc63deb5fb88c9cb1a982e282b
3
{ "blob_id": "8fce41314257dcbc63deb5fb88c9cb1a982e282b", "branch_name": "refs/heads/main", "committer_date": 1688679991000, "content_id": "70ada4a9ebef5418da5bd412518a43b46b7525e5", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "7920ac571217d627aad1ed8fa0b87ef1436cdb28", "extension": "py"...
2.59375
stackv2
from django.conf import settings from django.contrib.auth.models import User from django.core.mail import EmailMultiAlternatives, get_connection from django.template import loader def send_email(recipients, subject, template, context): """ Sends a multi-part (text and optionally HTML) email generated from tem...
51
39.27
113
14
393
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_7de4dd2df1938b19_84b381d3", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 14, 15 ]
[ 14, 15 ]
[ 12, 12 ]
[ 41, 41 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected direct use of jinja2. If n...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
email.py
/casepro/utils/email.py
rapidpro/casepro
BSD-3-Clause
2024-11-18T20:23:28.430391+00:00
1,555,402,998,000
4b14f436f3356c71b8b64082fb050160c32ec1df
2
{ "blob_id": "4b14f436f3356c71b8b64082fb050160c32ec1df", "branch_name": "refs/heads/master", "committer_date": 1555402998000, "content_id": "821de3452a1b87eb6b0b86d5fec955d6de0952a6", "detected_licenses": [ "MIT" ], "directory_id": "3f1918a279e807505c6fa13a597eb0d121a095f6", "extension": "py", "fi...
2.46875
stackv2
#! /usr/bin/env python # coding=utf-8 import os # 一种WSGI中间件,为开发环境或简单的服务器设置提供静态内容 from werkzeug import SharedDataMiddleware from flask import abort,Flask,request,jsonify,redirect,send_file from ext import db,mako,render_template #from mysql_models import PasteFile from mongo_models import PasteFile from utils import ge...
138
28.67
111
16
1,059
python
[{"finding_id": "semgrep_rules.python.flask.security.injection.path-traversal-open_891b2e46369f75f0_b439e8e7", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.path-traversal-open", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found request data in a call ...
2
true
[ "CWE-22" ]
[ "rules.python.flask.security.injection.path-traversal-open" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 42 ]
[ 42 ]
[ 22 ]
[ 48 ]
[ "A05:2017 - Broken Access Control" ]
[ "Found request data in a call to 'open'. Ensure the request data is validated or sanitized, otherwise it could result in path traversal attacks." ]
[ 7.5 ]
[ "MEDIUM" ]
[ "HIGH" ]
app.py
/file_hosting_system/app.py
linrong/flask-practice
MIT
2024-11-18T20:23:28.780627+00:00
1,581,739,193,000
8bf44ecbb8cfaad492c46f26f79d06815dacaa1f
3
{ "blob_id": "8bf44ecbb8cfaad492c46f26f79d06815dacaa1f", "branch_name": "refs/heads/master", "committer_date": 1581739193000, "content_id": "4768610aba4b8384d3818426a5fe1ac0606e0e47", "detected_licenses": [ "MIT" ], "directory_id": "255943a1043596d867fb2fe7236b52a9ad33ed72", "extension": "py", "fi...
2.625
stackv2
#utility.py #functions used in several scripts #jinfeng.chen@ucr.edu ##############################dirs and files################## ##create new directory def createdir(dirname): if not os.path.exists(dirname): os.mkdir(dirname) ##write content to new file def writefile(outfile, lines): ofile = open...
106
24.94
85
15
689
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1152c026e5f9229b_74600d38", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 34 ]
[ 34 ]
[ 9 ]
[ 27 ]
[ "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" ]
utility.py
/scripts/utility.py
JinfengChen/RelocaTE2
MIT
2024-11-18T20:23:31.190210+00:00
1,619,203,264,000
b5137728f12123a3f300ccb695bd8d36fc6e362c
3
{ "blob_id": "b5137728f12123a3f300ccb695bd8d36fc6e362c", "branch_name": "refs/heads/master", "committer_date": 1619203264000, "content_id": "501dfb9e0be00508b2e7de9ab29ff4f4ea4d6ee6", "detected_licenses": [ "MIT" ], "directory_id": "5e45335083c62d0f2e2ee2dda07ef57d4c678376", "extension": "py", "fi...
2.984375
stackv2
#!/usr/bin/env python3 """ Simple tkinter application for verifying voice samples with text prompts. Shows plot of WAV data. Left click to add trim start, right click to add trim end. Play and Verify will respect trimmings. Change prompt in text box to have different text written with Verify. """ import argparse impo...
292
31.27
88
20
2,063
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f76a0e75c19ac680_ed8f2fed", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
3
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 171, 230, 251 ]
[ 171, 230, 251 ]
[ 36, 45, 13 ]
[ 71, 80, 47 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess ...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
verify.py
/verify.py
synesthesiam/voice-recorder
MIT
2024-11-18T20:23:35.639877+00:00
1,534,843,829,000
71411d78a6a491eeb0786e821e4ff62d0c44a28f
3
{ "blob_id": "71411d78a6a491eeb0786e821e4ff62d0c44a28f", "branch_name": "refs/heads/master", "committer_date": 1534843829000, "content_id": "c4aee5b28fbd5d1ca75faa069e892768e524b3b4", "detected_licenses": [ "MIT" ], "directory_id": "a300412602307da4b3ce30d101d6cb7ce2b9c050", "extension": "py", "fi...
2.71875
stackv2
import datetime as dt from flask_login import UserMixin from database import Column, Model, SurrogatePK, db, reference_col, relationship from extensions import bcrypt class User(UserMixin, SurrogatePK, Model): __tablename__ = 'users' username = Column(db.String(80), unique=True, nullable=False) #..email ...
41
29.56
80
12
265
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_0f15279bcd12c9f8_86848a15", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'self' is being se...
1
true
[ "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 27 ]
[ 27 ]
[ 13 ]
[ 40 ]
[ "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'self' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
models.py
/images/backer/src/accounts/models.py
elston/flaskit
MIT
2024-11-18T20:23:41.662091+00:00
1,584,328,528,000
768bfeed286942b057a13f6c30ec15a6b6862ac9
3
{ "blob_id": "768bfeed286942b057a13f6c30ec15a6b6862ac9", "branch_name": "refs/heads/master", "committer_date": 1584328528000, "content_id": "c7ab3202fc4c2da204501ec54d9e580ba5398836", "detected_licenses": [ "MIT" ], "directory_id": "fad318e39158f275e8a92c4687312278e8b46395", "extension": "py", "fi...
2.9375
stackv2
import re import subprocess import pandas as pd import numpy as np try: from StringIO import StringIO as BytesIO except ImportError: from io import BytesIO TABLE_RE = re.compile("CREATE TABLE \[([^\]]+)\]\s+\((.*?\));", re.MULTILINE | re.DOTALL) class MdbTable: """ A MdbTable is ba...
227
35.93
78
16
1,974
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c403b35df75819c0_fae29d13", "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" ]
[ 216 ]
[ 216 ]
[ 12 ]
[ 57 ]
[ "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
/pandas_access/__init__.py
montoux/pandas_access
MIT
2024-11-18T20:48:56.633720+00:00
1,589,794,107,000
dd6d50bf6069af1a82999ba53d887800bb050208
3
{ "blob_id": "dd6d50bf6069af1a82999ba53d887800bb050208", "branch_name": "refs/heads/master", "committer_date": 1589794107000, "content_id": "c72c947489c42e822bfff0c0aab166ae9dd5e9d1", "detected_licenses": [ "MIT" ], "directory_id": "cfe9c83075381a2d1edfb54ff652d2d4bc4eafaa", "extension": "py", "fi...
2.6875
stackv2
# -*- coding: utf-8 -*- """ File Name: _nda.py Description : data augmentation by extending noise data into data set. Author : yuanfang date: 2019/12/13 """ # os模块中包含很多操作文件和目录的函数 import os import subprocess import time from collections import defaultdict import pandas as pd import jieb...
265
32.38
126
24
2,294
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1bb6d6ee07bb85d4_3aacd4e3", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 156, 229, 230, 231 ]
[ 156, 229, 230, 231 ]
[ 17, 9, 9, 9 ]
[ 70, 57, 86, 86 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'getstatusoutput' 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 subpro...
[ 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
_nda.py
/_nda.py
Bobyuan1015/KDA
MIT
2024-11-18T20:48:57.767308+00:00
1,614,608,022,000
612827a771027a6fa1007880ac24c3a0f69aa22d
2
{ "blob_id": "612827a771027a6fa1007880ac24c3a0f69aa22d", "branch_name": "refs/heads/master", "committer_date": 1614608022000, "content_id": "e133d55214c70ea45092d3d0e2156e59cebf76fb", "detected_licenses": [ "MIT" ], "directory_id": "e53f30bdd729a5a59d73ab41792157d9ac35a189", "extension": "py", "fi...
2.34375
stackv2
import socket import asyncio import struct import cv2 import pickle import numpy as np from datetime import datetime import threading import io try: from picamera.array import PiRGBArray from picamera import PiCamera except: pass buffer_size = 4096 class AsyncServer: def __init__(self, host: str, po...
265
26.77
91
19
1,412
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_82d3c1ca57f972f3_cc224412", "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" ]
[ 119, 214 ]
[ 119, 214 ]
[ 29, 24 ]
[ 53, 43 ]
[ "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" ]
streaming.py
/OT-AI/streaming.py
OpenTonk/OT-AI
MIT
2024-11-18T20:49:15.091384+00:00
1,521,544,521,000
b8ef44dc2f3f103a97a0798c2c9ee153ffa47be7
3
{ "blob_id": "b8ef44dc2f3f103a97a0798c2c9ee153ffa47be7", "branch_name": "refs/heads/master", "committer_date": 1521544521000, "content_id": "51ae2f43f32dd2685a8c7f1702f62762989d54e8", "detected_licenses": [ "MIT" ], "directory_id": "811dee382e5c13e222557de7c7c75084fc5e0939", "extension": "py", "fi...
2.515625
stackv2
import cgi import io import glob import os import json from bottle import route, run, template, post, request from requests import get from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.corpus import wordnet stop_words = [] files = [] fcontent = {} fildoclist = [] filwords =[] pptoken...
114
25.11
69
17
736
python
[{"finding_id": "semgrep_rules.python.flask.security.audit.directly-returned-format-string_ee74221c75c4f0c6_798c43b2", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.directly-returned-format-string", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected Fl...
4
true
[ "CWE-79" ]
[ "rules.python.flask.security.audit.directly-returned-format-string" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 37 ]
[ 37 ]
[ 5 ]
[ 15 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected Flask route directly returning a formatted string. This is subject to cross-site scripting if user input can reach the string. Consider using the template engine instead and rendering pages with 'render_template()'." ]
[ 5 ]
[ "HIGH" ]
[ "MEDIUM" ]
main.py
/app/main.py
madforjs/cvsm
MIT
2024-11-18T20:49:18.613174+00:00
1,410,931,033,000
fb2a59bbcf6b86e32a3d39e83eb6c21a56579552
3
{ "blob_id": "fb2a59bbcf6b86e32a3d39e83eb6c21a56579552", "branch_name": "refs/heads/master", "committer_date": 1410931033000, "content_id": "ff3a5406f7f6584bcd0f1bf5357835354bac2e4b", "detected_licenses": [ "MIT" ], "directory_id": "ee1d2ebec08fb1c9858bab1b5bd061cc6a0d6087", "extension": "py", "fi...
2.75
stackv2
#!/usr/bin/env python2 import os import sys import thread import time sys.path.insert(0, '/usr/lib/Leap') import Leap as L from Leap import CircleGesture from Leap import Gesture from Leap import SwipeGesture def call_amixer(): pass def set_volume(): pass print "Leap imported." class SampleListener(L.Listener): ...
143
21.8
91
19
858
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_f45386f5f6ed2669_adf922ae", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-fn", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of function call_amixer. Cons...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 32 ]
[ 32 ]
[ 4 ]
[ 47 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
__main__.py
/__main__.py
scizzorz/leap-volume
MIT
2024-11-18T20:49:21.269816+00:00
1,610,475,046,000
dda32d54f8ced9af3a84d0469d9b1c7e46fe62b2
3
{ "blob_id": "dda32d54f8ced9af3a84d0469d9b1c7e46fe62b2", "branch_name": "refs/heads/main", "committer_date": 1610475046000, "content_id": "d9f06885c3894a6756e8e1cbd835328ede7da76e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3a064e9e0673f0c72ca6e9b70381e26405a13d47", "extension": "py", ...
2.578125
stackv2
import speech_recognition as sr import pyttsx3 import os import pickle import time filename = 'Personalinfo' outfile = open(filename, 'wb') os.system('cls') listener = sr.Recognizer() engine = pyttsx3.init() voices = engine.getProperty('voices') engine.setProperty('voice', voices[0].id) def talk(text): engine.say...
90
32.42
178
13
771
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_6a0e117956a11b20_15a074fb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.arbitrary-sleep", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "time.sleep() call; did you mean to leave thi...
6
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 41, 51, 61, 71, 81 ]
[ 41, 51, 61, 71, 81 ]
[ 9, 9, 9, 9, 9 ]
[ 37, 41, 42, 40, 42 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
1.py
/personalAssistant/1.py
SouSageYa/A_Droid_With_Python_On_Raspberry_Pi
Apache-2.0
2024-11-18T20:49:23.370338+00:00
1,253,984,206,000
3d53b383d7cb4d6134b9b7be70238d509c160a24
2
{ "blob_id": "3d53b383d7cb4d6134b9b7be70238d509c160a24", "branch_name": "refs/heads/master", "committer_date": 1253984206000, "content_id": "8fc94448a0ea6500987abadbb7646332f0751261", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0cf45e468422eb0907a8ae3958fb52fa9ef7ebeb", "extension": "py"...
2.453125
stackv2
# -*- coding: utf-8 -*- # # Copyright 2009 Tobias Rodäbel # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
84
26.87
78
17
537
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-shelve_0085136bc74d677a_fe852c7b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-shelve", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Avoid using `shelve`, which use...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-shelve" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 64 ]
[ 65 ]
[ 10 ]
[ 69 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `shelve`, which uses `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
intid.py
/src/twistedae/intid.py
TheProjecter/twistedae
Apache-2.0
2024-11-18T20:49:24.884702+00:00
1,692,295,864,000
ac4879e01d059c0b9c86927aca365429ac915dcc
2
{ "blob_id": "ac4879e01d059c0b9c86927aca365429ac915dcc", "branch_name": "refs/heads/main", "committer_date": 1692295864000, "content_id": "4ee365ec6d4fe078b50dc1d9d039f9d71a9a37a6", "detected_licenses": [ "MIT" ], "directory_id": "899090818b68b045201eab9ef24ec882528a7fb1", "extension": "py", "file...
2.421875
stackv2
import logging import subprocess from collections.abc import Sequence import qgreenland.exceptions as exc from qgreenland.constants.project import ENV_MANAGER from qgreenland.util.runtime_vars import EvalStr logger = logging.getLogger("luigi-interface") def interpolate_args( args: Sequence[EvalStr], **kwarg...
66
27.21
88
12
454
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8b2b800b91f928fa_204855db", "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, 53 ]
[ 56, 53 ]
[ 14, 15 ]
[ 6, 19 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' function...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
command.py
/qgreenland/util/command.py
nsidc/qgreenland
MIT
2024-11-18T20:49:24.978309+00:00
1,675,066,623,000
b7b23162d0013fd75c19e41d041b1a0864b3d8c8
3
{ "blob_id": "b7b23162d0013fd75c19e41d041b1a0864b3d8c8", "branch_name": "refs/heads/master", "committer_date": 1675066623000, "content_id": "1da0c89372285045fa7d56b078d4c4284a468da0", "detected_licenses": [ "MIT" ], "directory_id": "3958e5746685a6473edbb43c6d6264f84ebf4e80", "extension": "py", "fi...
2.625
stackv2
import json import re import numpy as np from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer from sklearn.decomposition import TruncatedSVD from sklearn.pipeline import make_pipeline import faiss import os.path import pickle import gzip use_gpu = False if os.path.exists('product_asin.pkl') a...
92
31.37
88
18
778
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e5f3069d6bb12acb_0f1b6261", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
6
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 17, 19, 42, 44 ]
[ 17, 19, 42, 44 ]
[ 24, 24, 9, 9 ]
[ 38, 38, 37, 37 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
amazon_title_similarity.py
/ch04-recommending-products-and-services/amazon_title_similarity.py
PacktPublishing/AIBlueprints
MIT
2024-11-18T20:49:26.851437+00:00
1,569,684,702,000
8a487a30f3664f41da27a5e35b1d99b7b3f56bb4
3
{ "blob_id": "8a487a30f3664f41da27a5e35b1d99b7b3f56bb4", "branch_name": "refs/heads/master", "committer_date": 1569684702000, "content_id": "67bc901a4c7881af460dc74e992f81d3934b403f", "detected_licenses": [ "MIT" ], "directory_id": "b731ba53534bd98248174523101250a2302b162c", "extension": "py", "fi...
2.671875
stackv2
# Import the key used libraries import os import sys import pandas as pd import numpy as np import PyPDF2 import re from data_load_functions import * from joblib import Parallel, delayed import pickle try: import geopandas as gpd except: print('geopandas not found, will enter exception blocks throughout') p...
323
42.25
141
18
3,442
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5ad08be47d351731_4adc234f", "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" ]
[ 323 ]
[ 323 ]
[ 9 ]
[ 33 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
pipeline.py
/pipeline.py
nathangeology/FORCE_Geolocation_Docs
MIT
2024-11-18T20:49:29.583716+00:00
1,649,083,474,000
fa6522ce3128a04cf06a78d97fb3f9d15431e346
3
{ "blob_id": "fa6522ce3128a04cf06a78d97fb3f9d15431e346", "branch_name": "refs/heads/master", "committer_date": 1649083474000, "content_id": "88c85c29e6f77c186b1c7272440df01bfb159b8f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b6332e57c69582a20416bda42eeb6108310ef763", "extension": "py"...
2.96875
stackv2
import pickle from numpy import NaN from numpy import isnan import sys DISTANCE_AHEAD = 300 HEIGHT_DIFF = 3.5 def distance(x1,y1,x2,y2): return ((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))**.5 def check_arguments(args): if len(args)<2: raise RuntimeError("You must include two pickle files in the arguments.") d...
73
29.85
100
21
518
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e475e1c7a99e2ba3_732d8143", "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" ]
[ 18, 68 ]
[ 18, 68 ]
[ 13, 9 ]
[ 45, 40 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
traversal_model.py
/src/models/traversal_model.py
ejyager00/porterpassing
Apache-2.0
2024-11-18T20:49:30.081134+00:00
1,433,554,466,000
2f0cb75a704af1ae6969e3c9c55b2797d8ed46a2
2
{ "blob_id": "2f0cb75a704af1ae6969e3c9c55b2797d8ed46a2", "branch_name": "refs/heads/master", "committer_date": 1433554466000, "content_id": "572ceefc1091fb7a60fb3b30cb187541fbf7c705", "detected_licenses": [ "MIT" ], "directory_id": "e022be52fde651dc14346bd02210c3778f32f16a", "extension": "py", "fi...
2.453125
stackv2
# -*- coding: utf-8 -*- import urllib2 import urllib import hashlib import collections import ssl import httplib import json import logging import time import datetime import binascii import os import csv import sys reload(sys) sys.setdefaultencoding('utf8') logging.basicConfig(filename="..//..//..//logs//syncOrder.log...
148
40.78
155
19
1,603
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.httpsconnection-detected_f780e994913de792_5ec59ca7", "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...
4
true
[ "CWE-295" ]
[ "rules.python.lang.security.audit.httpsconnection-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 48 ]
[ 48 ]
[ 16 ]
[ 85 ]
[ "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" ]
syncSO.py
/pycrm/syncSO.py
wcl/pycrm
MIT
2024-11-18T20:49:35.048467+00:00
1,592,386,074,000
681cd764d72faba2cd0bd309f5dcc81da60995ae
3
{ "blob_id": "681cd764d72faba2cd0bd309f5dcc81da60995ae", "branch_name": "refs/heads/master", "committer_date": 1592386074000, "content_id": "797f465cc7d552668591713bec1aa84f1338e849", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5a35e571dbda8599692ce705a1430a66177d25b2", "extension": "py"...
2.59375
stackv2
from django.contrib.auth import get_user_model from rest_framework import serializers from .models import Tenant User = get_user_model() class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ( 'url', 'id', 'username',...
69
27.78
97
14
379
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_342d43ef48f92eef_eacaf01c", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'updated' is being...
1
true
[ "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 32 ]
[ 32 ]
[ 13 ]
[ 61 ]
[ "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'updated' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
serializers.py
/accounts/serializers.py
bellyfat/saasinit
Apache-2.0
2024-11-18T20:49:39.272949+00:00
1,548,262,988,000
9a09eafa2c6a81ca413fbb001fc3cd4aaedaa1a9
3
{ "blob_id": "9a09eafa2c6a81ca413fbb001fc3cd4aaedaa1a9", "branch_name": "refs/heads/master", "committer_date": 1548262988000, "content_id": "7b7d95e7f0c68b4c8bd9e5e8dada1ea45c82f11a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fc4e0b7e3c992cb55ac719e7a0387e934dd46d17", "extension": "py"...
3.265625
stackv2
import gzip import numpy as np import cPickle as pkl from glob2 import glob from collections import defaultdict from helpers import getSentencesForYear from settings import chunkCache import logging log = logging.getLogger(__name__) log.setLevel(logging.INFO) def getChunks(): '''Generate a list of chunks for ea...
147
35.61
84
15
1,486
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_85d053715ad4d8cb_952f54b2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 69, 131 ]
[ 69, 131 ]
[ 13, 20 ]
[ 40, 31 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `cPickle`, which is known to lead ...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
randomsentenceloader.py
/randomsentenceloader.py
c-martinez/w2v-convergence
Apache-2.0
2024-11-18T20:49:52.192407+00:00
1,487,947,050,000
4145f2de662b22b88b8a1eadd6646e516c154241
2
{ "blob_id": "4145f2de662b22b88b8a1eadd6646e516c154241", "branch_name": "refs/heads/master", "committer_date": 1487947050000, "content_id": "c637d5dfd4cb21d6253a0a34573c95b6cb2e5651", "detected_licenses": [ "MIT" ], "directory_id": "76f26d554763660fc41b77b9e7dec75a89a82cb5", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/env python3.5 import pandas as pd import math import numpy as np from sklearn.feature_extraction.text import TfidfVectorizer from sklearn import preprocessing from sklearn.linear_model.logistic import LogisticRegression from sklearn.metrics import classification_report, accuracy_score, confusion_matrix from...
78
28.26
108
16
625
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_f15af6f8a9e2e735_0ca21fde", "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" ]
[ 63 ]
[ 63 ]
[ 5 ]
[ 27 ]
[ "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" ]
create_toc_mapper_rf.py
/create_toc_mapper_rf.py
rupendrab/py_unstr_parse
MIT
2024-11-18T20:49:52.368861+00:00
1,692,304,842,000
eff9d8b2301d472bd0f6e15d56911c4b57e7e5ca
2
{ "blob_id": "eff9d8b2301d472bd0f6e15d56911c4b57e7e5ca", "branch_name": "refs/heads/main", "committer_date": 1692304842000, "content_id": "ba8e38119b907c4cc576b0975088946e00ea2e8a", "detected_licenses": [ "Unlicense" ], "directory_id": "24a3641a9575f40dbc6ada1bf3a4148cf78a98ad", "extension": "py", ...
2.40625
stackv2
#! /usr/bin/env python # Imports from apiclient import discovery, errors from httplib2 import Http from oauth2client import file, client, tools from googleapiclient.discovery import build from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request import argparse, os, pick...
86
45.12
150
26
907
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_39ae646d87c00b15_3de0c3c8", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
2
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 29, 40 ]
[ 29, 40 ]
[ 11, 3 ]
[ 29, 28 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
DrivePermissionCheck.py
/Python/DrivePermissionCheck.py
rupumped/NicksAPPS
Unlicense
2024-11-18T20:49:53.083314+00:00
1,616,524,352,000
235105f84fc59621c65ed2081253a3dd262f38c7
3
{ "blob_id": "235105f84fc59621c65ed2081253a3dd262f38c7", "branch_name": "refs/heads/main", "committer_date": 1616524352000, "content_id": "5f74a563758c680ba4fc56242b5181729a169c83", "detected_licenses": [ "MIT" ], "directory_id": "9c19cf382951db22a7932de1e9c1efd7b381b0da", "extension": "py", "file...
2.65625
stackv2
import pickle import pandas as pd from flask import Flask, request, Response from rossmann.Rossmann import Rossmann #loading model model = pickle.load(open(r'C:\Users\prese\Desktop\Data Scince\Projetos\RossmannStoreSales\model\model_rossmann.pkl','rb')) #Initialize API app = Flask(__name__) @app.route('/...
45
28.84
122
18
319
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b6d9094d5ada8618_e2997a0d", "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" ]
[ 7 ]
[ 7 ]
[ 9 ]
[ 123 ]
[ "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" ]
handler.py
/api/handler.py
cardosoyuri/RossmannStoreSalesPrediction
MIT
2024-11-18T20:49:57.109180+00:00
1,611,964,501,000
f6a0d274b3dbf993e68529a7652e0d96163000c7
2
{ "blob_id": "f6a0d274b3dbf993e68529a7652e0d96163000c7", "branch_name": "refs/heads/master", "committer_date": 1611964501000, "content_id": "404e1aba5b5cabbaf234121abc5aa841b686d50d", "detected_licenses": [ "MIT" ], "directory_id": "5c44a18a25da1ed5726b13ebfd55d511f10c7a90", "extension": "py", "fi...
2.484375
stackv2
# https://docs.djangoproject.com/en/2.1/ref/models/fields/ # https://doc.oroinc.com/user/concept-guides/inventory/ ideas for how to classify inventory status # https://www.techwithtim.net/tutorials/django/ # https://github.com/arsentieva/campy-backend/blob/master/app/models/models.py | referring to an old project I wor...
96
36.09
129
16
825
python
[{"finding_id": "semgrep_rules.python.django.security.audit.unvalidated-password_2602e86fc6be8b6f_20bfb107", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.unvalidated-password", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The password on 'user' is being se...
1
true
[ "CWE-521" ]
[ "rules.python.django.security.audit.unvalidated-password" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 27 ]
[ 27 ]
[ 7 ]
[ 34 ]
[ "A07:2021 - Identification and Authentication Failures" ]
[ "The password on 'user' is being set without validating the password. Call django.contrib.auth.password_validation.validate_password() with validation functions before setting the password. See https://docs.djangoproject.com/en/3.0/topics/auth/passwords/ for more information." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
models.py
/mysite/main/models.py
AaronTheBruce/inventory-tracker
MIT
2024-11-18T20:49:58.590844+00:00
1,524,494,907,000
9416923bd2600343c76d861a3d376d3849ac7360
2
{ "blob_id": "9416923bd2600343c76d861a3d376d3849ac7360", "branch_name": "refs/heads/master", "committer_date": 1524494907000, "content_id": "0ddc0f85827d12340876c42d8129472278c1169c", "detected_licenses": [ "MIT" ], "directory_id": "5bfe80d256e3a8f3f290c421bb1f637115a32456", "extension": "py", "fi...
2.46875
stackv2
#!/usr/bin/env python3 import sys import gzip import argparse import shutil import tempfile from argparse import RawTextHelpFormatter import os import multiprocessing from functools import partial from subprocess import call import random import string from pysam import AlignmentFile, tabix_compress, tabix_index fro...
157
29.04
99
16
1,160
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_95ea508b39064e70_28438681", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
7
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 105, 105 ]
[ 105, 105 ]
[ 17, 39 ]
[ 44, 43 ]
[ "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" ]
parallelsample.py
/svtyper/parallelsample.py
florealcab/svtyper
MIT
2024-11-18T20:49:58.683324+00:00
1,547,312,110,000
96b5c513c6f9388bf24c0e1e14a07e6b064bb1f5
3
{ "blob_id": "96b5c513c6f9388bf24c0e1e14a07e6b064bb1f5", "branch_name": "refs/heads/master", "committer_date": 1547312110000, "content_id": "994279174b025ab5cea13b457832a0d8b3f3979e", "detected_licenses": [ "MIT" ], "directory_id": "b0e43f80af3e897f7053c0b05f0ce63ed5d71cab", "extension": "py", "fi...
2.75
stackv2
import numpy import os import urllib import gzip import pickle def mnist_generator(data, batch_size, digits_filter, div_by=None): images, targets = data if digits_filter is not None: relevant_samples = numpy.isin(targets, digits_filter) images = images[relevant_samples] targets = targ...
70
34.17
79
15
582
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_73d843d9b51793b9_6c83b45f", "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...
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" ]
[ 50, 67 ]
[ 50, 67 ]
[ 43, 43 ]
[ 57, 57 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
mnist.py
/tflib/mnist.py
eitanrich/improved_wgan_training
MIT
2024-11-18T20:49:58.742785+00:00
1,592,145,927,000
b2a2b0faa5e6bea7749fc584e0d0cda200faa1c2
3
{ "blob_id": "b2a2b0faa5e6bea7749fc584e0d0cda200faa1c2", "branch_name": "refs/heads/master", "committer_date": 1592145927000, "content_id": "d285e2207403ec5fe654144a349c8faed596be65", "detected_licenses": [ "BSD-3-Clause", "MIT" ], "directory_id": "9b8a35506f275494b29edaf28c9a5b286c623f0a", "ext...
2.53125
stackv2
import json from PIL import Image from PIL import ImageFont from PIL import ImageDraw import os name_model = 'dla_34' threshold = 0.3 count = 0 name_folder = 'json_'+ name_model video_folder = 'anno_videos_' + name_model ls_dir = os.listdir(name_folder) os.system('mkdir {}'.format(video_folder)) # lsd = *.json for...
52
33.48
111
17
460
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_6075f09c205b44b1_e3f2928a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
3
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 15, 38 ]
[ 15, 38 ]
[ 1, 5 ]
[ 43, 69 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
draw4.py
/src/draw4.py
loki371/CenterNet
BSD-3-Clause,MIT
2024-11-18T20:50:04.012737+00:00
1,582,073,960,000
75274f4816a3aeff644793e0f5da92a4bebcc098
3
{ "blob_id": "75274f4816a3aeff644793e0f5da92a4bebcc098", "branch_name": "refs/heads/master", "committer_date": 1582073960000, "content_id": "542e70df65449cff42f53da7e6ce611d61da7131", "detected_licenses": [ "Apache-2.0" ], "directory_id": "68ff8bebf7e4aab95e8e7c68d7cdee262c10c228", "extension": "py"...
2.609375
stackv2
import pickle import pandas as pd from application.models import CorpusResult def get_corpus_results(corpus_id): results = CorpusResult.query.filter( CorpusResult.corpus_id == corpus_id ).all() df_dic = {} for result in results: watson_response = pickle.loads(result.data) df...
19
24.79
70
15
109
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cde29d707858a41a_a893ce1a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 15 ]
[ 15 ]
[ 27 ]
[ 52 ]
[ "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" ]
corpus.py
/web-app/application/analysis/corpus.py
rkeb/discover-archetype
Apache-2.0
2024-11-18T20:50:08.347752+00:00
1,604,175,989,000
f9b5e2bef6b491217934a022dd3cb452758cb350
3
{ "blob_id": "f9b5e2bef6b491217934a022dd3cb452758cb350", "branch_name": "refs/heads/master", "committer_date": 1604175989000, "content_id": "07234d98397d9156fdb6050f96dab80ce1dd006b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "70e3bcb355076503e68ed75fd06d6566d280e675", "extension": "py"...
3.109375
stackv2
#!/usr/bin/env python import glob import os if __name__ == '__main__': print('Searching for notebooks in the notebooks directory') # maybe executing like execute_notebook.py notebook_dir = '../notebooks' result_dir = '../results' if not os.path.exists(notebook_dir): # maybe executing like s...
42
40.12
111
15
403
python
[{"finding_id": "semgrep_rules.python.lang.correctness.use-sys-exit_fbbd1451f33ebba9_e619a406", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.use-sys-exit", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Detected use of `exit`. Use `sys.exit` over the python...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 37 ]
[ 38 ]
[ 9 ]
[ 82 ]
[ "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" ]
execute_notebook.py
/scripts/execute_notebook.py
vishalbelsare/OmniNet
Apache-2.0
2024-11-18T20:50:09.134912+00:00
1,649,458,931,000
d719fdc63e0eeb2313cebfcd6009d5441107663a
3
{ "blob_id": "d719fdc63e0eeb2313cebfcd6009d5441107663a", "branch_name": "refs/heads/master", "committer_date": 1649458931000, "content_id": "2bccc024073b57485faf17db151b6dd78a8495c9", "detected_licenses": [ "MIT" ], "directory_id": "1463e2c6e1e5ac799e14de945147309c3db4d1bc", "extension": "py", "fi...
2.53125
stackv2
import numpy as np import pickle import os from subprocess import Popen, PIPE import time import datetime import ipdb from sklearn.utils import shuffle def noremDiv(nu, de): if nu % de == 0: return nu // de else: return nu // de + 1 def batchDiv(nu, de): if nu % de == 0: return (nu...
226
29.62
93
22
1,882
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_30a73725b89a1b65_cb7c260d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
8
true
[ "CWE-78", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-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" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 41, 61, 68, 77 ]
[ 41, 61, 68, 77 ]
[ 9, 9, 17, 9 ]
[ 77, 74, 36, 73 ]
[ "A01:2017 - Injection", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "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()'.", "Avoid using `pickle`, whi...
[ 7.5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "MEDIUM", "MEDIUM", "MEDIUM" ]
modules.py
/sc_utils/modules.py
ishine/Auto-Tuning-Spectral-Clustering
MIT
2024-11-18T20:50:12.490925+00:00
1,505,881,663,000
a6e49d07b33b1ad44ec75ee6ec632e614c9f59a7
2
{ "blob_id": "a6e49d07b33b1ad44ec75ee6ec632e614c9f59a7", "branch_name": "refs/heads/master", "committer_date": 1505881663000, "content_id": "464164ed368acf778c06f8a4a2e1da32fd56fe4a", "detected_licenses": [ "MIT" ], "directory_id": "69f2796fd681b2030ea64d5346ad58d3bff8fb1b", "extension": "py", "fi...
2.5
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- #python3 import pickle import os import re # final relations dict relations = {} # relations we want to extract allowed_rels = { "17":"r_has_carac", "23":"r_has_carac", "6":"r_is_a", "9":"r_has_part", "15":"r_lieu", "24":"r_has_agent", "26":"...
46
29.37
116
20
386
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_925549075c6ae171_5295e631", "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" ]
[ 46 ]
[ 46 ]
[ 1 ]
[ 72 ]
[ "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" ]
filter.py
/relations/filter.py
AnthonySigogne/HackatonIWCS2017
MIT
2024-11-18T20:50:16.049189+00:00
1,628,581,801,000
a3870eac6e89b2c3ca18a9d9a1a0c1a1ab8489b5
3
{ "blob_id": "a3870eac6e89b2c3ca18a9d9a1a0c1a1ab8489b5", "branch_name": "refs/heads/main", "committer_date": 1628581801000, "content_id": "2c208309d4ea2bf71cc0066179740fcb056ead6d", "detected_licenses": [ "MIT" ], "directory_id": "f4cb1f4b83b70da53c365b7373d76cf15c8a6732", "extension": "py", "file...
2.6875
stackv2
# -*- coding: utf-8 -*- # SPDX-License-Identifier: MIT # Copyright © 2021 André Santos ############################################################################### # Imports ############################################################################### import base64 import math import re try: from xmlrpc.cl...
110
33.7
79
13
697
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_65c0b5981fc70e5c_1f26fec7", "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...
3
true
[ "CWE-776", "CWE-776", "CWE-95" ]
[ "rules.python.lang.security.use-defused-xmlrpc", "rules.python.lang.security.use-defused-xmlrpc", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM" ]
[ 15, 17, 66 ]
[ 15, 17, 66 ]
[ 5, 5, 22 ]
[ 37, 33, 37 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)", "A03:2021 - Injection" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead.", "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead.", "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If...
[ 7.5, 7.5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "HIGH" ]
rosparam_yaml_monkey_patch.py
/src/haroslaunch/rosparam_yaml_monkey_patch.py
git-afsantos/haroslaunch
MIT
2024-11-18T20:50:19.330606+00:00
1,610,889,042,000
e2d466b0e7e5fe875cefdc1b1b3f55ebe1e0cc38
3
{ "blob_id": "e2d466b0e7e5fe875cefdc1b1b3f55ebe1e0cc38", "branch_name": "refs/heads/master", "committer_date": 1610889042000, "content_id": "3efb8f39c80ec8896a91a7872354c8298a610e73", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4e5d4287404c640814bfd20b11cca8afece070bc", "extension": "py"...
2.71875
stackv2
try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET import cv2 import os import shutil import random import colorsys import matplotlib.pyplot as plt import matplotlib.image as imgplt import numpy as np def convert(s, box): """ :param s: 图像总大小,二维元组或列表 (w, h) ...
159
31.36
109
19
1,647
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_c6ef61b9851aa65e_8f861a69", "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" ]
[ 2, 4 ]
[ 2, 4 ]
[ 5, 5 ]
[ 40, 39 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "The Python documentation recommends using `defusedxml` ins...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
datasets_xml.py
/SSD/datasets_xml.py
PieceZhang/face_detect_yolov4_yolov4tiny_ssd
Apache-2.0
2024-11-18T20:50:19.458264+00:00
1,415,012,218,000
55b050811d04da4dfa698567de9dba4fc3635bc9
3
{ "blob_id": "55b050811d04da4dfa698567de9dba4fc3635bc9", "branch_name": "refs/heads/master", "committer_date": 1415012218000, "content_id": "2138eb7d26f772c0ae079197ead075b0dd552e3a", "detected_licenses": [ "MIT" ], "directory_id": "c890c8077841b19d50999c86290f5588bac3aa03", "extension": "py", "fi...
2.625
stackv2
import subprocess import uuid from api.util import SECONDS_IN_HOUR, build_clargs, build_data_filename, \ generate_output_spec, generate_random_routes, write_file # The command to execute SUMO from the command line. COMMAND = 'sumo' class SumoServiceHandler(): """ Implements the SumoService interface. ...
67
32.01
80
13
491
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_39fe8d913df8542f_d42c8e5c", "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" ]
[ 34 ]
[ 34 ]
[ 9 ]
[ 30 ]
[ "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" ]
handler.py
/api/handler.py
similitude/sumo-simmer
MIT
2024-11-18T20:50:27.751891+00:00
1,516,810,139,000
1856e26f88c5cb61284de20c28afbb59541b82bb
3
{ "blob_id": "1856e26f88c5cb61284de20c28afbb59541b82bb", "branch_name": "refs/heads/master", "committer_date": 1516810139000, "content_id": "b4486fa9997a0d1132bac25fec8a80f3f58f101d", "detected_licenses": [ "MIT" ], "directory_id": "f5fae97a6b76ff660495ad6107e2563d1b6273d4", "extension": "py", "fi...
2.609375
stackv2
import os.path as osp import pickle import numpy as np from mastic.system import AssociationType from mastic.molecule import MoleculeTypeAtomSelection # load the SystemType we will add associations to system_type_pkl_path = osp.join(".", "sEH_TPPU_SystemType.pkl") with open(system_type_pkl_path, 'rb') as rf: sEH...
78
41.05
74
12
726
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_805578b50f06ad28_96a458ac", "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" ]
[ 12 ]
[ 12 ]
[ 27 ]
[ 42 ]
[ "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" ]
binding_site_subselection_association.py
/examples/sEH-TPPU/binding_site_subselection_association.py
Computational-Chemistry-Research/mastic
MIT
2024-11-18T20:50:31.979744+00:00
1,609,524,101,000
237edfce0647b02bea1b37351670ce7222001798
2
{ "blob_id": "237edfce0647b02bea1b37351670ce7222001798", "branch_name": "refs/heads/master", "committer_date": 1609524101000, "content_id": "2594835fcd51a42178c4c5fc8d5b6fb3a835b52b", "detected_licenses": [ "MIT" ], "directory_id": "8ce0c003bd995695487163a44afe0a72a5424ba8", "extension": "py", "fi...
2.5
stackv2
#!/usr/bin/env python """ Parse mbsync's config file. Limitations: Currently does not parse the Patterns for Channels and assumes we want to perform IDLE with INBOX. """ import json import os import subprocess class MbsyncrcError(Exception): pass class Mbsyncrc(object): def __init__(self, config_path): ...
166
29.71
78
26
1,110
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_a22e7e6ecf946037_9790966a", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 70, 71 ]
[ 72, 71 ]
[ 21, 69 ]
[ 22, 73 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess'...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
parse_mbsyncrc.py
/mbsync_watcher/parse_mbsyncrc.py
alkim0/mbsync-watcher
MIT
2024-11-18T20:50:34.460073+00:00
1,418,935,736,000
09d9dded102b4dfbd30f9e274853b5e5cbf1b522
3
{ "blob_id": "09d9dded102b4dfbd30f9e274853b5e5cbf1b522", "branch_name": "refs/heads/master", "committer_date": 1418935736000, "content_id": "596be9caca45badf63e005398c4491dbec31d9ad", "detected_licenses": [ "MIT" ], "directory_id": "54fc1082676c0f4da82dc8eaa01c98ba50b4f43b", "extension": "py", "fi...
2.671875
stackv2
import socket import pickle import time import constants from utils import printd from engine import Engine import random import sys import time CLOSE = "close" class Server: def __init__(self, engine, port): self.engine = engine self.s = socket.socket(constants.S_FAMILY, constants.S_TYPE) self.port = p...
87
29.76
76
15
641
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.network.avoid-bind-to-all-interfaces_e4219e007ec7dee8_42f56276", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.network.avoid-bind-to-all-interfaces", "finding_type": "security", "severity": "low", "confidence": "high", "message": "Running ...
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" ]
[ 33, 46, 63 ]
[ 33, 46, 63 ]
[ 11, 21, 25 ]
[ 29, 44, 43 ]
[ "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" ]
server.py
/server.py
vhp-jjh/online-tag
MIT
2024-11-18T20:50:36.848446+00:00
1,425,311,891,000
ae2d1559c56aa8c1f965c618ff651e2f27bdfc67
3
{ "blob_id": "ae2d1559c56aa8c1f965c618ff651e2f27bdfc67", "branch_name": "refs/heads/master", "committer_date": 1425311891000, "content_id": "6e38398c4f8bbbbee413f2b94415db7bf069272d", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "2a882c2537f0a1d1675a84dd909fcc2369dad3ed", "extension": "p...
2.78125
stackv2
# Author: Eli Draizen # Date 5-1-14 # File: BlastXMLParser.py #Standard libraries import sys import xml.etree.cElementTree as ET import re from math import exp #Custom libraries from Parser import Parser, Match, Matches class HSP(Match): """Holds information about a given High-scoring Sequence Pair (HSP) re...
187
33.09
106
21
1,825
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_1135acddc02f49be_5932b5e1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
3
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 7 ]
[ 7 ]
[ 1 ]
[ 36 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
BlastXMLParser.py
/hsp_tiler/BlastXMLParser.py
edraizen/hsp_tiler
BSD-3-Clause
2024-11-18T20:50:36.907279+00:00
1,608,332,487,000
9c8a268e721d92955b40c97d0ecc19b68e98ed9c
2
{ "blob_id": "9c8a268e721d92955b40c97d0ecc19b68e98ed9c", "branch_name": "refs/heads/main", "committer_date": 1608332487000, "content_id": "a51545f0eda3f0a64c3311d0f5cce444acd7270e", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "e5c2d54924b7149e1f97762d35290ea6885d7a0c", "extension": "py"...
2.328125
stackv2
#!/usr/bin/env python3 """ SBOM Generator This Python script reads all dependencies of a project and produces a software bill-of-materials (SBOM) artifacts from them. Copyright (c) 2020, Tidepool Project All rights reserved. """ import sys import os import logging import logging.config import argparse import subproce...
424
35.6
174
20
3,574
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_477a3200596a9fec_45774cdd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
12
true
[ "CWE-78", "CWE-78", "CWE-95", "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.audit.exec-detected", "rules.python.lang.security.audit.exec-detected" ]
[ "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 52, 52, 106, 355, 361 ]
[ 52, 52, 106, 355, 361 ]
[ 12, 97, 16, 27, 23 ]
[ 126, 101, 62, 79, 97 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A03:2021 - Injection", "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess'...
[ 7.5, 7.5, 5, 5, 5 ]
[ "LOW", "HIGH", "LOW", "LOW", "LOW" ]
[ "HIGH", "LOW", "HIGH", "HIGH", "HIGH" ]
sbom_gen.py
/sbom_gen.py
tidepool-org/sbom_gen
BSD-2-Clause
2024-11-18T20:50:37.425111+00:00
1,559,533,164,000
7da52e641f4ca0fc2029138a48cd51bc8e260276
3
{ "blob_id": "7da52e641f4ca0fc2029138a48cd51bc8e260276", "branch_name": "refs/heads/master", "committer_date": 1559533164000, "content_id": "23b54fa354e9578ea397668db3b7b71ad8941e49", "detected_licenses": [ "MIT" ], "directory_id": "e17ae8bf899b159ed01d6e28a082ae71a931e404", "extension": "py", "fi...
2.703125
stackv2
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import padding, hmac, hashes from cryptography.exceptions import InvalidSignature from os import urandom, path from handlers import cd ''' This...
203
24.38
87
12
1,289
python
[{"finding_id": "semgrep_rules.python.cryptography.security.crypto-mode-without-authentication_0c01dcfafc171d3a_10d94983", "tool_name": "semgrep", "rule_id": "rules.python.cryptography.security.crypto-mode-without-authentication", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "An en...
3
true
[ "CWE-327", "CWE-327" ]
[ "rules.python.cryptography.security.crypto-mode-without-authentication", "rules.python.cryptography.security.crypto-mode-without-authentication" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 33, 75 ]
[ 33, 75 ]
[ 14, 14 ]
[ 73, 73 ]
[ "A03:2017 - Sensitive Data Exposure", "A03:2017 - Sensitive Data Exposure" ]
[ "An encryption mode of operation is being used without proper message authentication. This can potentially result in the encrypted content to be decrypted by an attacker. Consider instead use an AEAD mode of operation like GCM. ", "An encryption mode of operation is being used without proper message authenticatio...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
encryption.py
/encryption.py
rgabeflores/Python-Encryption
MIT
2024-11-18T20:50:39.279963+00:00
1,528,903,999,000
ac5bf1dd88fce81fdd336b4e8127ba396cce57f5
3
{ "blob_id": "ac5bf1dd88fce81fdd336b4e8127ba396cce57f5", "branch_name": "refs/heads/master", "committer_date": 1528903999000, "content_id": "d3f1de388f6e7b8df8c529c39f039000a05d4335", "detected_licenses": [ "MIT" ], "directory_id": "5ff8185863b28d84d9d706692b65878dbdcadfb1", "extension": "py", "fi...
3.09375
stackv2
"Implements the NomialMap class" from collections import defaultdict import numpy as np from ..exceptions import DimensionalityError from ..small_classes import HashVector, Quantity, Strings, qty from ..small_scripts import mag from .substitution import parse_subs DIMLESS_QUANTITY = qty("dimensionless") class Nomial...
217
36.92
79
20
1,939
python
[{"finding_id": "semgrep_rules.python.lang.correctness.dict-del-while-iterate_1d83903282434890_f3e41a47", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.dict-del-while-iterate", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "It appears that `self[key]` is a d...
1
true
[ "" ]
[ "rules.python.lang.correctness.dict-del-while-iterate" ]
[ "correctness" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 74 ]
[ 82 ]
[ 9 ]
[ 53 ]
[ "" ]
[ "It appears that `self[key]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration" ]
[ 5 ]
[ "" ]
[ "" ]
map.py
/gpkit/nomials/map.py
sichu366/gpkit
MIT
2024-11-18T20:50:40.657872+00:00
1,539,343,991,000
d412bc3b80570df8631ac79b9599a37630df99bd
3
{ "blob_id": "d412bc3b80570df8631ac79b9599a37630df99bd", "branch_name": "refs/heads/master", "committer_date": 1539343991000, "content_id": "cf400e71aae1febee6e288b862f2c08219b63451", "detected_licenses": [ "MIT" ], "directory_id": "1fe7e1fa3ee057dc8a8d8278f5be24f77b287537", "extension": "py", "fi...
2.703125
stackv2
import dateparser from django.utils import timezone def humanize_timedelta(delta): days, rem = divmod(delta.seconds, 86400) hours, rem = divmod(rem, 3600) minutes, seconds = divmod(rem, 60) if seconds < 1:seconds = 1 magnitudes = ["days", "hours", "minutes"] if seconds / delta.seconds > 0.05: ...
24
31.58
94
13
208
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_26bac3a3339686aa_bbd1aad3", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.dangerous-globals-use", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Found non static data as an index to 'globals()'...
2
true
[ "CWE-96", "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use", "rules.python.lang.security.dangerous-globals-use" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 14, 15 ]
[ 14, 15 ]
[ 54, 54 ]
[ 72, 72 ]
[ "A03:2021 - Injection", "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'.", "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
utils.py
/trax/trax/utils.py
christianlupus/trax
MIT
2024-11-18T20:50:40.700273+00:00
1,689,149,970,000
8fa6d439257b3824ca1c04cefea1820179137b23
3
{ "blob_id": "8fa6d439257b3824ca1c04cefea1820179137b23", "branch_name": "refs/heads/main", "committer_date": 1689149970000, "content_id": "9bfc41187ece02d367361e447b4507de3293643e", "detected_licenses": [ "MIT" ], "directory_id": "352ee943d093baa644f47a5c90a52b6ce6b410ce", "extension": "py", "file...
2.546875
stackv2
#!/usr/bin/env python import sys, os import multiprocessing def help_message(): print("Usage: python "+sys.argv[0]+" -bam <bam_list_file> -g <genome_size> -l <read_length> -bed <bed_file> -o <out_file> [-t <thread_nums>]") def get_opts(ARGV): opts = {} if len(ARGV) < 3: help_message() sys.exit(0) for i in ...
141
23.91
143
22
1,078
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_c1c4d5a8f55d2cfe_72ac8271", "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" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 27, 38 ]
[ 27, 38 ]
[ 8, 8 ]
[ 41, 77 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
approximate_cnv.py
/bin/approximate_cnv.py
sc-zhang/bioscripts
MIT
2024-11-18T20:50:40.861745+00:00
1,407,845,983,000
bf24978cb145b5b74571929c093e1b66f9069a21
3
{ "blob_id": "bf24978cb145b5b74571929c093e1b66f9069a21", "branch_name": "refs/heads/master", "committer_date": 1407845983000, "content_id": "7678c8c88be8d0acd95da82ae108405841c539fe", "detected_licenses": [ "MIT" ], "directory_id": "73bca317047b37eda3cb6f49704a0ba7382f8d98", "extension": "py", "fi...
2.53125
stackv2
import sys import config hostDBFields = { "hostIP": "IP" } class HostInfoDB: def __init__(self): try: import cx_Oracle connection_string = config.host_info_user + "/" + config.host_info_password + "@" + config.host_info_host + ":" + str(config.host_info_port) + "/" +config.host_info_name self.conn = cx_...
25
25.04
172
19
164
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_2d49c37d527f442d_621f3bbb", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
1
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 23 ]
[ 23 ]
[ 3 ]
[ 29 ]
[ "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" ]
hostinfodb.py
/lib/hostinfodb.py
Hadhat/flow-inspector
MIT
2024-11-18T20:50:41.625425+00:00
1,438,552,148,000
11f6187cb2c7eb01bec51f2bcf4348a3beee408d
3
{ "blob_id": "11f6187cb2c7eb01bec51f2bcf4348a3beee408d", "branch_name": "refs/heads/master", "committer_date": 1438552148000, "content_id": "40cf551240e9166ae644cc8da2cb0b69685dda4f", "detected_licenses": [ "MIT" ], "directory_id": "984c4cd6738cf431515e761c90557af822a8e6b4", "extension": "py", "fi...
2.609375
stackv2
#!/usr/bin/env python """ """ import os,sys import numpy as np import cPickle as pkl if __name__ == "__main__": from optparse import OptionParser o = OptionParser() o.set_usage('%prog [options] [pklReduceDict.py DICT]') o.set_description(__doc__) o.add_option('--snr',dest='snr',default=100,type='...
67
36.55
156
18
741
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-cPickle_5dfa5b353e7521f8_d3ebc7f7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-cPickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `cPickle`, which is ...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 30 ]
[ 30 ]
[ 16 ]
[ 39 ]
[ "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" ]
tableSlope.py
/scripts/tableSlope.py
griffinfoster/pulsar-polarization-sims
MIT
2024-11-18T20:50:52.113115+00:00
1,619,889,663,000
8f923e6bdef6cfde8286fb136f45a738fd1e79ab
2
{ "blob_id": "8f923e6bdef6cfde8286fb136f45a738fd1e79ab", "branch_name": "refs/heads/main", "committer_date": 1619889663000, "content_id": "25f5815b259b318896861cda6fc98735c039d6b9", "detected_licenses": [ "MIT" ], "directory_id": "17b176195388438a14da788302f3df7970f1b21c", "extension": "py", "file...
2.5
stackv2
from scripts.anntools import Collection from pathlib import Path from our_annotations import parse_sentence import matplotlib.pyplot as plt import numpy as np import string import torch import torch.nn as nn from torch.nn.utils.rnn import pad_sequence from data import WordDataset, EqualLenghtSequence, chunk, SentenceDa...
87
32.13
156
16
811
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_82bbb8b4750dc83b_d7aec7ae", "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" ]
[ 61, 62 ]
[ 61, 62 ]
[ 19, 9 ]
[ 69, 47 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
Test.py
/Test.py
TuquiSierra/Ehealth
MIT
2024-11-18T20:50:54.203989+00:00
1,535,124,025,000
db990e121529cfba2fe3de0a7c1d9e3d38a4acde
3
{ "blob_id": "db990e121529cfba2fe3de0a7c1d9e3d38a4acde", "branch_name": "refs/heads/master", "committer_date": 1535124025000, "content_id": "6ec29ac720295505e2cbce778bb794681b071521", "detected_licenses": [ "MIT" ], "directory_id": "757d879807b905b096d8e8dd0ff79973357d5e97", "extension": "py", "fi...
2.828125
stackv2
""" Run outer.py python outer.py outer.py has the following options: python outer.py --model='mtl2stance' --data='RumEval' --search=True --ntrials=10 --params="output/bestparams.txt" --model - which task to train, stance or veracity --data - which dataset to use --search - boolean, controls whether parameter searc...
154
41.8
144
20
1,539
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5d4ac14017681033_e6f7d2cb", "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...
7
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 68, 78, 89, 105, 117, 131, 142 ]
[ 68, 78, 89, 105, 117, 131, 142 ]
[ 30, 30, 30, 30, 30, 30, 30 ]
[ 44, 44, 44, 44, 44, 44, 44 ]
[ "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" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
outer.py
/outer.py
ifigueroap/Multitask4Veracity
MIT
2024-11-18T20:50:55.474489+00:00
1,688,236,841,000
13a18dee2089768dca3d38f954d6eaf6c49d210c
2
{ "blob_id": "13a18dee2089768dca3d38f954d6eaf6c49d210c", "branch_name": "refs/heads/master", "committer_date": 1688236841000, "content_id": "dae6a0dff106e78556da6207b7b2f71a08eab18e", "detected_licenses": [ "BSD-3-Clause-LBNL" ], "directory_id": "4c52e1aa84713a91c759495a70e8f5e3dcf74b12", "extension...
2.359375
stackv2
__author__ = 'Nina Stawski' __version__ = '0.32' import sqlite3 import os import stat def DatabaseConnect(): global conn conn = sqlite3.connect('prpr.db') global crsr crsr = conn.cursor() def DatabaseDisconnect(): conn.commit() crsr.close() conn.close() def CreateTables(): DatabaseC...
118
36.72
168
19
1,136
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_69fb8c4368c487eb_14d0d304", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
8
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" ]
[ 95, 99 ]
[ 95, 99 ]
[ 13, 13 ]
[ 34, 34 ]
[ "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" ]
setup.py
/setup.py
nstawski/prpr
BSD-3-Clause-LBNL
2024-11-18T20:51:05.641734+00:00
1,634,147,749,000
05f1febf5643d25d2ee74adb2f7a7a6091430d87
2
{ "blob_id": "05f1febf5643d25d2ee74adb2f7a7a6091430d87", "branch_name": "refs/heads/main", "committer_date": 1634147749000, "content_id": "71601c5a1cee9cac6c44b18c22fd8ebd34fd4e8d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "bd0056edc11779091f3ddd0ba56f523867d798b5", "extension": "py", ...
2.40625
stackv2
import click import os @click.group() def main(): pass # click.echo(f'RUNNING STREAM LIT {target}') # os.system(f'streamlit run {target}') @click.command() @click.argument("target", required=True) def run(target): # click.echo(f'RUNNING STREAMLIT {target}') os.system(f'streamlit run {target}') ...
20
17.95
48
10
101
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.pass-body-fn_c308b95a5c9b091e_6533c559", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.pass-body-fn", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "`pass` is the body of function main. Consider re...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 15 ]
[ 15 ]
[ 5 ]
[ 41 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
cli.py
/lib/bubbletea/cli.py
scoutcool/Bubbletea
Apache-2.0
2024-11-18T20:51:05.992508+00:00
1,519,362,636,000
aacd579a3e121aeae41163fabb09283247063c18
3
{ "blob_id": "aacd579a3e121aeae41163fabb09283247063c18", "branch_name": "refs/heads/master", "committer_date": 1519362636000, "content_id": "4954dc5b237cd34c219ecf266d965448aa435a2f", "detected_licenses": [ "MIT" ], "directory_id": "cc3202fd671acf2ba7dde348074470d2864381e8", "extension": "py", "fi...
2.703125
stackv2
# -*- coding: utf-8 -*- """ Created on Tue Dec 20 15:50:23 2016 @author: jessime """ #TODO integrate this with play_levels and remove duplicated Code import sys import os import subprocess as sp import traceback import numpy as np from shutil import copyfile from importlib import import_module, reload class Tutoria...
134
31.78
85
19
987
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_66f76b8b763a2ff9_4d65e15c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
6
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 29, 60 ]
[ 29, 60 ]
[ 13, 13 ]
[ 60, 60 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functio...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
tutorial.py
/src/tutorial.py
Jessime/Excision
MIT
2024-11-18T20:51:08.606587+00:00
1,692,694,190,000
e9486dbd4a813658c0cd638cdd53a922e2eacb3e
3
{ "blob_id": "e9486dbd4a813658c0cd638cdd53a922e2eacb3e", "branch_name": "refs/heads/main", "committer_date": 1692694190000, "content_id": "3843314a4e20524c42a4dd0805a2df5acc98fe30", "detected_licenses": [ "MIT" ], "directory_id": "0dcbf8f782d55f74dc72015214f51d6f6bd11618", "extension": "py", "file...
2.671875
stackv2
""" Objects for interacting with a central set of virtual environments. """ from itertools import chain from shutil import which import os import platform import subprocess import sys from filesystems.click import PATH import attr import click import filesystems.native def _create_virtualenv(virtualenv, arguments, ...
224
24.92
78
20
1,214
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_c2101ec855d0c7f4_6e23ecf8", "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" ]
[ 19, 49 ]
[ 31, 60 ]
[ 5, 5 ]
[ 6, 6 ]
[ "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" ]
common.py
/venvs/common.py
Julian/venvs
MIT
2024-11-18T20:51:13.001842+00:00
1,687,436,962,000
3121cbc09734258495d98d611703aa867cb2aeab
3
{ "blob_id": "3121cbc09734258495d98d611703aa867cb2aeab", "branch_name": "refs/heads/master", "committer_date": 1687436962000, "content_id": "a9ec67ea83353883ca6cd4004452df2693094383", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "95cec50712d94dcbbbc9cf29ea13fba29f7068cc", "extension": "p...
2.515625
stackv2
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # Tiago de Freitas Pereira <tiago.pereira@idiap.ch> # Sat 20 Aug 15:43:10 CEST 2016 import os import xml.sax from functools import partial from clapper.rc import UserDefaults import bob.io.base from bob.bio.base.database.utils import download_file, md5_hash, se...
307
29.77
117
24
1,939
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_2cd6a10c6baeb27d_e7ea7129", "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" ]
[ 7 ]
[ 7 ]
[ 1 ]
[ 15 ]
[ "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" ]
gbu.py
/src/bob/bio/face/database/gbu.py
bioidiap/bob.bio.face
BSD-3-Clause
2024-11-18T20:51:24.569724+00:00
1,416,205,372,000
0bbbdace437fa2ab716b0f208ea3a55ce55fc335
3
{ "blob_id": "0bbbdace437fa2ab716b0f208ea3a55ce55fc335", "branch_name": "refs/heads/master", "committer_date": 1416205372000, "content_id": "9b986be5e92ab0111afe1db4e3e5a4b80839a10d", "detected_licenses": [ "MIT" ], "directory_id": "246fbcc58c51a421cc8a45f42c8ef91aad3dbf2c", "extension": "py", "fi...
2.703125
stackv2
import pickle import numpy as np import pandas as pd def main(input_file): with open(input_file) as f: graph = pickle.load(f) node_map = {int(node_id): i for i, node_id in enumerate(graph.nodes())} outcomes = [] for fn, name in [ ('data/sfnodesdtINTOXICATIONCRIME.csv', 'intoxication...
44
25.09
75
15
303
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_6ffc4b53804b019a_a342ded0", "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" ]
[ 9 ]
[ 9 ]
[ 17 ]
[ 31 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
make_risks.py
/scripts/make_risks.py
Thanajade/out-for-justice
MIT
2024-11-18T20:51:25.095502+00:00
1,553,694,071,000
9c3fdfdfae53b7c4aaa018acc0d65b308b924b54
3
{ "blob_id": "9c3fdfdfae53b7c4aaa018acc0d65b308b924b54", "branch_name": "refs/heads/master", "committer_date": 1553694071000, "content_id": "4c66ca7b8492245bc5959ab1530ce0c835e1d136", "detected_licenses": [ "MIT" ], "directory_id": "f3a8066d64eef9eea2d3e92179e7965ccde35d73", "extension": "py", "fi...
3.359375
stackv2
# author: 千山漫雪空 # time: 2018.8.7 # encoding:utf-8 # --------------------------------------- # 摘要提取(向量实现) # --------------------------------------- def get_distance(np_sentence_vec, np_article_vec): A = 0 B = 0 AB = 0 for i in range(len(np_article_vec)): A = np.sum(np_sentence_vec*np_...
104
26.43
95
18
867
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d42780bfb03b6dd6_10009142", "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" ]
[ 57 ]
[ 57 ]
[ 24 ]
[ 38 ]
[ "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" ]
based_on_wordvec_v_0.2.py
/extraction/based_on_wordvec_v_0.2.py
sthgreat/Automatic-summary-extraction
MIT
2024-11-18T20:51:25.600110+00:00
1,628,770,440,000
58b9bfac8d565a91de74f5ac93d271333d070388
2
{ "blob_id": "58b9bfac8d565a91de74f5ac93d271333d070388", "branch_name": "refs/heads/master", "committer_date": 1628770440000, "content_id": "a7e59002be72773b688d4169a90e23fac17ad299", "detected_licenses": [ "MIT" ], "directory_id": "9fb2d55e10227a2facc960caca6d5c540826336b", "extension": "py", "fi...
2.359375
stackv2
#! /usr/bin/python3 import subprocess, os, sys """ Depth of crawling E.g: If it was set to 2, passed URL and all found links in it will be crawled. Assigning 0 to it, causing crawling the entire domain. """ DEPTH = 0 """ Number of processes """ PROCESSES = 12 """ Path to save the result """ ho...
69
21.49
113
11
405
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_2af7fdfcae1fc9f2_a22e7652", "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" ]
[ 23 ]
[ 23 ]
[ 5 ]
[ 43 ]
[ "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" ]
config.py
/config.py
sadobin/Crawl3r
MIT
2024-11-18T21:13:45.817866+00:00
1,492,166,348,000
fc08080dab14d78ec16839c1a7a72203f4083f05
2
{ "blob_id": "fc08080dab14d78ec16839c1a7a72203f4083f05", "branch_name": "refs/heads/master", "committer_date": 1492166348000, "content_id": "b7d73cdfda96e9a407a167d14098829e9fbb0db7", "detected_licenses": [ "MIT" ], "directory_id": "5217202825e0d9ea571f0e1bdaf86c42d2ca55ed", "extension": "py", "fi...
2.4375
stackv2
# -*- coding: utf-8 -*- """ Результаты выполнения Action`s """ from django import http from m3.actions import ( ActionResult as _ActionResult, BaseContextedResult as _BaseContextedResult, ) import helpers as _helpers class ExtUIScriptResult(_BaseContextedResult): """ По аналогии с ExtUiComponentResu...
68
29.9
82
13
476
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_f051643b451e9aa0_d93ba060", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ...
3
true
[ "CWE-79", "CWE-79", "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 33, 51, 66 ]
[ 33, 51, 68 ]
[ 20, 16, 16 ]
[ 61, 53, 52 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.", "Detected data rendered directly to the end user via 'HttpRes...
[ 5, 5, 5 ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
results.py
/src/m3_ext/ui/results.py
barsgroup/m3-ui
MIT
2024-11-18T21:13:51.928515+00:00
1,600,993,454,000
3d4ba9fd4e01da499e743adb8b5c440ddcae878f
3
{ "blob_id": "3d4ba9fd4e01da499e743adb8b5c440ddcae878f", "branch_name": "refs/heads/master", "committer_date": 1600993454000, "content_id": "23e4a8eb590d3bb3dc54dd5c1af181e67be0643d", "detected_licenses": [ "MIT" ], "directory_id": "89d935ed068a36faf738ca76c6219767685b0773", "extension": "py", "fi...
2.84375
stackv2
# pytorch transfer_learning example import torch import torchvision.models as models from torchvision import transforms from PIL import Image import torch.nn.functional as F import numpy as np import matplotlib.pyplot as plt # By default, models will be downloaded to your $HOME/.torch folder. # You can modify this b...
68
32.66
143
11
638
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_ac6b95d7466b45ba_7c114172", "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" ]
[ 23 ]
[ 23 ]
[ 19 ]
[ 33 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
pretrained_resnet.py
/transfer_learning/pretrained_resnet.py
zhangweiblan/pytorch_deep_learning_by_example
MIT
2024-11-18T21:13:55.305813+00:00
1,692,115,312,000
63b06d9389175ebb7972bebc9d9836a4209f1e36
3
{ "blob_id": "63b06d9389175ebb7972bebc9d9836a4209f1e36", "branch_name": "refs/heads/master", "committer_date": 1692115312000, "content_id": "a8bf149f589c24588b5421108ec3c130bb7631cd", "detected_licenses": [ "MIT" ], "directory_id": "a9e60d0e5b3b5062a81da96be2d9c748a96ffca7", "extension": "py", "fi...
2.8125
stackv2
# -*- coding: utf-8 -*- try: from xmlrpclib import Server except ImportError: # Python 3 from xmlrpc.client import Server from collections import defaultdict from itertools import groupby from . import codes from . import utils from .models import ChannelData, ArchiveProperties, Limits from .exceptions impor...
219
42.8
78
20
1,761
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_5177c50bed6fb208_f9f5bec1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
2
true
[ "CWE-776", "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc", "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 4, 6 ]
[ 4, 6 ]
[ 5, 5 ]
[ 33, 37 ]
[ "A04:2017 - XML External Entities (XXE)", "A04:2017 - XML External Entities (XXE)" ]
[ "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead.", "Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead." ]
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
channelarchiver.py
/configurations/i11-1-config/scripts/channelarchiver-0.0.4/channelarchiver/channelarchiver.py
openGDA/gda-diamond
MIT
2024-11-18T21:13:55.814965+00:00
1,603,214,045,000
12f87427715a1c74ee6014edce3b6dd2bed504b7
3
{ "blob_id": "12f87427715a1c74ee6014edce3b6dd2bed504b7", "branch_name": "refs/heads/master", "committer_date": 1603214045000, "content_id": "a7a8d764113bb584ff27f84642fc4c521213af20", "detected_licenses": [ "MIT" ], "directory_id": "c8ed31440e7a5e4813b60440efd27f2a7df0de21", "extension": "py", "fi...
2.546875
stackv2
"""Take screenshots of states.""" import os import argparse import torch import rospy import numpy as np import env import torobo_wrapper parser = argparse.ArgumentParser("Record states.") parser.add_argument("-s", help="state file", type=str, required=True) parser.add_argument("-o", help="output folder", type=str, re...
39
28.82
79
10
369
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_ad341089206297c7_fd6455fe", "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" ]
[ 39, 39 ]
[ 39, 39 ]
[ 5, 5 ]
[ 63, 63 ]
[ "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" ]
take_ss.py
/take_ss.py
alper111/symbol-emergence
MIT
2024-11-18T21:13:56.337613+00:00
1,308,055,566,000
5e28969e309219c2b00022d7b6aa5a3b56a75c06
2
{ "blob_id": "5e28969e309219c2b00022d7b6aa5a3b56a75c06", "branch_name": "refs/heads/master", "committer_date": 1308055566000, "content_id": "928518a0100900551f4c70fef1e1a5ad4fc4b013", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a4b467c857f645910eb66259d0a3e1ca3a26f866", "extension": "p...
2.484375
stackv2
'''Builds reStructuredText files into HTML as they change.''' # tornado import tornado.web # watchdog from watchdog.observers.polling import PollingObserver from watchdog.events import PatternMatchingEventHandler # std lib import os.path import datetime import urlparse import subprocess import glob import time class P...
95
29.71
82
17
657
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_bdfc61b47155a266_cbc37c3e", "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" ]
[ 26 ]
[ 26 ]
[ 9 ]
[ 30 ]
[ "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" ]
rstpages.py
/hbag/rstpages/rstpages.py
vlad73/handlerbag
BSD-3-Clause
2024-11-18T21:13:57.500908+00:00
1,692,109,124,000
9653165d21e990cddff02f80901b95882825cc3a
3
{ "blob_id": "9653165d21e990cddff02f80901b95882825cc3a", "branch_name": "refs/heads/main", "committer_date": 1692109124000, "content_id": "417040e342bf88acc65bd50d51f896dce0387991", "detected_licenses": [ "MIT" ], "directory_id": "3dfa0692f46628edc9dc2792bd17746700d69d18", "extension": "py", "file...
2.515625
stackv2
from __future__ import annotations import asyncio.subprocess import contextlib import os.path import tempfile from typing import Generator from typing import IO def get_quantified_unit(unit: str, amount: int) -> str: if amount == 1: return unit else: return f'{unit}s' def seconds_to_readabl...
50
23.9
67
14
305
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-asyncio-create-exec-audit_35e4d07150f07f8b_546685e1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-asyncio-create-exec-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected '...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-asyncio-create-exec-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 45 ]
[ 47 ]
[ 18 ]
[ 6 ]
[ "A01:2017 - Injection" ]
[ "Detected 'create_subprocess_exec' function 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" ]
util.py
/bot/util.py
anthonywritescode/twitch-chat-bot
MIT
2024-11-18T21:13:57.632779+00:00
1,303,627,704,000
6bf2f8418500ffc2a8f8a1e8527c2a82f0dc85dd
2
{ "blob_id": "6bf2f8418500ffc2a8f8a1e8527c2a82f0dc85dd", "branch_name": "refs/heads/master", "committer_date": 1303627704000, "content_id": "9fbdda1bcb720081a2d6d49c0fa6d4f9866baf84", "detected_licenses": [ "MIT" ], "directory_id": "0cacc4500d7816ea9c22755b21d6fadc2c4f73c1", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/env python # import various dependencies import MySQLdb, sys, cgi, connection print "Content-type: text/html\n" The_Form = cgi.FieldStorage() if The_Form: columns = "(`date`" cells = "(CURRENT_TIMESTAMP" for i in The_Form: columns += ", `" + i + "`" cells += ", '" + The_Form.getvalue(i) + "'" ...
34
23.59
129
12
249
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_75d22964986017e7_e1e12123", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
1
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 30 ]
[ 30 ]
[ 3 ]
[ 23 ]
[ "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" ]
post_results.py
/python/post_results.py
ravi-rajakumar/Zombie-Simulator
MIT
2024-11-18T21:13:58.306447+00:00
1,599,204,546,000
d893bf7dbe5e5efd4cad52a8b778e27a89b2f3ea
3
{ "blob_id": "d893bf7dbe5e5efd4cad52a8b778e27a89b2f3ea", "branch_name": "refs/heads/master", "committer_date": 1599204546000, "content_id": "badcc57b7ac5c3fa842b85e950fb47831abc8afb", "detected_licenses": [ "MIT" ], "directory_id": "ff79872e99211fc7f974d5cfefa87f80acca773d", "extension": "py", "fi...
2.875
stackv2
import os import asyncpg from datetime import datetime class Postgres: def __init__(self): self.db_url = os.getenv('POSTGRES_URL') async def checkConnection(self): conn = await asyncpg.connect(self.db_url) await conn.execute(''' CREATE TABLE IF NOT EXISTS testusers( ...
69
30.71
88
14
518
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.sqli.asyncpg-sqli_9956838d82c370d4_23abe711", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.sqli.asyncpg-sqli", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected string concatenation with a non-lit...
11
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.sqli.asyncpg-sqli", "rules.python.lang.security.audit.sqli.asyncpg-sqli", "rules.python.lang.security.audit.sqli.asyncpg-sqli", "rules.python.lang.security.audit.sqli.asyncpg-sqli", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.securi...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "HIGH", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "HIGH" ]
[ 47, 47, 56, 56, 56, 58, 58, 66, 66, 66, 66 ]
[ 47, 47, 56, 56, 56, 58, 58, 66, 66, 66, 66 ]
[ 22, 22, 15, 15, 15, 24, 24, 15, 15, 15, 15 ]
[ 66, 66, 54, 54, 54, 77, 77, 34, 34, 34, 34 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected string concatenation with a non-literal variable in a asyncpg Python SQL statement. This could lead to SQL injection if the variable is user-controlled and not properly sanitized. In order to prevent SQL injection, use parameterized queries or prepared statements instead. You can create parameterized quer...
[ 5, 5, 5, 5, 7.5, 5, 5, 5, 5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
connection.py
/project/main/db/connection.py
arezamoosavi/BTC-Alarming
MIT
2024-11-18T21:14:01.274671+00:00
1,605,727,528,000
d937cd472c073157c781b8a31ce0fc22c783eea2
3
{ "blob_id": "d937cd472c073157c781b8a31ce0fc22c783eea2", "branch_name": "refs/heads/main", "committer_date": 1605727528000, "content_id": "a0d2373050a52d7314dac36103b325b41f1fece3", "detected_licenses": [ "MIT" ], "directory_id": "c654585cd0918abf99c5722e5cd7b2110e6a889b", "extension": "py", "file...
2.640625
stackv2
import json import os from urllib.parse import quote from jinja2 import Environment, FileSystemLoader, select_autoescape from livereload import Server from more_itertools import chunked JSON_PATH = os.path.join("./", "books.json") HTML_DIR = os.path.join("./", "pages") def clean_html_dir(): filepaths_list =...
64
27.53
71
16
437
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_6a859693f07f7b4b_af7d4635", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja...
2
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 41, 50 ]
[ 44, 54 ]
[ 11, 25 ]
[ 6, 10 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected direct use of jinja2. If n...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
render_website.py
/render_website.py
Zed-chi/dvmn_frontend_ch4
MIT
2024-11-18T21:14:01.845390+00:00
1,566,431,789,000
ee51104afee26619863dc1029daa3c831c34dd76
2
{ "blob_id": "ee51104afee26619863dc1029daa3c831c34dd76", "branch_name": "refs/heads/master", "committer_date": 1566431789000, "content_id": "026a6fa2c9027d96933bb617f79c674cce9ad70e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "6d9a044b97aba7a16812fb470b943374e059ae63", "extension": "p...
2.453125
stackv2
# Launch multiple gloo processes through qsub. Benchmark the running times # of ring-based and grid-based (w/ and w/o failures) all-reduce algorithms. # The number of elements ranges from 1e5 to 1e8 # Usage: # ./python3 gloo_qsub.py [#_processes] [#_node_requested] [groups] # from pathlib import Path import subproc...
58
31.52
95
16
575
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f61a28c4b741671b_9cb9cecb", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
8
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.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subp...
[ "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 22, 22, 22, 32, 32, 58, 58, 58 ]
[ 22, 22, 22, 32, 32, 58, 58, 58 ]
[ 1, 16, 59, 1, 50, 5, 20, 54 ]
[ 64, 51, 63, 55, 54, 59, 46, 58 ]
[ "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 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functio...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "MEDIUM", "HIGH", "LOW", "HIGH", "LOW", "MEDIUM", "HIGH" ]
[ "HIGH", "MEDIUM", "LOW", "HIGH", "LOW", "HIGH", "MEDIUM", "LOW" ]
gloo_qsub.py
/script/gloo_qsub.py
chen-xanadu/gloo
BSD-3-Clause
2024-11-18T21:14:03.233427+00:00
1,633,153,127,000
9e0d564266951df5d412bbc2f0ff323023fe87d4
3
{ "blob_id": "9e0d564266951df5d412bbc2f0ff323023fe87d4", "branch_name": "refs/heads/master", "committer_date": 1633153127000, "content_id": "3b4d325350fc1877fa70a1db4a638721a6ad02d5", "detected_licenses": [ "MIT" ], "directory_id": "01d94ab245c92fd71b57dbac0f2e6a6f2db01a36", "extension": "py", "fi...
2.65625
stackv2
import csv import mysql.connector import os.path import pandas as pd import easygui import datetime from mysql.connector import Error from mysql.connector import errorcode import configparser ''' This Script is for too Copy the Data of NiftyALL i.e the Bhavcopy Data to Nifty50Derived Table which contain only Top 50 N...
96
44.35
119
19
932
python
[{"finding_id": "semgrep_rules.python.correctness.suppressed-exception-handling-finally-break_fa858a3b8333e7f4_fcf4adf2", "tool_name": "semgrep", "rule_id": "rules.python.correctness.suppressed-exception-handling-finally-break", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "Ha...
2
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 75 ]
[ 75 ]
[ 17 ]
[ 49 ]
[ "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
NIFTY50FROMNIFTYALL.py
/NIFTY50FROMNIFTYALL.py
anoop-phoenix/analysis-of-national-stock-exchange
MIT
2024-11-18T21:14:05.683201+00:00
1,555,221,881,000
270c02634d40dd9c8485bdfa8a0a375e41619620
3
{ "blob_id": "270c02634d40dd9c8485bdfa8a0a375e41619620", "branch_name": "refs/heads/master", "committer_date": 1555221881000, "content_id": "8db756ca16d8b65813a616ddf4a3362311987021", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fec619d74b55b0815266a2511b89dbfc1fd076c6", "extension": "py"...
2.71875
stackv2
import matplotlib.pyplot as plt import subprocess executables = ['clock', 'lru_aging', 'lru_counter', 'lru_stack'] for executable in executables: bashCommand = "./build/" + executable output = subprocess.check_output(['bash','-c', bashCommand]) output = output.split('\n')[:-1] x = [] y = [] ...
32
20.47
64
12
191
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_99acae786ad94178_5b099b4c", "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" ]
[ 9 ]
[ 9 ]
[ 14 ]
[ 65 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
graph.py
/benchmarks/graph.py
NK-Nikunj/Page-Replacement
Apache-2.0
2024-11-18T21:14:06.577860+00:00
1,684,497,112,000
1024b71fb546ac248468a771930b9611ede34a6c
2
{ "blob_id": "1024b71fb546ac248468a771930b9611ede34a6c", "branch_name": "refs/heads/master", "committer_date": 1684497112000, "content_id": "46660ad1d8593ec308d4f1642b9cd1bdcd75b56b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ca94071518d3cc097d711628ed82abbdc9202769", "extension": "py"...
2.375
stackv2
# Copyright (C) 2022 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
65
38.75
102
17
559
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_0e9ed94456c1548a_5dda1d70", "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" ]
[ 18 ]
[ 18 ]
[ 1 ]
[ 35 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
spirv_capabilities_parser.py
/vulkan_generator/vulkan_parser/internal/spirv_capabilities_parser.py
google/agi
Apache-2.0
2024-11-18T21:14:08.909510+00:00
1,578,565,091,000
9d66cf60c2d3d6dccae2bcbc173b53d46b20e0cf
2
{ "blob_id": "9d66cf60c2d3d6dccae2bcbc173b53d46b20e0cf", "branch_name": "refs/heads/master", "committer_date": 1578565091000, "content_id": "72ad803877bb8b3b96cd53f0281d8dd1ca5000d4", "detected_licenses": [ "MIT" ], "directory_id": "473da2c74f68f93f59ca799f2fcf441a59919496", "extension": "py", "fi...
2.40625
stackv2
from collections import namedtuple from contextlib import contextmanager from datetime import datetime from os import environ from titlecase import titlecase import argparse import html2text import logging import re from django.core.exceptions import ImproperlyConfigured from django import db logger = logging.getLog...
283
31.64
88
17
2,160
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_c7fdc3922cb695e1_34bc26cd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
16
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.p...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 123, 123, 134, 134, 144, 144, 166, 166, 171, 171, 189, 189, 192, 192, 193, 193 ]
[ 131, 131, 138, 138, 159, 159, 166, 166, 171, 171, 189, 189, 192, 192, 193, 193 ]
[ 9, 9, 9, 9, 9, 9, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17 ]
[ 10, 10, 10, 10, 10, 10, 85, 85, 51, 51, 36, 36, 78, 78, 58, 58 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01...
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
utils.py
/openprescribing/common/utils.py
WeakLemonDrink/openprescribing
MIT
2024-11-18T21:14:09.650674+00:00
1,519,393,753,000
4fb7205e62899a67712e5291cda44c28e2342c2a
3
{ "blob_id": "4fb7205e62899a67712e5291cda44c28e2342c2a", "branch_name": "refs/heads/master", "committer_date": 1519393753000, "content_id": "d475bd95ad96e08a9b0e78fc1f0e6d2406e25efa", "detected_licenses": [ "MIT" ], "directory_id": "a19a6ebf18f956be04c5319b5e3021b2d87ae044", "extension": "py", "fi...
2.640625
stackv2
#!/usr/bin/env python #### # # JOE SANDBOX EXTRACT SCORE SCRIPT # # Parses all XML reports within a directory and extracts the detection and score # import xml.etree.cElementTree as et import os, stat, sys, time import pickle import itertools import operator def main(): if len(sys.argv) == 2: evalDir(sy...
57
21.58
80
16
325
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_513bca01d53829d2_5ba49fd5", "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" ]
[ 10 ]
[ 10 ]
[ 1 ]
[ 36 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
extractscore.py
/src/extractscore.py
Weeshlow/scripts
MIT
2024-11-18T21:14:15.920433+00:00
1,504,168,930,000
c126ab848247d9d2485c28faca2ad9cab33a3cfa
3
{ "blob_id": "c126ab848247d9d2485c28faca2ad9cab33a3cfa", "branch_name": "refs/heads/master", "committer_date": 1504168930000, "content_id": "241bd996452afbfd6268000477f3c7096aec6354", "detected_licenses": [ "MIT" ], "directory_id": "bb440faedbc974d9670b0d9b74c6a2b1f1133b3e", "extension": "py", "fi...
2.6875
stackv2
import re import os import platform import pingparser from os.path import expanduser import tempfile import errno import hashlib import requests import miniupnpc SYNC_SERVER_URL = "http://localhost:8234" class Tools: def encrypt_file_name(self): return 1 def encrypt_bucket_name(self): return 1...
164
30.61
126
21
1,269
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_f297aa260755ddac_07759b5f", "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...
7
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 51 ]
[ 52 ]
[ 28 ]
[ 112 ]
[ "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" ]
tools.py
/UI/utilities/tools.py
396175371/storj_gui_client
MIT
2024-11-18T21:14:33.986600+00:00
1,585,853,191,000
5f2dce0928f8dedab7cd8c483142c855be94355d
3
{ "blob_id": "5f2dce0928f8dedab7cd8c483142c855be94355d", "branch_name": "refs/heads/master", "committer_date": 1585853191000, "content_id": "92136be20cce4f5f492f8f7bbd72f3caa2782973", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5ddd7751daa4ba02cfed5c0700b6c81292b60b3b", "extension": "py"...
2.703125
stackv2
# -*- coding: utf-8 -*- """ Created on Tue Aug 4 15:03:08 2015 REQUIRED: * neo4j community server v4+ * py2neo v4.3+ @author: sergey, comcon1 """ from py2neo import Graph from py2neo import Node from py2neo import Relationship class StuffNeo4j(): def __init__(self, nodelabel, reltype): sel...
153
31.97
98
14
1,247
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_1c7e1b692d9fd64a_e15d55e7", "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" ]
[ 35, 35, 40, 40, 45, 45 ]
[ 36, 36, 41, 41, 46, 46 ]
[ 13, 13, 13, 13, 13, 13 ]
[ 32, 32, 32, 32, 30, 30 ]
[ "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" ]
neo4jstuff.py
/neo4jstuff.py
sergey-zarealye-com/wordnet2neo4j
Apache-2.0
2024-11-18T21:14:34.708710+00:00
1,677,690,492,000
00524f03ad63f097fc2b183f400fa73cc3d956e5
2
{ "blob_id": "00524f03ad63f097fc2b183f400fa73cc3d956e5", "branch_name": "refs/heads/master", "committer_date": 1677690492000, "content_id": "70a48beb8254f1ca19a8a14abc2fcba0765ff736", "detected_licenses": [ "Apache-2.0" ], "directory_id": "58a9a6cdb9787866268a4d6ca49d9fa10f4f6c02", "extension": "py"...
2.328125
stackv2
from .natlog import natlog from .db import db from .unify import const_of #from Natlog.Parser import parse #from Natlog.Scanner import Int from sklearn.ensemble import RandomForestClassifier from sklearn.neural_network import MLPClassifier #from answerer import tsv2mat import numpy as np from sklearn.preprocessing im...
207
21.73
73
18
1,427
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_74f5622c12faeb25_6ce77ac6", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `eval_it` is de...
2
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 115 ]
[ 115 ]
[ 11 ]
[ 18 ]
[ "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" ]
natlearn.py
/bak/natlearn.py
ptarau/pypro
Apache-2.0
2024-11-18T21:14:35.003733+00:00
1,574,348,827,000
ee48a18912bcfe37f61a12f7c33a35c885e3ae38
3
{ "blob_id": "ee48a18912bcfe37f61a12f7c33a35c885e3ae38", "branch_name": "refs/heads/master", "committer_date": 1574348827000, "content_id": "0b7bf1ce0babd4d9579aa76d4668155d16d28ae2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "31ed390054f43cfec82db5d2dd55a0ced84c0800", "extension": "py"...
2.796875
stackv2
import sys import math import itertools from colorama import Fore, Style def med_dev(vals): med = sum(vals) / len(vals) dev = ((sum(abs(med - i) ** 2 for i in vals) / len(vals)) ** 0.5) return int(med), int(dev) def round_deviation(med_dev): med, dev = med_dev if dev < 1E-7: return med...
207
27.16
76
18
1,706
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_4c2c4e47fadef00a_8c1e48fa", "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-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 155, 159 ]
[ 155, 159 ]
[ 23, 15 ]
[ 34, 26 ]
[ "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" ]
io_py_result_processor.py
/scripts/postprocessing/io_py_result_processor.py
SofyaTavrovskaya/disk_perf_test_tool
Apache-2.0
2024-11-18T21:14:35.317098+00:00
1,687,111,332,000
bdba9af3d109f769c2d174efa3e43c51a6e94d3a
3
{ "blob_id": "bdba9af3d109f769c2d174efa3e43c51a6e94d3a", "branch_name": "refs/heads/master", "committer_date": 1687111332000, "content_id": "922d3f796f9d0406ff05ea9382177f0bc14fd9b0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "94aa1f239df81f7ff7b82efd4123fa9075de4b1e", "extension": "py"...
3.34375
stackv2
import nltk import pandas as pd import gensim from nltk.stem import WordNetLemmatizer from nltk.stem.porter import * import pickle from multiprocessing import freeze_support nltk.download('wordnet') if __name__ == '__main__': # add freeze support for multiprocessing LDA Multicore freeze_support() # use po...
87
37
114
15
790
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a14e75fe9c6d7e03_d8e5711c", "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...
7
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 36, 61, 62, 73, 74, 80 ]
[ 36, 61, 62, 73, 74, 80 ]
[ 9, 9, 9, 18, 18, 17 ]
[ 53, 58, 65, 62, 56, 50 ]
[ "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 `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
LDAModel.py
/TwitterModelingPython/LDAModel.py
PatrickKoss/TwitterTopicModeling
Apache-2.0
2024-11-18T21:14:37.055678+00:00
1,675,067,711,000
b67bb1c580683e17c7ccb9d173fecd110deba093
3
{ "blob_id": "b67bb1c580683e17c7ccb9d173fecd110deba093", "branch_name": "refs/heads/master", "committer_date": 1675067711000, "content_id": "8a69840882455cf98d49506619447654e3ecf6b6", "detected_licenses": [ "MIT" ], "directory_id": "5a01774b1815a3d9a5b02b26ca4d6ba9ecf41662", "extension": "py", "fi...
2.6875
stackv2
from django.shortcuts import render, redirect from django import forms from django.contrib.auth import authenticate, login # This line allows you to import the necessary functions of the authentication module. def page(request): if request.POST: # This line is used to check if the Form_connection form has been posted...
35
47.09
155
17
350
python
[{"finding_id": "semgrep_rules.python.django.security.injection.open-redirect_9100161236347886_9d09b7c3", "tool_name": "semgrep", "rule_id": "rules.python.django.security.injection.open-redirect", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Data from request ($DATA) is passed t...
2
true
[ "CWE-601", "CWE-601" ]
[ "rules.python.django.security.injection.open-redirect", "rules.python.django.security.injection.open-redirect" ]
[ "security", "security" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 19, 19 ]
[ 19, 19 ]
[ 6, 13 ]
[ 42, 42 ]
[ "A01:2021 - Broken Access Control", "A01:2021 - Broken Access Control" ]
[ "Data from request ($DATA) is passed to redirect(). This is an open redirect and could be exploited. Ensure you are redirecting to safe URLs by using django.utils.http.is_safe_url(). See https://cwe.mitre.org/data/definitions/601.html for more information.", "Data from request ($DATA) is passed to redirect(). Thi...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
connection.py
/Module 1/Chapter12/Work_manager/TasksManager/views/connection.py
PacktPublishing/Django-Web-Development-with-Python
MIT
2024-11-18T21:14:37.178333+00:00
1,472,312,753,000
16ffa97087cd0d97da2b8fb7880cb28cec1bbadd
3
{ "blob_id": "16ffa97087cd0d97da2b8fb7880cb28cec1bbadd", "branch_name": "refs/heads/master", "committer_date": 1472313602000, "content_id": "ad5f28200d841520e8121ad6c0c0407bd54814ac", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c9f3a222ab317ae69e2ced148a6d51610a4af477", "extension": "py"...
2.546875
stackv2
# -*- coding: utf-8 -*- import logging import subprocess from abc import ABCMeta from abc import abstractmethod from sys import stderr import return_codes from autologging import TRACE from autologging import traced from configuration import Configuration from git_commands import GitCommand logging.basicConfig(level=...
175
33.14
116
19
1,132
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_cb2f83a247e6d908_0ff988e3", "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" ]
[ 103, 104 ]
[ 103, 104 ]
[ 17, 17 ]
[ 83, 82 ]
[ "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" ]
worker.py
/src/worker.py
macisamuele/git-worker
Apache-2.0
2024-11-18T21:14:38.926325+00:00
1,524,495,351,000
ef13ab8fc1067f2e6952ece75616349d5c0d3b71
3
{ "blob_id": "ef13ab8fc1067f2e6952ece75616349d5c0d3b71", "branch_name": "refs/heads/master", "committer_date": 1524507270000, "content_id": "74c56ec09dd3c2fe699e25095650a1ad9a40d487", "detected_licenses": [ "MIT", "Apache-2.0" ], "directory_id": "5389e503feb7ffa0936ca11d543139919b555e1d", "exten...
2.859375
stackv2
import os import sys import ConfigParser import xml.dom.minidom class BlockInfoParser: """\brief Crawls blockmon's source tree for block files and creates a python file containing a dictionary of block types to core.block.BlockInfo objects. This script takes the root of the source tree...
225
41.78
108
24
2,018
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_271f5e2e279114ea_4250c275", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
3
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 4 ]
[ 4 ]
[ 1 ]
[ 23 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
blockinfoparser.py
/docker/d-streamon-master/d-streamon/streamon/daemon/core/blockinfoparser.py
scissor-project/open-scissor
MIT,Apache-2.0
2024-11-18T21:14:41.298456+00:00
1,693,082,372,000
28ff5061a88cd11f764a7f83370f076362fb23f8
3
{ "blob_id": "28ff5061a88cd11f764a7f83370f076362fb23f8", "branch_name": "refs/heads/main", "committer_date": 1693083719000, "content_id": "11b9b6e1b787d50671d211d24b801cd50e769434", "detected_licenses": [ "MIT" ], "directory_id": "6950d17118b97259e181cfc1e6ba3becf6fab753", "extension": "py", "file...
3.140625
stackv2
"""Jupyter notebook to Markdown and back, using Pandoc""" import os import subprocess import tempfile from functools import partial # Copy nbformat reads and writes to avoid them being patched in the contents manager!! from nbformat import reads as ipynb_reads from nbformat import writes as ipynb_writes from .parse_...
132
29.89
109
16
990
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_39ee743e4cf43e05_3f2692d1", "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" ]
[ 32 ]
[ 32 ]
[ 12 ]
[ 57 ]
[ "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" ]
pandoc.py
/jupytext/pandoc.py
mwouts/jupytext
MIT
2024-11-18T21:14:42.847341+00:00
1,566,304,628,000
907b27af438bd2c78db123bb6762db29cd93e7cb
2
{ "blob_id": "907b27af438bd2c78db123bb6762db29cd93e7cb", "branch_name": "refs/heads/master", "committer_date": 1566304628000, "content_id": "30a3137c315bc893ce1daef1e3749b151156aa48", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7385124cee58d817f9094facd4d338a1a178a98b", "extension": "py"...
2.328125
stackv2
import pdb import os import json import argparse from lxml.etree import Element, SubElement, tostring, ElementTree from xml.dom.minidom import parseString import pickle json_path = "/home/junjie/Code/tianchi/guangdong/guangdong1_round1_train1_20190818/Annotations/anno_train.json" output_dir = "/home/junjie/Code/tianch...
69
34.61
111
13
675
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_dc26f9e6beb1ed9d_54402c59", "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-611", "CWE-502" ]
[ "rules.python.lang.security.use-defused-xml", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "MEDIUM" ]
[ 6, 18 ]
[ 6, 18 ]
[ 1, 17 ]
[ 40, 36 ]
[ "A04:2017 - XML External Entities (XXE)", "A08:2017 - Insecure Deserialization" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.", "Avoid using `pickle`, which is known to lead to code execu...
[ 7.5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
json2voc.py
/prepocess/json2voc.py
fregulationn/mmdetection
Apache-2.0
2024-11-18T20:10:31.599780+00:00
1,551,727,492,000
a8d0945799acfe6fb706ff63b254c3feafd96fd2
3
{ "blob_id": "a8d0945799acfe6fb706ff63b254c3feafd96fd2", "branch_name": "refs/heads/master", "committer_date": 1551727492000, "content_id": "7f0a44b5941551750c1220d92f38dd283197925c", "detected_licenses": [ "MIT" ], "directory_id": "23fce9135a95b9fe058e7b9b1d9337191b066a37", "extension": "py", "fi...
3.328125
stackv2
"""Parser module. Contains tools for parsing the various PAF Mainfile component files. The Address File is the main source tying together the other components, containing each address within the UK through reference to the other component files. Each line in the Address File is 88 characters long, and is construct...
178
37.43
79
23
1,437
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_90368eaef999c817_391eb9fa", "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-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 174 ]
[ 174 ]
[ 23 ]
[ 64 ]
[ "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
files_parser.py
/paf_tools/populate/files_parser.py
osgirl/paf-tools
MIT
2024-11-18T20:10:34.851509+00:00
1,693,456,282,000
bf475b44e3b948a36a8c92524a694c30ce16868e
2
{ "blob_id": "bf475b44e3b948a36a8c92524a694c30ce16868e", "branch_name": "refs/heads/main", "committer_date": 1693456282000, "content_id": "1ad53081217420ef60add79a86f2d587449d321e", "detected_licenses": [ "MIT" ], "directory_id": "977f7a7386899a5d0152b29b57ec26682b430437", "extension": "py", "file...
2.484375
stackv2
#!/usr/bin/env python2 # IMPORTANT: This will run using Python 2 still! import datetime import json import os import subprocess import sys import yaml def write_gemini_config(config, config_file): with open(config_file, 'w') as fo: yaml.dump(config, fo, allow_unicode=False, default_flow_style=False) ...
108
34.02
79
17
880
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_6096c2e357187d93_2b00c483", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 95 ]
[ 95 ]
[ 9 ]
[ 51 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
data_manager_gemini_download.py
/data_managers/data_manager_gemini_database_downloader/data_manager/data_manager_gemini_download.py
galaxyproject/tools-iuc
MIT
2024-11-18T20:10:38.604125+00:00
1,431,294,287,000
881dbe4ca14009f7904d4f2bdc2402a83617596e
3
{ "blob_id": "881dbe4ca14009f7904d4f2bdc2402a83617596e", "branch_name": "refs/heads/master", "committer_date": 1431294287000, "content_id": "9dbc3fff45945d4ad63e8f7db36fa0f4893a7ba2", "detected_licenses": [ "MIT" ], "directory_id": "fce812e4b5c86e808ae685e6837c023f686de4e4", "extension": "py", "fi...
2.5625
stackv2
''' Request (set serializer in `handle`) -> Resource -> Data -> Presentor (set response type in `build_response`, inject hypermedia in `serialize`) -> Normalizer (globalized preparer) -> Serializer ''' import mimeparse from collections import namedtuple from django.http import HttpResponse from restless.seriali...
138
34.94
112
14
1,050
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_4e5fbe31a088d469_43d15dee", "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" ]
[ 58 ]
[ 58 ]
[ 20 ]
[ 68 ]
[ "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" ]
presentors.py
/restmore/presentors.py
zbyte64/python-restmore
MIT
2024-11-18T20:10:39.578502+00:00
1,530,622,070,000
4c09b5880849b3be171bd582b88fb30c4b5ab918
3
{ "blob_id": "4c09b5880849b3be171bd582b88fb30c4b5ab918", "branch_name": "refs/heads/master", "committer_date": 1530622070000, "content_id": "e695b0ef591160a2e972b5af447f57bc197610a6", "detected_licenses": [ "MIT" ], "directory_id": "99bf7e47e805914f88159437cf03eb1a9d0ccb69", "extension": "py", "fi...
2.609375
stackv2
import xml.etree.ElementTree as ET import pickle import os from os import listdir, getcwd from os.path import join import sys import re import random classes = ["box_normal", "box_score", "chessman"] prop = 1.0 def convert(size, box): dw = 1./size[0] dh = 1./size[1] x = (box[0] + box[1])/2.0 y = (box[...
77
25.86
144
16
618
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_b702e4be6d64424f_78966bcb", "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" ]
[ 1, 29 ]
[ 1, 29 ]
[ 1, 12 ]
[ 35, 29 ]
[ "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" ]
voc_label_tiao.py
/tiao_tools/voc_label_tiao.py
cooli7wa/keras-yolo3
MIT
2024-11-18T20:10:46.913833+00:00
1,640,629,747,000
24677f22fa90565234a827010f7be752a9a647c5
2
{ "blob_id": "24677f22fa90565234a827010f7be752a9a647c5", "branch_name": "refs/heads/master", "committer_date": 1640629747000, "content_id": "536f862d7ac33a457a4635ae2f13e7746bbc8732", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "aceb7d4a721fb4aa36a1efe6a603ca5ad584e751", "extension": "p...
2.359375
stackv2
from rdflib.graph import ConjunctiveGraph, URIRef from rdflib.namespace import RDF, OWL, DCTERMS from rdflib import util as rdflib_util from xml.sax import SAXParseException import argparse import re import logging logger = logging.getLogger(__name__) def main(): parser = argparse.ArgumentParser( descrip...
138
31.48
76
15
1,054
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_625eb1e8399becc5_49ea8170", "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 ]
[ 38 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
add-properties2turtle.py
/scripts/add-properties2turtle.py
monarch-initiative/dipper
BSD-3-Clause
2024-11-18T20:10:47.682966+00:00
1,509,972,463,000
3d303cfcb33d128ae4e7f8b36a28cf62385a69ca
3
{ "blob_id": "3d303cfcb33d128ae4e7f8b36a28cf62385a69ca", "branch_name": "refs/heads/master", "committer_date": 1509972463000, "content_id": "051a9b51d61dc5ac399f99190e5600d19b6cff54", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "cbefadeb6433a6ce0a85056c1e5df738192bf629", "extension": "p...
2.71875
stackv2
# Author: F. Alex Wolf (http://falexwolf.de) # T. Callies """Exporting to formats for other software. """ import numpy as np import os import json import pdb from math import inf from .data_structs.data_graph import add_or_update_graph_in_adata from scipy.sparse import issparse def save_spring_dir(adata, k, ...
214
41.41
134
20
2,195
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.python-debugger-found_1c4ee88a4dd48b8e_f0bfa4a7", "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;...
7
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 55, 90 ]
[ 55, 90 ]
[ 5, 5 ]
[ 44, 60 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
exporting.py
/scanpy/exporting.py
M0hammadL/scanpy
BSD-3-Clause
2024-11-18T20:10:47.912976+00:00
1,434,144,825,000
a64583568debcd7fb768ecb0227b500b9cefade5
3
{ "blob_id": "a64583568debcd7fb768ecb0227b500b9cefade5", "branch_name": "refs/heads/master", "committer_date": 1434144825000, "content_id": "d9480c0cd19a54be62afc8f0164f4030b861c0e3", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "f869bdf871c834eaa502fa113c3ee495f66f8ef1", "extension": "p...
2.78125
stackv2
# Authors: Jake VanderPlas # License: BSD __all__ = ['LinearRegression', 'Ridge', 'Lasso'] import inspect import types import imp import numpy as np from sklearn import linear_model as sklearn_linear_model from .base import BaseEstimator class LinearModel(BaseEstimator): """Base class for Linear regression wi...
149
32.04
79
19
1,188
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_cad3fbca5dba5b41_db43a804", "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" ]
[ 122 ]
[ 122 ]
[ 5 ]
[ 33 ]
[ "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" ]
linear_model.py
/siglearn/linear_model.py
erichseamon/siglearn
BSD-2-Clause
2024-11-18T20:10:48.788542+00:00
1,599,158,272,000
6834a1792c7dc2337520cbc8e653cf351a23c340
2
{ "blob_id": "6834a1792c7dc2337520cbc8e653cf351a23c340", "branch_name": "refs/heads/master", "committer_date": 1599158272000, "content_id": "d02ec4c5eed60e03b2d1a4bf7f3e6c68255ca956", "detected_licenses": [ "MIT" ], "directory_id": "27b60c59ae5fe8d3a81a4a44485618e891ff0e34", "extension": "py", "fi...
2.3125
stackv2
import os import time import sys import threading import pygame,sys from pygame.locals import * from time import ctime, sleep pygame.init() screen=pygame.display.set_mode((320,240),0,32) pygame.key.set_repeat(100) def runFocus(func): temp_val = 512 while True: for event in pygame.event.get(): if event.type ==KEY...
47
25.23
63
18
384
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_9c3a7bb5ffd78907_e815d2df", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 28, 38 ]
[ 28, 38 ]
[ 15, 15 ]
[ 64, 64 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
motorizedfocuscamerapreview.py
/References/motorizedfocuscamerapreview.py
vmendivil/pi-timelapse
MIT
2024-11-18T20:10:49.843211+00:00
1,577,173,776,000
425a2b878e391f066a7e8d97d473ae807f620562
3
{ "blob_id": "425a2b878e391f066a7e8d97d473ae807f620562", "branch_name": "refs/heads/master", "committer_date": 1577173776000, "content_id": "9a3add6b0ab3c9e1633eb2db8331042b0aae8ff4", "detected_licenses": [ "MIT" ], "directory_id": "f2475329a1924b82704d0fe3d52f1f9cbc5a94d6", "extension": "py", "fi...
2.828125
stackv2
import psycopg2 import sys def q5(conn,key): cur = conn.cursor() query = ''' select ct.name as type, c.tag, ce.num, c.quota from classes c join classEnroll ce on c.id = ce.class_id join classtypes ct on ct.id = c.type_id join courses cr on cr.id = c.course_id join subjects s on cr.subject_id = ...
45
23.33
81
13
336
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_b5eb2eedd451c65b_48173102", "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" ]
[ 16, 16 ]
[ 16, 16 ]
[ 3, 3 ]
[ 21, 21 ]
[ "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" ]
q5.py
/ass/ass3/q5.py
GaryccOps/cs3311
MIT
2024-11-18T20:10:52.618210+00:00
1,577,084,809,000
6dc3075c79644f9f1fbf92635a11f10198043508
3
{ "blob_id": "6dc3075c79644f9f1fbf92635a11f10198043508", "branch_name": "refs/heads/master", "committer_date": 1577084809000, "content_id": "1343e02a8329067847cf1517d854cb643fd13a30", "detected_licenses": [ "MIT" ], "directory_id": "309391b8e1510a8e549590301188beb3306d2807", "extension": "py", "fi...
2.515625
stackv2
""" SpellCheck Module for Spellcheckapp. Contains spell check related views. All responses are constructed with security headers. """ import subprocess import tempfile from shlex import quote from flask import ( Blueprint, current_app, flash, g, make_response, render_template ) from spellcheckapp import db from ...
166
36.78
156
20
1,361
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7da4c129a5a16548_2cd23442", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 72 ]
[ 72 ]
[ 28 ]
[ 142 ]
[ "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" ]
spellcheck.py
/spellcheckapp/spellcheck/spellcheck.py
kratel/nyu_appsec_a2
MIT