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-18T23:26:07.816086+00:00 | 1,546,767,646,000 | b9106352396dbde94174cc9467eea8528030cae6 | 3 | {
"blob_id": "b9106352396dbde94174cc9467eea8528030cae6",
"branch_name": "refs/heads/master",
"committer_date": 1546767646000,
"content_id": "e69e67d259938c8ebc95410acce6dc9dd732c4d2",
"detected_licenses": [
"MIT"
],
"directory_id": "280d0ecf0e88d6cb377d525ae895c404a4d8f04e",
"extension": "py",
"fi... | 2.515625 | stackv2 | # coding: utf-8
from flask import Blueprint, current_app, make_response
from flask_wtf import csrf
# 提供静态文件的蓝图
html = Blueprint("web_html", __name__)
# 127.0.0.1:5000/
# 127.0.0.1:5000/index.html
# 127.0.0.1:5000/register.html
# 127.0.0.1:5000/favicon.ico # 浏览器认为的网站标识,浏览器会自己请求这个资源
@html.route("/<re(r'.*'):html_fil... | 34 | 23.74 | 70 | 11 | 292 | python | [{"finding_id": "semgrep_rules.python.flask.security.audit.xss.make-response-with-unknown-content_568bedfe58438c35_67865248", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "... | 2 | true | [
"CWE-79",
"CWE-614"
] | [
"rules.python.flask.security.audit.xss.make-response-with-unknown-content",
"rules.python.flask.security.audit.secure-set-cookie"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
29,
32
] | [
29,
32
] | [
12,
5
] | [
71,
46
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A05:2021 - Security Misconfiguration"
] | [
"Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"LOW"
] | web_html.py | /ihome/web_html.py | huashanqitu/iHome-python | MIT | |
2024-11-18T23:26:10.328196+00:00 | 1,535,424,066,000 | 8ad5aca33757b5906dfb489ea3e3aef4977e26f8 | 2 | {
"blob_id": "8ad5aca33757b5906dfb489ea3e3aef4977e26f8",
"branch_name": "refs/heads/master",
"committer_date": 1535424066000,
"content_id": "f75ff1ed4fa5891e1b0a0d6c9fe7e1fc64bb8e4d",
"detected_licenses": [
"MIT"
],
"directory_id": "874271b0c0d270eb53ae2bc288df71e795992cf5",
"extension": "py",
"fi... | 2.328125 | stackv2 | ###############################################################################
# File Name : jackhmmer_runner.py
# Created By : Qing Ye
# Creation Date : [2016-04-17 22:30]
# Last Modified : [2017-11-15 18:54]
# Description :
############... | 188 | 35.08 | 96 | 19 | 1,597 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_7f2133957775a9fb_6458af13", "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... | 11 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
90,
185
] | [
90,
185
] | [
9,
9
] | [
58,
60
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess functi... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | jackhmmer_runner.py | /data-processing/jackhmmer_runner.py | kad-ecoli/deepcontact | MIT | |
2024-11-18T23:26:12.244157+00:00 | 1,514,634,764,000 | dfab07601c9490c32cae2ef44fa0f21dc5dfa009 | 2 | {
"blob_id": "dfab07601c9490c32cae2ef44fa0f21dc5dfa009",
"branch_name": "refs/heads/master",
"committer_date": 1514634764000,
"content_id": "0925b65b4f7322cfffd30e2fe039f26daf98035c",
"detected_licenses": [
"MIT"
],
"directory_id": "3afba939b4bf4281961cbf67d26e508f08f446f6",
"extension": "py",
"fi... | 2.4375 | stackv2 | import tensorflow as tf
import numpy as np
import pickle
# var_list is returned by the policy.
# Thus, they should be the same. I assume.
def saveToFlat(var_list, param_pkl_path):
# get all the values
var_values = np.concatenate([v.flatten() for v in tf.get_default_session().run(var_list)])
pickle.dump(var... | 31 | 37.13 | 94 | 16 | 301 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3163a1683707b5f0_3f76cf46", "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"
] | [
10,
14
] | [
10,
14
] | [
5,
18
] | [
56,
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"
] | ppo_utils.py | /baselines/ppo1/ppo_utils.py | NoListen/baselines | MIT | |
2024-11-18T23:26:12.650975+00:00 | 1,473,249,518,000 | 4c02a39afaa2a8d819b22ad0af345411da5d8080 | 3 | {
"blob_id": "4c02a39afaa2a8d819b22ad0af345411da5d8080",
"branch_name": "refs/heads/master",
"committer_date": 1473249518000,
"content_id": "8bdda8df7af817391e3696ec342b48fbe337f934",
"detected_licenses": [
"MIT"
],
"directory_id": "04df72e91cf680dc775dabb8415aa5cd4708f460",
"extension": "py",
"fi... | 2.53125 | stackv2 | #encoding: utf-8
import psycopg2
import ppygis
import datetime
import string
import sys
reload(sys)
#中文错误
sys.setdefaultencoding( "utf-8" )
#postgis
pgisCon = psycopg2.connect(database="gis_database",user="postgres",password="postgres",host="localhost",port="5432")
pgisCursor = pgisCon.cursor()
pgisCursor.execute("cre... | 65 | 39.4 | 161 | 13 | 841 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_83a43a044450a1b6_7e7e941a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 3 | true | [
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.lang.security.audit.sqli.psycopg-sqli",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"HIGH"
] | [
41,
41,
41
] | [
41,
41,
41
] | [
9,
9,
9
] | [
33,
33,
33
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Detected string concatenation with a non-literal variable in a psycopg2 Python SQL statement. This could lead to SQL injection if the variable is user-controlled and not properly sanitized. In order to prevent SQL injection, use paramet... | [
5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | dataToPost.py | /disk/dataToPost.py | lzxleslie/Hgis_program | MIT | |
2024-11-18T23:26:13.794794+00:00 | 1,561,008,925,000 | 18bb55384b57358909914a6cdb95a3649cee26af | 4 | {
"blob_id": "18bb55384b57358909914a6cdb95a3649cee26af",
"branch_name": "refs/heads/master",
"committer_date": 1561008925000,
"content_id": "003060344ae3d6020d9e14b5ee4965ff221f72e2",
"detected_licenses": [
"MIT"
],
"directory_id": "0959d88eb8e1ab579dec7eb4bfc1fbaac945ea0b",
"extension": "py",
"fi... | 3.5 | stackv2 | #!/usr/bin/env python
"""
Parse an XML document with SAX. Display info about each element.
Usage:
python sax_report.py infilename
Examples:
python sax_report.py people.xml
"""
import sys
from xml.sax import make_parser, handler
class TestHandler(handler.ContentHandler):
def __init__(self):
se... | 132 | 26.28 | 84 | 13 | 836 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_83804650482f2f12_96b2bcc8", "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"
] | [
14
] | [
14
] | [
1
] | [
41
] | [
"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"
] | sax_report.py | /Training/2014-0110-training/Code_python/Xml/Solutions/sax_report.py | mike03052000/python | MIT | |
2024-11-18T23:26:14.035177+00:00 | 1,629,277,611,000 | 9848b42fd6e0eb5e48cc59189d766b686a750025 | 3 | {
"blob_id": "9848b42fd6e0eb5e48cc59189d766b686a750025",
"branch_name": "refs/heads/main",
"committer_date": 1629277611000,
"content_id": "098e584d3c8f3cd205f50940710874e317b4c082",
"detected_licenses": [
"MIT"
],
"directory_id": "4083048761d16cbbe46dcb1ca5300ef9d772ea33",
"extension": "py",
"file... | 2.984375 | stackv2 | """
微信聊天记录截图
连接手机 使用命令符的adb截图
主要功能是滚动屏幕并截图,同时把图片传到电脑
"""
import os
import time
from PIL import Image
def execute(cmd):
adbstr = 'adb {}'.format(cmd)
print(adbstr)
os.system(adbstr)
if __name__ == '__main__':
i = 999
savedir = r'/Users/Gavin/Desktop/20210805微信聊天记录导出备份/聊天记录分析_pyhton/screen/'
... | 44 | 23.41 | 79 | 15 | 361 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_cb901569a75f7dd2_f2a6966d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 2 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
15
] | [
15
] | [
5
] | [
22
] | [
"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"
] | 微信聊天记录截图.py | /微信聊天记录截图.py | papa-cmd/WeChat-chat-history-analysis | MIT | |
2024-11-18T23:26:15.237856+00:00 | 1,633,098,404,000 | d4b8178f57c8b2ab72789349dccac59cfc680364 | 3 | {
"blob_id": "d4b8178f57c8b2ab72789349dccac59cfc680364",
"branch_name": "refs/heads/main",
"committer_date": 1633098404000,
"content_id": "a7400ad36b4790431a613402336f89cf948f09c8",
"detected_licenses": [
"MIT"
],
"directory_id": "c315ef0af954a4b6932d4a759e8988e35547d497",
"extension": "py",
"file... | 3.203125 | stackv2 | import pickle
import inflection
import pandas as pd
import numpy as np
import math
import datetime
class Rossmann(object):
def __init__(self):
self.competition_distance_scaler = pickle.load(open('/Users/Igor/repos/Data-Science-Em-Producao/parameter/competition_distance_scaler.pkl', 'rb'))
se... | 263 | 51.88 | 158 | 18 | 3,581 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_eadb86e28e841489_85cca853", "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",
"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"
] | [
11,
12,
13,
14,
15
] | [
11,
12,
13,
14,
15
] | [
46,
46,
46,
46,
46
] | [
157,
159,
152,
141,
147
] | [
"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"
] | Rossmann.py | /Data-Science-Em-Producao/webapp/rossmann/Rossmann.py | IgorQueiroz32/Data_Science_Em_Producao | MIT | |
2024-11-18T23:26:20.302162+00:00 | 1,614,181,199,000 | 3535bc81c9953ab51ebc10bc658c435c2d0825b7 | 3 | {
"blob_id": "3535bc81c9953ab51ebc10bc658c435c2d0825b7",
"branch_name": "refs/heads/master",
"committer_date": 1614181199000,
"content_id": "658e3d547a262fe1bc0663417590ff6cbe42602d",
"detected_licenses": [
"Python-2.0",
"MIT"
],
"directory_id": "50008b3b7fb7e14f793e92f5b27bf302112a3cb4",
"exten... | 3 | stackv2 | #!/usr/bin/env python
from __future__ import generators
from xml.dom import Node
from Ft.Xml.Domlette import NonvalidatingReader, PrettyPrint
def in_order_iterator_filter(node, filter_func):
if filter_func(node):
yield node
for child in node.childNodes:
for cn in in_order_iterator_filter(child... | 88 | 31.94 | 72 | 16 | 649 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_985d7e62853cf366_2f991472", "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
] | [
25
] | [
"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"
] | recipe-135131.py | /recipes/Python/135131_Merging_XBEL_Bookmark_files/recipe-135131.py | betty29/code-1 | Python-2.0,MIT | |
2024-11-18T22:48:25.710740+00:00 | 1,426,889,047,000 | 2582f11786bff99ad9ba0726ac40fd2261a3178d | 2 | {
"blob_id": "2582f11786bff99ad9ba0726ac40fd2261a3178d",
"branch_name": "refs/heads/master",
"committer_date": 1426889047000,
"content_id": "f408cb1306fd5859b6c1900caa6e66f367d21d59",
"detected_licenses": [
"MIT"
],
"directory_id": "9e2ada410ee1d79ec24a630802b7b48f7650a80c",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/opt/splunk/bin/python
import os
import sys
from credentialsFromSplunk import *
import logging as logger
import time
from gsheet import spreadsheet
__author__ = "george@georgestarcher.com (George Starcher)"
_MI_APP_NAME = 'Alert-To-GoogleSpreadsheet'
#SYSTEM EXIT CODES
_SYS_EXIT_FAILED_SPLUNK_AUTH = 7
_SYS_EXIT_FA... | 134 | 29.78 | 156 | 15 | 1,021 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_5229a3651e226cc5_a4252eed", "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"
] | [
50
] | [
50
] | [
5
] | [
32
] | [
"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"
] | alert_to_gsheet.py | /GoogleSpreadsheet/alert_to_gsheet.py | layamba25/Splunk-Alert | MIT | |
2024-11-18T22:27:18.100124+00:00 | 1,634,716,431,000 | 96c7416a861a32273487e8fa3dff36f5581bfc5a | 3 | {
"blob_id": "96c7416a861a32273487e8fa3dff36f5581bfc5a",
"branch_name": "refs/heads/main",
"committer_date": 1634716431000,
"content_id": "e95bc62e564d121c6c8b7b800f0073c0c5400d41",
"detected_licenses": [
"MIT"
],
"directory_id": "e42837b51e9b590efc118614d8f6b2f6101a9cd1",
"extension": "py",
"file... | 2.765625 | stackv2 | """helper wrapper module for solving LTL formulas with aalta"""
import os.path as path
import subprocess
import re
from tgan_sr.utils import ltl_parser
DEFAULT_BINARY_PATH = "bin"
def solve_ltl(formula_obj, timeout=None, binary_path=DEFAULT_BINARY_PATH):
formula_str = formula_obj.rewrite(ltl_parser.Token.WEAKU... | 38 | 39.42 | 164 | 14 | 378 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_7c8049b0bdf6226d_3895b11a", "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"
] | [
25
] | [
25
] | [
15
] | [
165
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | ltl.py | /impl/tgan_sr/data_generation/ltl.py | reactive-systems/TGAN-SR | MIT | |
2024-11-18T22:27:26.733738+00:00 | 1,680,231,626,000 | 1c363536a493271169a15ef5e60b1a4d087cde47 | 2 | {
"blob_id": "1c363536a493271169a15ef5e60b1a4d087cde47",
"branch_name": "refs/heads/master",
"committer_date": 1680231626000,
"content_id": "bae17d4745e8f5d9628a224e98ebcf55ec3939f4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8824e5cded4a0dffce2cd4b8809fa495ee27d484",
"extension": "py"... | 2.421875 | stackv2 | import os
import sys
import can
import time
import threading
import random
from ...core.event_base import EventBase
def parse_wheel_speed(data):
'''
Parse WHEEL_SPEEDS info from Toyota Corolla.
in: CAN msg
out: in [km/h]
WHEEL_SPEED_FR
WHEEL_SPEED_FL
WHEEL_SPEED_RR
WHE... | 128 | 26.91 | 84 | 13 | 1,052 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_a9691317a94278d9_49f6d341", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 3 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
92,
94,
97
] | [
92,
95,
97
] | [
9,
9,
9
] | [
68,
47,
66
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | odometer_listener.py | /src/aceinna/devices/widgets/odometer_listener.py | Aceinna/python-openimu | Apache-2.0 | |
2024-11-18T22:27:28.428605+00:00 | 1,288,809,156,000 | 2b87783d8d3c864e1f865a135804f9a5bf17c0ef | 3 | {
"blob_id": "2b87783d8d3c864e1f865a135804f9a5bf17c0ef",
"branch_name": "refs/heads/master",
"committer_date": 1288809156000,
"content_id": "63f229ff3397399ecb7403c7b3be0ee2082ce3f5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f3f115145ac02c8ed685d9c83b430c74c8331729",
"extension": "py"... | 2.734375 | stackv2 | from base import make_main, Daemon
import os, subprocess, signal, time
def create_wrapper_class(script_path, daemon_name=None, script_args=(), autorestart=0):
if autorestart:
autorestart = int(autorestart)
class WrapperDaemon(Daemon):
name = daemon_name or os.path.basename(script_path).split("... | 62 | 32.63 | 127 | 20 | 413 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_71ed8a2c13882041_e2a48d51", "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"
] | [
19
] | [
19
] | [
32
] | [
104
] | [
"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"
] | wrapper.py | /src/py/daemonhelper/wrapper.py | blamarvt/python-daemonhelper | Apache-2.0 | |
2024-11-18T22:27:34.133521+00:00 | 1,559,576,371,000 | 74a2cc7d6f23abe633d99e34f6d76f56ae615e02 | 3 | {
"blob_id": "74a2cc7d6f23abe633d99e34f6d76f56ae615e02",
"branch_name": "refs/heads/master",
"committer_date": 1559576371000,
"content_id": "df91e2c3e5521d4b5ce7c712c97fad206cd5638a",
"detected_licenses": [
"MIT"
],
"directory_id": "1e364d28a65e1c54476f30956cf4c09371b3ac86",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/python
# coding: utf-8
# ---------------------------------------------------------------------------------------------------------------------
#
# Florida International University
#
# This software is a "Camilo Valdes Work" under the terms of the United States Copyrig... | 203 | 34.7 | 119 | 18 | 1,768 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_9dfa3c13558b6120_a4b8e507", "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"
] | [
184
] | [
184
] | [
23
] | [
94
] | [
"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"
] | provision_index.py | /provision_index.py | VonRosenchild/flint | MIT | |
2024-11-18T22:27:35.003531+00:00 | 1,590,502,645,000 | 8b12dca4563ed820af48c1ef3f4b4b487c77a089 | 2 | {
"blob_id": "8b12dca4563ed820af48c1ef3f4b4b487c77a089",
"branch_name": "refs/heads/master",
"committer_date": 1590502645000,
"content_id": "8ab1bdcf1a44d6e68062550f37f6dbbd864b4048",
"detected_licenses": [
"MIT"
],
"directory_id": "05585e9ae26be3751f96e4bd7f2d976d624ad214",
"extension": "py",
"fi... | 2.453125 | stackv2 | import mysql.connector
import re
from bs4 import BeautifulSoup
def processtext(data):
if data is not None:
if 'mlang' in data:
data = re.findall('\{mlang\sfr\}(.*?)\{mlang\}', data)
data = " ".join(data)
else:
data = ""
return data
db = mysql.connector.connect(
h... | 55 | 27.04 | 179 | 16 | 403 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_fba016a6cdc6f548_985b3a3c", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc... | 2 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
38,
54
] | [
38,
54
] | [
5,
5
] | [
26,
32
] | [
"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"
] | tools.py | /tools.py | samuelcalegari/contentManager | MIT | |
2024-11-18T22:27:38.130406+00:00 | 1,551,251,246,000 | 7635bc0bc0639cc383f6a98dbf55d1e3a538754c | 3 | {
"blob_id": "7635bc0bc0639cc383f6a98dbf55d1e3a538754c",
"branch_name": "refs/heads/master",
"committer_date": 1551251246000,
"content_id": "f5afc0264eb649944a6b65b29dffec80d7a36066",
"detected_licenses": [
"MIT"
],
"directory_id": "80de9bccb9225b8192003cd433271ecd8d7ed6c8",
"extension": "py",
"fi... | 2.59375 | stackv2 | #create flask_app file
import json
import os
from flask import Flask,jsonify,request
from flask_cors import CORS
import pickle
import numpy as np
app = Flask(__name__)
CORS(app)
@app.route("/cuspredict/",methods=['GET','POST'])
def predict():
creditscore = float(request.args.get('creditscore'))
geography = req... | 59 | 27.12 | 158 | 13 | 420 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.nan-injection_e84cdea86f9d6503_a228e327", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.nan-injection", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found user input going directly into type... | 9 | true | [
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-704",
"CWE-502",
"CWE-502"
] | [
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.injection.nan-injection",
"rules.python.flask.security.in... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | [
13,
16,
17,
18,
19,
20,
21,
47,
47
] | [
13,
16,
17,
18,
19,
20,
21,
47,
47
] | [
19,
11,
14,
15,
17,
22,
23,
17,
17
] | [
57,
41,
47,
49,
53,
63,
65,
36,
36
] | [
"",
"",
"",
"",
"",
"",
"",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
5
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | customer_predictor_flask_app.py | /api/customer_predictor_flask_app.py | Vkrntkmrsngh/Machine-Learning-Training | MIT | |
2024-11-18T22:27:41.776600+00:00 | 1,573,720,223,000 | 1ec6c11870cf17f1b061a1826cb3ca0f786d5e03 | 2 | {
"blob_id": "1ec6c11870cf17f1b061a1826cb3ca0f786d5e03",
"branch_name": "refs/heads/master",
"committer_date": 1573720223000,
"content_id": "e7936863222d502c5e5d76855ebd1d531ad4d5f1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c4944e68f2b435753e9e5a0db70e709f437950ed",
"extension": "py"... | 2.390625 | stackv2 | """
"""
import os
import gc
import xml.etree.ElementTree as etxml
import random
import skimage.io
import skimage.transform
import numpy as np
import tensorflow as tf
import ssd300
import time
import cv2
from dataset.Dataset import Dataset
'''
SSD检测
'''
batch_size = 1
class_size=22
graph_config = 'dsod'
dataset = Da... | 128 | 32.3 | 122 | 37 | 1,057 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_26a29a0e072e33cd_73819dd7", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
6
] | [
6
] | [
1
] | [
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"
] | main.py | /main.py | elbert-lau/DSOD-SSD-tensorflow | Apache-2.0 | |
2024-11-18T22:27:42.083330+00:00 | 1,549,987,316,000 | 6429f521db0ccdd2e71081f8d5a52bbcc7af7715 | 2 | {
"blob_id": "6429f521db0ccdd2e71081f8d5a52bbcc7af7715",
"branch_name": "refs/heads/master",
"committer_date": 1549987316000,
"content_id": "734f51b03525923d25f539713bb7207112f22b28",
"detected_licenses": [
"MIT"
],
"directory_id": "320b49883166ec5df361a486c2adc12179ec00c3",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
mm.tinker.py
============
Garleek - Tinker bridge
"""
from __future__ import print_function, absolute_import, division
import os
import sys
import shutil
from distutils.spawn import find_executable
from subprocess import check_output
from tempfile import NamedTempora... | 263 | 34.23 | 93 | 21 | 2,338 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_8186ccf650feca5e_0d0d64a3", "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... | 11 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-tainted-env-args",
"rules.python.lang... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
210,
210,
222,
222,
231,
231
] | [
210,
210,
222,
222,
231,
231
] | [
26,
39,
26,
39,
26,
39
] | [
47,
46,
47,
46,
47,
46
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM"
] | tinker.py | /garleek/mm/tinker.py | pk-organics/garleek | MIT | |
2024-11-18T22:14:47.718717+00:00 | 1,510,718,460,000 | 38919d4b9aaa48936c3ea849af56046182d432e5 | 2 | {
"blob_id": "38919d4b9aaa48936c3ea849af56046182d432e5",
"branch_name": "refs/heads/master",
"committer_date": 1510718460000,
"content_id": "76aab2787e9d918bcc19801341c18ebbffc79701",
"detected_licenses": [
"MIT"
],
"directory_id": "a934f77ba31b28b2102b69939ad7492c55b327c3",
"extension": "py",
"fi... | 2.3125 | stackv2 | from flask import Blueprint, render_template, request, redirect, url_for, send_file
from Controller.pubmed_controller import get_formulas, search_pubmed, scrapy_pmid_abstract, \
insert_formula, insert_abstract, get_complete_res_by_formula, extract_snps, \
generate_csv_by_formula
from config import APP_FOLDER
p... | 56 | 34.27 | 93 | 13 | 454 | python | [{"finding_id": "semgrep_rules.python.flask.security.open-redirect_2983d6c8ba544917_d32a4370", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.open-redirect", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Data from request is passed to redirect(). This is an open redir... | 3 | true | [
"CWE-601",
"CWE-601",
"CWE-601"
] | [
"rules.python.flask.security.open-redirect",
"rules.python.flask.security.open-redirect",
"rules.python.flask.security.open-redirect"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
18,
18,
43
] | [
27,
32,
46
] | [
5,
5,
5
] | [
79,
75,
75
] | [
"A01:2021 - Broken Access Control",
"A01:2021 - Broken Access Control",
"A01:2021 - Broken Access Control"
] | [
"Data from request is passed to redirect(). This is an open redirect and could be exploited. Consider using 'url_for()' to generate links to known locations. If you must use a URL to unknown pages, consider using 'urlparse()' or similar and checking if the 'netloc' property is the same as your site's host name. See... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | pubmed.py | /blueprints/pubmed.py | semal/DataFetch | MIT | |
2024-11-18T22:14:55.309908+00:00 | 1,633,475,296,000 | b10675735fb5fa94e0493613c8a8efaf98ae68b0 | 3 | {
"blob_id": "b10675735fb5fa94e0493613c8a8efaf98ae68b0",
"branch_name": "refs/heads/main",
"committer_date": 1633475296000,
"content_id": "811e8b315d6a7d4abf42af8e91f5aea8739acd51",
"detected_licenses": [
"MIT"
],
"directory_id": "d59a4a0e6c204d1f59dafcc7fc9fee2eb972cb8f",
"extension": "py",
"file... | 2.953125 | stackv2 | import subprocess
import os.path
def make_wav(text, speed=1.0, emotion='normal', output_file='__temp.wav', output_dir=os.getcwd(), voice_name='mei',
openjtalk_binpath='/usr/bin',
openjtalk_dicpath='/var/lib/mecab/dic/open-jtalk/naist-jdic',
openjtalk_voicepath='/usr/share/hts-voi... | 29 | 44.45 | 115 | 10 | 359 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_06d6c88a4a221fa8_817e763c", "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"
] | [
22
] | [
22
] | [
9
] | [
52
] | [
"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"
] | jtalk.py | /ssfu_client/src/jtalk.py | social-robotics-lab/SpeechServerForUnityChan | MIT | |
2024-11-18T22:14:58.430631+00:00 | 1,598,082,896,000 | 31f9a2ab7c26bca38f8b7a75018ffe46e893f7fc | 3 | {
"blob_id": "31f9a2ab7c26bca38f8b7a75018ffe46e893f7fc",
"branch_name": "refs/heads/master",
"committer_date": 1598082896000,
"content_id": "891084890ba807426ca4b02da344105a486213a7",
"detected_licenses": [
"MIT"
],
"directory_id": "b15380f20f535ace9d229f29d7bb977db26c5978",
"extension": "py",
"fi... | 2.8125 | stackv2 | import time
import zlib
from pathlib import Path
from typing import Union, Any
import jsonpickle
import ujson
from cryptography.fernet import Fernet
from werkzeug.datastructures import ImmutableMultiDict
from modules.globals import instance_path
from modules.log import setup_logger
_logger = setup_logger(__name__)
... | 186 | 29.73 | 109 | 22 | 1,291 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_aa1d1f660b870f26_33c3fbeb", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-jsonpickle",
"rules.python.lang.security.deserialization.avoid-jsonpickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
88,
90
] | [
88,
90
] | [
27,
27
] | [
71,
54
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `jsonpickle`, 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 using `json` module.",
"Avoid using `jsonpickle`, which is known to lead to code execution vulnerabi... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | settings.py | /modules/settings.py | tappi287/usdzconvert_webui | MIT | |
2024-11-18T22:15:01.260539+00:00 | 1,689,769,679,000 | 14a5fc475fc3577825fd9a74c768b859864565ed | 2 | {
"blob_id": "14a5fc475fc3577825fd9a74c768b859864565ed",
"branch_name": "refs/heads/master",
"committer_date": 1689769679000,
"content_id": "e3b52b4672adf81d1a2150e52e82db3ec0ec7fea",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f49f3bfed3844e4b73832d25d8a5d4f3c6730be5",
"extension": "py"... | 2.453125 | stackv2 | # -*- coding: utf-8 -*-
# Copyright© 1986-2019 Altair Engineering Inc.
# pylint: disable=C0111,E1101,R0912,R0913
"""Utils functions for pkr"""
import base64
import hashlib
from builtins import input
from builtins import object
from builtins import range
from builtins import str
from fnmatch import fnmatch
from glob ... | 409 | 29.23 | 98 | 21 | 2,739 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_2756d6a9ee26b0f9_63c30645", "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... | 3 | true | [
"CWE-79",
"CWE-116",
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.jinja2.security.audit.missing-autoescape-disabled",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
185,
185,
214
] | [
188,
188,
214
] | [
24,
24,
15
] | [
10,
10,
48
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A03:2021 - Injection",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.",
"Detected a Jinja2 environment witho... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | utils.py | /pkr/utils.py | altairengineering/pkr | Apache-2.0 | |
2024-11-18T22:15:01.849685+00:00 | 1,584,513,413,000 | 207101daa5264af471c47c31653f04110e1018e3 | 2 | {
"blob_id": "207101daa5264af471c47c31653f04110e1018e3",
"branch_name": "refs/heads/master",
"committer_date": 1584513413000,
"content_id": "52578762d168846e15b7483aebed6076cfbd3e71",
"detected_licenses": [
"MIT"
],
"directory_id": "c42264a1e17f82b5c65dc4e1b1a10e1374fbf557",
"extension": "py",
"fi... | 2.328125 | stackv2 | import os
import shutil
import subprocess
import time
#setup the current folder and destination folder for copying
currentDir = os.path.dirname(__file__)
desinationDir = os.path.join(currentDir, '')
#copy the exe to the current folder from the debug folder
originExe = os.path.join(currentDir, '../x64/Debug/GameBackb... | 42 | 30.12 | 86 | 12 | 352 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_3f719db762d5b292_bbd92fc8", "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"
] | [
23
] | [
23
] | [
12
] | [
87
] | [
"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"
] | MassTest.py | /GameBackboneSln/GameBackboneUnitTest/MassTest.py | gyurgyma/GameBackbone | MIT | |
2024-11-18T22:15:03.727866+00:00 | 1,617,028,771,000 | 6d9a509995dec9574ab508d222769813f023e00e | 3 | {
"blob_id": "6d9a509995dec9574ab508d222769813f023e00e",
"branch_name": "refs/heads/main",
"committer_date": 1617028771000,
"content_id": "68b749f55dbcea4cdc2c033993fd93032055d4cb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5da112064f588e52bacbd5394546485b9923ffb7",
"extension": "py",
... | 2.78125 | stackv2 | """ some utilities that didn't fit elsewhere
"""
import ast
import logging
import importlib.util
import html
import os
import stat
from distutils.spawn import find_executable
from pathlib import Path
from typing import Any
from typing import Dict
from typing import List
from typing import Mapping
from typing import O... | 260 | 32.13 | 99 | 15 | 1,988 | python | [{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_6807a9d78fa1d320_7e09d27a", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected direct use of jinja... | 1 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.direct-use-of-jinja2"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
84
] | [
84
] | [
15
] | [
43
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | utils.py | /ansible_navigator/utils.py | NilashishC/ansible-navigator | Apache-2.0 | |
2024-11-18T22:15:05.210032+00:00 | 1,527,841,911,000 | 0b88a49886944971c941498bd7277d6c1ab17ea3 | 2 | {
"blob_id": "0b88a49886944971c941498bd7277d6c1ab17ea3",
"branch_name": "refs/heads/master",
"committer_date": 1527841911000,
"content_id": "8c415e2667b244f1e4c9ab305bf9dcab578be6a7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4e55f1a103b7a21197de791cfd2db9c10604cb09",
"extension": "py"... | 2.328125 | stackv2 | # -*- coding: utf-8 -*-
# Create your views here.
from django.http import HttpResponse
from django.template import Context, loader
import time
import gourmand
def index(request):
template = loader.get_template('wikifeedme/index.html')
return HttpResponse(template.render(Context()))
def feedMe(request):
te... | 28 | 32.89 | 64 | 12 | 218 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_ff4150b6dd9941ca_44f1fcc2", "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 ... | 6 | true | [
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.django.security.audit.xss.direct-use-of-httpresponse",
"rules.python.flask.security.xss.audit.direct-use-of-jinja2",
"rules.python.django.security.audit.xss.direct... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
10,
10,
24,
24,
28,
28
] | [
10,
10,
24,
24,
28,
28
] | [
12,
25,
12,
25,
12,
25
] | [
52,
51,
50,
49,
52,
51
] | [
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML.",
"Detected direct use of jinja2. If not done properly, this ma... | [
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | views.py | /djangosite/wikifeedme/views.py | slysawai/wikifeedme | Apache-2.0 | |
2024-11-18T22:15:05.841758+00:00 | 1,614,168,206,000 | e2084c5a7ab3decf30866b4a046fd1edf801e8a1 | 2 | {
"blob_id": "e2084c5a7ab3decf30866b4a046fd1edf801e8a1",
"branch_name": "refs/heads/master",
"committer_date": 1614168206000,
"content_id": "88236443364abb51ea367d0f9602d2e093e474c5",
"detected_licenses": [
"MIT"
],
"directory_id": "5bc9847de7b01cb9f97975f7563a114d63cc2d84",
"extension": "py",
"fi... | 2.3125 | stackv2 | # Python 2.7
import logging
import json
import socket
import subprocess
import os
from httplib import HTTPConnection
STATE = dict(Yellow="PORT11=0:NC PORT12=128:NC PORT13=0:NC",
Red="PORT11=0:NC PORT12=0:NC PORT13=128:NC",
Green="PORT11=128:NC PORT12=0:NC PORT13=0:NC",
Off="PO... | 71 | 28.41 | 83 | 16 | 528 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f4a2d5923de0e15a_c35e9d58", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
22,
22
] | [
22,
22
] | [
9,
37
] | [
42,
41
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | launcher_controller.py | /launcher_controller.py | safo-bora/TrafficLightCode | MIT | |
2024-11-18T22:55:24.615095+00:00 | 1,552,124,192,000 | 2e539f5a4c533a32d62e1083efc0e7f35f2b049b | 2 | {
"blob_id": "2e539f5a4c533a32d62e1083efc0e7f35f2b049b",
"branch_name": "refs/heads/master",
"committer_date": 1552124192000,
"content_id": "5f8d5a28d77579423dd959501a56b724802756cb",
"detected_licenses": [
"MIT"
],
"directory_id": "f1375ed1bee1fd99fb1a316894805db658fd665a",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python
import pika
from pika import spec
import sys
import subprocess
import requests
import json
def get_node_ip(node_name):
bash_command = "bash ../cluster/get-node-ip.sh " + node_name
process = subprocess.Popen(bash_command.split(), stdout=subprocess.PIPE)
output, error = process.communic... | 45 | 31.11 | 157 | 13 | 347 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_9e522ce3ade9aa6b_90e75f20", "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"
] | [
11
] | [
11
] | [
15
] | [
77
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | declare-queue.py | /ConsistentHashing/RabbitMqSummit/python/cluster/declare-queue.py | matrixdekoder/RabbitMq-PoC-Code | MIT | |
2024-11-18T22:55:24.715747+00:00 | 1,538,252,360,000 | a82761fa07583a5bcd4e7eedf44b432c8d2a3d2e | 3 | {
"blob_id": "a82761fa07583a5bcd4e7eedf44b432c8d2a3d2e",
"branch_name": "refs/heads/master",
"committer_date": 1538252360000,
"content_id": "8ffc3fce4a7f3381f9a689156e2b0a2d3eb89b0f",
"detected_licenses": [
"MIT"
],
"directory_id": "1da449acf7478635db5511e14af779e5113b27d4",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/anaconda3/envs/bugzilla-env/bin/python
# !! change python environment !!
import data_helpers
import numpy as np
import pickle
class MeanEmbeddingVectorizer(object):
def __init__(self, word2vec):
self.word2vec = word2vec
# if a text is empty we should return a vector of zeros
# with the... | 54 | 29.11 | 90 | 18 | 402 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d260249f2fad6f85_fe242abd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502",
"CWE-95"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
29,
32,
53
] | [
29,
32,
53
] | [
14,
21,
13
] | [
31,
38,
26
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization",
"A03:2021 - Injection"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"HIGH"
] | eval.py | /eval.py | dbreddyAI/severity-prediction | MIT | |
2024-11-18T22:55:28.880689+00:00 | 1,524,372,769,000 | 78bfa6724bbe6b994db7d245a5a79188b04b77ec | 3 | {
"blob_id": "78bfa6724bbe6b994db7d245a5a79188b04b77ec",
"branch_name": "refs/heads/master",
"committer_date": 1524372769000,
"content_id": "3f780b1d1d6976b9ba4b38349ae8dc050d61c5f3",
"detected_licenses": [
"MIT"
],
"directory_id": "b7a8165ba3357b4c2b345f4b57ca70ef8f32a59d",
"extension": "py",
"fi... | 2.609375 | stackv2 | # coding: utf-8
import os
import collections
import pickle
import numpy as np
import yaml
import jieba
data_path = './data'
BLACKLIST = '!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~\',。?;()、!· '
UNK = 'unk'
limit = {
'maxq': 20,
'minq': 0,
'maxa': 20,
'mina': 3
}
def merge_data():
"""
合并源数据
:re... | 298 | 25.99 | 93 | 21 | 2,168 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d76274ac1b743913_be547b1c", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
113,
174
] | [
113,
174
] | [
9,
20
] | [
33,
34
] | [
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.",
"Avoid using `pickle`, which is known to lead to... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | data_process.py | /data_process.py | aodiwei/ChineseSampleSeq2SeqChatBot | MIT | |
2024-11-18T22:55:30.920295+00:00 | 1,631,936,907,000 | 30af0cbcf6f5812ba97e1b9d651a7f2e913622b9 | 2 | {
"blob_id": "30af0cbcf6f5812ba97e1b9d651a7f2e913622b9",
"branch_name": "refs/heads/main",
"committer_date": 1631936907000,
"content_id": "43317a9eb3519ccf7a88b2ee75fb4b404be6a614",
"detected_licenses": [
"MIT"
],
"directory_id": "ed89f4b126a342c5dfd7ead872e7a5a6a7d353e2",
"extension": "py",
"file... | 2.453125 | stackv2 | import torch
from torchvision import datasets, transforms
from kymatio.torch import Scattering2D
import os
import pickle
import numpy as np
import logging
SHAPES = {
"cifar10": (32, 32, 3),
"cifar10_500K": (32, 32, 3),
"fmnist": (28, 28, 1),
"mnist": (28, 28, 1)
}
def get_scatter_transform(dataset):... | 312 | 34.04 | 118 | 20 | 2,309 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_55daec5e703cefd7_cd9b8ad4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
125
] | [
125
] | [
23
] | [
37
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | data.py | /data.py | lxuechen/Handcrafted-DP | MIT | |
2024-11-18T22:55:31.302588+00:00 | 1,611,065,041,000 | 3a5afe94962942b43a9d4bcbf54f889c191f5ae0 | 3 | {
"blob_id": "3a5afe94962942b43a9d4bcbf54f889c191f5ae0",
"branch_name": "refs/heads/main",
"committer_date": 1611065041000,
"content_id": "f20ab2fe3426563e7c379945ace34fbfd7787fca",
"detected_licenses": [
"MIT"
],
"directory_id": "4dcf3e2cb42b80874af9702210ab3451190d2bb0",
"extension": "py",
"file... | 2.5625 | stackv2 | from copy import deepcopy
import random
import pisqpipe as pp
from pisqpipe import DEBUG_EVAL, DEBUG
from board_info_helper import check_win, Adjacent, generate_board_value_lists
from CriticNetwork import CriticNetwork
# from Debug import logDebug, logTraceBack, DEBUG_LOGFILE
from Board import Board
import pickle
impor... | 192 | 33.05 | 132 | 20 | 1,625 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5b485128be4ad939_9eb87e89", "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"
] | [
69,
169
] | [
69,
169
] | [
42,
17
] | [
90,
93
] | [
"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"
] | adp.py | /pbrain-pyrandom-master/adp.py | Yuer867/ai-gomoku | MIT | |
2024-11-18T22:55:38.169774+00:00 | 1,660,748,476,000 | 35a1a477a7567c9f190fb0ee77ba652c0814ffcf | 2 | {
"blob_id": "35a1a477a7567c9f190fb0ee77ba652c0814ffcf",
"branch_name": "refs/heads/master",
"committer_date": 1660748476000,
"content_id": "44132931efa3ee466ec85140f89f86263e7b4768",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "547b57431aefdbf4ee560194e0101321a7289bc8",
"extension": "py"... | 2.34375 | stackv2 | #!/usr/bin/env python
#
# An Ansible module to query rpm for the list of installed packages.
#
# (c) Copyright 2018 SUSE LLC
#
# 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.apa... | 61 | 27.39 | 75 | 11 | 413 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_d863e6a72cd73938_7be92f18", "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"
] | [
41
] | [
41
] | [
14
] | [
42
] | [
"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"
] | rpm_list.py | /library/rpm_list.py | ArdanaCLM/ardana-ansible | Apache-2.0 | |
2024-11-18T22:55:40.692047+00:00 | 1,569,397,772,000 | 5544037579aca5861e6667555a93844eea9b5655 | 2 | {
"blob_id": "5544037579aca5861e6667555a93844eea9b5655",
"branch_name": "refs/heads/master",
"committer_date": 1569397772000,
"content_id": "e6ab55aeb33e2db9e22a18b7db4f5c9ff2a3dc7d",
"detected_licenses": [
"MIT"
],
"directory_id": "b3826f101c8955ae5e4106333863da46dd550b73",
"extension": "py",
"fi... | 2.328125 | stackv2 | import itertools
import pickle
import gluonnlp as nlp
import pandas as pd
from mecab import MeCab
from model.utils import Vocab
from utils import Config
from collections import Counter
# loading dataset
data_config = Config('data/config.json')
tr = pd.read_csv(data_config.train, sep='\t').loc[:, ['document', 'label']]... | 40 | 32.75 | 107 | 11 | 338 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_360e4e02b208a76f_5030e9a2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
38
] | [
38
] | [
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"
] | build_vocab.py | /A_Structured_Self-attentive_Sentence_Embedding_cls/build_vocab.py | simonefrancia/nlp_implementation | MIT | |
2024-11-18T22:55:42.621132+00:00 | 1,624,630,415,000 | fb829f07a5ca0abf6f00dc8cba3d1722f8aab7a4 | 3 | {
"blob_id": "fb829f07a5ca0abf6f00dc8cba3d1722f8aab7a4",
"branch_name": "refs/heads/main",
"committer_date": 1624630415000,
"content_id": "73e24e58ef0dd039461864600752d2f6f483a607",
"detected_licenses": [
"MIT"
],
"directory_id": "8efa54abaeaee7d5c7d8b212cbd50b874fbac675",
"extension": "py",
"file... | 2.53125 | stackv2 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#%matplotlib inline
import pickle
from sklearn.feature_selection import SelectKBest, f_regression
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
import os
from keras.models import Sequential
fr... | 147 | 24.26 | 103 | 13 | 1,081 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_ff1ec783d62e35ae_5b9061f7", "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"
] | [
101
] | [
101
] | [
1
] | [
60
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | LSTM.py | /LSTM.py | ArthurVanSchendel/VERIMAG_Internship | MIT | |
2024-11-18T23:24:00.671301+00:00 | 1,612,478,196,000 | 0d6a6e8f156532a45def7af868c6556ff9ad3005 | 3 | {
"blob_id": "0d6a6e8f156532a45def7af868c6556ff9ad3005",
"branch_name": "refs/heads/master",
"committer_date": 1612478196000,
"content_id": "61d7d538f897b365009270e15c88a3eceeeb8fe6",
"detected_licenses": [
"MIT"
],
"directory_id": "e4cafdc61fac358a77b2ad6a927fce1f17febf5c",
"extension": "py",
"fi... | 2.578125 | stackv2 | from collections import deque
from threading import Thread
from time import sleep
from typing import Dict
import numpy as np
from core.data.command import Command
from core.device.abstract import Connector
from core.device.manager import DeviceManager
from core.task.abstract import BaseTask
from core.task.manager imp... | 282 | 28.93 | 112 | 18 | 1,815 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_a76848f21e06e319_a72a6b50", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \... | 10 | 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"
] | [
238,
241
] | [
238,
241
] | [
28,
28
] | [
77,
78
] | [
"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"
] | PBR.py | /custom/tasks/PBR.py | MValle21/DeviceControl | MIT | |
2024-11-18T23:24:00.907864+00:00 | 1,625,063,657,000 | 79bb7dfdce827c13865976e3eba45866da2119c1 | 2 | {
"blob_id": "79bb7dfdce827c13865976e3eba45866da2119c1",
"branch_name": "refs/heads/master",
"committer_date": 1625063657000,
"content_id": "65721afe80fdd18adb4887c18caf9969e4344935",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "0777f1e60ff8792e506589ce4ddab4bb23d5be3b",
"extension": "p... | 2.3125 | stackv2 | from threading import Thread
from collections import Counter, OrderedDict
import subprocess
import time, datetime
import statistics
from IPython.display import display
import ipywidgets as widgets
import matplotlib
from launcher.study import Study
import sys
sys.path.append('/home/docker/melissa/melissa')
sys.path.ap... | 398 | 33.28 | 130 | 18 | 2,738 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_012cb20c5669b833_850772a9", "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... | 10 | 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.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
101,
104,
120,
123,
136,
139,
153,
156
] | [
105,
104,
124,
123,
140,
139,
157,
156
] | [
19,
39,
19,
39,
19,
39,
19,
41
] | [
57,
43,
57,
43,
57,
43,
59,
45
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH"
] | [
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW",
"HIGH",
"LOW"
] | main.py | /utility/MelissaMonitoring/MelissaMonitoring/main.py | melissa-sa/melissa | BSD-3-Clause | |
2024-11-18T23:24:03.348817+00:00 | 1,627,206,904,000 | b181ca926e3753978ea3eaf37da1dce59ae3239e | 3 | {
"blob_id": "b181ca926e3753978ea3eaf37da1dce59ae3239e",
"branch_name": "refs/heads/master",
"committer_date": 1627206904000,
"content_id": "a3a2ea15c8cc882616d1a80589c487002bb9c217",
"detected_licenses": [
"MIT"
],
"directory_id": "4466ed8909c90a0f4d36f248821e70a8c6ebb82c",
"extension": "py",
"fi... | 3.078125 | stackv2 | import datetime
import sys
import subprocess
def get_version(packagename):
'''Checks the version of an installed package.
Args:
packagename: Name of package.
Returns:
Version string for package on success, `None` on failure.'''
try:
if sys.version_info >= (3, 8):
f... | 48 | 43.9 | 145 | 19 | 491 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_48a775daa6d2432b_7d259839", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 2 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
19,
19
] | [
19,
19
] | [
19,
125
] | [
130,
129
] | [
"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"
] | util.py | /metareserve_geni/internal/gni/py2/util/util.py | ZhaoNeil/metareserve-GENI | MIT | |
2024-11-18T23:55:44.948331+00:00 | 1,622,775,765,000 | e018cdcddc18185a599e4a373ff3b1e6f3567657 | 3 | {
"blob_id": "e018cdcddc18185a599e4a373ff3b1e6f3567657",
"branch_name": "refs/heads/main",
"committer_date": 1622775765000,
"content_id": "659a204936d35918c1babcb0b5aea63b364b9bd5",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "efa26add570c24430dd2a989b3ccab67969d4d3f",
"extension": "py",
"... | 2.8125 | stackv2 | import pickle
import subprocess
import csv
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from sklearn.metrics import matthews_corrcoef
from sklearn.metrics import accuracy_score
from sklearn.metrics import roc_curve,roc_auc_score
from sklearn.preprocessing import minmax_scale
from sklearn.prepr... | 74 | 33.47 | 103 | 14 | 740 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3adc71830dccad15_7762251d", "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
] | [
4
] | [
26
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | train_svm.py | /train_svm.py | PedroRuizCode/Segmentacion_imagenes_ML | CC0-1.0 | |
2024-11-18T23:55:45.145674+00:00 | 1,621,000,952,000 | b1a57c0ddb99746f5c2e55cbcecd230e5ca43006 | 2 | {
"blob_id": "b1a57c0ddb99746f5c2e55cbcecd230e5ca43006",
"branch_name": "refs/heads/main",
"committer_date": 1621000952000,
"content_id": "b9214a3b726794f1a703c13872ae1e610e8a876f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "810bd792f73413213cd38c791f70e867f3482ef0",
"extension": "py",
... | 2.359375 | stackv2 | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import pymysql as db
my_window = Tk()
my_window.title("our final project/login/ Entry record")
my_window.geometry("1366x768")
my_window.configure(bg="grey")
img2=PhotoImage(file="img2.gif")
my_window.resizable(1, 1)
L1=Label(my_window,text="... | 304 | 33.22 | 166 | 14 | 3,338 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_5d9769d685079a79_831b9f5e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 8 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.p... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH"
] | [
104,
104,
178,
178,
250,
250,
275,
275
] | [
104,
104,
178,
178,
250,
250,
275,
275
] | [
5,
5,
5,
5,
9,
9,
10,
10
] | [
23,
23,
27,
27,
79,
79,
86,
86
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | Entry_Record.py | /ems/Entry_Record.py | pushpa-kumari123/Enquiry_Management_System | Apache-2.0 | |
2024-11-18T22:43:33.176693+00:00 | 1,691,507,769,000 | 1528d355c55390feebbe8a710c5595149e0f7e52 | 2 | {
"blob_id": "1528d355c55390feebbe8a710c5595149e0f7e52",
"branch_name": "refs/heads/master",
"committer_date": 1691507769000,
"content_id": "e8d90e922183882e58d1cfc4302cf000a722efb4",
"detected_licenses": [
"MIT"
],
"directory_id": "8358c8d86600703663eb8a8f30493c20704cf586",
"extension": "py",
"fi... | 2.34375 | stackv2 | import logging
import sys
from typing import Dict, Any, Optional, Union, Sequence, Type, Tuple
import click
from xcube.constants import (GENERAL_LOG_FORMAT,
XCUBE_LOG_FORMAT,
LOG,
LOG_LEVEL_OFF_NAME,
LO... | 352 | 36.33 | 123 | 16 | 2,817 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_7cfbc5c6460d232c_81863005", "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"
] | [
160
] | [
160
] | [
20
] | [
50
] | [
"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"
] | common.py | /xcube/cli/common.py | dcs4cop/xcube | MIT | |
2024-11-18T22:43:34.803096+00:00 | 1,532,531,177,000 | 8c1efecd4607331fe58889b318e57b0c7cf0f63e | 2 | {
"blob_id": "8c1efecd4607331fe58889b318e57b0c7cf0f63e",
"branch_name": "refs/heads/master",
"committer_date": 1532531177000,
"content_id": "4c4a126d997f9496b908cb838bf32c9dfd9fd834",
"detected_licenses": [
"MIT"
],
"directory_id": "f6e70b44f7f36948bac6a21e57562970eac317f4",
"extension": "py",
"fi... | 2.40625 | stackv2 | # coding=utf-8
"""
Trying out pynt.
mini-first-impressions review:
- good build dependencies
- easy to call python things
- cumbersome to call things normally done in bash.
- if I actually used it, I would probably have 50% of code in tiny bash scripts, 1 per task.
- loops, if-blocks, etc less painful than bash.
- no ... | 349 | 29.32 | 164 | 19 | 2,549 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_582fa25914755359_2a318da0", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 15 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subpr... | [
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
125,
131,
134,
262,
294
] | [
125,
136,
134,
266,
298
] | [
20,
21,
19,
20,
20
] | [
65,
10,
23,
38,
38
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subprocess funct... | [
7.5,
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"HIGH",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"LOW",
"HIGH",
"HIGH"
] | build.py | /build.py | matthewdeanmartin/keno | MIT | |
2024-11-18T22:43:49.109497+00:00 | 1,511,342,091,000 | 55a65dbe475b3c6801e52ee6da631229930751f9 | 3 | {
"blob_id": "55a65dbe475b3c6801e52ee6da631229930751f9",
"branch_name": "refs/heads/master",
"committer_date": 1511342091000,
"content_id": "f1cccacced8a264be6f31384648f0e4557a44521",
"detected_licenses": [
"MIT"
],
"directory_id": "24cdb6d06776d5c6a23393b28a68843046e38031",
"extension": "py",
"fi... | 3.21875 | stackv2 | from Tkinter import*
root=Tk()
root.title("Calculator Python")
Label(root,text="enter a number").grid(column=0,row=0,columnspan=4)
e=Entry(root,width=16,bd=5,justify="right")
e.grid(column=0,columnspan=4,row=0)
def insert(x):
e.insert(END,x)
def clear():
e.delete(0,END)
def result(x):
y=eval(e.get())
... | 42 | 41.69 | 74 | 12 | 575 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_47dbfed768a0f072_7403102b", "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 ... | 19 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
13
] | [
13
] | [
7
] | [
20
] | [
"A03:2021 - Injection"
] | [
"Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources."
] | [
5
] | [
"LOW"
] | [
"HIGH"
] | calculator.py | /calculator.py | amarjeet045/calculator | MIT | |
2024-11-18T22:56:16.933152+00:00 | 1,576,638,651,000 | a65a3d80ad210344c2e698067a7f77463825fbf9 | 3 | {
"blob_id": "a65a3d80ad210344c2e698067a7f77463825fbf9",
"branch_name": "refs/heads/master",
"committer_date": 1576642306000,
"content_id": "a5993bbcb9422e929988f0d2a78798d6e98c8823",
"detected_licenses": [
"MIT"
],
"directory_id": "05b85a5260e6a7b236693300208b35bde1ca73ee",
"extension": "py",
"fi... | 2.578125 | stackv2 | from calendar import timegm
from datetime import datetime, timedelta
from typing import Any, Dict, Optional
import jwt
from pydantic import BaseModel
from fastapi_auth.auth_settings import get_auth_settings
class ExpirationClaim(BaseModel):
exp: int
def get_expiration_claim(expires_delta: timedelta) -> Expira... | 31 | 34.68 | 115 | 11 | 239 | python | [{"finding_id": "semgrep_rules.python.jwt.security.audit.jwt-python-exposed-data_df53c1be1238a227_3afada09", "tool_name": "semgrep", "rule_id": "rules.python.jwt.security.audit.jwt-python-exposed-data", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "The object is passed strictly to j... | 1 | true | [
"CWE-522"
] | [
"rules.python.jwt.security.audit.jwt-python-exposed-data"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
25
] | [
25
] | [
15
] | [
103
] | [
"A02:2017 - Broken Authentication"
] | [
"The object is passed strictly to jwt.encode(...) Make sure that sensitive information is not exposed through JWT token payload."
] | [
5
] | [
"LOW"
] | [
"LOW"
] | signing.py | /fastapi_auth/security/signing.py | dmontagu/fastapi-auth | MIT | |
2024-11-18T22:56:20.778501+00:00 | 1,616,490,556,000 | 73b219883d301a4f1fba1d4f4dad6db62e330bd2 | 3 | {
"blob_id": "73b219883d301a4f1fba1d4f4dad6db62e330bd2",
"branch_name": "refs/heads/master",
"committer_date": 1616490556000,
"content_id": "2881e7c106eab98814e0bd7b1bb4f470648c1033",
"detected_licenses": [
"MIT"
],
"directory_id": "d8fa977dad19684c6125e04005b674d6682eb3b9",
"extension": "py",
"fi... | 2.796875 | stackv2 | import xml.etree.ElementTree as ET
import csv
import time
import io
from utils import valid_category, strip_tag_name, hms_string, print_percentage, wiki_to_paintext
from paths import path_pages_title_csv, path_corpus_xml, path_wiki_XML, path_corpus_plaintext
def create_corpus_wiki(filename_wiki):
total_pages_cou... | 184 | 32.41 | 102 | 23 | 1,292 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_e10a6399025bc7ba_97b4b9e5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 2 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
1
] | [
1
] | [
1
] | [
35
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | corpus.py | /back-end/src/corpus.py | chawki505/search_engine | MIT | |
2024-11-18T23:18:13.733664+00:00 | 1,567,016,690,000 | b4215fe3fd593350e9e2f4ca9e7b0dd54db2acd2 | 2 | {
"blob_id": "b4215fe3fd593350e9e2f4ca9e7b0dd54db2acd2",
"branch_name": "refs/heads/master",
"committer_date": 1567016690000,
"content_id": "c8f258c8d5b99f8cf4f36c5d0d9cde1b2815934c",
"detected_licenses": [
"MIT"
],
"directory_id": "5e1f689f7d0172c162713b50ec4d09919d0f3a49",
"extension": "py",
"fi... | 2.390625 | stackv2 | """
Converge the set of installed virtualenvs.
"""
from datetime import datetime
import os
import subprocess
import sys
from filesystems.exceptions import FileExists, FileNotFound
from tqdm import tqdm
import click
import toml
from venvs import __version__, _config
from venvs.common import _FILESYSTEM, _LINK_DIR, _R... | 132 | 28.77 | 79 | 19 | 840 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_3b43ed2e90130f32_1db24966", "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"
] | [
66
] | [
69
] | [
56
] | [
14
] | [
"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"
] | converge.py | /venvs/converge.py | pombredanne/venvs | MIT | |
2024-11-18T23:18:19.849155+00:00 | 1,337,404,085,000 | 2283d97e01855db1a2992bb95aadb1a01c27050a | 3 | {
"blob_id": "2283d97e01855db1a2992bb95aadb1a01c27050a",
"branch_name": "refs/heads/master",
"committer_date": 1337404085000,
"content_id": "c4a59f6d8ad75a3f000b1cf66e3f8818fbe54f2f",
"detected_licenses": [
"MIT"
],
"directory_id": "7544a69ddd02b72f5a9583182b501e520bea431b",
"extension": "py",
"fi... | 2.671875 | stackv2 | #fancy_font.py
#This file is part of the PyAsciiArt project
#Created by Huba Nagy 24.02.12
# and is released under the MIT Licence.
#
#Copyright (c) 2012 Huba Z. Nagy
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
# OF MERCHANTABILI... | 149 | 32.43 | 84 | 19 | 1,097 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_d449c217aae15488_17d76b31", "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"
] | [
17
] | [
17
] | [
1
] | [
46
] | [
"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"
] | fancyf.py | /py_ascii_art/fancyf.py | huba/PyAsciiArt | MIT | |
2024-11-18T23:18:39.754387+00:00 | 1,556,581,637,000 | fd1614f59cb9a53f2731a033a227bbb34b8a551a | 2 | {
"blob_id": "fd1614f59cb9a53f2731a033a227bbb34b8a551a",
"branch_name": "refs/heads/master",
"committer_date": 1556581637000,
"content_id": "d5e31c468cbd9de0d962125cb96d8b22e2175641",
"detected_licenses": [
"MIT"
],
"directory_id": "6bb2f21403abde73169100744a73d304587514b4",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python
import glob,os
import sys, getopt
help_message = "usage example: python array_merge.py -i /path/to/reads/ -o /path/to/output -r filerank"
if __name__ == "__main__":
try:
opts, args = getopt.getopt(sys.argv[1:],'hr:i:o:',["filerank=","inputdir=","outputdir="])
except:
print help_message
s... | 35 | 29.86 | 103 | 14 | 371 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_aa79840cb28a7c2b_1f4fe9b1", "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"
] | [
34,
35
] | [
34,
35
] | [
2,
2
] | [
100,
93
] | [
"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"
] | array_merge.py | /lsa-slurm/LSFScripts/array_merge.py | agofton/metaFly | MIT | |
2024-11-19T00:07:04.885535+00:00 | 1,616,882,270,000 | 4660cb163632d6d3ea27f7eb1b7a0c77213b80ad | 2 | {
"blob_id": "4660cb163632d6d3ea27f7eb1b7a0c77213b80ad",
"branch_name": "refs/heads/master",
"committer_date": 1616882270000,
"content_id": "ce71e09fcdd9ac3574e70634c970bc34ede74160",
"detected_licenses": [
"MIT"
],
"directory_id": "10788633c1db94f4e4bd92888d73093923577c11",
"extension": "py",
"fi... | 2.5 | stackv2 | """
Job script to optimize trajectories with trajopt
See: https://github.com/aravindr93/trajopt.git
"""
from mppi import MPPI
from utils import get_environment
from tqdm import tqdm
import time as timer
import numpy as np
import pickle
import gym
import spacecraftRobot
import argparse
import json
import os
# ========... | 98 | 31.03 | 112 | 11 | 776 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_83c3fb532b201583_4b7d1ca9", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-95",
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.audit.eval-detected",
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
30,
88,
91
] | [
30,
88,
91
] | [
16,
5,
1
] | [
30,
55,
51
] | [
"A03:2021 - Injection",
"A08:2017 - Insecure Deserialization",
"A08:2017 - Insecure Deserialization"
] | [
"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.",
"Avoid using `pickle`, which is known to lead to code execut... | [
5,
5,
5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | job_script1.py | /POLO/job_script1.py | ashBabu/spaceRobot_RL | MIT | |
2024-11-19T00:07:09.920628+00:00 | 1,563,699,611,000 | be6704e2d1abe3d90a3dc5c76ae549ffe4d99085 | 3 | {
"blob_id": "be6704e2d1abe3d90a3dc5c76ae549ffe4d99085",
"branch_name": "refs/heads/master",
"committer_date": 1645365083000,
"content_id": "47598a62f622eac859f3520d4c4bc74013e078e9",
"detected_licenses": [
"MIT"
],
"directory_id": "2190601a0046def781d51c91c80aaa7f9ce41c16",
"extension": "py",
"fi... | 2.640625 | stackv2 | from tempfile import TemporaryDirectory as TDir
import tempfile
from zipfile import ZipFile
import sys, os # for os.stat and sys.platform
import re
from shutil import copyfile
from subprocess import run
def filedump(a, b):
"""dumps fontent of readable a into writable b, by chunks of 2048 bytes for memory efficie... | 84 | 32.07 | 100 | 17 | 686 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_113a46fcb883b432_644bb07c", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
84
] | [
84
] | [
5
] | [
14
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | localfileutils.py | /libficconvert/localfileutils.py | niacdoial/AO3-stylish-downloader | MIT | |
2024-11-19T00:07:16.157633+00:00 | 1,611,872,637,000 | 9662c4f8cb845de79b03c6c9dd6c99d4a984f887 | 3 | {
"blob_id": "9662c4f8cb845de79b03c6c9dd6c99d4a984f887",
"branch_name": "refs/heads/master",
"committer_date": 1611872637000,
"content_id": "9e43f80e2c72f7b3bc2b0ee57715278c7fff442a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cada0e9282609e3419d65c970d194f0b78a47c75",
"extension": "py"... | 2.625 | stackv2 | # -*- coding: utf-8 -*-
import logging
import re
import subprocess
import sys
from pathlib import Path
import click
import sqlalchemy
from wbia.dtool.copy_sqlite_to_postgres import (
copy_sqlite_to_postgres,
SqliteDatabaseInfo,
PostgresDatabaseInfo,
compare_databases,
)
logger = logging.getLogger('w... | 143 | 28.26 | 92 | 19 | 936 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_295f80532a336940_d938bc4d", "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"
] | [
65,
65,
99,
99
] | [
67,
67,
99,
99
] | [
13,
13,
17,
17
] | [
14,
14,
79,
79
] | [
"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"
] | migrate_sqlite_to_postgres.py | /wbia/cli/migrate_sqlite_to_postgres.py | Hrmirzadeh/wildbook-ia | Apache-2.0 | |
2024-11-19T00:07:16.520364+00:00 | 1,368,888,801,000 | 64cf44d32f5fc4d0c920aa3d3deb0840975a7aa3 | 2 | {
"blob_id": "64cf44d32f5fc4d0c920aa3d3deb0840975a7aa3",
"branch_name": "refs/heads/master",
"committer_date": 1368888801000,
"content_id": "e8fb11fa272cca3f1820b96ffa0fa812d668ac96",
"detected_licenses": [
"MIT"
],
"directory_id": "2d3b6727e833b6c9651ebd25178c8b4f9e648caf",
"extension": "py",
"fi... | 2.34375 | stackv2 | # -*- coding: utf-8 -*-
"""
zx10challenges.application
==========================
This is the main entry point for 0x10challenges. It contains the app factory.
:copyright: (C) 2013 Matthew Frazier
:license: MIT/X11 -- see the LICENSE file for details
"""
from flask import Flask, Markup
from markdown import markdown
... | 59 | 29 | 77 | 15 | 404 | python | [{"finding_id": "semgrep_rules.python.lang.maintainability.useless-inner-function_22f73596500cd967_789952ce", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-inner-function", "finding_type": "maintainability", "severity": "high", "confidence": "medium", "message": "function `markdown_filte... | 3 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
51
] | [
51
] | [
16
] | [
49
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected explicitly unescaped content using 'Markup()'. This permits the unescaped data to include unescaped HTML which could result in cross-site scripting. Ensure this data is not externally controlled, or consider rewriting to not use 'Markup()'."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | application.py | /zx10challenges/application.py | leafstorm/0x10challenges | MIT | |
2024-11-19T00:07:16.741037+00:00 | 1,543,330,703,000 | 03d220d99fc1028e2172a4258fedaf47f4b163d3 | 3 | {
"blob_id": "03d220d99fc1028e2172a4258fedaf47f4b163d3",
"branch_name": "refs/heads/master",
"committer_date": 1543330703000,
"content_id": "ee1e1319bcb992d380706972fd6b407dc7817c6c",
"detected_licenses": [
"MIT"
],
"directory_id": "a15f6bf5073a269b90843f644eab9787ea70636f",
"extension": "py",
"fi... | 2.703125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: XiZhihui
# @Date: 2018-11-24 21:33:26
# @Last Modified by: XiZhihui
# @Last Modified time: 2018-11-26 16:29:08
# @Description: peak calling with macs2
import os
import argparse
import subprocess
def parse_args():
"""
macs2 callpeak --broad --broad-cutoff ... | 87 | 33.84 | 139 | 17 | 873 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_b632a9fa950bf974_91ec64af", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 5 | true | [
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.subprocess-shell-true"
] | [
"security",
"security"
] | [
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH"
] | [
83,
83
] | [
83,
83
] | [
15,
42
] | [
47,
46
] | [
"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"
] | callpeak.py | /ChIP-seq/scripts/callpeak.py | xizhihui/pipelines | MIT | |
2024-11-19T00:07:19.323322+00:00 | 1,626,210,239,000 | ee0ab8b964108a0e315de97e31b9631985de2f2b | 2 | {
"blob_id": "ee0ab8b964108a0e315de97e31b9631985de2f2b",
"branch_name": "refs/heads/main",
"committer_date": 1626210239000,
"content_id": "6e130a29e371c0cb5e7858bf032955ac004d8d2b",
"detected_licenses": [
"MIT"
],
"directory_id": "8f1d5bec4c288b3b239badfc48ef0b3af0a9debf",
"extension": "py",
"file... | 2.40625 | stackv2 | import argparse
import os, sys, time
import json
import jsonlines
import pandas as pd
import pickle
from utils import timed_func
def main(args):
if not os.path.exists(args.output_dir):
os.makedirs(args.output_dir)
category_counts_df = pd.read_csv("count_categorize.csv")
category_counts_df.drop(c... | 76 | 35 | 100 | 18 | 632 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1b401d52670dfa95_8d533ce1", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
63
] | [
63
] | [
17
] | [
44
] | [
"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"
] | categorize.py | /scripts/20200718_preprocess/categorize.py | SPOClab-ca/writing-features-AI-papers | MIT | |
2024-11-19T00:07:27.407029+00:00 | 1,670,545,589,000 | 3376aefc92764c0e04a8376542957bdf46febf4e | 2 | {
"blob_id": "3376aefc92764c0e04a8376542957bdf46febf4e",
"branch_name": "refs/heads/master",
"committer_date": 1670545589000,
"content_id": "aa00d6b495dd02417c199c981d3da9acf8fead5c",
"detected_licenses": [
"MIT"
],
"directory_id": "1a54115b518dffdb90ee149792c0efd597084f2d",
"extension": "py",
"fi... | 2.484375 | stackv2 | import os
import pickle
import warnings
from typing import Any, Dict, List
import boto3
from boto3 import Session
from tqdm import tqdm
from thunderbolt.client.local_cache import LocalCache
class S3Client:
def __init__(self, workspace_directory: str = '', task_filters: List[str] = [], tqdm_disable: bool = Fals... | 86 | 40.41 | 154 | 27 | 793 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_d4e7811631c8e63a_045a9586", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
45,
46
] | [
45,
46
] | [
36,
33
] | [
154,
116
] | [
"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"
] | s3_client.py | /thunderbolt/client/s3_client.py | m3dev/thunderbolt | MIT | |
2024-11-19T00:07:30.597586+00:00 | 1,586,593,612,000 | 663ff04182e7c99c6863822d4d15bc5aa1793422 | 3 | {
"blob_id": "663ff04182e7c99c6863822d4d15bc5aa1793422",
"branch_name": "refs/heads/master",
"committer_date": 1586593612000,
"content_id": "5a6743ffb9999e4135526a596bd6fd32168e5a76",
"detected_licenses": [
"Unlicense"
],
"directory_id": "cb67ce993073d0c41aefa9b6e4f62ab070d22f06",
"extension": "py",... | 3.15625 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 24 12:37:35 2020
@author: Piang
"""
import speech_recognition as sr
import os,sys
from nltk.chat.util import Chat, reflections
pairs = [
[
r"my name is (.*)",
["Hello %1, How are you today ?",]
],
[
r"what is your name ?",
... | 132 | 21.88 | 161 | 16 | 806 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_55810a4efb129300_c3257494", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ... | 2 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
118
] | [
118
] | [
13
] | [
45
] | [
"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"
] | chatbot.py | /chatbot.py | Technopark95/ArtificialIntelligence | Unlicense | |
2024-11-19T00:33:33.057483+00:00 | 1,627,411,474,000 | b00db82925336ab3011cf08ad55d90b472baf538 | 2 | {
"blob_id": "b00db82925336ab3011cf08ad55d90b472baf538",
"branch_name": "refs/heads/master",
"committer_date": 1627411474000,
"content_id": "7b890d8ff75f85f4c3f82ef25e39b68c66a30b46",
"detected_licenses": [
"MIT"
],
"directory_id": "395ab72edfc78710334b7c1a44550890ae474de9",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python
#####################
# Testing Code for BonnLogger.py
#####################
__cvs_id__ = "$Id: TestLogger.py,v 1.1 2008-07-09 00:12:23 dapple Exp $"
import unittest, os, sys, datetime, time, re, subprocess
###########################################
os.environ['BONN_TEST'] = '1'
os.environ[... | 459 | 32.02 | 79 | 14 | 3,424 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_6cab1b64534b5fd0_ac1895a3", "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... | 5 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
255
] | [
255
] | [
16
] | [
61
] | [
"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"
] | TestLogger.py | /TestLogger.py | deapplegate/wtgpipeline | MIT | |
2024-11-19T00:34:39.158397+00:00 | 1,614,246,478,000 | 03b533da3361893ca5ec96de75813b063452fa8b | 3 | {
"blob_id": "03b533da3361893ca5ec96de75813b063452fa8b",
"branch_name": "refs/heads/master",
"committer_date": 1614246478000,
"content_id": "ee0aba280da58cf11d2ccd5a3f507f366312a527",
"detected_licenses": [
"MIT"
],
"directory_id": "d7880f1af129665f47c284793e20fed3d97e82c2",
"extension": "py",
"fi... | 2.53125 | stackv2 | """
Create Ridge Regression models using CNN features to predict metrics.
Run after train_cnn.ipynb and feature_extract.ipynb
Written by Jatin Mathur.
5/2020
"""
import os
import numpy as np
import pandas as pd
import pickle
import matplotlib.pyplot as plt
from sklearn.metrics import r2_score
from scipy.stats import ... | 118 | 45.31 | 124 | 14 | 1,472 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_5432ff2632531392_94f9f027", "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"
] | [
52,
59
] | [
52,
59
] | [
21,
21
] | [
116,
116
] | [
"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"
] | train_ridge_models.py | /scripts/train_ridge_models.py | PeterDaoura/taddle | MIT | |
2024-11-18T23:28:25.890493+00:00 | 1,519,322,850,000 | db70f8cc42a813ce400d0c38942054fbf8568ded | 2 | {
"blob_id": "db70f8cc42a813ce400d0c38942054fbf8568ded",
"branch_name": "refs/heads/master",
"committer_date": 1519322850000,
"content_id": "0108366a7da2137ff82becc31eb4766b538b6d99",
"detected_licenses": [
"MIT"
],
"directory_id": "60c7879f1f3301cb4a9e099b461c72f6954be58a",
"extension": "py",
"fi... | 2.5 | stackv2 | """
Copyright (c) 2015-2018 Raj Patel(raj454raj@gmail.com), StopStalk
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
... | 186 | 37.02 | 83 | 22 | 1,289 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_25d3442b73e5c25d_ee77e557", "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"
] | [
150
] | [
150
] | [
36
] | [
77
] | [
"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"
] | spoj.py | /modules/sites/spoj.py | mukuldhariwal94/stopstalk-deployment | MIT | |
2024-11-18T23:39:43.904435+00:00 | 1,635,588,871,000 | bf8ae7d38a9f7594e6bcf36c5474b53039fbe851 | 2 | {
"blob_id": "bf8ae7d38a9f7594e6bcf36c5474b53039fbe851",
"branch_name": "refs/heads/main",
"committer_date": 1635588871000,
"content_id": "56d36e4e9edd332ec624e39e2ad326f230113078",
"detected_licenses": [
"BSD-3-Clause",
"Zlib",
"MIT"
],
"directory_id": "7b9024138f815c8d9eae91068d93e33465b81c7... | 2.328125 | stackv2 | '''
This script trains a vanila feedforward neural network on the generated KUKA-surf dataset.
The NN inputs are the 7 joint positions, velocities and torques, while outputs are the 7 joint accelerations.
'''
import os, sys, importlib
sys.path.append( os.path.join( os.path.dirname(__file__), os.path.pardir ) )
import... | 253 | 39.25 | 131 | 24 | 2,258 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.non-literal-import_449239192c2ac9da_c8a62a28", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.non-literal-import", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Untrusted user input in `importlib.import_... | 3 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-dill"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
53
] | [
53
] | [
16
] | [
28
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `dill`, 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"
] | 03_train_NN.py | /KUKA-experiment/03_train_NN.py | Data-Science-in-Mechanical-Engineering/Using-Model-Knowledge-for-Learning-Forward-Dynamics | BSD-3-Clause,Zlib,MIT | |
2024-11-18T23:40:00.510000+00:00 | 1,608,698,606,000 | 27e0b506f3322046f467cbaccef214db775ae2e0 | 3 | {
"blob_id": "27e0b506f3322046f467cbaccef214db775ae2e0",
"branch_name": "refs/heads/master",
"committer_date": 1608698606000,
"content_id": "25e6fb494fa147f041b1be60e19c90b8ddfce73a",
"detected_licenses": [
"MIT"
],
"directory_id": "ccfcbb85a02cec0bbcd05acf238c9e55e096c35b",
"extension": "py",
"fi... | 2.65625 | stackv2 | import json
import requests
import xml.etree.ElementTree
import pathlib
from flask import render_template, request
from app import app
import mysql.connector
# REST Api Constants
HERE_COM_URL = 'https://places.api.here.com/places/v1/discover/explore';
YELP_URL = 'https://api.yelp.com/v3/businesses';
CURRENT_DIRECTORY... | 184 | 29.2 | 97 | 14 | 1,461 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_07606e41d54d68fa_c135f588", "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... | 24 | true | [
"CWE-611",
"CWE-611",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-915",
"CWE-704"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml-parse",
"rules.python.django.security.injection.sql.sql-injection-db-cursor-execute",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.py... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"MEDIUM",
"MEDIUM",
"LOW",
"LOW",
"LOW",
"MEDIUM"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"HIGH",
"HIGH",
"HIGH"
] | [
3,
39,
165,
173,
173,
173,
173
] | [
3,
39,
173,
173,
173,
173,
173
] | [
1,
12,
5,
5,
5,
20,
20
] | [
29,
54,
75,
75,
75,
74,
74
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A08:2021 - Software and Data Integrity Failures",
"A01:2017 - Injection"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The native Python `xml` library is vulnerable to XML Exter... | [
7.5,
7.5,
5,
5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"MEDIUM",
"LOW",
"LOW",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"HIGH",
"HIGH",
"HIGH",
"LOW",
"MEDIUM"
] | analysis.py | /app/views/analysis.py | RahulSondhi/jetBlueChallenge | MIT | |
2024-11-18T23:40:03.338765+00:00 | 1,690,830,269,000 | 8034574baf4725b02c472c98c2e0e0605bffd36a | 2 | {
"blob_id": "8034574baf4725b02c472c98c2e0e0605bffd36a",
"branch_name": "refs/heads/master",
"committer_date": 1690830269000,
"content_id": "a87439379d16b073a521ea6ec0a884c0a10f8b6c",
"detected_licenses": [
"MIT"
],
"directory_id": "c0eeaae1a689a349a86b1e0cf672f7b90fa32886",
"extension": "py",
"fi... | 2.40625 | stackv2 | """
# SqlCode
"""
import os
import sqlite3
import threading
from typing import Optional, cast
import pandas as pd
try:
import vaex.datasets
except ImportError:
vaex = None
import solara
from solara.alias import rv
from solara.website.utils import apidoc
if vaex is not None:
df_iris = vaex.datasets.iris(... | 84 | 32.12 | 131 | 17 | 666 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_cd444ead3564bea0_47192f2a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U... | 3 | true | [
"CWE-89",
"CWE-89"
] | [
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH"
] | [
37,
37
] | [
37,
37
] | [
32,
32
] | [
83,
83
] | [
"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"
] | sql_code.py | /solara/website/pages/api/sql_code.py | widgetti/solara | MIT | |
2024-11-19T00:05:05.333662+00:00 | 1,621,791,983,000 | dbdcdeb0f5588524c773948066b1d4313dbf0eaf | 3 | {
"blob_id": "dbdcdeb0f5588524c773948066b1d4313dbf0eaf",
"branch_name": "refs/heads/master",
"committer_date": 1621791983000,
"content_id": "9b67238be2be8cc0b3025c44782f29981109bded",
"detected_licenses": [
"MIT"
],
"directory_id": "55c6c45305a8c18f355e616bf31038a836c5c1f5",
"extension": "py",
"fi... | 3.296875 | stackv2 | import pickle
import numpy as np
class HandPoses:
"""
Hand Poses Class.
This class predict hand pose from hand landmarks input.
The prediction uses C-Support Vector Classification from Scikit-Learn
Keyword Arguments:
pose_threshold {float}: SVC... | 40 | 36.15 | 109 | 13 | 288 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_0c7d8061e57d3f14_9094e983", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
22
] | [
22
] | [
27
] | [
67
] | [
"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"
] | hand_poses.py | /hand_poses.py | luizhss/Gesture_Hand_Controller | MIT | |
2024-11-19T00:06:19.140572+00:00 | 1,543,993,264,000 | c7828e1cb8de13244b8c2f6d74e1b2ae510a30f8 | 3 | {
"blob_id": "c7828e1cb8de13244b8c2f6d74e1b2ae510a30f8",
"branch_name": "refs/heads/master",
"committer_date": 1543993264000,
"content_id": "0b728651e86ad01ca56c23e65d3dc3b98ecfd477",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "12c963e5bc527591bceb59b46eb31da588bcfef9",
"extension": "py"... | 3.078125 | stackv2 | import os
import pickle
import numpy as np
from typing import Optional
with open('qanta/obscurity/wiki_wc.pickle', 'rb') as f:
wc = pickle.load(f)
def get_article_len(title: str) -> Optional[int]:
""""
:return the word count of the article corresponding to the title given if found, or None if not found
... | 25 | 24.6 | 105 | 9 | 163 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_007e83a34565c961_f09650bc", "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
] | [
10
] | [
24
] | [
"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"
] | obscurity.py | /src/qanta/obscurity/obscurity.py | kevinniechen/qanta-codalab | Apache-2.0 | |
2024-11-19T00:19:25.627964+00:00 | 1,528,287,102,000 | db490cb39f22e359192291f8308d6b307c0be8ef | 3 | {
"blob_id": "db490cb39f22e359192291f8308d6b307c0be8ef",
"branch_name": "refs/heads/master",
"committer_date": 1528287102000,
"content_id": "e9b238831abebb54a29b1f06fc9d99e31940ec6f",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "562a14c985907d669ba52958d7195268ca4a1ba6",
"extension": "p... | 2.671875 | stackv2 | import numpy as np
import pickle
import math
from utilities.utilities import dot_loss, next_batch
class BasicConverter:
def __init__(self):
# training history
self._updatedLoss = 1000.0
self._diffs = []
self._losses = []
self._updates = []
# training control
... | 79 | 37.16 | 113 | 20 | 677 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_b6c2cb606d157f85_cb1da0c2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
23
] | [
23
] | [
9
] | [
44
] | [
"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"
] | converters.py | /utilities/converters.py | konqr/HEPDrone | BSD-3-Clause | |
2024-11-19T00:32:07.549044+00:00 | 1,566,005,690,000 | 93c35303fbd7bd629ec68d7eb22432bdf5acc211 | 3 | {
"blob_id": "93c35303fbd7bd629ec68d7eb22432bdf5acc211",
"branch_name": "refs/heads/master",
"committer_date": 1566005690000,
"content_id": "4847b1cf067a45f5f4e1d1b32e1dd5a77618e3b4",
"detected_licenses": [
"MIT"
],
"directory_id": "820ca34f4880a14139c0d85e18910a2494b97945",
"extension": "py",
"fi... | 2.515625 | stackv2 | import discord
import asyncio
from dateparser import parse
from datetime import datetime
import db
@asyncio.coroutine
def task(client, config):
yield from client.wait_until_ready()
now = datetime.now().timestamp()
c = db.cursor()
c.execute("SELECT target, time, message FROM alerts WHERE time > {}".form... | 28 | 32.14 | 110 | 16 | 217 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_7d6cbe15379d9657_0aa92fa1", "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"
] | [
12,
12
] | [
12,
12
] | [
5,
5
] | [
109,
109
] | [
"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"
] | alert.py | /alert.py | flukiluke/eris | MIT | |
2024-11-19T01:11:12.917238+00:00 | 1,580,337,514,000 | c0c63b40f7ac119df1d9d32e6c7810429ccf3aa6 | 3 | {
"blob_id": "c0c63b40f7ac119df1d9d32e6c7810429ccf3aa6",
"branch_name": "refs/heads/master",
"committer_date": 1580337514000,
"content_id": "d9ec7bc3e4e08e06a30d2dbc53517504238adead",
"detected_licenses": [
"MIT"
],
"directory_id": "b9c16361c2ce87afa22f10a5f43b8972b2b3b0dc",
"extension": "py",
"fi... | 2.578125 | stackv2 | import os
import subprocess
from itertools import chain
from pathlib import Path
import pandas as pd
import sklearn
from IPython.display import display
from graphviz import Source
import numpy as np
from sklearn.model_selection import cross_val_score
from tqdm import tqdm
import matplotlib.pyplot as plt
def read_fil... | 82 | 37.05 | 115 | 18 | 799 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3cca34cf990a2c40_b5daf90f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 3 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
43
] | [
43
] | [
13
] | [
33
] | [
"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"
] | util.py | /util.py | iCarrrot/project_ML | MIT | |
2024-11-19T01:11:13.933087+00:00 | 1,572,898,414,000 | 850fea1a5726c4369952e4a7a8a7b4a0ae955bfd | 3 | {
"blob_id": "850fea1a5726c4369952e4a7a8a7b4a0ae955bfd",
"branch_name": "refs/heads/master",
"committer_date": 1572898414000,
"content_id": "20cfb11b4ab2902f147d56fbe53efdfff89b99a4",
"detected_licenses": [
"MIT"
],
"directory_id": "16aabd7d01d327815b64fe1ee39e1c42e07acdfa",
"extension": "py",
"fi... | 2.796875 | stackv2 | # A small pipeline that compares the starts of TALON transcripts to
# starts derived from the CAGE assay, and plots the results by
# novelty group.
from optparse import OptionParser
import os
import sys
import subprocess
from pathlib import Path
script_dir = os.path.dirname(os.path.realpath(__file__))
utils_dir = "/".... | 92 | 39.92 | 98 | 14 | 883 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_adf3a417eda97be4_a853755d", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 4 | true | [
"CWE-78",
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
51,
62,
74,
84
] | [
52,
64,
75,
86
] | [
9,
9,
9,
9
] | [
61,
47,
55,
53
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'check_output' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Detected subproces... | [
7.5,
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | run_CAGE_analysis.py | /CAGE/run_CAGE_analysis.py | dewyman/TALON-paper-2019 | MIT | |
2024-11-19T01:11:27.937166+00:00 | 1,524,144,033,000 | 084ac367783280ee5ce9571590ebfec46c4aa30b | 2 | {
"blob_id": "084ac367783280ee5ce9571590ebfec46c4aa30b",
"branch_name": "refs/heads/master",
"committer_date": 1524144033000,
"content_id": "499988d3cf7fdddfc7dfc6e4320b38ff6054436c",
"detected_licenses": [
"MIT"
],
"directory_id": "d5e7d38beb487f8ee46c0db5ca8f2782849837e7",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python
import sys
import argparse
import time
import datetime
import subprocess
parser = argparse.ArgumentParser(description='Plot log files')
parser.add_argument('year', type=int, help="year ", choices=[
2016, 2017, 2018, 2019, 2020, 2021])
parser.add_argument('month', help="month"... | 145 | 29.3 | 106 | 32 | 1,280 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_27c7022ff478e0b0_4c6fe04c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ... | 6 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
40
] | [
40
] | [
15
] | [
76
] | [
"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"
] | plottr.py | /plottr.py | mmomrk/joks-log-plotter | MIT | |
2024-11-19T01:11:30.242140+00:00 | 1,615,922,602,000 | 5fc5a690da07999be545715bff93f81325c5282e | 2 | {
"blob_id": "5fc5a690da07999be545715bff93f81325c5282e",
"branch_name": "refs/heads/master",
"committer_date": 1615922602000,
"content_id": "b9ab5e22b6eef90cbb4b3c4e9f2ec83082a624db",
"detected_licenses": [
"MIT"
],
"directory_id": "a4c28ac7de71bb3bd2e0018ceb8fcd28e5df63c8",
"extension": "py",
"fi... | 2.3125 | stackv2 | """ script_check_data.py
"""
import pickle
import numpy as np
from matplotlib import use
use('pdf')
from matplotlib.backends.backend_pdf import PdfPages
import matplotlib.pyplot as plt
from corner import corner
file_name = 'pub_snemo7_mcmc_jla+csp+foundation_err_lt1.pkl'
test_data = pickle.load(open(file_name, 'rb')... | 55 | 23.73 | 119 | 14 | 402 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cf7b3a1f6a427c99_c7b8035c", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
14
] | [
14
] | [
13
] | [
47
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | script_check_data.py | /unity/script_check_data.py | rubind/host_unity | MIT | |
2024-11-19T01:11:30.650287+00:00 | 1,487,724,583,000 | dacdb042395502406bc6bc73f51573908eb14edc | 3 | {
"blob_id": "dacdb042395502406bc6bc73f51573908eb14edc",
"branch_name": "refs/heads/master",
"committer_date": 1487724583000,
"content_id": "4d560cb2629e31ae47ba5cdc3bb1f3abc2886c17",
"detected_licenses": [
"MIT"
],
"directory_id": "5b646c3d92313d7b278dab7c4ed83fa4cf58731e",
"extension": "py",
"fi... | 2.875 | stackv2 | """
modifier: Da-Rong Liu
Date: 2/01/2017
In this implementation, sentences of the same length are put into one bucket.
This helps to avoid doing padding.
Refenrence: https://github.com/ketranm/RMN/blob/master/text/TextProcessor.lua
"""
import collections
import os
import sys
import pickle
import numpy as np
from ra... | 213 | 35.85 | 125 | 20 | 1,727 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e9d03ed034fd87e1_a828aedd", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
38,
130
] | [
38,
130
] | [
36,
13
] | [
50,
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"
] | reader.py | /LSTM+att_fix_10/reader.py | darongliu/Lstm_Turing_LM_tf | MIT | |
2024-11-19T01:11:34.160915+00:00 | 1,597,285,223,000 | 801275726ee3aabb9cb536d20a41cefbd12d9980 | 2 | {
"blob_id": "801275726ee3aabb9cb536d20a41cefbd12d9980",
"branch_name": "refs/heads/master",
"committer_date": 1597285223000,
"content_id": "9cb3f964d5c51e3a4dd49a0c0eff5b372bd6dff9",
"detected_licenses": [
"MIT"
],
"directory_id": "ca9b4e3aea901072787fb087c63f8a6c755abbe6",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""CIFAR10 dataset."""
import os
import pickle
import numpy as np
import xnas.core.logging as logging
import xnas.da... | 109 | 36.01 | 118 | 16 | 932 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_cbfb1763fd628855_f15ab270", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 1 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
86
] | [
86
] | [
24
] | [
56
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | cifar10.py | /xnas/datasets/cifar10.py | WOODchen7/XNAS | MIT | |
2024-11-19T01:11:39.793583+00:00 | 1,548,124,126,000 | 2f3efcd37797ca4116b88227c53a998c357c28cb | 3 | {
"blob_id": "2f3efcd37797ca4116b88227c53a998c357c28cb",
"branch_name": "refs/heads/master",
"committer_date": 1548124126000,
"content_id": "1719dcbd392154f31a41bcd78e04127d42bfdfbe",
"detected_licenses": [
"MIT"
],
"directory_id": "4744e3286a30c7d9ecec334d31e6bf964224b464",
"extension": "py",
"fi... | 2.671875 | stackv2 | #Code base from https://github.com/aravindsiv/dan_qa
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from keras.utils import to_categorical
import pickle as pkl
import numpy as np
class PreProcessor:
def __init__(self,INPUT_FILE,WE_FILE):
self.input_file = INP... | 99 | 30.77 | 96 | 17 | 800 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_fe3c29f007aba98c_d661f5a2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 2 | true | [
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
16
] | [
16
] | [
10
] | [
46
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | preprocess.py | /scripts/dan_nlp/preprocess.py | pblackman/NN_calibration | MIT | |
2024-11-18T23:46:49.227028+00:00 | 1,492,107,591,000 | 892fefd18311f30d0f8afcf0b82a1f33f66d4264 | 2 | {
"blob_id": "892fefd18311f30d0f8afcf0b82a1f33f66d4264",
"branch_name": "refs/heads/master",
"committer_date": 1492107591000,
"content_id": "053b300ef1e48e424092d0714eb6c02fb06fc063",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "e1885828ad809c4e90715631abc3cf8e81e65159",
"extension": "p... | 2.484375 | stackv2 | import sys
import os
from subprocess import (Popen, PIPE, STDOUT)
APP = os.path.abspath(os.path.join(os.path.dirname(__file__), 'run.py'))
"""The Python script to run."""
def spawn():
"""
Start the Quantitaive Imaging Profile REST server.
:return: the completed process return code
"""
# The ... | 28 | 30.11 | 115 | 11 | 203 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ed3a3458e9ebb288_2a74b30c", "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"
] | [
18
] | [
18
] | [
12
] | [
62
] | [
"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"
] | spawn.py | /qirest/server/spawn.py | ohsu-qin/qirest | BSD-2-Clause | |
2024-11-18T23:46:51.130625+00:00 | 1,567,467,598,000 | b4f0daa2fc60f34e15c2d66b2f35baa4c665f94c | 4 | {
"blob_id": "b4f0daa2fc60f34e15c2d66b2f35baa4c665f94c",
"branch_name": "refs/heads/master",
"committer_date": 1567467598000,
"content_id": "85e1346c9f5e70d10e3a639e0f391ea30c34ca37",
"detected_licenses": [
"MIT"
],
"directory_id": "66d596eeb6c2336f7efda2d082194aac00d2cd89",
"extension": "py",
"fi... | 3.8125 | stackv2 | import numpy
#Variables
PLAYERS= 2
boardW = 5
boardH = 5
board = numpy.zeros((boardW,boardH))
step = 0
winLength = 3
#Functions
def drawBoard():
global step
print("\n Step:", step, "\n")
for i in range(0,len(board)):
for j in numpy.flipud(board)[i]:
print('{:>4}'.format(getSym(j)), end... | 99 | 27.27 | 85 | 17 | 736 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_0f042552bb438719_76f60fb1", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ... | 1 | true | [
"CWE-95"
] | [
"rules.python.lang.security.audit.eval-detected"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
28
] | [
28
] | [
23
] | [
86
] | [
"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"
] | EXTREME Tic Tac Toe.py | /EXTREME Tic Tac Toe.py | realmichaelye/EXTREME-Tic-Tac-Toe | MIT | |
2024-11-18T23:48:08.027132+00:00 | 1,492,130,741,000 | e828923333f012541c3a7ed7fe9ca64c8f03c986 | 2 | {
"blob_id": "e828923333f012541c3a7ed7fe9ca64c8f03c986",
"branch_name": "refs/heads/master",
"committer_date": 1492130741000,
"content_id": "b93df3d2d4622502f738c94ec653666214036256",
"detected_licenses": [
"MIT"
],
"directory_id": "a57cd6579790ead2adfe20617779a5c1a88f83e2",
"extension": "py",
"fi... | 2.453125 | stackv2 | """
nestrun.py - run commands based on control dictionaries.
"""
import argparse
import collections
import csv
import datetime
import errno
import functools
import json
import logging
import os
import os.path
import shlex
import shutil
import signal
import subprocess
import sys
from nestly.core import control_iter
# ... | 384 | 35.54 | 105 | 22 | 2,948 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defusedcsv_5651f528c9a92348_387212a4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defusedcsv", "finding_type": "security", "severity": "low", "confidence": "low", "message": "Detected the generation of a CSV file using the built-in `csv` mo... | 8 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
263
] | [
264
] | [
30
] | [
66
] | [
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | nestrun.py | /nestly/scripts/nestrun.py | fhcrc/nestly | MIT | |
2024-11-18T23:48:15.651178+00:00 | 1,613,044,506,000 | f3f0d42c882fe36ef08a482da3967259d05043a7 | 3 | {
"blob_id": "f3f0d42c882fe36ef08a482da3967259d05043a7",
"branch_name": "refs/heads/main",
"committer_date": 1613044506000,
"content_id": "d81a18c61096f019ad2d2c6bfcc3da4d8c8bb1c3",
"detected_licenses": [
"MIT"
],
"directory_id": "e1accd8ef5260254139052b0ba573642583aa6ce",
"extension": "py",
"file... | 3.109375 | stackv2 | import pickle
import numpy as np
reward_reach_ave_1 = []
reward_reach_time_1 = []
reward_reach_ave_4 = []
reward_reach_time_4 = []
reward_reach_ave_c = []
reward_reach_time_c = []
# 実験結果を読み込む
for i in range(1, 11):
f = open('reach_result/reward_reach_time_1_' + str(i) + '.txt', 'rb')
reward_reach_time_1.appen... | 38 | 27.76 | 90 | 12 | 459 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_cc2941452525df1c_9220c7a9", "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... | 9 | 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"
] | [
14,
17,
20
] | [
14,
17,
20
] | [
32,
32,
32
] | [
46,
46,
46
] | [
"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"
] | reach_result.py | /result/reach_result.py | furihata0639/MFRL | MIT | |
2024-11-18T23:48:27.919928+00:00 | 1,625,847,912,000 | 2b809b64e628381742e02b760fec577e493ff858 | 3 | {
"blob_id": "2b809b64e628381742e02b760fec577e493ff858",
"branch_name": "refs/heads/main",
"committer_date": 1625847912000,
"content_id": "c6978d312aa7110cf65a5ab3c37fb87a27b02fe3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9a4559bc52429bab2046344569ec7078a7c3f3ad",
"extension": "py",
... | 3 | stackv2 |
from config import *
import pymysql
class MySQL():
def __init__(self, host=MYSQL_HOST, username=MYSQL_USER, password=MYSQL_PASSWORD, database=MYSQL_DATABASE):
"""
MySQL 初始化
:param host:
:param username:
:param password:
:param port:
:param database:
... | 132 | 29 | 117 | 16 | 936 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_b84f1d6224b53365_053c8fb3", "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... | 10 | true | [
"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.sqlalchemy.security.sqlalchemy-execute-raw-query",
"rules.python.lang.security.audit.formatted-sql-query",
"rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query",
... | [
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"HIGH",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"MEDIUM",
"HIGH",
"HIGH"
] | [
36,
36,
43,
93,
93,
99,
99,
107,
107,
120
] | [
36,
36,
43,
93,
93,
99,
99,
107,
107,
120
] | [
15,
15,
13,
9,
9,
15,
15,
17,
17,
17
] | [
43,
43,
49,
33,
33,
43,
43,
48,
48,
51
] | [
"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 possible formatted SQL query. Use parameterized queries instead.",
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa... | [
5,
7.5,
7.5,
5,
7.5,
5,
7.5,
5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | mysql.py | /mysql.py | dengchengfu/spider-yushou | Apache-2.0 | |
2024-11-19T00:29:31.672664+00:00 | 1,656,678,944,000 | d63ebdf1e5d854b13c342dd9f60d0f1a709bf408 | 3 | {
"blob_id": "d63ebdf1e5d854b13c342dd9f60d0f1a709bf408",
"branch_name": "refs/heads/master",
"committer_date": 1656678944000,
"content_id": "a1eba3fc253897dbb1737962219dd79cb102b316",
"detected_licenses": [
"MIT"
],
"directory_id": "cdd82a49ace86e6a4ba94206575a92965f6db7c3",
"extension": "py",
"fi... | 2.90625 | stackv2 | import shlex
import subprocess
import sys
from typing import Iterable, Tuple, Union
def call_binary(cmd: str) -> Tuple[bytes, bool]:
if sys.platform == "win32":
args = cmd
else:
# linux must split arguments
args = shlex.split(cmd)
try:
data = subprocess.check_output(args)
... | 46 | 26.02 | 89 | 13 | 314 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_a286e6d5dd8df914_efa82baf", "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"
] | [
14
] | [
14
] | [
16
] | [
45
] | [
"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"
] | command.py | /litefeel/pycommon/command.py | litefeel/pycommon | MIT | |
2024-11-19T00:29:31.876772+00:00 | 1,497,159,353,000 | b87980a8dfe84f9ea91cbf0cbeb31e63dfe1ee3c | 2 | {
"blob_id": "b87980a8dfe84f9ea91cbf0cbeb31e63dfe1ee3c",
"branch_name": "refs/heads/master",
"committer_date": 1497159353000,
"content_id": "0418e4b327ee762c5d69441bee4a603833eb1257",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4ad51cca3d438191c67f543d93696cf6511f31e0",
"extension": "py"... | 2.359375 | stackv2 | # -*- coding: utf-8 -*-
# file: main.py
# author: huachengyu
# time: 09/06/2017 10:10 AM
# Copyright 2017 huachengyu. All Rights Reserved.
#
# 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
#
# ... | 140 | 34.64 | 116 | 18 | 1,356 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defusedcsv_942ac39b141d7680_2e43d826", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defusedcsv", "finding_type": "security", "severity": "low", "confidence": "low", "message": "Detected the generation of a CSV file using the built-in `csv` mo... | 8 | 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"
] | [
99,
110,
126
] | [
99,
110,
126
] | [
21,
13,
29
] | [
46,
38,
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"
] | main.py | /baidu_scraper/zhenxiang_scraper/main.py | huachengyu/spider_list | Apache-2.0 | |
2024-11-19T00:29:33.686522+00:00 | 1,544,834,708,000 | d2cfa1c076755455581bdab70514481742bb7dd7 | 2 | {
"blob_id": "d2cfa1c076755455581bdab70514481742bb7dd7",
"branch_name": "refs/heads/master",
"committer_date": 1544834708000,
"content_id": "08a4925fe04e4a532f15e87485a8dbb99db5828b",
"detected_licenses": [
"MIT"
],
"directory_id": "4ec73221b4519c3ce2fd8814dceae69ba4deefb7",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import Flask, jsonify, request
from pymodm import connect
from pymodm import MongoModel, fields
import datetime
import base64
import io as io2
import numpy as np
from skimage import io as im
from skimage import io, exposure
from PIL import Image
import logging
logging.basicConfig(filename='log.txt', level=lo... | 490 | 26.43 | 79 | 19 | 3,057 | python | [{"finding_id": "semgrep_rules.python.django.security.audit.avoid-raw-sql_cd80bb2b09d69dfd_950c15da", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-raw-sql", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of 'RawSQL' or 'raw' indicating... | 7 | true | [
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89",
"CWE-89"
] | [
"rules.python.django.security.audit.avoid-raw-sql",
"rules.python.django.security.audit.avoid-raw-sql",
"rules.python.django.security.audit.avoid-raw-sql",
"rules.python.django.security.audit.avoid-raw-sql",
"rules.python.django.security.audit.avoid-raw-sql",
"rules.python.django.security.audit.avoid-raw-... | [
"security",
"security",
"security",
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
111,
143,
167,
194,
228,
284
] | [
111,
143,
167,
194,
228,
284
] | [
13,
13,
13,
13,
19,
15
] | [
58,
66,
58,
58,
64,
60
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected the use of 'RawSQL' or 'raw' indicating the execution of a non-parameterized SQL query. This could lead to a SQL injection and therefore protected information could be leaked. Instead, use Django ORM and parameterized queries before raw SQL. An example of using the Django ORM is: `People.objects.get(name=... | [
5,
5,
5,
5,
5,
5
] | [
"LOW",
"LOW",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | server.py | /server.py | haerynkim/bme590final | MIT | |
2024-11-19T00:44:08.806537+00:00 | 1,579,722,239,000 | ae66efaa8de70aa77b981023e54e65d2351dbc9f | 3 | {
"blob_id": "ae66efaa8de70aa77b981023e54e65d2351dbc9f",
"branch_name": "refs/heads/master",
"committer_date": 1579722239000,
"content_id": "f7e703c5db4f450ca1fe891914c8ae05fe6bc2b3",
"detected_licenses": [
"MIT"
],
"directory_id": "b75017667468907d3c7d712e595a974de6105657",
"extension": "py",
"fi... | 2.8125 | stackv2 |
import json
import time
from django.views import View
from django.urls import reverse
from django.utils.datastructures import MultiValueDictKeyError
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseRedirect
from django.template import loader
from ..forms import PostureForm
from ..controller... | 212 | 32.66 | 119 | 23 | 1,357 | python | [{"finding_id": "semgrep_rules.python.django.security.nan-injection_02c9547c7c13be76_82fd9f36", "tool_name": "semgrep", "rule_id": "rules.python.django.security.nan-injection", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found user input going directly into typecast for bool(), f... | 5 | true | [
"CWE-704",
"CWE-79",
"CWE-79",
"CWE-79",
"CWE-79"
] | [
"rules.python.django.security.nan-injection",
"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",
"rules.python.flask.security.xss.audit.direct-use-of-ji... | [
"security",
"security",
"security",
"security",
"security"
] | [
"MEDIUM",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
102,
165,
167,
212,
212
] | [
102,
165,
167,
212,
212
] | [
22,
24,
24,
20,
33
] | [
39,
45,
67,
67,
66
] | [
"",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Found user input going directly into typecast for bool(), float(), or complex(). This allows an attacker to inject Python's not-a-number (NaN) into the typecast. This results in undefind behavior, particularly when doing comparisons. Either cast to a different type, or add a guard checking for all capitalizations ... | [
7.5,
5,
5,
5,
5
] | [
"MEDIUM",
"LOW",
"LOW",
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | posture.py | /yoga/yoga/views/posture.py | carmeloacosta/FS-coding-challenge | MIT | |
2024-11-19T00:44:15.652433+00:00 | 1,688,129,859,000 | 60dfc3bc9d10443b893d3d464f1c8bf8627d4d24 | 2 | {
"blob_id": "60dfc3bc9d10443b893d3d464f1c8bf8627d4d24",
"branch_name": "refs/heads/main",
"committer_date": 1688129859000,
"content_id": "e71a798c0134ea377f73d7a6d7835f1f35759e33",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6f0101b172bb6341d1315f6f441d4defa6c7d20c",
"extension": "py",
... | 2.40625 | stackv2 | # Copyright 2022 PAL Authors. All rights reserved.
#
# 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 ... | 63 | 28.21 | 82 | 15 | 434 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.exec-detected_6c86387701bd3ea2_b056f08a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.exec-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of exec(). exec() can be dangerous ... | 2 | true | [
"CWE-95",
"CWE-95"
] | [
"rules.python.lang.security.audit.exec-detected",
"rules.python.lang.security.audit.eval-detected"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
34,
37
] | [
34,
37
] | [
9,
16
] | [
44,
45
] | [
"A03:2021 - Injection",
"A03:2021 - Injection"
] | [
"Detected the use of exec(). exec() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources.",
"Detected the use of eval(). eval() can be dangerous if used... | [
5,
5
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | runtime.py | /pal/core/runtime.py | reasoning-machines/pal | Apache-2.0 | |
2024-11-19T00:44:18.244269+00:00 | 1,621,787,736,000 | 79fa94d71508e6d1dfaa0bbb09afffad04fe7845 | 3 | {
"blob_id": "79fa94d71508e6d1dfaa0bbb09afffad04fe7845",
"branch_name": "refs/heads/main",
"committer_date": 1621787736000,
"content_id": "3f9319f40cb0fc3c658a65145b053e602aa600a2",
"detected_licenses": [
"MIT"
],
"directory_id": "67a3037bfbe7f779dd62e7cdc014d08228510c3f",
"extension": "py",
"file... | 2.671875 | stackv2 | #!/usr/bin/python
# Name: Chen Liang
# College: Dublin Institute of Technology
# Date: 06 Apr 2012
# Description: Kerberos Key Distribution Centre Simuluation
import socket
import sys
import threading
import xml.etree.ElementTree as xml
import datetime
import hashlib
class ClientThread (threading.Thread):
def __i... | 223 | 32.67 | 79 | 17 | 1,548 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_334d67598cc0b662_732732e2", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 7 | true | [
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
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"
] | kdc_sim.py | /federated_single_sign_on/sp/python/kdc/kdc_sim.py | liangcorp/simplified_fsso_simulation | MIT | |
2024-11-19T00:44:20.524944+00:00 | 1,599,208,954,000 | 63f4d5317892ba8300c524cc923f86ede6872054 | 2 | {
"blob_id": "63f4d5317892ba8300c524cc923f86ede6872054",
"branch_name": "refs/heads/master",
"committer_date": 1599208954000,
"content_id": "53374daf4d845abeb5fe571c85e123d247235546",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "cf52dd7b20b1a7b95fcb2a0f999aee7593ab4c73",
"extension": "py",
... | 2.390625 | stackv2 | def setUpDatabase(connection, db_name):
cursor = connection.cursor()
# DROP EXISTING DATABASE
cursor.execute(
f"DROP DATABASE IF EXISTS {db_name}"
)
cursor.execute(
f"CREATE DATABASE {db_name} CHARACTER SET utf8"
)
cursor.execute(
f"USE {db_name}"
)
... | 206 | 35.05 | 150 | 9 | 1,666 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_3527ca5d153d8d95_34651bca", "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"
] | [
4,
4,
7,
7,
10,
10
] | [
6,
6,
9,
9,
12,
12
] | [
5,
5,
5,
5,
5,
5
] | [
10,
10,
10,
10,
10,
10
] | [
"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"
] | CreatDatabaseSchema.py | /src/core/CreatDatabaseSchema.py | SteffenLm/ebs | CC0-1.0 | |
2024-11-19T00:44:24.096861+00:00 | 1,666,688,852,000 | 9177e1eb484285c07081d900e03f936fea38ec7e | 3 | {
"blob_id": "9177e1eb484285c07081d900e03f936fea38ec7e",
"branch_name": "refs/heads/master",
"committer_date": 1666688852000,
"content_id": "ea9c70b259beac26a8a2668b5423f538327e085b",
"detected_licenses": [
"MIT"
],
"directory_id": "4f0b0347a2af5261c3cdc5d4083e747df2ac9b39",
"extension": "py",
"fi... | 2.734375 | stackv2 | import time
import os
import random
from copy import deepcopy
from datetime import datetime
import numpy as np
def random_key(length):
from secrets import token_bytes
key = token_bytes(nbytes=length)
key_int = int.from_bytes(key, 'big')
return key_int
def get_key(key, save_path=r'C:\pykey.txt'):
... | 183 | 29.28 | 111 | 19 | 1,708 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_c4ea6301c4a35fb4_eef8125f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used... | 3 | true | [
"CWE-78",
"CWE-78",
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit",
"rules.python.lang.security.audit.dangerous-system-call-audit"
] | [
"security",
"security",
"security"
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
107,
118,
120
] | [
107,
118,
120
] | [
9,
17,
13
] | [
62,
80,
70
] | [
"A01:2017 - Injection",
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.",
"Found dynamic conte... | [
7.5,
7.5,
7.5
] | [
"LOW",
"LOW",
"LOW"
] | [
"HIGH",
"HIGH",
"HIGH"
] | file_sys.py | /file_sys.py | xiehaosz/pylearn | MIT | |
2024-11-19T00:44:25.684355+00:00 | 1,408,273,039,000 | 46a2263eca68c69710a849a27f99a3b3cd419e07 | 2 | {
"blob_id": "46a2263eca68c69710a849a27f99a3b3cd419e07",
"branch_name": "refs/heads/master",
"committer_date": 1408273039000,
"content_id": "a92fcb3bd3d2886282414937a481600b7c74afa4",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "8966e0cad119521c306a04de5675c5c7e840af37",
"extension": "p... | 2.4375 | stackv2 | # vim: fileencoding=utf-8
import collections
import datetime
import dulwich.objects
import dulwich.repo
import email.utils
import fnmatch
import os
import stat
import time
from subprocess import Popen, PIPE
from threading import Lock
class BaseObject(object):
def __init__(self, odb, obj):
self._odb = od... | 604 | 25.2 | 84 | 18 | 3,355 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_752076e0b0216832_bd587c15", "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"
] | [
566
] | [
566
] | [
17
] | [
65
] | [
"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"
] | models.py | /blikit/models.py | nakamuray/blikit | BSD-2-Clause | |
2024-11-19T00:44:26.860011+00:00 | 1,464,930,805,000 | 3ddb9b65183daa776d29f230d792633dc65303f6 | 3 | {
"blob_id": "3ddb9b65183daa776d29f230d792633dc65303f6",
"branch_name": "refs/heads/master",
"committer_date": 1464930805000,
"content_id": "e71242289070428feea4997e1657d8322b7c63b2",
"detected_licenses": [
"MIT"
],
"directory_id": "1c7140160fedb82740da1dd23f6508d7aa5af07f",
"extension": "py",
"fi... | 3.15625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pickle
import base64
class Serializer(object):
@classmethod
def serialize(cls, object):
"""
save a given object into a byte string
:param object: the object to serialize
"""
return base64.b64encode(pickle.dumps(objec... | 23 | 23.17 | 56 | 12 | 129 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_54161d44f673f35e_110a2f43", "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"
] | [
15,
23
] | [
15,
23
] | [
33,
16
] | [
56,
55
] | [
"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"
] | serialization.py | /crossprocess/serialization.py | sandybee/python-crossprocess-transient-object | MIT | |
2024-11-19T00:44:28.771606+00:00 | 1,605,696,415,000 | 420e4e814ca1eca1bcd5bd3819c5823070337708 | 3 | {
"blob_id": "420e4e814ca1eca1bcd5bd3819c5823070337708",
"branch_name": "refs/heads/master",
"committer_date": 1605696415000,
"content_id": "55d0807c828e0800ac5bc3723880c6efce944c10",
"detected_licenses": [
"MIT"
],
"directory_id": "1a6166890ae16b20ca1f3763be03333809caf785",
"extension": "py",
"fi... | 2.609375 | stackv2 | # app.py
from flask import Flask, request, jsonify, render_template
from sortedcontainers import SortedDict
import pickle
import os
from datetime import datetime as dt
tetris = Flask(__name__)
if 'high_scores.pickle' in os.listdir():
high_scores_file = open('high_scores.pickle','rb')
high_scores = pickle.load... | 51 | 30 | 93 | 19 | 376 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_18144f71debca9bf_b3d8bae3", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding... | 4 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
11,
25
] | [
11,
25
] | [
19,
5
] | [
48,
46
] | [
"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"
] | __init__.py | /flask_app/__init__.py | kunalgupta02209/Tetris-Flask | MIT | |
2024-11-18T23:05:25.204995+00:00 | 1,531,866,922,000 | 2f36ad59c65b678e30bb20fa55421ca20e36d14b | 3 | {
"blob_id": "2f36ad59c65b678e30bb20fa55421ca20e36d14b",
"branch_name": "refs/heads/master",
"committer_date": 1531866922000,
"content_id": "dc3740ca78f2d5cad228e5e9dffa3e80e74c50e6",
"detected_licenses": [
"MIT"
],
"directory_id": "027d460775be6d452487cf842f6fe32a04d758f3",
"extension": "py",
"fi... | 2.578125 | stackv2 | import markdown
import os
import requests
import sys
from flask import Flask, g, Markup, render_template
from flask_restful import Resource, Api, reqparse
class Service:
def __init__(self):
# Create the application with the instance config option on
self.app = Flask(__name__, instance_relative_con... | 74 | 32.66 | 95 | 17 | 490 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2485035805c04c91_96b449d9", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-79"
] | [
"rules.python.flask.security.xss.audit.explicit-unescape-with-markup"
] | [
"security"
] | [
"LOW"
] | [
"MEDIUM"
] | [
38
] | [
40
] | [
20
] | [
78
] | [
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Detected explicitly unescaped content using 'Markup()'. This permits the unescaped data to include unescaped HTML which could result in cross-site scripting. Ensure this data is not externally controlled, or consider rewriting to not use 'Markup()'."
] | [
5
] | [
"LOW"
] | [
"MEDIUM"
] | __init__.py | /libraries/python/bootstrap/__init__.py | jamesm1987/home-automation | MIT | |
2024-11-18T23:05:26.412549+00:00 | 1,566,493,329,000 | a319b7d79cbdfc3aa31643254aab11ec79f790c4 | 2 | {
"blob_id": "a319b7d79cbdfc3aa31643254aab11ec79f790c4",
"branch_name": "refs/heads/master",
"committer_date": 1566493329000,
"content_id": "591f1f62b96c684fbbdb3f66d3a14d9cf83c1799",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f76887b8ce5deb6db1066e01ccb175e861d64046",
"extension": "py"... | 2.453125 | stackv2 | #!/usr/bin/env python
import ConfigParser
import getpass
import os
import sys
import xmlrpclib
import ssl
API_URL = "https://boot.planet-lab.org/PLCAPI/"
PLC_CONFIG="/etc/planetlab.conf"
SESSION_DIR=os.environ['HOME'] + "/.ssh"
SESSION_FILE=SESSION_DIR + "/mlab_session"
api = None
def setup_global_session(url, debu... | 176 | 29.27 | 80 | 14 | 1,260 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_2bd4ae90b1558a9e_021e9f34", "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... | 4 | true | [
"CWE-776"
] | [
"rules.python.lang.security.use-defused-xmlrpc"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
7
] | [
7
] | [
1
] | [
17
] | [
"A04:2017 - XML External Entities (XXE)"
] | [
"Detected use of xmlrpc. xmlrpc is not inherently safe from vulnerabilities. Use defusedxml.xmlrpc instead."
] | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | session.py | /plsync/planetlab/session.py | m-lab/operator | Apache-2.0 | |
2024-11-18T23:05:31.231423+00:00 | 1,459,406,537,000 | d32ed17280ed2172a5ce234c61ad8de6e9779b1b | 2 | {
"blob_id": "d32ed17280ed2172a5ce234c61ad8de6e9779b1b",
"branch_name": "refs/heads/master",
"committer_date": 1459406537000,
"content_id": "544d86183ba1a30ba6945c2895977c04a0630028",
"detected_licenses": [
"MIT"
],
"directory_id": "b0c8bdf5f8045ca5c0322d8e1ca685d3c0d4944a",
"extension": "py",
"fi... | 2.484375 | stackv2 | import os
import sys
import glob
import time
def do(command):
print("Running " + command)
print(os.system(command))
i = 0
if(len(sys.argv) > 1):
do("cd training/to_process && scdl -c -a -l "+sys.argv[1])
for file in glob.glob('training/to_process/**/*.mp3'):
wav_out = 'training/wav'+str(i)+'-... | 21 | 24.57 | 71 | 14 | 168 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_1fe8cbde5f1ea693_43915da3", "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"
] | [
8
] | [
8
] | [
11
] | [
29
] | [
"A01:2017 - Injection"
] | [
"Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability."
] | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | download_soundcloud_playlist_to_wav.py | /download_soundcloud_playlist_to_wav.py | 255BITS/DCGAN-tensorflow | MIT | |
2024-11-18T23:05:33.164200+00:00 | 1,662,042,776,000 | 26bc2fdc9792c9b4ccaa214e5348991abbf7006e | 2 | {
"blob_id": "26bc2fdc9792c9b4ccaa214e5348991abbf7006e",
"branch_name": "refs/heads/master",
"committer_date": 1662042776000,
"content_id": "6e33334ec6097e8a9cfc91f6737e47867eff7169",
"detected_licenses": [
"MIT"
],
"directory_id": "061c36c4b33dd0c47d9d62c2057559d4c5973681",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
# vim:ts=4:sts=4:sw=4:et
#
# Author: Hari Sekhon
# Date: 2016-02-14 15:46:37 +0000 (Sun, 14 Feb 2016)
#
# https://github.com/HariSekhon/DevOps-Python-tools
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and opt... | 76 | 29.59 | 136 | 14 | 614 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_d97b4814a4038799_dc36fe3a", "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... | 5 | 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"
] | [
72,
72
] | [
72,
72
] | [
18,
45
] | [
50,
49
] | [
"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"
] | timeout.py | /timeout.py | ashkankamyab/DevOps-Python-tools | MIT | |
2024-11-18T23:05:44.700419+00:00 | 1,632,880,075,000 | 046dd168432bb49f0367d6c188297bd629f824a3 | 3 | {
"blob_id": "046dd168432bb49f0367d6c188297bd629f824a3",
"branch_name": "refs/heads/master",
"committer_date": 1632880075000,
"content_id": "f3308fba01c17136200948e76e06a89acae2edde",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "388750f05c5a1c8f26ae38a29587f8be9569b9c1",
"extension": "py"... | 2.875 | stackv2 | #!/usr/bin/env python
import yaml
from ansible.module_utils.basic import AnsibleModule
DOCUMENTATION = '''
---
module: yaml_checker
short_description: Ensures that a YAML file's syntax is correct.
options:
path:
description:
- The file path to the file that needs to be checked
required:True
'''
EXA... | 89 | 27.13 | 76 | 20 | 494 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_afe8c0073323689d_50bcbe18", "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-pyyaml-load"
] | [
"security"
] | [
"MEDIUM"
] | [
"HIGH"
] | [
48
] | [
48
] | [
9
] | [
43
] | [
"A08:2017 - Insecure Deserialization"
] | [
"Detected a possible YAML deserialization vulnerability. `yaml.unsafe_load`, `yaml.Loader`, `yaml.CLoader`, and `yaml.UnsafeLoader` are all known to be unsafe methods of deserializing YAML. An attacker with control over the YAML input could create special YAML input that allows the attacker to run arbitrary Python ... | [
7.5
] | [
"LOW"
] | [
"MEDIUM"
] | yaml_checker.py | /src/library/yaml_checker.py | freddebacker/nuage-metroae | Apache-2.0 | |
2024-11-18T23:05:46.074496+00:00 | 1,400,229,600,000 | a4cbb2f0f1ff9759ca3696c2a32cc04298d999f0 | 3 | {
"blob_id": "a4cbb2f0f1ff9759ca3696c2a32cc04298d999f0",
"branch_name": "refs/heads/master",
"committer_date": 1400229600000,
"content_id": "4dcc8436af940a970a6ed1090b522dd3fbcd1fcf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2539b3eae49b03f6dd9ae1b0efd16a9157f7a024",
"extension": "p... | 2.765625 | stackv2 | # -*- coding: utf-8 -*-
"""
database.simple_insertion
~~~~~~~~~~~~~~~~~~~~~~~~~
Simple insertion and row id
http://flask.pocoo.org/snippets/37/
"""
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
def insert(table, fields=(), values=()):
# g.db... | 27 | 21.63 | 79 | 13 | 161 | python | [{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_2df0849e0baecef4_39007328", "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
] | [
5
] | [
31
] | [
"A01:2017 - Injection"
] | [
"Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre... | [
7.5
] | [
"LOW"
] | [
"HIGH"
] | simple_insertion.py | /database/simple_insertion.py | XiangyiKong/flask-snippets | BSD-3-Clause | |
2024-11-18T23:05:46.121267+00:00 | 1,615,293,955,000 | b564a633fd3bbc7657034ea316317612c49ed09d | 2 | {
"blob_id": "b564a633fd3bbc7657034ea316317612c49ed09d",
"branch_name": "refs/heads/master",
"committer_date": 1615293955000,
"content_id": "34fd25570cba80184414930c9b4b51ca59f25eea",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "eff198d0dd8338f9a0e38482fc4f90c162b0676c",
"extension": "p... | 2.3125 | stackv2 | # http://webarchive.nationalarchives.gov.uk/20160105160709/http://ons.gov.uk/ons/guide-method/census/2011/census-data/bulk-data/bulk-data-downloads/index.html
from collections import OrderedDict
import csv
import os
import requests
import shutil
from zipfile import ZipFile
from luigi import Task, Parameter
from lib.... | 265 | 30.61 | 158 | 20 | 1,918 | python | [{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_f0abc055925113d2_d462d971", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ... | 8 | true | [
"CWE-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"
] | [
257,
257
] | [
257,
257
] | [
9,
9
] | [
31,
31
] | [
"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"
] | ons.py | /tasks/uk/census/ons.py | CartoDB/bigmetadata | BSD-3-Clause | |
2024-11-18T23:05:46.829983+00:00 | 1,542,205,002,000 | c741f964da909cf10c5b4a20d63fbd8a4128d97b | 2 | {
"blob_id": "c741f964da909cf10c5b4a20d63fbd8a4128d97b",
"branch_name": "refs/heads/master",
"committer_date": 1542207731000,
"content_id": "6ce93d964d8315f8b84012acf5005fb61df96d73",
"detected_licenses": [
"MIT"
],
"directory_id": "3f2d02f82039e3be8de1244f1f1c049e9c71a2fc",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
import subprocess
import sublime
import sublime_plugin
PLATFORM = sublime.platform()
PIPENV = "pipenv"
def console_print(msg):
print("PipenvPath: {}".format(msg))
def add_to_path(PATH, path):
if PLATFORM == "windows":
return ";".join((path+"\\Scripts", PATH))
else:
return ":".jo... | 77 | 30.52 | 78 | 16 | 560 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_930e081090ef28f2_faed44a6", "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"
] | [
48,
53
] | [
54,
53
] | [
20,
19
] | [
10,
23
] | [
"A01:2017 - Injection",
"A01:2017 - Injection"
] | [
"Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.",
"Found 'subprocess' functi... | [
7.5,
7.5
] | [
"LOW",
"HIGH"
] | [
"HIGH",
"LOW"
] | PipenvPath.py | /PipenvPath.py | dhelonious/PipenvPath | MIT | |
2024-11-18T23:05:47.992411+00:00 | 1,480,177,754,000 | ab8cd5a1390065ddd87992f5dd7792f9e96c42cb | 2 | {
"blob_id": "ab8cd5a1390065ddd87992f5dd7792f9e96c42cb",
"branch_name": "refs/heads/master",
"committer_date": 1480177754000,
"content_id": "da7c41370cbc5894ff8a9482d906b7b5b7b5e453",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "abecf79d49ddb3e8abeecb4f036809d23b7dc452",
"extension": "py"... | 2.359375 | stackv2 | import sys
import os, os.path
import time
import base64
import subprocess
# http://www.ai.uga.edu/mc/SingleInstance.html
# http://mail.python.org/pipermail/python-list/2002-August/161599.html
# http://stackoverflow.com/questions/220525?sort=votes
# http://www.soundc.de/blog/2008/10/21/interprocess-synchronization-in-p... | 200 | 25.3 | 90 | 15 | 1,365 | python | [{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_9afa779e8db5b773_c7ba2a41", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par... | 4 | true | [
"CWE-78"
] | [
"rules.python.lang.security.audit.dangerous-subprocess-use-audit"
] | [
"security"
] | [
"LOW"
] | [
"HIGH"
] | [
173
] | [
173
] | [
19
] | [
64
] | [
"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"
] | interlocks.py | /Zoocmd/core/interlocks.py | worriy/zoo | Apache-2.0 | |
2024-11-18T23:05:48.054211+00:00 | 1,611,821,375,000 | 0db15c6ea0e27f447dfcebacfe53f49614a5b45e | 3 | {
"blob_id": "0db15c6ea0e27f447dfcebacfe53f49614a5b45e",
"branch_name": "refs/heads/main",
"committer_date": 1611821375000,
"content_id": "ff0620c50a8c70c8a1391da04e9f4ed242090822",
"detected_licenses": [
"Unlicense"
],
"directory_id": "178d99befc659b3bb6557b09b16165dbc63b8fc4",
"extension": "py",
... | 2.71875 | stackv2 | # fmt: off
import sys
try:
from functools import cache
except ImportError: # pragma: no cover
from functools import lru_cache
cache = lru_cache(maxsize=None)
try:
from ast import unparse as ast_unparse
except ImportError: # pragma: no cover
from astunparse import unparse as _unparse
def as... | 131 | 36.15 | 109 | 18 | 1,146 | python | [{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_86b6f6a48a032c4e_89075c79", "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"
] | [
100
] | [
100
] | [
21
] | [
67
] | [
"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"
] | _compat.py | /pdoc/_compat.py | cybernetics/pdoc | Unlicense | |
2024-11-18T23:05:48.640398+00:00 | 1,507,143,139,000 | 5ea148c57ad1846341618b80ebfd230222deb935 | 4 | {
"blob_id": "5ea148c57ad1846341618b80ebfd230222deb935",
"branch_name": "refs/heads/master",
"committer_date": 1507143139000,
"content_id": "c950e7e67d674673e067591c309833858c9d9287",
"detected_licenses": [
"MIT"
],
"directory_id": "77ad08a3d7c6e431ead93adac1244bc17ad3cab6",
"extension": "py",
"fi... | 3.609375 | stackv2 | import bcrypt
import getpass
import pickle
import string
import click
import pathlib
def getPassword():
symbols = 0
numbers = 0
uppers = 0
created = False
while not created:
password = getpass.getpass() # Get password without echoing
for symbol in string.punctuation:
sy... | 78 | 34.24 | 142 | 16 | 611 | python | [{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8a6e349da806a186_7c91e621", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno... | 3 | true | [
"CWE-502",
"CWE-502"
] | [
"rules.python.lang.security.deserialization.avoid-pickle",
"rules.python.lang.security.deserialization.avoid-pickle"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | [
56,
63
] | [
56,
63
] | [
13,
23
] | [
46,
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"
] | __init__.py | /__init__.py | kathamer/PyAccounts | MIT | |
2024-11-18T23:05:49.026252+00:00 | 1,583,220,532,000 | 32f6a1662c963ed717176e82b04e17650a4b9f38 | 2 | {
"blob_id": "32f6a1662c963ed717176e82b04e17650a4b9f38",
"branch_name": "refs/heads/master",
"committer_date": 1583220532000,
"content_id": "c4010a571c0d95bd4b03987c4e3bab32827348cd",
"detected_licenses": [
"MIT"
],
"directory_id": "cee0c12382cb5c1f2d67fefadb27d6fe55a1b102",
"extension": "py",
"fi... | 2.34375 | stackv2 | import os
from app import app
from flask import request, Response, jsonify, make_response, abort, url_for
from app.core.Main import create_image_by_url,create_image_by_text
# @app.route('/')
@app.route('/app/wc_api',methods=['POST'])
def index():
data = request.json # 获取 JSON 数据
print(data)
text = data.g... | 39 | 31.13 | 87 | 22 | 297 | python | [{"finding_id": "semgrep_rules.python.flask.security.injection.path-traversal-open_da3ce7e8e2309879_f2549b26", "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",
"CWE-79"
] | [
"rules.python.flask.security.injection.path-traversal-open",
"rules.python.flask.security.audit.xss.make-response-with-unknown-content"
] | [
"security",
"security"
] | [
"MEDIUM",
"LOW"
] | [
"HIGH",
"MEDIUM"
] | [
29,
30
] | [
29,
30
] | [
30,
28
] | [
81,
53
] | [
"A05:2017 - Broken Access Control",
"A07:2017 - Cross-Site Scripting (XSS)"
] | [
"Found request data in a call to 'open'. Ensure the request data is validated or sanitized, otherwise it could result in path traversal attacks.",
"Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_respon... | [
7.5,
5
] | [
"MEDIUM",
"LOW"
] | [
"HIGH",
"MEDIUM"
] | views.py | /app/views.py | CodeBoy2006/Wordcloud-web | MIT | |
2024-11-18T23:05:49.667207+00:00 | 1,601,575,920,000 | 63ae57d2a644808a6fa4006a382940a374213680 | 3 | {
"blob_id": "63ae57d2a644808a6fa4006a382940a374213680",
"branch_name": "refs/heads/master",
"committer_date": 1601575920000,
"content_id": "89f4c382ae96aa8dedf3eaeea86f88a7d779ece9",
"detected_licenses": [
"MIT"
],
"directory_id": "de5ce6494a3abf7926ef5a91585243c1d807704f",
"extension": "py",
"fi... | 2.546875 | stackv2 | import argparse
import pathlib
from urllib.parse import urlparse
import json
import copy
import requests
import traceback
import xml
import xml.etree.ElementTree as ET
import collections
from folioclient.FolioClient import FolioClient
def add_stats(stats, a):
if a not in stats:
stats[a] = 1
else:
... | 82 | 26.15 | 88 | 12 | 556 | python | [{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_07d6c5769e12c06c_09c1418b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead... | 4 | true | [
"CWE-611",
"CWE-611"
] | [
"rules.python.lang.security.use-defused-xml",
"rules.python.lang.security.use-defused-xml"
] | [
"security",
"security"
] | [
"LOW",
"LOW"
] | [
"HIGH",
"HIGH"
] | [
8,
9
] | [
8,
9
] | [
1,
1
] | [
11,
35
] | [
"A04:2017 - XML External Entities (XXE)",
"A04:2017 - XML External Entities (XXE)"
] | [
"The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service.",
"The Python documentation recommends using `defusedxml` ins... | [
7.5,
7.5
] | [
"LOW",
"LOW"
] | [
"MEDIUM",
"MEDIUM"
] | delete_by_query.py | /service_requests_tools/delete_by_query.py | FOLIO-FSE/FOLIO-backup-and-restore | MIT |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.