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-19T01:11:42.393590+00:00
1,587,327,619,000
1094835fca370c2f326ae6de2a28725328989382
2
{ "blob_id": "1094835fca370c2f326ae6de2a28725328989382", "branch_name": "refs/heads/master", "committer_date": 1587327619000, "content_id": "ab7ae2d2061f47dcd2e315224ac6a924fb71a8e5", "detected_licenses": [ "MIT" ], "directory_id": "9528e055b09ae4ccaf54db0f6d122c94c2c7df9e", "extension": "py", "fi...
2.375
stackv2
from django.shortcuts import render from django.db import connection # Create your views here. from rest_framework.decorators import api_view from rest_framework.response import Response # Create your views here. def dictfetchall(cursor): "Return all rows from a cursor as a dict" columns = [col[0] for col ...
60
27.12
69
11
382
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_42066dfcbbae6e17_91ef0f71", "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" ]
[ 37, 37, 57, 57 ]
[ 37, 37, 57, 57 ]
[ 9, 9, 9, 9 ]
[ 34, 34, 34, 34 ]
[ "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" ]
views.py
/dvdrentalPostgres/film/views.py
rkatz1002/djangoPostgresDvdRental
MIT
2024-11-19T01:11:46.195283+00:00
1,640,561,201,000
abd07af81332b414f635e76553944f43d9332d3a
3
{ "blob_id": "abd07af81332b414f635e76553944f43d9332d3a", "branch_name": "refs/heads/master", "committer_date": 1640561201000, "content_id": "9eefb29767bf5891d3116c53351d31de58051268", "detected_licenses": [ "MIT" ], "directory_id": "0ee9d4bf12a630cf9747bb91de50b5798a326692", "extension": "py", "fi...
2.59375
stackv2
import logging import pandas as pd import requests import io import re import datetime def create_elo_dict(db): elo_dict = pd.read_csv('data/raw/elo_dictionary.csv', sep=';')[['fd.name', 'elo.name']] elo_dict = elo_dict.rename(columns={'fd.name':'fd_name', 'elo.name':'elo_name'}) elo_dict['updated_untill'...
103
36.55
127
20
959
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_d255e41bf1f653a1_51bbaebe", "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" ]
[ 56, 56 ]
[ 56, 56 ]
[ 13, 13 ]
[ 42, 42 ]
[ "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" ]
from_clubelo.py
/src/data/from_clubelo.py
paolof89/sci-bet
MIT
2024-11-19T01:11:46.579635+00:00
1,546,552,864,000
186b98e1dab94e9983d85d765338beabb3f892ef
3
{ "blob_id": "186b98e1dab94e9983d85d765338beabb3f892ef", "branch_name": "refs/heads/master", "committer_date": 1546552864000, "content_id": "877d16f3e4c9670d2a91cd2c064264c7ddb9ef97", "detected_licenses": [ "MIT" ], "directory_id": "a78a9c414d55b3288a92525a9d724c4f616be08f", "extension": "py", "fi...
2.96875
stackv2
#!/usr/bin/env python3 """ Copyright (C) 2018 Christian Thomas Jacobs Pynea facilitates the reproducibility of LaTeX documents by embedding the scripts and data files required to regenerate the figures within the document itself. Pynea is released under the MIT license. See the file LICENSE.md for more details. """ ...
66
28.32
159
17
409
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_eada650dcbe5515a_07f9cb34", "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" ]
[ 42, 42 ]
[ 42, 42 ]
[ 23, 63 ]
[ 68, 67 ]
[ "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" ]
document.py
/pynea/document.py
ctjacobs/pynea
MIT
2024-11-19T01:11:47.050017+00:00
1,594,707,844,000
ec49cb32c7df3553f3956d9af6535b64601cda6f
3
{ "blob_id": "ec49cb32c7df3553f3956d9af6535b64601cda6f", "branch_name": "refs/heads/master", "committer_date": 1594707844000, "content_id": "bc980ee19524f5979446a10f34a09be1269579dd", "detected_licenses": [ "MIT" ], "directory_id": "dedd1580df3f2b2d2215601ffa10c80e2fc5ebf1", "extension": "py", "fi...
2.96875
stackv2
"""Turns out mysql is pretty terrible at outputting true, portable CSV files. It's not impossible, but this seemed easier. This is a fairly quick-and-dirty approach, based on https://stackoverflow.com/a/41840534/1837122. Password for mysql will need to have been set via the keyring CLI first. """ import contextlib im...
59
30.31
77
14
407
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d147ea293caf4267_5552b2c1", "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-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" ]
[ 31, 31 ]
[ 31, 31 ]
[ 9, 9 ]
[ 30, 30 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected possible formatted SQL query. Use parameterized queries instead.", "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepa...
[ 5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
output_to_csv.py
/src/output_to_csv.py
philosophicles/CamdramDataWarehouse
MIT
2024-11-19T01:11:49.654837+00:00
1,392,830,973,000
5101123263a9867845e6098dd220477d32186ca8
2
{ "blob_id": "5101123263a9867845e6098dd220477d32186ca8", "branch_name": "refs/heads/master", "committer_date": 1392830973000, "content_id": "d8cf8aee546068c2b42d8e44a1a6f351644697a2", "detected_licenses": [ "MIT" ], "directory_id": "23752b6d3f1a9bf7a4567a6184e437e86d62efce", "extension": "py", "fi...
2.5
stackv2
#!python import json import os import MySQLdb def create_databases(installer_json, config_json): db_conf = installer_json['database'] db = MySQLdb.connect(host="localhost", user=db_conf['user'], passwd=db_conf['pass']) cur = db.cursor() prefix = installer_json['prefix_name'] platforms = config_json['platforms'] ...
173
27.39
110
17
1,252
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_efe36293827404ff_43c4edb8", "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...
13
true
[ "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 23 ]
[ 23 ]
[ 5 ]
[ 110 ]
[ "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" ]
platform_installer.py
/installers/platform_installer.py
uvicate/Users
MIT
2024-11-19T01:11:53.029723+00:00
1,623,845,206,000
ea3213d7cf084a9709d6c61dda0c4575c7f557cb
3
{ "blob_id": "ea3213d7cf084a9709d6c61dda0c4575c7f557cb", "branch_name": "refs/heads/master", "committer_date": 1623845206000, "content_id": "c85baaa08d6ae71f0b77d7f47b00e60f807a102e", "detected_licenses": [ "MIT" ], "directory_id": "42ce0ed5e2db3e9b72f8793620a2206fb79f1a9e", "extension": "py", "fi...
2.78125
stackv2
#!/bin/python3 from subprocess import Popen, PIPE import os, json, sys seeds = [] xs = [] zs = [] seedsDone = [] with open("results.json", "r") as results_file: for seed in json.load(results_file): seedsDone.append(seed) with open("seeds.txt", "r") as seed_file: for line in seed_file: # Skip ...
105
28.47
131
15
767
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_266169cbd7f70539_89ee53d1", "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...
9
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 83 ]
[ 83 ]
[ 127 ]
[ 131 ]
[ "A01:2017 - Injection" ]
[ "Found 'subprocess' function 'Popen' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead." ]
[ 7.5 ]
[ "HIGH" ]
[ "LOW" ]
run.py
/run.py
KalleStruik/seed-checking-mod
MIT
2024-11-19T01:11:53.161118+00:00
1,640,201,428,000
5d9035bd40843823eb4d259eff2645fb32b24b7f
2
{ "blob_id": "5d9035bd40843823eb4d259eff2645fb32b24b7f", "branch_name": "refs/heads/master", "committer_date": 1640201428000, "content_id": "9c6f5b6bb328bdf92825ee59e3f9f0f8822be8c6", "detected_licenses": [ "MIT" ], "directory_id": "0f843ade6219482f1a6bbbc65d487cce549da876", "extension": "py", "fi...
2.328125
stackv2
from django.shortcuts import redirect, render from django.http import HttpResponse from .models import Link def index(request, temp): return HttpResponse("Hello, world. You're at " + temp) def openLink(request, temp): count = Link.objects.filter(active=True, name=temp).count() if count == 0: re...
18
27.67
66
11
113
python
[{"finding_id": "semgrep_rules.python.django.security.audit.xss.direct-use-of-httpresponse_0e6b380cd9c1edcd_0d249a8e", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.xss.direct-use-of-httpresponse", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected data ...
1
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.xss.direct-use-of-httpresponse" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 8 ]
[ 8 ]
[ 12 ]
[ 59 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected data rendered directly to the end user via 'HttpResponse' or a similar object. This bypasses Django's built-in cross-site scripting (XSS) defenses and could result in an XSS vulnerability. Use Django's template engine to safely render HTML." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
views.py
/hknweb/shortlinks/views.py
erictang000/hknweb
MIT
2024-11-19T01:21:33.929694+00:00
1,571,576,216,000
e713055921fa99a6eefda913c57619649826a54d
2
{ "blob_id": "e713055921fa99a6eefda913c57619649826a54d", "branch_name": "refs/heads/master", "committer_date": 1571576216000, "content_id": "db4fde97aace93f0ca388979f566a7e3e24e93c4", "detected_licenses": [ "Apache-2.0" ], "directory_id": "304435172bd5ba0413051766762975d3cd1137e8", "extension": "py"...
2.390625
stackv2
import os from flask import Flask, request, jsonify from convert.keras import KerasONNX import onnxruntime as rt import numpy as np from PIL import Image import requests from google.cloud import storage from io import BytesIO, StringIO from flask_cors import CORS from transferlearning.utils import TransferLearning fro...
148
27.28
151
17
1,026
python
[{"finding_id": "semgrep_rules.python.flask.security.injection.ssrf-requests_fea46a0b0050e05a_325f6c6a", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.ssrf-requests", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Data from request object is passed to a n...
7
true
[ "CWE-918" ]
[ "rules.python.flask.security.injection.ssrf-requests" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 69 ]
[ 69 ]
[ 16 ]
[ 52 ]
[ "A10:2021 - Server-Side Request Forgery (SSRF)" ]
[ "Data from request object is passed to a new server-side request. This could lead to a server-side request forgery (SSRF). To mitigate, ensure that schemes and hosts are validated against an allowlist, do not forward the response to the user, and ensure proper authentication and transport-layer security in the prox...
[ 7.5 ]
[ "MEDIUM" ]
[ "HIGH" ]
app.py
/app.py
siddharthshah3030/hackinout-ai
Apache-2.0
2024-11-19T01:21:35.625969+00:00
1,492,167,217,000
a6729238b25c803381b29fe55f0a55d67c3a7fc9
3
{ "blob_id": "a6729238b25c803381b29fe55f0a55d67c3a7fc9", "branch_name": "refs/heads/master", "committer_date": 1492167217000, "content_id": "d0632a27bc862e356360a4ad839fda2e3a31f5ae", "detected_licenses": [ "MIT" ], "directory_id": "b5e389e202f729a29bd64bfe4983ddc9b1b5778c", "extension": "py", "fi...
2.71875
stackv2
# -*-coding: utf-8-*- # Author : Christopher Lee # License: Apache License # File : baidu.py # Date : 2017-04-14 14-10 # Version: 0.0.1 # Description: description of this file. import datetime import os from lxml.html import fromstring from ..common.storage import SQLiteStorage, NullStorage from ..common.download...
160
31.75
117
18
1,171
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_7e099d3c9896e3b0_e92843bc", "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" ]
[ 126 ]
[ 126 ]
[ 9 ]
[ 41 ]
[ "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" ]
baidu.py
/dictionary/cn_dict/baidu.py
yunfeiyue/pydictionary
MIT
2024-11-19T01:21:37.327581+00:00
1,496,458,709,000
7bab95731c68cf1878caa080c775f8ec9a5c29dd
3
{ "blob_id": "7bab95731c68cf1878caa080c775f8ec9a5c29dd", "branch_name": "refs/heads/master", "committer_date": 1496458709000, "content_id": "1cb78266e4bbdca9ad488ab3f2a9afba5567bf8a", "detected_licenses": [ "MIT" ], "directory_id": "14b8675d719b0917194e1ac214f4d9308f3a4431", "extension": "py", "fi...
2.828125
stackv2
#!/usr/bin/env python import sys import subprocess import time def trace(): popen = subprocess.Popen(["/bin/bash"], bufsize=1, stderr=subprocess.PIPE, stdin=subprocess.PIPE, shell=True) code = open(sys.argv[1],'r').read() popen.stdin.write("set %s;" % ' '.join(sys.argv[1:])) popen.stdin.write("export PS4='>:...
68
29.1
132
16
563
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.subprocess-shell-true_49f38800191400ee_aac1f884", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.subprocess-shell-true", "finding_type": "security", "severity": "high", "confidence": "medium", "message": "Found 'subprocess' function 'Popen'...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.subprocess-shell-true" ]
[ "security" ]
[ "MEDIUM" ]
[ "HIGH" ]
[ 8 ]
[ 8 ]
[ 107 ]
[ 111 ]
[ "A01:2017 - Injection" ]
[ "Found 'subprocess' function 'Popen' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead." ]
[ 7.5 ]
[ "HIGH" ]
[ "LOW" ]
profile.py
/.local/bin/contrib/profile.py
lordmilko/jaagrdots
MIT
2024-11-19T01:21:38.704078+00:00
1,563,970,953,000
6acbe5a79fbeab9f27063378b32e7462f3abc252
3
{ "blob_id": "6acbe5a79fbeab9f27063378b32e7462f3abc252", "branch_name": "refs/heads/master", "committer_date": 1563970953000, "content_id": "41e844f4c3cd3cf159490c879a906b2c9990284b", "detected_licenses": [ "MIT" ], "directory_id": "7107f5f66ded8b6e1e1a7aff61c13f7ae729bdb8", "extension": "py", "fi...
2.640625
stackv2
import os import re from time import sleep from PIL import ImageGrab from aip import AipOcr import cv2 as cv import numpy as np import win32api import win32clipboard as wc import win32con import win32gui def grab_im(): """ 选择区域截图,返回截取的PIL图片 """ while True: cursor_current_x, cursor_current_y =...
150
28.21
77
15
1,260
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_1a6e8da46de8ad03_b8c1355f", "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...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 150 ]
[ 150 ]
[ 5 ]
[ 44 ]
[ "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_ocr_via_baidu_api.py
/py_ocr_via_baidu_api.py
xuchengj031/py_ocr_via_baidu_api
MIT
2024-11-19T01:21:42.972546+00:00
1,624,654,864,000
93b239c087d1e9877e3065e9ceddfa361a39dc89
4
{ "blob_id": "93b239c087d1e9877e3065e9ceddfa361a39dc89", "branch_name": "refs/heads/master", "committer_date": 1624654864000, "content_id": "6911361c957e151f595ee6a6fb8b1edeb4467407", "detected_licenses": [ "MIT" ], "directory_id": "91a555ca8fb405b85814dd0050d96622f546654f", "extension": "py", "fi...
3.515625
stackv2
# Copyright (c) 2019 Heizelnut # # This software is released under the MIT License. # https://opensource.org/licenses/MIT import os import sys import yaml class Kucka: VERSION = "0.1.0" AUTHOR = "Heizelnut (https://github.com/heizelnut)" DESCRIPTION = ("Minimalistic automation tool to build, run, install...
216
30.96
77
18
1,471
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_76ccc040acfb3697_7e561c91", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 216 ]
[ 216 ]
[ 13 ]
[ 57 ]
[ "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
__init__.py
/src/kucka/__init__.py
heizelnut/kucka
MIT
2024-11-19T01:21:44.146860+00:00
1,631,007,542,000
182ca43cf267b73c8e933ea9921bafd3cea208fe
2
{ "blob_id": "182ca43cf267b73c8e933ea9921bafd3cea208fe", "branch_name": "refs/heads/master", "committer_date": 1631007542000, "content_id": "cab1e2324b360084a25caa085903c9a4e8f2f467", "detected_licenses": [ "MIT" ], "directory_id": "e92ec83a4b0c3597d3debb7b41c981519294818d", "extension": "py", "fi...
2.375
stackv2
from typing import NoReturn, Dict from pathlib import Path import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from torch.utils.data import DataLoader from src.data import UnsupervisedDatasetWrapper from src.trainer import BaseTrainer from src.trainer.base_trainer import save_config...
140
36.87
111
17
1,118
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_3269984107eb8672_5cbcff54", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 47, 58 ]
[ 47, 58 ]
[ 66, 77 ]
[ 110, 111 ]
[ "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" ]
scatsimclr_trainer.py
/src/trainer/scatsimclr_trainer.py
thanhdh-3030/scatsimclr
MIT
2024-11-19T01:21:45.560233+00:00
1,567,615,372,000
81412c689d6626e66bdcd7521a5e401cb4c0d2d5
2
{ "blob_id": "81412c689d6626e66bdcd7521a5e401cb4c0d2d5", "branch_name": "refs/heads/master", "committer_date": 1567691706000, "content_id": "13953cf516d27f742c187c3d7bf946ddd2a6dc11", "detected_licenses": [ "MIT" ], "directory_id": "aa5e9defea373d64d75336fc6c5a03124e24abbd", "extension": "py", "fi...
2.359375
stackv2
""" $Id: ScarabConnection.py,v 1.3 2000/03/13 22:32:35 kmacleod Exp $ Scarab Connection class The Scarab Connection class provides the housekeeping for setting up connections, setting parameters, and creating the initial root proxy for a server. """ from urllib import splittype, splithost, splitport import types im...
461
34.52
100
26
3,683
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_2a69878e750fb38f_b65efa43", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
17
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-cPickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 101, 102 ]
[ 101, 102 ]
[ 34, 32 ]
[ 59, 55 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `cPickle`, which is known to lead ...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
ScarabConnection.py
/supporting_libs/scarab/Scarab-0.1.00d19/python/ScarabConnection.py
esayui/mworks
MIT
2024-11-19T01:56:34.217944+00:00
1,690,835,496,000
a2e1f50f533d395089f8f7e21ae249bfbe656e42
3
{ "blob_id": "a2e1f50f533d395089f8f7e21ae249bfbe656e42", "branch_name": "refs/heads/master", "committer_date": 1690835496000, "content_id": "e2c6b5532e67d321e7cc9202b786e90c9c8b73b7", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "030e53ca6a0327e7fce3de3baca78093b972fc5a", "extension": "p...
2.5625
stackv2
#!/usr/bin/env python3 import argparse import yaml import os import pprint from utils import readableDir parser = argparse.ArgumentParser( description="Cut an invite", ) parser.add_argument('infile', type=argparse.FileType('r')) parser.add_argument('metafile', type=argparse.FileType('r')) parser.add_argument('-o'...
25
26.88
113
11
181
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_4eec7ad8f54631d4_3b5cb634", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 24, 24 ]
[ 24, 24 ]
[ 5, 5 ]
[ 115, 115 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
cutinvite.py
/modules/seminar/cutinvite.py
trojsten/dgs
BSD-3-Clause
2024-11-19T01:56:43.530266+00:00
1,542,153,753,000
91eff5dd9c99b375d68e356efcf72ec62b8e5194
3
{ "blob_id": "91eff5dd9c99b375d68e356efcf72ec62b8e5194", "branch_name": "refs/heads/master", "committer_date": 1542154279000, "content_id": "174c4f754734f1ab8fe50a64b53e3f1eee2aa237", "detected_licenses": [ "MIT" ], "directory_id": "c0bfe4a5472616675eb65122fb663c2a115da8bd", "extension": "py", "fi...
2.828125
stackv2
""" Load MDS Provider data into a database. """ import json import mds from mds.db import sql from mds.fake.data import random_string from mds.json import read_data_file import os import pandas as pd from pathlib import Path import sqlalchemy import string def data_engine(uri=None, **kwargs): """ Create a SQ...
238
40.04
121
18
2,129
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_7a1beafe734896dd_0cbb56dd", "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" ]
[ 107, 107 ]
[ 107, 107 ]
[ 17, 17 ]
[ 51, 51 ]
[ "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" ]
load.py
/mds/db/load.py
RideReport/mds-provider
MIT
2024-11-19T01:56:43.928419+00:00
1,690,766,529,000
417e0ca9d65b3d790b0f7e96a1d0e48d69e9756a
2
{ "blob_id": "417e0ca9d65b3d790b0f7e96a1d0e48d69e9756a", "branch_name": "refs/heads/main", "committer_date": 1690766529000, "content_id": "c38c8ad328b7778bf73265a6d236438739819d84", "detected_licenses": [ "MIT" ], "directory_id": "a873ed639369c60a1653048bc1481af0bad14b03", "extension": "py", "file...
2.46875
stackv2
import configparser import json import logging import pickle import tempfile from pathlib import Path from pprint import pprint from typing import Any, Iterable, List, Union import pandas as pd import requests import toml PACKAGE_DIR = Path(__file__).resolve().parent CONFIG_PATH = PACKAGE_DIR / "config.ini" DEFAULT_D...
256
33.06
103
17
2,129
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_1243e5f1c7f50bd5_83b16143", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
7
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 185, 241 ]
[ 185, 241 ]
[ 20, 13 ]
[ 34, 33 ]
[ "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" ]
base.py
/pyrfume/base.py
pyrfume/pyrfume
MIT
2024-11-19T01:56:48.901202+00:00
1,428,932,393,000
c8aa26b7fc99afb6581783ddc45ceb05abf89759
3
{ "blob_id": "c8aa26b7fc99afb6581783ddc45ceb05abf89759", "branch_name": "refs/heads/master", "committer_date": 1428932393000, "content_id": "a2cd4c256d1b50e5c502f7851848004a4df05f3c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "697c67a36ff266c81fa4653275ef22056df7e11f", "extension": "py"...
2.578125
stackv2
""" @name Python-YAPF-Autoformat @package sublime_plugin @author rexdf """ import sublime import sublime_plugin import tempfile import configparser import os import subprocess if sublime.platform() == 'windows': USER_CONFIG_NAME = 'YAPF.sublime-settings' else: USER_CONFIG_NAME = 'YAPF.sublime-settings'...
117
32.74
76
22
742
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.useless-if-body_6f9a81327f2f50e7_8e53b53b", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.useless-if-body", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Useless if statement; both blocks ha...
5
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" ]
[ 86, 88 ]
[ 86, 90 ]
[ 35, 28 ]
[ 59, 68 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'STARTUPINFO' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
pyapf.py
/pyapf.py
rexdf/Python-YAPF-Autoformat
Apache-2.0
2024-11-19T01:56:50.547621+00:00
1,586,978,519,000
fdb9c72230974863b41c7b0311d57ba15321153a
3
{ "blob_id": "fdb9c72230974863b41c7b0311d57ba15321153a", "branch_name": "refs/heads/master", "committer_date": 1586978519000, "content_id": "9f0a146738736fd2b0e6e2bb37b6516ce0495d28", "detected_licenses": [ "MIT" ], "directory_id": "00704607914f449a83536b62ea9e145702c2604e", "extension": "py", "fi...
2.703125
stackv2
#! /usr/bin/env python3 import pickle import redis import sys import yaml import telepot from telepot import namedtuple as tnp from telepot.loop import MessageLoop import mus class HordagoDatabase(): def __init__(self): self.games = redis.StrictRedis('localhost') def has_game(self, game_id): ...
352
40.9
141
22
3,041
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_29274757635bd394_57bebc96", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
4
true
[ "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 24, 30, 35 ]
[ 24, 30, 35 ]
[ 33, 20, 38 ]
[ 51, 38, 56 ]
[ "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" ]
telegram.py
/pymus/telegram.py
mickaelseznec/mus
MIT
2024-11-19T01:56:51.506089+00:00
1,544,583,227,000
fedcfc19327465556e8c54d878b4f8d8c824e555
3
{ "blob_id": "fedcfc19327465556e8c54d878b4f8d8c824e555", "branch_name": "refs/heads/master", "committer_date": 1544583227000, "content_id": "489d22062b8c5ad39e828f387994e3213621921b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "29f6b4804f06b8aabccd56fd122b54e4d556c59a", "extension": "py"...
2.90625
stackv2
import gi, time import subprocess import sys import os import screen_smells import requests gi.require_version("Gtk", "3.0") from gi.repository import Gtk from ErrorDialog import ErrorDialog """ Add project screen for Susereum. Uses the provided URL for the project in order to add the project After the project is added...
271
40.6
161
22
2,655
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_55ff240c42fa0402_b4150bac", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
8
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 146, 146 ]
[ 146, 146 ]
[ 23, 23 ]
[ 40, 40 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
screen_add_project.py
/GUI/screen_add_project.py
obahy/Susereum
Apache-2.0
2024-11-19T02:10:30.521550+00:00
1,690,899,302,000
8db02aa8cf82b59a8bf8f12b0124aba3064650db
2
{ "blob_id": "8db02aa8cf82b59a8bf8f12b0124aba3064650db", "branch_name": "refs/heads/main", "committer_date": 1690899302000, "content_id": "fb20adfbd899881b2e2cb67ad9e99bc4a734ad2e", "detected_licenses": [ "MIT" ], "directory_id": "82b8d888be750c9a5c37664b19bc6d4dee2ea17c", "extension": "py", "file...
2.328125
stackv2
#!/usr/bin/env python # coding: utf-8 # In[ ]: #!/usr/bin/env python # coding: utf-8 #!/usr/bin/env python # make executable in bash chmod +x PyRun # Libraries import sys import pandas as pd import numpy as np import pubchempy as pcp import os import glob import re from pandas import json_normalize from rdkit....
311
31.86
96
26
2,357
python
[{"finding_id": "semgrep_rules.python.lang.correctness.useless-eqeq_bbdc8e33f726a270_0898d8a6", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.useless-eqeq", "finding_type": "correctness", "severity": "low", "confidence": "medium", "message": "This expression is always True: `string == string` or `st...
4
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" ]
[ 86, 91 ]
[ 90, 91 ]
[ 13, 13 ]
[ 14, 84 ]
[ "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" ]
spec_postproc.py
/Python/Modules_Python/spec_postproc.py
zmahnoor14/MAW
MIT
2024-11-19T02:10:33.408117+00:00
1,601,517,562,000
3c8dad5d9bc4e79dd9a1a88033ebd659bdbf9b0e
3
{ "blob_id": "3c8dad5d9bc4e79dd9a1a88033ebd659bdbf9b0e", "branch_name": "refs/heads/master", "committer_date": 1601517562000, "content_id": "d71e43df6a40bedfbb7c95e5f6f463376bab092e", "detected_licenses": [ "MIT" ], "directory_id": "03cb7037d65ea1b809a20ad6461ee209750a5227", "extension": "py", "fi...
2.78125
stackv2
import os #this function extracts tablet's name def name(): name = os.popen("xsetwacom --list devices | grep 'stylus'").read() return '\"' + "".join(name.partition('stylus')[0:2]) + '\"' #this function resets tablet's area and returns full area coordinates def area(): os.popen("xsetwacom --set " + name() + " Re...
35
33.83
86
16
351
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_980adc6f2c68debf_199d6a79", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
7
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-c...
[ "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 10, 11, 22, 27, 29, 33, 34 ]
[ 10, 11, 22, 27, 29, 33, 34 ]
[ 2, 9, 9, 10, 10, 2, 2 ]
[ 54, 56, 51, 66, 66, 58, 57 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
owl_lib.py
/owl_lib.py
vuncrychen/osu-wacom-linux-gui
MIT
2024-11-19T02:10:35.728021+00:00
1,516,811,960,000
db2671f999d6d33dd54072faf652495896639c51
3
{ "blob_id": "db2671f999d6d33dd54072faf652495896639c51", "branch_name": "refs/heads/master", "committer_date": 1516811960000, "content_id": "68b2df13796ee5eb547337afb61d6b1f61665817", "detected_licenses": [ "MIT" ], "directory_id": "9f1c903d3014ac7f55e45ca4931c9a1f1340b2ff", "extension": "py", "fi...
2.671875
stackv2
from sanic import Sanic from sanic.response import html app = Sanic() @app.route('/') async def home(request): return html('<h1>Welcome to cube-as-a-service</h1>') @app.route('/<i:number>') async def cube(request, i): return html(f'<h1>{i} cubed is {i ** 3}</h1>') if __name__ == '__main__': app.run(host...
16
20.5
56
11
109
python
[{"finding_id": "semgrep_rules.python.flask.security.injection.raw-html-format_9490d80875b1b035_34788b96", "tool_name": "semgrep", "rule_id": "rules.python.flask.security.injection.raw-html-format", "finding_type": "security", "severity": "medium", "confidence": "medium", "message": "Detected user input flowing into a ...
2
true
[ "CWE-79" ]
[ "rules.python.flask.security.injection.raw-html-format" ]
[ "security" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ 12 ]
[ 12 ]
[ 17 ]
[ 50 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. To be sure this is safe, check that ...
[ 5 ]
[ "MEDIUM" ]
[ "MEDIUM" ]
webapp.py
/webapp.py
DIAGNijmegen/rse-container-intro
MIT
2024-11-19T02:10:44.294327+00:00
1,607,705,552,000
85a8de2f38de923e0ba0241be1ab71602b6b19b9
3
{ "blob_id": "85a8de2f38de923e0ba0241be1ab71602b6b19b9", "branch_name": "refs/heads/master", "committer_date": 1607705552000, "content_id": "684741afbce0a445573b571b93dc0d2d7bddbd0b", "detected_licenses": [ "MIT" ], "directory_id": "52086bfa8c0c13d73b8ec8ee82c560e17ae9398e", "extension": "py", "fi...
2.953125
stackv2
#!/bin/python3 from argparse import ArgumentParser import subprocess import json # Returns a list of all json window objects per workspace def get_workspace_windows(): command = "swaymsg -t get_tree" process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) data = jso...
81
34.17
99
19
666
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_12ac212d850c9186_7831cf29", "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" ]
[ 70, 70 ]
[ 70, 70 ]
[ 15, 47 ]
[ 76, 51 ]
[ "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" ]
windows.py
/windows.py
gkowzan/wofi-scripts
MIT
2024-11-19T02:10:45.325411+00:00
1,572,040,838,000
2ddec76a86b1d406e48dd5fcf0680a01961c0006
3
{ "blob_id": "2ddec76a86b1d406e48dd5fcf0680a01961c0006", "branch_name": "refs/heads/master", "committer_date": 1572040838000, "content_id": "81c621a0051af95f50ce9d34d08b585de9c45150", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a9b85508a58d14113fcb4b0d74c990d97c0bad75", "extension": "py"...
2.703125
stackv2
import socket import os import threading import re import pickle import time from BlockChain import TraderChain from colorama import Fore, Style from communication import * # Variaveis globais, apenas para a concatenação da string e colorir a mesma (Biblioteca Colorama) styleCommunication = Fore.MAGENTA + Style.BRIGHT...
234
40.24
147
21
2,046
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_87e0f11bec2e30e8_4dbcf398", "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...
12
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.pyth...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 86, 111, 129, 149, 157, 165, 176, 186, 197, 210, 223 ]
[ 86, 111, 129, 149, 157, 165, 176, 186, 197, 210, 223 ]
[ 34, 39, 43, 30, 30, 30, 53, 59, 27, 29, 31 ]
[ 54, 58, 62, 47, 47, 47, 78, 79, 46, 48, 50 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserial...
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
miner.py
/miner.py
felipemelchior/UniBlock
Apache-2.0
2024-11-19T02:10:46.793200+00:00
1,590,920,909,000
1a67ff30ec99d43746a3bc3fd74bd05ae1a9c705
2
{ "blob_id": "1a67ff30ec99d43746a3bc3fd74bd05ae1a9c705", "branch_name": "refs/heads/master", "committer_date": 1590920923000, "content_id": "ffcb862be8e9938feac28d522fad73af9f6abf59", "detected_licenses": [ "MIT" ], "directory_id": "c19eeea2991abd279b803f2b13ba218dd8f05862", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/env python3 # clang-tidy review # Copyright (c) 2020 Peter Hill # SPDX-License-Identifier: MIT # See LICENSE for more information import argparse import itertools import fnmatch import json import os from operator import itemgetter import pprint import subprocess import requests import unidiff from github ...
283
26.82
114
20
1,807
python
[{"finding_id": "semgrep_rules.python.lang.maintainability.is-function-without-parentheses_31e97461c802087c_f4b12f73", "tool_name": "semgrep", "rule_id": "rules.python.lang.maintainability.is-function-without-parentheses", "finding_type": "maintainability", "severity": "medium", "confidence": "medium", "message": "Is \...
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" ]
[ 128, 128 ]
[ 128, 128 ]
[ 17, 68 ]
[ 86, 72 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' function...
[ 7.5, 7.5 ]
[ "LOW", "HIGH" ]
[ "HIGH", "LOW" ]
review.py
/review.py
nus-cs3203/clang-tidy-review
MIT
2024-11-19T02:10:59.679567+00:00
1,555,760,929,000
874d103b2d2259864de84be9649a668747b27aee
3
{ "blob_id": "874d103b2d2259864de84be9649a668747b27aee", "branch_name": "refs/heads/master", "committer_date": 1555760929000, "content_id": "fad6df429bb9ed36b08f7aa232c24296b322a710", "detected_licenses": [ "MIT" ], "directory_id": "8271fe8b6213938049f81626e5bb20f066e00893", "extension": "py", "fi...
3.046875
stackv2
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ This script produces a seating plan with the help of LaTeX. The data for the plan must be given as CSV file For help, run the script from command line with -h example: >> python3 sitzplan.py example.csv -e mac-roman --hspacing [3,3] -t Sitzplan -o Sitzplan Prerequisits:...
182
25.43
116
21
1,284
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_928978fb06b80940_715c4400", "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" ]
[ 131 ]
[ 131 ]
[ 3 ]
[ 44 ]
[ "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" ]
sitzplan.py
/pdf_generation/sitzplan/sitzplan.py
kinnla/schule
MIT
2024-11-19T02:10:59.752121+00:00
1,463,109,473,000
e78042ab219c8d0226f9a9b7fd1dfc675b78cc63
3
{ "blob_id": "e78042ab219c8d0226f9a9b7fd1dfc675b78cc63", "branch_name": "refs/heads/master", "committer_date": 1463109813000, "content_id": "69d285f4612d5665620af777f10927fa84d43ef5", "detected_licenses": [ "BSD-3-Clause", "BSD-2-Clause" ], "directory_id": "83f4e0e48423685a0ee0656c1223c2fba1b7ce87...
2.859375
stackv2
# -*- coding: utf-8 -*- from . import common from kids.cmd import cmd, msg class Command(common.DbCommand): """Clear objects (tables, fields) Will remove data from target database Usage: %(std_usage)s """ def __init__(self, env=None): self.env = env or {} super(Command,...
77
31.82
80
20
537
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_803d012f167b638e_efe4a470", "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-95" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "MEDIUM", "HIGH", "MEDIUM" ]
[ 49, 49, 59 ]
[ 52, 52, 59 ]
[ 9, 9, 21 ]
[ 11, 11, 50 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A03:2021 - 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 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
anodb_replace.py
/src/anodb/anodb_replace.py
0k/anodb
BSD-3-Clause,BSD-2-Clause
2024-11-19T02:45:18.570671+00:00
1,566,220,248,000
f7ae7f0145577eccc9ded4302a23c492e3961c1f
2
{ "blob_id": "f7ae7f0145577eccc9ded4302a23c492e3961c1f", "branch_name": "refs/heads/master", "committer_date": 1566220248000, "content_id": "845a31316d5ea0078fcdbdc616ab712378e0e810", "detected_licenses": [ "MIT" ], "directory_id": "10d3258091c8608cce7f043b1e780447ff209471", "extension": "py", "fi...
2.359375
stackv2
#!/usr/bin/env python """ This script computes the top-N matches for a given partner usage : ./knn.py --input /opt/output-per-partner/1458655100/20585/cnn_features.txt.gz """ import pickle import ConfigParser import os import sys import gzip from itertools import product, combinations import numpy as np import mult...
351
28
117
18
2,844
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.hardcoded-tmp-path_485259e1b9551e4c_75ef68d9", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.hardcoded-tmp-path", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Detected hardcoded temp directory. C...
6
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 162 ]
[ 162 ]
[ 5 ]
[ 51 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
knn.py
/python/knn.py
oakfr/img-search
MIT
2024-11-19T02:45:23.507639+00:00
1,544,999,855,000
3f6d6c9246bbf556d4af99dc579c10f42c6833ac
3
{ "blob_id": "3f6d6c9246bbf556d4af99dc579c10f42c6833ac", "branch_name": "refs/heads/master", "committer_date": 1544999855000, "content_id": "21f6d72b252461def631b041bba36941789bd097", "detected_licenses": [ "MIT" ], "directory_id": "5fd639e283731458712a37900e77336137d43c20", "extension": "py", "fi...
2.78125
stackv2
import numpy as np import os import time from datetime import datetime import sqlite3 import sys class Real_time_fuctions: def convert_list(self): id_list = [] name_list = [] id_number_list = [] money_list = [] acess_list = [] conn = sqlite3.connect('Banco_de_dados...
169
31.96
107
17
1,220
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_eba48dcf56a4f0cd_51926571", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 96, 116 ]
[ 96, 116 ]
[ 9, 9 ]
[ 93, 108 ]
[ "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" ]
fuctions.py
/FaceRecognition/fuctions.py
helpthx/FaceRecognition
MIT
2024-11-19T02:45:23.754178+00:00
1,585,841,343,000
fa469ac8141a0fac5c1a4611be7b89b19648c72a
3
{ "blob_id": "fa469ac8141a0fac5c1a4611be7b89b19648c72a", "branch_name": "refs/heads/master", "committer_date": 1585841343000, "content_id": "667a65a3de1def8c86dfd9b90eaf099ac3657aed", "detected_licenses": [ "MIT" ], "directory_id": "e171f7ab015f5e7f918104bd36db9daa4f80cc04", "extension": "py", "fi...
2.703125
stackv2
import pickle import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State import dash_cytoscape as cyto import numpy as np from sklearn.tree import DecisionTreeClassifier from sklearn.ensemble import Random...
96
24.51
89
19
551
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_c2e0d8d887202193_6ac54309", "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" ]
[ 47 ]
[ 47 ]
[ 14 ]
[ 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" ]
insights.py
/pages/insights.py
mkirby42/ds-dash-template
MIT
2024-11-19T02:45:23.887022+00:00
1,635,207,927,000
0c4f822c23d92b73435fdd897aabf07ad73901e1
3
{ "blob_id": "0c4f822c23d92b73435fdd897aabf07ad73901e1", "branch_name": "refs/heads/main", "committer_date": 1635207927000, "content_id": "f8ed088bdb415b540815f8b16ffe284df2b9b733", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "2eff5a335be48682379a363a05441fed72d80dc5", "extension": "py"...
2.578125
stackv2
# Python modules import sys import os import stat import subprocess import tempfile # Our modules import vespa.common.util.misc as util_misc """Creates double-clickable shortcuts for all Vespa apps. It will only work when Vespa has been successfully installed. This code is meant to be run like so: python -m 'vespa....
174
32.6
93
16
1,395
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_fec9ec635d5cf406_8de2cf5e", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
4
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 169 ]
[ 169 ]
[ 9 ]
[ 28 ]
[ "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" ]
create_shortcuts.py
/vespa/create_shortcuts.py
teddychao/vespa
BSD-3-Clause
2024-11-19T02:45:28.460867+00:00
1,528,207,495,000
913ca3d3bc198715fc5d1fd91531b3c4e3bc8967
3
{ "blob_id": "913ca3d3bc198715fc5d1fd91531b3c4e3bc8967", "branch_name": "refs/heads/master", "committer_date": 1528207495000, "content_id": "b7002080a32c699df8ef40773170af9a5cb60f3c", "detected_licenses": [ "MIT" ], "directory_id": "701d9a3a838288063e5eb76500321a597c5c4b53", "extension": "py", "fi...
2.546875
stackv2
#!/usr/bin/env python import os, time import rospy import wiringpi IN = 'in' OUT = 'out' from rpi_gpio.srv import * from rpi_gpio import msg as msgs #http://elinux.org/RPi_Low-level_peripherals#Model_A.2B.2C_B.2B_and_B2 RPI2_GPIO_PINS = ( 0,#ID_SD 1,#ID_SC 2,#SDA1 3,#SCL2 4, 5, 6, ...
182
31.65
116
14
1,469
python
[{"finding_id": "semgrep_rules.python.lang.correctness.dict-del-while-iterate_130f29b47b442c85_ade736d4", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.dict-del-while-iterate", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "It appears that `self.directions[p...
7
true
[ "", "", "", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.correctness.dict-del-while-iterate", "rules.python.lang.correctness.dict-del-while-iterate", "rules.python.lang.correctness.dict-del-while-iterate", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.pyt...
[ "correctness", "correctness", "correctness", "security", "security", "security" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "HIGH", "HIGH", "HIGH" ]
[ 70, 85, 95, 134, 139, 179 ]
[ 81, 93, 101, 134, 139, 179 ]
[ 9, 9, 9, 13, 19, 13 ]
[ 44, 39, 91, 27, 33, 27 ]
[ "", "", "", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "It appears that `self.directions[pin]` is a dict with items being deleted while in a for loop. This is usually a bad idea and will likely lead to a RuntimeError: dictionary changed size during iteration", "It appears that `self.states[pin]` is a dict with items being deleted while in a for loop. This is usually ...
[ 5, 5, 5, 7.5, 7.5, 7.5 ]
[ "", "", "", "LOW", "LOW", "LOW" ]
[ "", "", "", "HIGH", "HIGH", "HIGH" ]
rpi_gpio_node.py
/rpi_gpio/nodes/rpi_gpio_node.py
teosnare/rpi_gpio
MIT
2024-11-19T02:45:30.993692+00:00
1,471,070,558,000
c66d40c508b3f1b219c9c9cdb92b6070fe8a6c2f
2
{ "blob_id": "c66d40c508b3f1b219c9c9cdb92b6070fe8a6c2f", "branch_name": "refs/heads/master", "committer_date": 1471070558000, "content_id": "24513c51a895609ab5a0fcea8ddf9ab5f0129a7f", "detected_licenses": [ "MIT" ], "directory_id": "8cdb31b6ba33bd848c1bb12b54ac2394291a3dfb", "extension": "py", "fi...
2.34375
stackv2
import re from .utils import endswith from os import walk, path from .interpreters import * from .interpreters import __all__ as InterpretersNames class SimpleImport(): interpreters = {} @staticmethod def loadInterpreters(): interpreter_regex = r"Interpreter$" for name in InterpretersNames: _obje...
142
35.73
126
25
1,128
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_4e01d8892bed5549_c349ab78", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.dangerous-globals-use", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Found non static data as an index to 'globals()'...
2
true
[ "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 14 ]
[ 14 ]
[ 17 ]
[ 32 ]
[ "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
SimpleImport.py
/lib/SimpleImport.py
gitter-badger/sublime-simple-import
MIT
2024-11-19T02:45:33.110530+00:00
1,644,361,308,000
e375f43c567694e9ae5ad592fab029462cacad9c
2
{ "blob_id": "e375f43c567694e9ae5ad592fab029462cacad9c", "branch_name": "refs/heads/master", "committer_date": 1644361308000, "content_id": "c14705393225298b404c3da245c38ff5f846db51", "detected_licenses": [ "MIT" ], "directory_id": "2a7642d0c4711ed920c17f24ef5dd08ada55ed49", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/env python3 import photons as photons import tkinter as tk import time import pickle import tkinter.filedialog as tkfd import os root = tk.Tk() def fileOpen(arg=None): filename = tkfd.askopenfilename(initialdir = os.curdir,title = "Open",filetypes = (("Pickle","*.pickle"),("all files","*.*"))) re...
81
22.57
130
16
592
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_2b42d617f1b55e9e_e9b45693", "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" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 20 ]
[ 20 ]
[ 9 ]
[ 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" ]
phoSim.py
/phoSim.py
decorator-factory/photons-game
MIT
2024-11-19T02:45:33.924251+00:00
1,478,091,274,000
ec43afefd161c4f6d1bd95f83dc24f79abf346f6
2
{ "blob_id": "ec43afefd161c4f6d1bd95f83dc24f79abf346f6", "branch_name": "refs/heads/master", "committer_date": 1478091274000, "content_id": "39567ae0198fb55142c9af3f0de114831b0498b1", "detected_licenses": [ "MIT" ], "directory_id": "8fe387733323182713ceab6b4b0a4cb6c82fa4ef", "extension": "py", "fi...
2.375
stackv2
#!/usr/bin/env python3 import argparse import asyncio import json import itertools import requests from apscheduler.schedulers.asyncio import AsyncIOScheduler from decouple import config, Csv from influxdb import InfluxDBClient # suppress self-signed certificate warnings requests.packages.urllib3.disable_warnings() ...
96
30.53
99
15
736
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_af30a953fe00b0a0_39a465dc", "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-295" ]
[ "rules.python.requests.security.disabled-cert-validation" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 53 ]
[ 53 ]
[ 11 ]
[ 59 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation." ]
[ 7.5 ]
[ "LOW" ]
[ "LOW" ]
metrics.py
/metrics.py
sabakaio/k8s-diag-logs
MIT
2024-11-19T02:45:35.570160+00:00
1,617,019,946,000
7ec8901f72b0c71bf4b90e964e0fb0c3538ea547
3
{ "blob_id": "7ec8901f72b0c71bf4b90e964e0fb0c3538ea547", "branch_name": "refs/heads/master", "committer_date": 1617019946000, "content_id": "ccc30cf3b3ddbea016d4c66c9f4e247052cfe7f1", "detected_licenses": [ "MIT" ], "directory_id": "e14c03b8f486dcc1a3625a08d9a0784b879bba5f", "extension": "py", "fi...
2.671875
stackv2
# coding:utf-8 from io import BytesIO import numpy as np import requests import tensorflow as tf from PIL import Image from flask import Flask, request, make_response from ml_tools.object_detection.utils import label_map_util from ml_tools.object_detection.utils import visualization_utils as vis_util class ObjectDe...
116
40.28
112
18
992
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_3533daf65b88dd58_c764f562", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ...
4
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.audit.xss.make-response-with-unknown-content", "rules.python.flask.security.audit.xss.make-response-with-unknown-content" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 103, 107 ]
[ 103, 107 ]
[ 24, 24 ]
[ 65, 64 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Be careful with `flask.make_response()`. If this response is rendered onto a webpage, this could create a cross-site scripting (XSS) vulnerability. `flask.make_response()` will not autoescape HTML. If you are rendering HTML, write your HTML in a template file and use `flask.render_template()` which will take care ...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
server.py
/tensorflow/tensorflow-object-detection-server/server.py
fengrk/docker-practice
MIT
2024-11-19T02:45:36.259950+00:00
1,490,793,342,000
941805e7828acfa3ec0b7235d15b4356123e006e
3
{ "blob_id": "941805e7828acfa3ec0b7235d15b4356123e006e", "branch_name": "refs/heads/master", "committer_date": 1490793342000, "content_id": "208608ea0682ecbdfaa6b21cb8b31d1a39ed0af0", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "96c1e62f87484d3e7e719c7d888d6679b45f1e66", "extension": "p...
3.328125
stackv2
# # Copyright Michael Groys, 2014 # # # Different utils for writing unit tests # import inspect from collections import Counter class UnitTestAssert(Exception): def __init__(self): Exception.__init__(self) def __str__(self): return "Unit test failed" _conditionFailed = Counter() _currTest =...
105
27.16
95
11
775
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_06b8a653443b1ff1_01f7641e", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 28, 43 ]
[ 28, 43 ]
[ 14, 14 ]
[ 62, 62 ]
[ "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" ]
ut_utils.py
/m/ut_utils.py
minersoft/miner
BSD-3-Clause
2024-11-19T02:45:47.655042+00:00
1,535,255,264,000
97d965f80e382e028a0b4841952b0ed6cfc64bf5
2
{ "blob_id": "97d965f80e382e028a0b4841952b0ed6cfc64bf5", "branch_name": "refs/heads/master", "committer_date": 1535255264000, "content_id": "b4ea1d8313d49ffcdd7cff6ace59c0c934fccf7d", "detected_licenses": [ "MIT" ], "directory_id": "b61711f4b7b559517cdce14a4a79a67d58f93168", "extension": "py", "fi...
2.3125
stackv2
import os from collections import namedtuple from jinja2 import Environment Generator = namedtuple('Generator', ['generate_project']) def get_generator(template_string, filters=None): def generate_project(program, out_directory): env = Environment() if filters: import importlib ...
34
28.06
81
16
185
python
[{"finding_id": "semgrep_rules.python.flask.security.xss.audit.direct-use-of-jinja2_440db155100c44f8_6375f8ee", "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" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.jinja2.security.audit.missing-autoescape-disabled" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ 13, 13 ]
[ 13, 13 ]
[ 15, 15 ]
[ 28, 28 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A03:2021 - Injection" ]
[ "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 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
__init__.py
/wick/generators/template/__init__.py
SAIOP651645465/wick-1
MIT
2024-11-19T02:45:49.227223+00:00
1,556,383,471,000
94334f4dd7d2df54b34bed6d6675b7355466ffaf
2
{ "blob_id": "94334f4dd7d2df54b34bed6d6675b7355466ffaf", "branch_name": "refs/heads/master", "committer_date": 1556383471000, "content_id": "76fb5e9c50cb3ebbaf6440e5ed1f7e993e082f5f", "detected_licenses": [ "MIT" ], "directory_id": "818edca070b068345b23bd80f76ab95238d6fb43", "extension": "py", "fi...
2.375
stackv2
""" Collects twitter posts to use as YIAY answers. What it does: - Searches for tweets containing a hashtag with the Twitter API - Converts tweets to words with existing associated video clips - Renders tweets to HTML and then to images using WKHtmlToPdf """ from typing import Container, Generator, Tuple, Dict, Op...
176
27.47
116
17
1,325
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_e2b0dd38c1a5056c_0ebe056a", "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-79", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 137, 168 ]
[ 140, 168 ]
[ 21, 9 ]
[ 4, 45 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "'mark_safe()' is used to mark a str...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
twitter.py
/yiaygenerator/core/twitter.py
PaperBag42/yiaygenerator
MIT
2024-11-19T02:45:52.679724+00:00
1,510,405,837,000
0fed50e76a8ef12d5c560a6047924b28844b619c
3
{ "blob_id": "0fed50e76a8ef12d5c560a6047924b28844b619c", "branch_name": "refs/heads/master", "committer_date": 1510405837000, "content_id": "6b3c17bb2b5b37bb02223f3b22261f5d8efd247c", "detected_licenses": [ "MIT" ], "directory_id": "0d20ab8abdd259a45652e1304aad6e8c1594ba32", "extension": "py", "fi...
3.125
stackv2
#!/usr/bin/python3 from sqlite3 import Connection class SiDB( Connection ): def __init__( self, database ): self.database = database super( self.__class__, self ).__init__( self.database ) self.cursor = self.cursor() def insert( self, table, data ): """Inserts data in the table and returns ID of the last in...
147
34.35
122
16
1,476
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_b63e082ee8a0d16e_45f48a52", "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...
10
true
[ "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-...
[ "security", "security", "security", "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH", "MEDIUM", "HIGH" ]
[ 30, 77, 95, 108, 108, 132, 132, 140, 140 ]
[ 30, 77, 95, 108, 108, 132, 132, 140, 140 ]
[ 3, 3, 3, 3, 3, 3, 3, 4, 4 ]
[ 37, 43, 43, 59, 59, 29, 29, 88, 88 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "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, 7.5, 5, 7.5, 5, 7.5, 5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
SiDB.py
/SiDB.py
dvorakkk/devfestse17_twitterbot
MIT
2024-11-19T02:45:53.747212+00:00
1,522,112,383,000
aec8c0424100e48205d6a02e2e08eb6580dff91a
3
{ "blob_id": "aec8c0424100e48205d6a02e2e08eb6580dff91a", "branch_name": "refs/heads/master", "committer_date": 1522112383000, "content_id": "e416516c50ba28771165e6e3982004b45ee167a2", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "b9dd18b22863d3ff45d4acf034c30eb4f6e0b989", "extension": "p...
2.609375
stackv2
import gzip, pickle, os.path import tensorflow as tf NUM_CLASSES = 10 IMAGE_SIZE = 28 IMAGE_PIXELS = IMAGE_SIZE * IMAGE_SIZE NUM_HIDDEN_LAYERS = 1 HIDDEN_SIZES = [5] # length should equal NUM_HIDDEN_LAYERS INCLUDE_BIASES = False WEIGHT_DECAY = 0.00002 # This builds the feedforward network op and returns it. A weight...
107
40.39
80
21
1,028
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_82a70869f975903b_e09c0d9a", "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" ]
[ 86, 92 ]
[ 86, 92 ]
[ 9, 19 ]
[ 69, 52 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
mnist_model.py
/mnist_model.py
bagnalla/tf_mnist
BSD-2-Clause
2024-11-19T02:45:59.573143+00:00
1,579,228,395,000
6534cfd80415cec48dadff1479260bfbc1a8b5ec
3
{ "blob_id": "6534cfd80415cec48dadff1479260bfbc1a8b5ec", "branch_name": "refs/heads/master", "committer_date": 1579228395000, "content_id": "c5d0a755ccd26ea8a46f20e3cc0ae13308d0c662", "detected_licenses": [ "MIT" ], "directory_id": "ee740f901f0e2f190eb4c3492c85440eca4c16a9", "extension": "py", "fi...
2.9375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # py37 only # import asyncio # async def run(cmd): # proc = await asyncio.create_subprocess_shell( # cmd, # stdout=asyncio.subprocess.PIPE, # stderr=asyncio.subprocess.PIPE) # # stdout, stderr = await proc.communicate() # # print(f'[{cm...
152
25.37
61
15
993
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-asyncio-create-exec-audit_3e2a16e622d38aff_3fddc823", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-asyncio-create-exec-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected '...
3
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-asyncio-create-exec-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 50, 115 ]
[ 53, 115 ]
[ 18, 9 ]
[ 6, 61 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected 'create_subprocess_exec' function without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
sub.py
/pygrpc_repo/pygrpc/gio/sub.py
xkortex/xlab
MIT
2024-11-19T02:57:17.363889+00:00
1,620,409,773,000
8ab4a047738a058b662d4e8204cb66ba9bf6ee73
3
{ "blob_id": "8ab4a047738a058b662d4e8204cb66ba9bf6ee73", "branch_name": "refs/heads/master", "committer_date": 1620409773000, "content_id": "be08ec9c1a8340ea5d1f01b01f3fac4463d04c4f", "detected_licenses": [ "BSD-2-Clause-Views" ], "directory_id": "aab5a0958969db1a6cb6bcada6a14bab48f73a4f", "extensio...
2.53125
stackv2
#!/usr/bin/env python # script to test the orient.py running script. import stdb import pickle import os.path import numpy as np from obspy.clients.fdsn import Client from obspy.taup import TauPyModel from orientpy import BNG, arguments from pathlib import Path def main(): # Run the Input Parser args = arg...
225
36.8
82
22
1,962
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8f321f00dad42b20_a0f20789", "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" ]
[ 205, 219 ]
[ 205, 219 ]
[ 17, 17 ]
[ 63, 63 ]
[ "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" ]
bng_calc_auto.py
/Scripts/bng_calc_auto.py
VioletaSeo/OrientPy
BSD-2-Clause-Views
2024-11-19T02:57:20.228511+00:00
1,677,003,895,000
078952f49615595c5d8512a2d6e492766cca93f6
2
{ "blob_id": "078952f49615595c5d8512a2d6e492766cca93f6", "branch_name": "refs/heads/main", "committer_date": 1677003895000, "content_id": "40b990f6b76f54088abb4e96f3f1808e5f0b403d", "detected_licenses": [ "MIT" ], "directory_id": "0b277b2b4e9381b8e2e08b9e0f43ed6f4e4dc39e", "extension": "py", "file...
2.375
stackv2
import pickle from copy import deepcopy import numpy as np import grr.GIF_network as gfn from lib import generate_models_argparser, load_generate_models_opts # Parse commandline arguments args = generate_models_argparser.parse_args() opts = load_generate_models_opts( args.opts, { 'dt': None, ...
88
24.09
79
13
535
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_040432d81f203efa_378f9096", "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" ]
[ 26, 56 ]
[ 26, 56 ]
[ 27, 9 ]
[ 41, 30 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
generate_mpfc_models.py
/analysis/GIFnet_pipeline/generate_mpfc_models.py
nauralcodinglab/raphegif
MIT
2024-11-19T02:57:21.864407+00:00
1,516,907,481,000
540981de2f4013d8d4904a4a67a092de49888d17
3
{ "blob_id": "540981de2f4013d8d4904a4a67a092de49888d17", "branch_name": "refs/heads/master", "committer_date": 1516907481000, "content_id": "053913ac799773a5ca39b6399a401e26503b91fb", "detected_licenses": [ "MIT" ], "directory_id": "69c43e8b1e6957b378f1b736102fa97b39f03f82", "extension": "py", "fi...
2.578125
stackv2
import urllib.request import xml.etree.ElementTree as ET import constants class Connect: cookie = None @classmethod def __init__(cls): cls.cookie = None with urllib.request.urlopen('{}common-info'.format(constants.CONNECT_BASE_URL)) as response: xml = response.read() r...
93
40.41
120
20
769
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_ade2446f0734d24e_7e23f0a9", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xml", "finding_type": "security", "severity": "high", "confidence": "low", "message": "The Python documentation recommends using `defusedxml` instead...
4
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 2 ]
[ 2 ]
[ 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" ]
connect.py
/models/connect.py
appkabob/adobe_connect_py
MIT
2024-11-19T02:57:27.353340+00:00
1,692,116,364,000
94409c69c6782cd1b7eaf8e22bab6e27ab2e70cd
2
{ "blob_id": "94409c69c6782cd1b7eaf8e22bab6e27ab2e70cd", "branch_name": "refs/heads/master", "committer_date": 1693259976000, "content_id": "d7a5538e9659a10ae11521a58a0eafbae9df950e", "detected_licenses": [ "MIT" ], "directory_id": "29e99c68a5061bb3f081e49f57cd451fc125a0e9", "extension": "py", "fi...
2.328125
stackv2
""" Simple RPM repo functions. """ from __future__ import print_function import sys import zlib try: import urllib2 as urllib except: import urllib.request as urllib import xml.etree.ElementTree as ET req_timeout = 600.0 def _data_url(url): try: if url.startswith('/'): url = "file:"...
101
24.93
77
16
721
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_8aeb5348e5976c51_92569433", "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" ]
[ 13 ]
[ 13 ]
[ 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" ]
srepo.py
/srepo.py
james-antill/centos-sync-packages
MIT
2024-11-19T03:12:09.837972+00:00
1,534,237,536,000
93e4363f4ef4b895281231ced3666e6b3f441a6b
3
{ "blob_id": "93e4363f4ef4b895281231ced3666e6b3f441a6b", "branch_name": "refs/heads/master", "committer_date": 1534237536000, "content_id": "f27f84f31658df56c1a83e8142b45f2045ba2893", "detected_licenses": [ "MIT" ], "directory_id": "c11d8162ac2bcb623c0c86c1b9ff7a00ba980526", "extension": "py", "fi...
2.640625
stackv2
#! /usr/bin/env python import numpy as np from sklearn.ensemble import IsolationForest import json import cPickle as pickle def load_data(filename): with open(filename, 'r') as f: lines = f.readlines() x = [] for l in lines: x.append(json.loads(l)['feature']) x = np.array(x) y =...
73
30.97
85
12
742
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_562ba828a3d2dbda_576e9d54", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
3
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-cPickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 44, 44 ]
[ 44, 44 ]
[ 9, 9 ]
[ 30, 30 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `cPickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead t...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
iForest.py
/iforest_raw/python_sklearn/iForest.py
marine0131/audio_process
MIT
2024-11-19T03:12:11.089306+00:00
1,692,397,756,000
665da4f6293aa2927f9cad4f0598afb2c222abe3
2
{ "blob_id": "665da4f6293aa2927f9cad4f0598afb2c222abe3", "branch_name": "refs/heads/master", "committer_date": 1692397803000, "content_id": "15827cbc2c9acc024c02790510a1435210726f9f", "detected_licenses": [ "MIT" ], "directory_id": "7de550ac37dc5defe063702d129b4f8e1dadac57", "extension": "py", "fi...
2.484375
stackv2
import re from django import template from django.utils.safestring import mark_safe from django.utils.html import escape register = template.Library() @register.filter def highlight_term(text, term): term = escape(term) # necessary for phrases like 'R&D' if term.lower() in text.lower(): text = re....
22
21
59
14
106
python
[{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_05dffbfad94b1f66_1b020004", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-mark-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "'mark_safe()' is used to mark a string as \"...
1
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 22 ]
[ 22 ]
[ 12 ]
[ 27 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escaping and could therefore subject the content to XSS attacks. Use 'django.utils.html.format_html()' to build HTML for rendering instead." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
highlight_filter.py
/src/bookmarker/templatetags/highlight_filter.py
dellsystem/bookmarker
MIT
2024-11-19T03:12:15.075847+00:00
1,585,595,824,000
0bb6591473bb19eaef1da52cf2770a203f150a19
3
{ "blob_id": "0bb6591473bb19eaef1da52cf2770a203f150a19", "branch_name": "refs/heads/master", "committer_date": 1585595824000, "content_id": "d92a6781230cf4c393e1f4d87600d8a4bceb62af", "detected_licenses": [ "MIT" ], "directory_id": "845ba9bcbee4fcb369d10c9ebbac262bf9610b92", "extension": "py", "fi...
2.78125
stackv2
# -*- coding: utf-8 -*- """ [calc.py] Maths Operation Plugin [Author] Abdur-Rahmaan Janhangeer, pythonmembers.club [About] evaluates maths expressions in the format supported by py [Commands] >>> .calc <maths expression> returns evaluated expression """ from math import * class Plugin: def __init__(self): ...
45
33.93
77
24
376
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_a37f131ff9b64b61_44bd5e06", "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" ]
[ 42 ]
[ 42 ]
[ 33 ]
[ 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" ]
calc.py
/honeybot/plugins/calc.py
AngeloGiacco/honeybot-1
MIT
2024-11-19T03:12:15.479581+00:00
1,481,489,186,000
29e82de6c2c9f129acdf00c5ac2c4f983d4db9f0
3
{ "blob_id": "29e82de6c2c9f129acdf00c5ac2c4f983d4db9f0", "branch_name": "refs/heads/master", "committer_date": 1481489186000, "content_id": "2b7947a5acb39b14280b72e329a8f67aef5ed31e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ecb42114d093cef302c1b203f5fca0c609bc7d29", "extension": "py"...
3.0625
stackv2
#!/usr/bin/python3 import os import sys from math import copysign predictions = os.popen('cut predictions.txt -d \' \' -f1', 'r').readlines() correct = os.popen('cut %s -d\' \' -f1' % (sys.argv[1].zfill(5))).readlines() accurate = 0.0 spendcorrect = 0.0 total = 0.0 spendtotal = 0.0 count = 0.0 falses = 0.0 for i in ...
31
24.65
77
14
266
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_7c3574a8a7357033_fed9592a", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 7, 7 ]
[ 7, 7 ]
[ 11, 11 ]
[ 66, 66 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
accuracy.multiclass.py
/scoring/accuracy.multiclass.py
scuthbert/OracleAudienceCompetition
Apache-2.0
2024-11-19T03:12:16.700119+00:00
1,622,234,815,000
781a370b80effd84ef7529acf8763666c1d260b3
2
{ "blob_id": "781a370b80effd84ef7529acf8763666c1d260b3", "branch_name": "refs/heads/master", "committer_date": 1622234815000, "content_id": "7d187c1fa15ccff019e9cd5bba38bbed12beae62", "detected_licenses": [ "MIT" ], "directory_id": "9213d8e23c8645a803bc788593931791707e38a5", "extension": "py", "fi...
2.3125
stackv2
from FileListClass import * import gzip, bz2 import logging, os logger = logging.getLogger('pufferfish') ##bowtie2 --very-sensitive -N 1 -x sciara -U $reads 2>>$prefix.txt | samtools view -bSh - 2>>$prefix.txt | samtools sort - $prefix 2>>$prefix.txt ## ##samtools index $prefix.bam 2>>$prefix.txt def detect_fastx_...
113
28.99
146
15
1,014
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_628756d6c32d6313_99336278", "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...
3
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 86 ]
[ 86 ]
[ 9 ]
[ 25 ]
[ "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" ]
mapreads.py
/deprecated/pufferfish/pufferfish/mapreads.py
JohnUrban/sciara-project-tools
MIT
2024-11-19T03:12:18.616622+00:00
1,526,360,490,000
920428ab1a78256a6de7b03645337f56e389ae5d
3
{ "blob_id": "920428ab1a78256a6de7b03645337f56e389ae5d", "branch_name": "refs/heads/master", "committer_date": 1526360490000, "content_id": "ae8e912c906e81229955b60ee77ec30f606d0b93", "detected_licenses": [ "MIT" ], "directory_id": "2d8d41aa4c33d2f70e46ff709e6d152cab7d8ce7", "extension": "py", "fi...
2.515625
stackv2
from DTree import DecisionTree from LuaScript import LuaScript import sys, os, subprocess, re class Dissector: def __init__(self, protocol): self.dtree = DecisionTree() self.protocol = protocol self.tshark = TShark() def dissect_packet(self, pcap="icpm.pcap"): tshark = TShark(...
87
32.21
100
19
655
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_d93c00312e023574_f8ac9e73", "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 ]
[ 19 ]
[ 81 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
Dissector.py
/builder/Dissector.py
luuis9am/PDGS
MIT
2024-11-19T03:12:18.924340+00:00
1,528,443,196,000
6ea4ff867d2d99d69410f97a963726a5475a17c7
3
{ "blob_id": "6ea4ff867d2d99d69410f97a963726a5475a17c7", "branch_name": "refs/heads/master", "committer_date": 1528443196000, "content_id": "eb1cdfd1550aeee4e7f2e4e67a3dd25094ea094e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "885c4a9ba1fe1b1566e7a788fab55ad317ce5359", "extension": "p...
2.765625
stackv2
"""Common functions for doing stuff.""" from datetime import timedelta import functools import sys assert sys.version_info >= (3, 6), 'Use Python ≥3.6' def parse_params(params): for k, v in params.items(): if isinstance(v, str): try: params[k] = eval(v) except Name...
28
21.64
52
14
151
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_8fc2b08e4288af86_d5de7184", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
1
true
[ "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 13 ]
[ 13 ]
[ 29 ]
[ 36 ]
[ "A03:2021 - Injection" ]
[ "Detected the use of eval(). eval() can be dangerous if used to evaluate dynamic content. If this content can be input from outside the program, this may be a code injection vulnerability. Ensure evaluated content is not definable by external sources." ]
[ 5 ]
[ "LOW" ]
[ "HIGH" ]
common.py
/common.py
basnijholt/nanowire-qpc-spectrum
BSD-3-Clause
2024-11-19T03:12:23.002950+00:00
1,454,580,264,000
6a9a9f95e18c03285d2e7fdabe2f09a0ee51c149
3
{ "blob_id": "6a9a9f95e18c03285d2e7fdabe2f09a0ee51c149", "branch_name": "refs/heads/master", "committer_date": 1454580264000, "content_id": "8a73f4d725c4832831aa07997ffd7353c7e22c92", "detected_licenses": [ "BSD-3-Clause", "Apache-2.0" ], "directory_id": "de6fb3a55196b6bd36a4fda0e08ad658679fb7a1",...
2.71875
stackv2
''' @author: jnaous ''' try: from cStringIO import StringIO except ImportError: from StringIO import StringIO import xmlrpclib import urlparse import base64 import logging logger = logging.getLogger("TestClientTransport") class TestClientTransport(xmlrpclib.Transport): """Handles connections to XML-RPC se...
42
31.57
79
13
306
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xmlrpc_4eea09a20a4c2e7c_5b32a9e4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.use-defused-xmlrpc", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected use of xmlrpc. xmlrpc is not inherently safe fr...
1
true
[ "CWE-776" ]
[ "rules.python.lang.security.use-defused-xmlrpc" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 9 ]
[ 9 ]
[ 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" ]
transport.py
/optin_manager/src/python/openflow/common/utils/transport.py
dana-i2cat/felix
BSD-3-Clause,Apache-2.0
2024-11-19T03:12:23.134573+00:00
1,620,153,654,000
9641fffc1d4ac5c9fdcd4a1532a7fada3283b560
3
{ "blob_id": "9641fffc1d4ac5c9fdcd4a1532a7fada3283b560", "branch_name": "refs/heads/master", "committer_date": 1620153654000, "content_id": "cd3c870e77f011e0e5c5c566dbfa605be0a2fa4b", "detected_licenses": [ "MIT" ], "directory_id": "8b1aab44c0f306b47ace642edff92ee9b1f33ff9", "extension": "py", "fi...
2.890625
stackv2
""" Dumps all tables into a single python pickle file. Run with pipenv run python dump-db.py """ from config import Config from factory import make_dbfacade from app.model import Team, User import pickle filename = 'db.pkl' db = make_dbfacade(Config()) all_teams = db.query(Team) all_users = db.query(User) data = { ...
26
19.65
58
9
141
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_6c61e68adf63f90e_6cc0055b", "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 ]
[ 5 ]
[ 25 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
dump-db.py
/dump-db.py
ubclaunchpad/rocket2
MIT
2024-11-19T03:12:25.439161+00:00
1,533,541,844,000
9383437b2d76ffdc6ddae1a1ae40e263c3f8486a
2
{ "blob_id": "9383437b2d76ffdc6ddae1a1ae40e263c3f8486a", "branch_name": "refs/heads/master", "committer_date": 1533541844000, "content_id": "0a1e9c96faff75da83e948b8c816dac14af27f5f", "detected_licenses": [ "MIT" ], "directory_id": "66b50e8ba133eff58e79419ae50e0c70b26b1aad", "extension": "py", "fi...
2.328125
stackv2
import cv2 import pickle import glob import os undistorted_dir_name = 'output_images/undistorted' chess_undistor_dir_name ="output_images/chessundistorted" # Read in the saved objpoints and imgpoints dist_pickle = pickle.load( open( "caliberation_dist_pickle.p", "rb" ) ) mtx = dist_pickle["mtx"] dist = dist_pickle["d...
30
29.43
91
14
241
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_a7623ff08500bb30_b2c056ea", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 10 ]
[ 10 ]
[ 15 ]
[ 72 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
undistortimages.py
/undistortimages.py
gayyaswa/CarND-Advanced-Lane-Lines
MIT
2024-11-19T03:12:26.591693+00:00
1,490,360,353,000
8a578bcf9a69a51bc48f53cfbf349ebc42689b8c
3
{ "blob_id": "8a578bcf9a69a51bc48f53cfbf349ebc42689b8c", "branch_name": "refs/heads/master", "committer_date": 1490360353000, "content_id": "fb9d91bf86ca0770790d14bbd251d24e0f69b6ff", "detected_licenses": [ "MIT" ], "directory_id": "1262f1b71303b67975a2155968c9dfa52a70ebf0", "extension": "py", "fi...
2.703125
stackv2
import os import sqlite3 import logging class RealDb(): def __init__(self): self.db_file = os.environ['TRAM_ROOT'] + '/data/real.db' self.db_connection = sqlite3.connect(self.db_file) self.cursor = self.db_connection.cursor() logging.info('RealDb object created') def get_all(s...
22
30.59
98
11
170
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_356a0fff980803a6_42cff9b2", "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" ]
[ 21, 21 ]
[ 21, 21 ]
[ 9, 9 ]
[ 35, 35 ]
[ "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" ]
real.py
/backend/schedule_worker/db/real.py
evemorgen/GdzieJestTenCholernyTramwajProject
MIT
2024-11-19T01:33:38.584266+00:00
1,527,615,546,000
8ca6677877a01d61a16822127d3ee0c718277d16
3
{ "blob_id": "8ca6677877a01d61a16822127d3ee0c718277d16", "branch_name": "refs/heads/master", "committer_date": 1527615546000, "content_id": "45957ee941181b01e56c930fd7030d88498e1f6d", "detected_licenses": [ "MIT" ], "directory_id": "b7393cc60892fd48e32e671822ddd3515b312046", "extension": "py", "fi...
3.09375
stackv2
#!/usr/bin/python3.5 import pysynth, pysynth_b, pysynth_c, pysynth_d, pysynth_e, pysynth_p, pysynth_s import random import math import sys import os class Input: BPM = 120 songLength = 50 key = 'C' synth = 'a' songName = "" # Key signatures disctionary keySignatures = { 'C': ['c', 'd', 'e', ...
245
28.24
92
21
2,168
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_b1a63f84f0ef3f46_155464ef", "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" ]
[ 238 ]
[ 238 ]
[ 5 ]
[ 52 ]
[ "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" ]
proceduralMusicGen.py
/proceduralMusicGen.py
Ubspy/HackKState
MIT
2024-11-19T01:33:45.899460+00:00
1,663,146,072,000
25049131bf2bff40c2fa111fa0491e4526a3a6d9
2
{ "blob_id": "25049131bf2bff40c2fa111fa0491e4526a3a6d9", "branch_name": "refs/heads/master", "committer_date": 1663146072000, "content_id": "653b3a91ab1325965e99d3da48164c52c2d2e34e", "detected_licenses": [ "MIT" ], "directory_id": "ecc84bf4583005157dd6248ccd4838e153f7d6ae", "extension": "py", "fi...
2.5
stackv2
import re from django import template from django.utils.safestring import SafeData, mark_safe from django.utils.html import escape, smart_urlquote from django.utils.encoding import force_text register = template.Library() # This entire filter is almost identical to urlize_quoted_links from the DRF template tags, but ...
99
40.86
116
21
945
python
[{"finding_id": "semgrep_rules.python.django.security.audit.avoid-mark-safe_3984b6af83b42daa_beec7788", "tool_name": "semgrep", "rule_id": "rules.python.django.security.audit.avoid-mark-safe", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "'mark_safe()' is used to mark a string as \"...
1
true
[ "CWE-79" ]
[ "rules.python.django.security.audit.avoid-mark-safe" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 97 ]
[ 97 ]
[ 12 ]
[ 37 ]
[ "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "'mark_safe()' is used to mark a string as \"safe\" for HTML output. This disables escaping and could therefore subject the content to XSS attacks. Use 'django.utils.html.format_html()' to build HTML for rendering instead." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
loggers_extras.py
/loggers/templatetags/loggers_extras.py
drguggiana/bonDjango
MIT
2024-11-19T01:33:49.402333+00:00
1,598,811,068,000
0871b4c2ccc824babbf7115128e9c81c9704fa96
2
{ "blob_id": "0871b4c2ccc824babbf7115128e9c81c9704fa96", "branch_name": "refs/heads/master", "committer_date": 1598811068000, "content_id": "ab3dffcc4ea4fb3632609f6876f750646e88229f", "detected_licenses": [ "MIT" ], "directory_id": "80b2b1fad6ab060f2b6d65a5adf4ebc9a726bb96", "extension": "py", "fi...
2.34375
stackv2
from . import bp_main from flask.views import MethodView from flask import render_template, request, url_for, redirect, g from flask_login import login_required, current_user from database.models import Role_dict, Alert, Location, Entity, Access from sqlalchemy import func import datetime as dt from collections impo...
195
35.48
136
22
1,559
python
[{"finding_id": "semgrep_rules.python.flask.security.open-redirect_29c5d50c5e3bb427_1efe7a6d", "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...
4
true
[ "CWE-601" ]
[ "rules.python.flask.security.open-redirect" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 23 ]
[ 26 ]
[ 5 ]
[ 54 ]
[ "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 ]
[ "LOW" ]
[ "MEDIUM" ]
views.py
/web_app/modules/main/views.py
ai404/esafe-platform
MIT
2024-11-19T01:33:50.005603+00:00
1,520,200,321,000
4a13a6161ded005b11ffb02ff016cc4d327947cb
2
{ "blob_id": "4a13a6161ded005b11ffb02ff016cc4d327947cb", "branch_name": "refs/heads/master", "committer_date": 1520200321000, "content_id": "03dc98274a9a09d329a999f27452e5fee87bd38b", "detected_licenses": [ "MIT" ], "directory_id": "0edd2b30c42d4a40ddd84667b206009f26f0f6e7", "extension": "py", "fi...
2.40625
stackv2
from glob import glob from scripts.DataGeneratorClass import DataGenerator from collections import defaultdict import pickle def load_train_test(dict_dir, chunks, params): input_dict_train, target_dict_train, input_dict_val, target_dict_val, \ len_wav_list_inp_train, len_wav_list_inp_val = __get_dictionaries...
64
37.27
121
17
578
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_3306652ae2310c63_d7647ae7", "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" ]
[ 24, 27 ]
[ 24, 27 ]
[ 20, 20 ]
[ 39, 39 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
load_data_bkp.py
/src/scripts/bkp/load_data_bkp.py
rperi/AudioDenoisingAutoEncoder
MIT
2024-11-19T01:33:53.000825+00:00
1,578,304,336,000
f8daa4ad73166b2b726a573ea849d8fc3f9ed6c7
4
{ "blob_id": "f8daa4ad73166b2b726a573ea849d8fc3f9ed6c7", "branch_name": "refs/heads/master", "committer_date": 1578304336000, "content_id": "8be760a4114acf5a4db49d05c1ef322eef5d00e1", "detected_licenses": [ "MIT" ], "directory_id": "2b6fa34dac030ec1f2918b1377956bf791219d22", "extension": "py", "fi...
3.75
stackv2
# https://leetcode.com/problems/compare-version-numbers/ # # Compare two version numbers version1 and version2. # If version1 > version2 return 1, if version1 < version2 return -1, otherwise return 0. # # You may assume that the version strings are non-empty and contain only digits and the . character. # The . characte...
58
29.67
100
14
464
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.eval-detected_b0e925bf87d66134_f5153ae5", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.eval-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected the use of eval(). eval() can be dangerous ...
2
true
[ "CWE-95", "CWE-95" ]
[ "rules.python.lang.security.audit.eval-detected", "rules.python.lang.security.audit.eval-detected" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 28, 33 ]
[ 28, 33 ]
[ 23, 23 ]
[ 30, 30 ]
[ "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" ]
compare-version-numbers.py
/leetcode/easy/compare-version-numbers.py
rainzhop/cumulus-tank
MIT
2024-11-19T01:33:54.677914+00:00
1,591,233,729,000
cf2ff7a645783f3d0c910eabb422d2fa11fb838a
3
{ "blob_id": "cf2ff7a645783f3d0c910eabb422d2fa11fb838a", "branch_name": "refs/heads/master", "committer_date": 1591233729000, "content_id": "1b3458b6b8f75e90b685eec3fd1c5b5dc6acef2a", "detected_licenses": [ "MIT" ], "directory_id": "139bf8c637b4d04877180d5cff4621a7dead539c", "extension": "py", "fi...
2.828125
stackv2
""" Module that simplify few calls to PostgreSQL Acknowledgement: some of the code is based on the tutorial form https://www.postgresqltutorial.com/postgresql-python """ import psycopg2 import logging from kafka_postgres.postgresql_helper.exceptions import DataBaseOperationError from kafka_postgres.definitions.keys i...
168
38.68
110
15
1,269
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_8aebb16d6525e8f9_9dd21aa7", "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" ]
[ 110, 129 ]
[ 110, 138 ]
[ 13, 13 ]
[ 54, 35 ]
[ "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" ]
postgresql_helper.py
/kafka_postgres/postgresql_helper/postgresql_helper.py
eykop/Web-Monitoring-Kafka-PostgreSQL
MIT
2024-11-19T01:57:19.868428+00:00
1,615,935,453,000
ac0c53705d785889c55c4655eba356e8eaa7518e
3
{ "blob_id": "ac0c53705d785889c55c4655eba356e8eaa7518e", "branch_name": "refs/heads/master", "committer_date": 1615935453000, "content_id": "f52dc974edaa5616625ed7d5fbcc3bc64bc42005", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4e4217926b8274aa56b7afa5061938d1040d0460", "extension": "py"...
2.578125
stackv2
''' dab-seq: single-cell dna genotyping and antibody sequencing ben demaree 8.8.2019 ''' import subprocess import os if __name__ == "__main__": # input folder input_dir = '/drive4/harish_novaseq/' output_dir = '/drive4/harish_novaseq/repaired/' fastq_files = [f for f in os.listdir(input_dir) if '.f...
32
23.81
99
11
249
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_bd6228d96214fc66_d2fc9988", "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" ]
[ 32, 32 ]
[ 32, 32 ]
[ 9, 43 ]
[ 48, 47 ]
[ "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" ]
repair_fastq.py
/sequencing_utilities/repair_fastq.py
AbateLab/DAb-seq
Apache-2.0
2024-11-19T01:57:20.314448+00:00
1,589,786,381,000
ae8a0473048c4e341703ca38f7a6d75c3de5e875
3
{ "blob_id": "ae8a0473048c4e341703ca38f7a6d75c3de5e875", "branch_name": "refs/heads/master", "committer_date": 1589786381000, "content_id": "913e4e17f7d19d222631bd2b6e12ee3db5a00d6a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c1eef090cb16165b58e6afe05d066b3bb2d4ade0", "extension": "py"...
2.515625
stackv2
import os import sys os_name = 'windows' pngquant_path = 'bin\windows\pngquant.exe' tmp_ext = '-fs8.png' def get_img_without_ext(img_path): last_dot_idx = img_path.rfind('.') return img_path[:last_dot_idx] def compress_image(src, dst): src_without_ext = get_img_without_ext(src) cmd = pngquant_path + ...
38
28.92
72
18
297
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_3ed277591c20cd1f_d36e05c3", "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" ]
[ 15 ]
[ 15 ]
[ 5 ]
[ 19 ]
[ "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" ]
utils.py
/utils.py
nguyencse/pycompress
Apache-2.0
2024-11-19T01:57:30.377652+00:00
1,480,362,140,000
906dd19c027dfe3b9df86daae3a60ba0edef5055
3
{ "blob_id": "906dd19c027dfe3b9df86daae3a60ba0edef5055", "branch_name": "refs/heads/master", "committer_date": 1480362140000, "content_id": "e0376e002e8e9c78859e514d73c870b1260fa2a9", "detected_licenses": [ "MIT" ], "directory_id": "ff26fe3c5ba990bbb1a4cd1989f439417e95423d", "extension": "py", "fi...
2.90625
stackv2
# -*- coding:utf-8 -*- import MySQLdb def DBSave1(title, nopuntitle, url, summary, time, isaccident, hash): """ 数据库存储方法 表:newsdetails """ conn = MySQLdb.connect(host='127.0.0.1', port=3306, user='root', passwd='root', ...
84
26.74
104
22
617
python
[{"finding_id": "semgrep_rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query_c271ec7941f75df3_68b3bf58", "tool_name": "semgrep", "rule_id": "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Avoiding SQL string conc...
3
true
[ "CWE-89", "CWE-89", "CWE-89" ]
[ "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security", "security" ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 22, 48, 72 ]
[ 22, 48, 72 ]
[ 5, 5, 5 ]
[ 31, 31, 29 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Avoiding SQL string concatenation: untrusted input concatenated with raw SQL query can result in SQL Injection. In order to execute raw query safely, prepared statement should be used. SQLAlchemy provides TextualSQL to easily used prepared statement with named parameters. For complex SQL composition, use SQL Expre...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
DbProcess.py
/ReferenceCode/DbProcess.py
zthxxx/python-OpinionMonitoring
MIT
2024-11-19T01:57:30.581270+00:00
1,693,565,297,000
ed64af2eaee40bb1b40bd93caa8fbd2541ea6591
3
{ "blob_id": "ed64af2eaee40bb1b40bd93caa8fbd2541ea6591", "branch_name": "refs/heads/master", "committer_date": 1693565297000, "content_id": "19933655d0b02d31b70d9bfaf78bbb069b8d7002", "detected_licenses": [ "MIT" ], "directory_id": "228640e0cf31aa1f34ef41de74a071b8bb6c970e", "extension": "py", "fi...
2.515625
stackv2
#!@python3@/bin/python3 -u from collections import defaultdict import itertools import json import os import random import re import subprocess import sys CONFIG = "@jsonConfig@" # example: '0: +*DP1 3840/600x2160/340+1920+0 DP1' XRANDR_MONITOR_RE = re.compile(r'^\d+: \+\*?(?P<id>[\w-]+) (?P<w>\d+)\/\d+x(?P<h>\d+)\/...
118
26.48
127
14
845
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_8f3b59fbb32ba2c6_75014d34", "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" ]
[ 78 ]
[ 78 ]
[ 5 ]
[ 40 ]
[ "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" ]
random_wallpaper.py
/repos/c0deaddict/hm-modules/random-wallpaper/random_wallpaper.py
nix-community/nur-combined
MIT
2024-11-19T02:10:47.234363+00:00
1,692,626,483,000
b31e7ab4161f9620e56b046f7c9293edef4cfd81
3
{ "blob_id": "b31e7ab4161f9620e56b046f7c9293edef4cfd81", "branch_name": "refs/heads/master", "committer_date": 1692626483000, "content_id": "1086419d991daaeac22dcac52392c672db75e1c4", "detected_licenses": [ "MIT" ], "directory_id": "a8169de7e3d4068c1712a1ef8bbc3a1efbdf2b02", "extension": "py", "fi...
2.53125
stackv2
import cv2 import numpy as np import subprocess import alf.io from one.api import ONE from pathlib import Path import os import time import logging _logger = logging.getLogger('ibllib') ''' For a session where there is DLC already computed, load DLC traces to cut video ROIs and then compute motion energy for these R...
270
28.15
89
15
2,138
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_9e7027c97d493bb3_ab664550", "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" ]
[ 79, 81 ]
[ 83, 81 ]
[ 15, 15 ]
[ 32, 19 ]
[ "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" ]
motion_energy_pipeline.py
/prototyping/motion_energy_pipeline.py
int-brain-lab/iblvideo
MIT
2024-11-19T02:10:53.747383+00:00
1,628,867,988,000
e7badfb627bbd4af6cdbb558e2d766973df26072
2
{ "blob_id": "e7badfb627bbd4af6cdbb558e2d766973df26072", "branch_name": "refs/heads/master", "committer_date": 1628867988000, "content_id": "4425a75a27810f5ae929e42049eb98e64ffca10b", "detected_licenses": [ "MIT" ], "directory_id": "00d7e9321d418a2d9a607fb9376b862119f2bd4e", "extension": "py", "fi...
2.40625
stackv2
#!/usr/bin/env python import pickle import PyEcho import datetime import time import RPi.GPIO as gpio import pims.wemocontrol.wemo_backend as wemo_backend from pims.echo.myring import retrieve, SECRETSDB_FILE # FIXME get rid of unused imports # FIXME document steps needed for secret file def wemo_action(wemo, acti...
98
25.43
76
13
684
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.arbitrary-sleep_86c587aa7d2cf778_643beb6a", "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-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 60 ]
[ 60 ]
[ 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" ]
alexa2do.py
/echo/alexa2do.py
baluneboy/pims
MIT
2024-11-19T02:10:57.172951+00:00
1,607,306,787,000
b1dd0d279db4412ed0d216e9115757b5753e1d32
3
{ "blob_id": "b1dd0d279db4412ed0d216e9115757b5753e1d32", "branch_name": "refs/heads/main", "committer_date": 1607306787000, "content_id": "3af0fe860e5f44635b36167c67cc50e4490e20e7", "detected_licenses": [ "MIT" ], "directory_id": "d8b9ff20d403f2327ac892a7061fb532357cb170", "extension": "py", "file...
2.96875
stackv2
""" This script allows for the standardized evaluation metrics such as F1, BLEU-4, ROUGE-L, METEOR, etc. to be computed against a set of reference responses. """ import argparse import glob import logging import os import pickle import pprint from collections import Counter import nlgeval from datasets import load_me...
425
35.2
145
21
3,450
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_3b55637de82d1f81_8b790039", "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...
10
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 221 ]
[ 221 ]
[ 21 ]
[ 55 ]
[ "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" ]
eval_metrics.py
/evaluation/eval_metrics.py
omkarpat/conversational-movie-recommender
MIT
2024-11-19T02:10:59.625024+00:00
1,631,289,030,000
86cf3ebbeeb9ecce05622fdad6f5b44ade09f651
2
{ "blob_id": "86cf3ebbeeb9ecce05622fdad6f5b44ade09f651", "branch_name": "refs/heads/master", "committer_date": 1631289030000, "content_id": "dfdfaa5c15aeba348e916009bf003b3f39246fb1", "detected_licenses": [ "MIT" ], "directory_id": "489489fca771f02b373b98a2755e6700476c61bd", "extension": "py", "fi...
2.328125
stackv2
# Script to update ods-ci test results in polarion import os import argparse import re import shutil import yaml import sys import uuid import subprocess dir_path = os.path.dirname(os.path.abspath(__file__)) sys.path.append(dir_path+"/../") from util import clone_config_repo, read_yaml POLARION_URL = "https://polari...
134
36.1
89
12
1,089
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_2f4790ae80e8d405_13dcb658", "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...
9
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW", "MEDIUM", "LOW", "MEDIUM" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 109, 109, 119, 119, 127, 127 ]
[ 109, 109, 119, 119, 127, 127 ]
[ 11, 38, 11, 38, 11, 38 ]
[ 43, 42, 43, 42, 43, 42 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functio...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW", "HIGH", "LOW", "HIGH" ]
[ "HIGH", "LOW", "HIGH", "LOW", "HIGH", "LOW" ]
polarionUpdater.py
/utils/scripts/polarion/polarionUpdater.py
vpavlin/ods-ci
MIT
2024-11-19T02:11:06.840972+00:00
1,690,675,952,000
9960f10a03400a2f999be5aee736f2003d06276a
2
{ "blob_id": "9960f10a03400a2f999be5aee736f2003d06276a", "branch_name": "refs/heads/master", "committer_date": 1690675952000, "content_id": "daec151c25ab8b9d06e0fa695d43d17426db874c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5de6854181ce3fd2544d43644b3bb9abc923969b", "extension": "py"...
2.359375
stackv2
import os import json import requests APP_URL_FORMAT = "http://{}:8001/api/v2/applications/{}" APPS = {'YouTube': '111299001912', 'Plex': '3201512006963', 'Prime Video': '3201512006785', 'Universal Guide': '3201710015067', 'Netflix': '11101200001', 'Apple TV': '3201807016597', ...
82
30.02
92
15
834
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_190aa2103d1aa80d_736fb98d", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ...
4
true
[ "CWE-78", "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" ]
[ 62, 66 ]
[ 62, 66 ]
[ 16, 16 ]
[ 87, 89 ]
[ "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" ]
application.py
/custom_components/samsungtv_custom/samsungctl_qled/application.py
roberodin/ha-samsungtv-custom
Apache-2.0
2024-11-19T02:11:15.331706+00:00
1,557,448,848,000
893fd863c3a777f20e8984bf9f309e609ff260a1
3
{ "blob_id": "893fd863c3a777f20e8984bf9f309e609ff260a1", "branch_name": "refs/heads/master", "committer_date": 1557448848000, "content_id": "63cbc7184eb2e15f7d04026f232c788dd426ccc6", "detected_licenses": [ "MIT" ], "directory_id": "2886c2724fb4f12c99d028e9cb55da9b232a4a85", "extension": "py", "fi...
2.734375
stackv2
import os import subprocess from typing import List def get_base_call(mount_path: str) -> List[str]: """Return base docker call with mounted path""" return ['docker', 'run', '--log-driver=none', '-v', '{}:/data'.format(os.path.abspath(mount_path))] def fix_permissions(tool: str, work...
19
34.21
99
11
163
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_b6a4f865122c0d0b_cdcd23ca", "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 ]
[ 5 ]
[ 35 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'check_call' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
__init__.py
/src/rnaseq_lib3/docker/__init__.py
jvivian/rnaseq-lib3
MIT
2024-11-19T02:11:15.444293+00:00
1,613,655,782,000
08dd2df3f52b50412ab556019a00f9cac34867d4
3
{ "blob_id": "08dd2df3f52b50412ab556019a00f9cac34867d4", "branch_name": "refs/heads/master", "committer_date": 1613655782000, "content_id": "d2f8a587bc13f78fc7beb584c2c474f58539d5fb", "detected_licenses": [ "MIT" ], "directory_id": "3f800f41c9e2fa8098912f557d3edb82d84e4303", "extension": "py", "fi...
3.109375
stackv2
import os import psycopg2 from psycopg2 import OperationalError, DatabaseError import sys import logging def log_psycopg2_exception(err): """ This method provides additional information about the passed error: - details about the exception - line number where exception occurred - diagn...
116
26.22
103
13
677
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_12d890b9f5d68efb_27b772a4", "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" ]
[ 93, 93 ]
[ 95, 95 ]
[ 13, 13 ]
[ 14, 14 ]
[ "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" ]
database.py
/database/database.py
tiskutis/California-Apartment-Price-Predictor-API
MIT
2024-11-19T02:11:16.680400+00:00
1,693,574,052,000
486d8beeaf3721fed88d6bec8ae3aeaacbc2e4a1
3
{ "blob_id": "486d8beeaf3721fed88d6bec8ae3aeaacbc2e4a1", "branch_name": "refs/heads/master", "committer_date": 1693574052000, "content_id": "46630188e18e0562493c073fa847a9a7c1b1523d", "detected_licenses": [ "MIT" ], "directory_id": "184f13269249b08e5b62444ece10af8a3a35c9a5", "extension": "py", "fi...
2.6875
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- """ [path] cd /Users/brunoflaven/Documents/01_work/blog_articles/stop_starting_start_stopping/pandas_convert_json/ [file] START WP LOCALLY ! wp apis https://yalla.pythonista.mydomain.priv/wordpress/wp-json/wp/v2 https://yalla.pythonista.mydomain.priv/wordpress/wp-json/wp/v2...
95
23.54
149
12
618
python
[{"finding_id": "semgrep_rules.python.requests.best-practice.use-raise-for-status_152686e1e3570b8a_6cc74aa7", "tool_name": "semgrep", "rule_id": "rules.python.requests.best-practice.use-raise-for-status", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "There's an HTTP request ...
3
true
[ "CWE-295" ]
[ "rules.python.requests.security.disabled-cert-validation" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 57 ]
[ 57 ]
[ 16 ]
[ 63 ]
[ "A03:2017 - Sensitive Data Exposure" ]
[ "Certificate verification has been explicitly disabled. This permits insecure connections to insecure servers. Re-enable certification validation." ]
[ 7.5 ]
[ "LOW" ]
[ "LOW" ]
014_pandas_convert_json_wp.py
/stop_starting_start_stopping/pandas_convert_json/014_pandas_convert_json_wp.py
bflaven/BlogArticlesExamples
MIT
2024-11-19T02:11:27.820910+00:00
1,563,367,637,000
0767e54123ca7872c3b8900506e5ca9ada53d36c
3
{ "blob_id": "0767e54123ca7872c3b8900506e5ca9ada53d36c", "branch_name": "refs/heads/master", "committer_date": 1563367637000, "content_id": "beeb5f9e8c8286723bced8fb5b10743870584bf3", "detected_licenses": [ "MIT" ], "directory_id": "15e62969e186c66518ccb5f725dbb1788f1f6a3b", "extension": "py", "fi...
3.015625
stackv2
import pickle data = pickle.load(open("static_about_comment.pkl","rb")) comment_nums = list(data.values()) max_comment_num = max(comment_nums) min_comment_num = min(comment_nums) avg_comment_num = sum(comment_nums)/len(comment_nums) Dict = {} for ele in comment_nums: if ele not in Dict: Dict[ele] = 1 ...
24
22.08
57
10
150
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_8035460829802e91_891b5eff", "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" ]
[ 3 ]
[ 3 ]
[ 8 ]
[ 58 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
analistic_comment.py
/analistic_comment.py
clickoneclick/wide_and_deep
MIT
2024-11-19T02:11:38.600777+00:00
1,573,054,717,000
89abc5607281007cbd563ab187bdc44c1410e996
2
{ "blob_id": "89abc5607281007cbd563ab187bdc44c1410e996", "branch_name": "refs/heads/master", "committer_date": 1573054717000, "content_id": "acb636c6ed4f78fcd1b0041826acfa08b81b2252", "detected_licenses": [ "MIT" ], "directory_id": "8296d5bed781da5d2f990d1fe5d06488f39b0c56", "extension": "py", "fi...
2.453125
stackv2
# -*- coding: utf-8 -*- import os import math import cv2 import librosa import numpy as np from subprocess import call vfps = 30 size = (1280, 720) def align2audio(data, mp3_path): n = 100 wave, sr = librosa.load(mp3_path, sr=vfps*n) Nfr = math.ceil(wave.shape[0] / n) line = data[-1] tail = np.ar...
50
30.7
115
13
509
python
[{"finding_id": "semgrep_rules.python.lang.correctness.unchecked-subprocess-call_d680c861786b2b1b_a933bc73", "tool_name": "semgrep", "rule_id": "rules.python.lang.correctness.unchecked-subprocess-call", "finding_type": "correctness", "severity": "medium", "confidence": "medium", "message": "This is not checking the ret...
2
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 27 ]
[ 27 ]
[ 5 ]
[ 18 ]
[ "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" ]
visual.py
/visual.py
Junlin-Yin/lower-face-synthesize
MIT
2024-11-19T02:11:40.620264+00:00
1,572,407,303,000
8380d951c9fbbb355a12267eab03ef6eee1d0017
3
{ "blob_id": "8380d951c9fbbb355a12267eab03ef6eee1d0017", "branch_name": "refs/heads/master", "committer_date": 1572407303000, "content_id": "5f1aec1321e73f3059a2eb7681e360cb6101407d", "detected_licenses": [ "MIT" ], "directory_id": "dc19e002019e5d913c7ed7489d896534fc255eb0", "extension": "py", "fi...
2.546875
stackv2
""" __author__ = "Xingjian Du" Main -Capture the config file -Process the json config passed -Create an agent instance -Run the agent """ import sys try: sys.path.append(sys.argv[2]) except: sys.path.append(sys.argv[1]) from config_file import get_config from agents import * def main(): config =...
36
17.17
73
10
163
python
[{"finding_id": "semgrep_rules.python.lang.security.dangerous-globals-use_01a4a01646ca0b8c_bb6675a4", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.dangerous-globals-use", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Found non static data as an index to 'globals()'...
1
true
[ "CWE-96" ]
[ "rules.python.lang.security.dangerous-globals-use" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 27 ]
[ 27 ]
[ 19 ]
[ 47 ]
[ "A03:2021 - Injection" ]
[ "Found non static data as an index to 'globals()'. This is extremely dangerous because it allows an attacker to execute arbitrary code on the system. Refactor your code not to use 'globals()'." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
main_eval.py
/main_eval.py
diggerdu/VGGish_Genre_Classification
MIT
2024-11-19T02:11:47.224559+00:00
1,595,843,344,000
e2003b00a6917edeabfaacf274b11e4e304a4f09
2
{ "blob_id": "e2003b00a6917edeabfaacf274b11e4e304a4f09", "branch_name": "refs/heads/master", "committer_date": 1595845764000, "content_id": "49df7f36546b8ed125058e80bf0abbc8bf417839", "detected_licenses": [ "Apache-2.0" ], "directory_id": "40e7fd21ee7cb090650eb2ce122abde0b17147d0", "extension": "py"...
2.3125
stackv2
import os import logging import ast import sys import importlib from glob import glob from itertools import product, chain import yaml import networkx as nx from jinja2 import Template logger = logging.getLogger('soil') logger.setLevel(logging.INFO) def load_network(network_params, dir_path=None): if network_...
201
28.05
81
17
1,356
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_be35027ba3af8b52_cd185959", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
5
true
[ "CWE-79", "CWE-79" ]
[ "rules.python.flask.security.xss.audit.direct-use-of-jinja2", "rules.python.flask.security.xss.audit.direct-use-of-jinja2" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 93, 102 ]
[ 93, 102 ]
[ 17, 18 ]
[ 58, 37 ]
[ "A07:2017 - Cross-Site Scripting (XSS)", "A07:2017 - Cross-Site Scripting (XSS)" ]
[ "Detected direct use of jinja2. If not done properly, this may bypass HTML escaping which opens up the application to cross-site scripting (XSS) vulnerabilities. Prefer using the Flask method 'render_template()' and templates with a '.html' extension in order to prevent XSS.", "Detected direct use of jinja2. If n...
[ 5, 5 ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
serialization.py
/soil/serialization.py
fadesibert/soil
Apache-2.0
2024-11-19T02:11:48.573781+00:00
1,518,293,149,000
cb53fb7d8fe3e044f455a0d11f96492601937f59
3
{ "blob_id": "cb53fb7d8fe3e044f455a0d11f96492601937f59", "branch_name": "refs/heads/master", "committer_date": 1518293149000, "content_id": "31a2c51834514abcac208aff185106a8134d0258", "detected_licenses": [ "MIT" ], "directory_id": "6a5108c0335e12b1e98cbf6e391fec0501094590", "extension": "py", "fi...
2.71875
stackv2
import pickle import balance_bot_ne EVAL = 6 env = balance_bot_ne.BalancebotEnvUneven(render=False) nn_shape = [env.observation_space_size(), 24, env.action_space_size()] nn = balance_bot_ne.NeuralNet(nn_shape) def run_episode(env, policy): total_reward = 0 for i in range(EVAL): obs = env.reset() ...
39
27.21
87
15
265
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_e84cf423bc5126d1_22d33592", "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" ]
[ 35 ]
[ 35 ]
[ 9 ]
[ 74 ]
[ "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" ]
balance_train_ne.py
/scripts/balance_train_ne.py
yconst/balance-bot-ne
MIT
2024-11-19T02:11:48.689035+00:00
1,500,475,370,000
2ed96c104283bc45914204263acc9079710bc925
3
{ "blob_id": "2ed96c104283bc45914204263acc9079710bc925", "branch_name": "refs/heads/master", "committer_date": 1500475482000, "content_id": "cef632827e2660e475081dc392175eaed57420c0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "eeaf9d3a01e9d1c21ea254c2546b4a6c2be75c4e", "extension": "py"...
2.640625
stackv2
#!/usr/bin/env python r""" This module provides command execution functions such as cmd_fnc and cmd_fnc_u. """ import sys import subprocess robot_env = 1 try: from robot.libraries.BuiltIn import BuiltIn except ImportError: robot_env = 0 import gen_print as gp import gen_valid as gv import gen_misc as gm if r...
114
30.97
79
15
688
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_f806e8259c2bb1fa_f2aa5fbe", "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" ]
[ 67, 69 ]
[ 71, 69 ]
[ 16, 39 ]
[ 58, 43 ]
[ "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" ]
gen_cmd.py
/lib/gen_cmd.py
rahulmah/sample-cloud-native-toolchain-tutorial-20170720084529291
Apache-2.0
2024-11-19T02:11:49.310441+00:00
1,585,054,120,000
73e42ff82bba55740f71ecd2808a53ae935ffe51
2
{ "blob_id": "73e42ff82bba55740f71ecd2808a53ae935ffe51", "branch_name": "refs/heads/master", "committer_date": 1585054120000, "content_id": "d50f83d71e5b7e2d6416afec0f28f9ebb3560776", "detected_licenses": [ "MIT" ], "directory_id": "6bc9dbd05541d00e993a92d9d5c7b3dd007fae0c", "extension": "py", "fi...
2.390625
stackv2
import os import sys import json import time import re post_name = input("post_name: ") preview_path = post_name+"/preview.html" detail_path = post_name+"/detail.html" meta_path = post_name+"/meta-data.json" # os.system("cp templates/preview_template.html "+preview_path) # os.system("cp templates/detail_template.html...
108
30.35
84
14
838
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_2c2e45cae679f3da_94c14516", "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...
20
true
[ "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-c...
[ "security", "security", "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ 18, 19, 20, 21, 43, 44 ]
[ 18, 19, 20, 21, 43, 44 ]
[ 5, 5, 5, 5, 5, 5 ]
[ 34, 66, 64, 65, 66, 64 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found dynamic conte...
[ 7.5, 7.5, 7.5, 7.5, 7.5, 7.5 ]
[ "LOW", "LOW", "LOW", "LOW", "LOW", "LOW" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
post.py
/posts/post.py
tom1484/tom1484.github.io
MIT
2024-11-19T02:32:40.947338+00:00
1,608,415,573,000
25b93d491a1dac5e772cf92c00b2841288ea089e
3
{ "blob_id": "25b93d491a1dac5e772cf92c00b2841288ea089e", "branch_name": "refs/heads/main", "committer_date": 1608415573000, "content_id": "f20e9918717fb930b38d698ba51ae1847360cbbc", "detected_licenses": [ "Apache-2.0" ], "directory_id": "197cf01a11147dd169bceabaefcb8d91a30e0d19", "extension": "py", ...
2.84375
stackv2
""" usage: partition_dataset.py [-h] [-i IMAGEDIR] [-o OUTPUTDIR] [-r RATIO] [-x] Partition dataset of images into training and testing sets optional arguments: -h, --help show this help message and exit -i IMAGEDIR, --imageDir IMAGEDIR Path to the folder where the image dataset...
80
34.48
142
15
661
python
[{"finding_id": "semgrep_rules.python.lang.security.use-defused-xml_11de8da7dfb165b6_feb5215d", "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" ]
[ 24 ]
[ 24 ]
[ 1 ]
[ 35 ]
[ "A04:2017 - XML External Entities (XXE)" ]
[ "The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and \"XML bombs\" can cause denial of service." ]
[ 7.5 ]
[ "LOW" ]
[ "MEDIUM" ]
partition_dataset.py
/cloudmesh/secchi/tensorflow/preprocessing/partition_dataset.py
cloudmesh/cloudmesh-secchi
Apache-2.0
2024-11-19T02:32:43.561648+00:00
1,532,374,005,000
675db940f3953b9a8924276fa6f7a7ae7cbf107e
2
{ "blob_id": "675db940f3953b9a8924276fa6f7a7ae7cbf107e", "branch_name": "refs/heads/master", "committer_date": 1532374005000, "content_id": "d42981ac420591477951d6acc655758d8ef52a32", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "819b92ccfdfbe739c9c4b2a18d66e2324900f7f7", "extension": "p...
2.484375
stackv2
__author__ = 'Alexendar Perez' ##################### # # # Introduction # # # ##################### """select gRNAs from a set that meet certain annotation requirements""" ################# # # # Libraries # # # ################# import sys im...
252
37.03
162
20
2,042
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_d16c1781b9474adb_6f0ff25f", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.unspecified-open-encoding", "finding_type": "best-practice", "severity": "medium", "confidence": "medium", "message": "Missing 'encoding' par...
7
true
[ "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM" ]
[ 239, 242 ]
[ 239, 242 ]
[ 9, 9 ]
[ 50, 72 ]
[ "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" ]
gRNA_from_annotations.py
/src/gRNA_from_annotations.py
lzamparo/crisprML
BSD-3-Clause
2024-11-19T02:32:45.643019+00:00
1,524,115,122,000
fc61132b3ce2cdf42056673d7c2676f78ce39b43
3
{ "blob_id": "fc61132b3ce2cdf42056673d7c2676f78ce39b43", "branch_name": "refs/heads/master", "committer_date": 1524115122000, "content_id": "9dd7ab4835a783cfad8c4a244ec7ebac61bddbce", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e9814b3e0ff829a1d7137caf842fed29beeda116", "extension": "py"...
3.140625
stackv2
import subprocess import re def clean(console_output): """Removes ANSI escape sequences from given console ouput""" ansi_escape = re.compile(r'\x1b[^m]*m') return ansi_escape.sub('', console_output) def decode(binary_strings): result = [] for bs in binary_strings: if isinstance(bs, str):...
31
29.19
98
14
195
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_ec71463c4ca4832c_0e00bbf8", "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" ]
[ 29 ]
[ 29 ]
[ 15 ]
[ 99 ]
[ "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'." ]
[ 7.5 ]
[ "LOW" ]
[ "HIGH" ]
executor.py
/inspectr/executor.py
teonite/inspectr-cli
Apache-2.0
2024-11-19T02:32:46.064487+00:00
1,570,392,765,000
84453d6cec5575d36ebd1a83c19481b2f89976a3
3
{ "blob_id": "84453d6cec5575d36ebd1a83c19481b2f89976a3", "branch_name": "refs/heads/master", "committer_date": 1570392765000, "content_id": "3fadc03fe4ba3983effb743eb78cfc29c029900a", "detected_licenses": [ "MIT" ], "directory_id": "ff4c13c00355ff291b028ec219648e0c00772468", "extension": "py", "fi...
3.34375
stackv2
''' The NOAA Weather App allows you to view detailed information from weather.gov for any city in the US. Usage: In order to search for the weather, you need to enter the four-character station code for a particular city e.g. KNYC for New York City. To find station codes, use the "Station Codes List" Tab, sel...
266
44.09
149
18
2,805
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_da341bb21f706c61_7d55bd26", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value...
3
true
[ "CWE-611" ]
[ "rules.python.lang.security.use-defused-xml" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 162 ]
[ 162 ]
[ 5 ]
[ 39 ]
[ "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" ]
NOAA_weather_app.py
/NOAA_weather_app.py
sameertulshyan/weather_app
MIT
2024-11-19T02:32:51.721885+00:00
1,692,309,268,000
cc681792052f6525890b4907cb48d2dbc957ff1e
3
{ "blob_id": "cc681792052f6525890b4907cb48d2dbc957ff1e", "branch_name": "refs/heads/master", "committer_date": 1692309268000, "content_id": "8d8085c85a8d541c3ac02e507c31f00885b61c97", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0b8684745088bb7e0ab009dffe1458baea4e7d65", "extension": "py"...
2.765625
stackv2
import os import glob import shutil import logging def rm_ext(filename): return os.path.splitext(filename)[0] def find_files(pattern, root=None, excluded_pattern=None): fnames = [] patterns = pattern.split() for p in patterns: if root is not None: p = os.path.join(root, p) ...
165
33.81
93
17
1,437
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_6256db66197ba868_321b0118", "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" ]
[ 150 ]
[ 150 ]
[ 11 ]
[ 25 ]
[ "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" ]
utils.py
/d2lbook/utils.py
d2l-ai/d2l-book
Apache-2.0
2024-11-19T02:32:58.967518+00:00
1,604,936,478,000
5a06c83327990cad8b9d305bc8cc8ecbf9c7c68b
3
{ "blob_id": "5a06c83327990cad8b9d305bc8cc8ecbf9c7c68b", "branch_name": "refs/heads/master", "committer_date": 1604936478000, "content_id": "b21520de88021b481aae5fcf9d202ba82f9493ef", "detected_licenses": [ "Apache-2.0" ], "directory_id": "412b8b3edcd8dd53ef5d12e97626a722dd30e5c5", "extension": "py"...
2.53125
stackv2
import webbrowser import subprocess import sys from os.path import dirname, realpath, join from .nibbler import Nibbler from .helpers import nudgelog class Builder(): '''Class which build the nudge tool''' def __init__(self, path_to_app, more_info_url): try: self.nudge_path = dirname(di...
55
34.29
85
16
435
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_57d8d170ddc632e9_fa0f232f", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
1
true
[ "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security" ]
[ "LOW" ]
[ "HIGH" ]
[ 37 ]
[ 37 ]
[ 9 ]
[ 30 ]
[ "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" ]
builder.py
/payload/Library/nudge/Resources/nudgelib/builder.py
scriptsandthings/Nudge-python_LcTrKid
Apache-2.0
2024-11-19T02:32:59.537096+00:00
1,604,343,287,000
b1c1625fa0ad00c2a8df215878780b00d24535fa
3
{ "blob_id": "b1c1625fa0ad00c2a8df215878780b00d24535fa", "branch_name": "refs/heads/main", "committer_date": 1604343287000, "content_id": "9416e0d0993b3aa750eff644791d1996d60cd2cc", "detected_licenses": [ "MIT" ], "directory_id": "c90493a90c7665659ac5c5341520939b0c4ac66b", "extension": "py", "file...
2.96875
stackv2
""" gpcr_ecl_saltbridge.py Identify GPCR structures with saltbridges between extracellular loops 2 and 3. Handles all functions. """ # python standard library from collections import OrderedDict import json import logging import pathlib import pickle from urllib.error import HTTPError from urllib.request import urlope...
265
39.26
117
23
2,358
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dynamic-urllib-use-detected_1c8ea181f845bc86_669ebd3b", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dynamic-urllib-use-detected", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected a dynamic value...
7
true
[ "CWE-502", "CWE-502", "CWE-502", "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle", "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security", "security", "security", "security" ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ 61, 71, 83, 94 ]
[ 61, 71, 83, 94 ]
[ 25, 9, 25, 9 ]
[ 68, 73, 68, 73 ]
[ "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization", "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format.", "Avoid using `pickle`, which is known to lead to...
[ 5, 5, 5, 5 ]
[ "LOW", "LOW", "LOW", "LOW" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
gpcr_ecl_saltbridge.py
/gpcr_ecl_saltbridge/gpcr_ecl_saltbridge.py
schallerdavid/gpcr_ecl_saltbridge
MIT
2024-11-19T02:33:00.601481+00:00
1,548,005,439,000
e55157ada495f61ef9cf96d0cf2aca1327b2c7f3
3
{ "blob_id": "e55157ada495f61ef9cf96d0cf2aca1327b2c7f3", "branch_name": "refs/heads/master", "committer_date": 1548005439000, "content_id": "e635457f497cb6d9a9aa011bccfec9b0854aebfc", "detected_licenses": [ "MIT" ], "directory_id": "bbc99b92b45ce2e9c46b2a3714865b0b7e0c7cb9", "extension": "py", "fi...
2.78125
stackv2
# coding:utf-8 # version:python3.5.1 # author:kyh import flickrapi import datetime import psycopg2 import time # flickr照片类 class flickr_photo(object): def __init__(self, photo_id, photo_site, photo_url): self.id = photo_id self.site = photo_site self.url = photo_url # 将照片插入数据库 de...
135
32.62
106
20
1,111
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_c8129ef8ab6ae798_7a143550", "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" ]
[ "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" ]
[ 25, 25, 59, 59 ]
[ 25, 25, 59, 59 ]
[ 13, 13, 9, 9 ]
[ 50, 50, 46, 46 ]
[ "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" ]
get_flickr_photos.py
/1SiteRanking/Data Collection/get_flickr_photos.py
HCH2CHO/EmotionMap
MIT
2024-11-19T02:33:03.173218+00:00
1,593,289,435,000
bacd0997c80010426a6acee6137502c2b825962d
2
{ "blob_id": "bacd0997c80010426a6acee6137502c2b825962d", "branch_name": "refs/heads/master", "committer_date": 1593289435000, "content_id": "483415c16fdc97c182ab96e764d14196137a0485", "detected_licenses": [ "MIT" ], "directory_id": "811ff5a30c5dffd90f17c30ad0efd138e3548bf8", "extension": "py", "fi...
2.328125
stackv2
import logging import time as timesleep from datetime import timedelta from typing import List import requests from fastapi import status from sqlalchemy import and_ from sqlalchemy.orm import Session from app import models, crud, search_utils from app.core import config from app.db.session import db_worker_session ...
88
43.36
117
20
747
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_7865722f4a7f3c94_9d1b1b8f", "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" ]
[ 24, 24 ]
[ 24, 24 ]
[ 9, 9 ]
[ 102, 102 ]
[ "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" ]
worker.py
/backend/app/app/core/worker.py
giladefrati/Dor2Door
MIT
2024-11-19T02:33:03.234169+00:00
1,692,796,300,000
39750112d2173365e59967e42f16ff2ba3810c5e
3
{ "blob_id": "39750112d2173365e59967e42f16ff2ba3810c5e", "branch_name": "refs/heads/main", "committer_date": 1692796300000, "content_id": "5a35ffde34002b3380c740a7726351b21474d787", "detected_licenses": [ "MIT" ], "directory_id": "3eb1e9fc543a9bb592181fe5c6d661199f773249", "extension": "py", "file...
2.546875
stackv2
import os import pandas as pd import pickle def main(): df = pd.read_csv("Github_projects.csv", index_col=0) project_list = df["project"].to_list() project_list = [project.split("/")[-1].replace(".git", "") for project in project_list] concept_list = df["concept"].to_list() project_unique = [] ...
26
35.12
107
13
214
python
[{"finding_id": "semgrep_rules.python.lang.security.deserialization.avoid-pickle_7b4dca5616f34e44_27337315", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.deserialization.avoid-pickle", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Avoid using `pickle`, which is kno...
1
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 22 ]
[ 22 ]
[ 9 ]
[ 55 ]
[ "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" ]
GitHub_class_associations.py
/GitHub_class_associations.py
hpicgs/Topic-Models-and-Dimensionality-Reduction-Benchmark
MIT
2024-11-19T02:33:05.427645+00:00
1,589,089,586,000
4072d1bc10782fe78080f8a54c7106a7e0cdfaec
2
{ "blob_id": "4072d1bc10782fe78080f8a54c7106a7e0cdfaec", "branch_name": "refs/heads/master", "committer_date": 1589089586000, "content_id": "3cb0c73b537db3cb00f190d1dbe17b42b27bca40", "detected_licenses": [ "MIT" ], "directory_id": "828f4943d0b1e1672c94c2b70a42416c535e3906", "extension": "py", "fi...
2.453125
stackv2
#!/usr/bin/python3 import threading import os import gi import shlex import time from subprocess import Popen, PIPE gi.require_version('Gst', '1.0') gi.require_version('Gtk', '3.0') from gi.repository import Gst, GObject, Gtk, GstVideo, GdkPixbuf class ThreadProgress(threading.Thread): def __init__(self, movie...
63
24.16
89
13
374
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_aff36167c38bc751_79fa0c97", "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" ]
[ 32 ]
[ 32 ]
[ 19 ]
[ 90 ]
[ "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" ]
threadProgressVideo.py
/src/threadProgressVideo.py
b1gby/Darknet-VideoInterface
MIT
2024-11-19T02:33:14.899571+00:00
1,415,260,607,000
85508a6e19d5f722e911b3faec66d606ca52c7df
2
{ "blob_id": "85508a6e19d5f722e911b3faec66d606ca52c7df", "branch_name": "refs/heads/master", "committer_date": 1415260607000, "content_id": "dcf455cb17382e3b5eb6dcb02e4c5fab7d569cef", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8091d047ed15a08c21ff4953cd432bc4511d42ae", "extension": "py"...
2.46875
stackv2
#!/usr/bin/python """ @package nilib @file redisflush.py @brief To flush the entire Redis database used by niserver. @version $Revision: 1.01 $ $Author: elwynd $ @version Copyright (C) 2012 Trinity College Dublin and Folly Consulting Ltd This is an adjunct to the NI URI library developed as part of the SAIL...
107
32.62
110
14
845
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-system-call-audit_862e0346af1694de_8b1293bf", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-system-call-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Found dynamic content used...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-system-call-audit", "rules.python.lang.security.audit.dangerous-system-call-tainted-env-args" ]
[ "security", "security" ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
[ 95, 95 ]
[ 95, 95 ]
[ 13, 13 ]
[ 52, 52 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Found dynamic content used in a system call. This is dangerous if external data can reach this function call because it allows a malicious actor to execute commands. Use the 'subprocess' module instead, which is easier to use without accidentally exposing a command injection vulnerability.", "Found user-controll...
[ 7.5, 7.5 ]
[ "LOW", "MEDIUM" ]
[ "HIGH", "HIGH" ]
redisflush.py
/python/nilib/redisflush.py
skunkwerks/netinf
Apache-2.0
2024-11-19T02:33:29.251750+00:00
1,630,547,039,000
f6a1aba83aefae6050a9a7caaf58c8c195199c1e
3
{ "blob_id": "f6a1aba83aefae6050a9a7caaf58c8c195199c1e", "branch_name": "refs/heads/main", "committer_date": 1630547039000, "content_id": "609d9b643f1b5801cac0fbe6e3860eea34b6774c", "detected_licenses": [ "MIT" ], "directory_id": "5474d0f7962ce71bcded38efec7a235dc45f1a78", "extension": "py", "file...
3.125
stackv2
# -*- coding: utf-8 -*- """ Created on Sat Jul 17 17:20:22 2021 @author: NiruSai """ import streamlit as st from tensorflow import keras import numpy as np import pandas as pd import datetime from sklearn.preprocessing import MinMaxScaler import os import inspect import pickle model_type=st.sidebar.selectbox(lab...
111
37.75
173
25
1,045
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.open-never-closed_095707d058faa275_fc930eea", "tool_name": "semgrep", "rule_id": "rules.python.lang.best-practice.open-never-closed", "finding_type": "best-practice", "severity": "high", "confidence": "medium", "message": "file object opened without corresponding...
2
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 25 ]
[ 25 ]
[ 11 ]
[ 33 ]
[ "A08:2017 - Insecure Deserialization" ]
[ "Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format." ]
[ 5 ]
[ "LOW" ]
[ "MEDIUM" ]
app.py
/Final Deployment/app.py
sidn19/Stock-price-prediction
MIT
2024-11-19T02:33:29.483029+00:00
1,619,017,490,000
07a090c2446c2b1e2099ef2150120eaffdb0946b
3
{ "blob_id": "07a090c2446c2b1e2099ef2150120eaffdb0946b", "branch_name": "refs/heads/master", "committer_date": 1619017490000, "content_id": "fe8620ddbf8c8e92905d175901703eb3583527e1", "detected_licenses": [ "MIT" ], "directory_id": "9a45add955c287699f945ad60523264a1d365f82", "extension": "py", "fi...
3.09375
stackv2
#!/bin/python3 ''' Upgrading only outdated "pip install --user" packages.''' # Only python 3.5 and above may use this script because method subprocess.run() # is used. import subprocess import sys def get_outdated_pip3_user_pkgs(): outdated_pkgs =[] try: cmd = [sys.executable, '-m', 'pip', 'list', ...
73
36.64
86
19
662
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_639d198cc8a00271_d1371b45", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
2
true
[ "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
[ 16, 39 ]
[ 16, 39 ]
[ 21, 25 ]
[ 78, 82 ]
[ "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'run' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Detected subprocess functio...
[ 7.5, 7.5 ]
[ "LOW", "LOW" ]
[ "HIGH", "HIGH" ]
pip_upgrade_pkgs.py
/pip_upgrade_pkgs/pip_upgrade_pkgs.py
sunbearc22/pip_upgrade_pkgs
MIT
2024-11-19T02:33:40.821653+00:00
1,622,992,309,000
44b1e065802ee5578436b299781b56e111614536
2
{ "blob_id": "44b1e065802ee5578436b299781b56e111614536", "branch_name": "refs/heads/master", "committer_date": 1622992309000, "content_id": "2f5c0ccf61acd7b208c513c7d3e2c2a9f2d6dac7", "detected_licenses": [ "MIT" ], "directory_id": "16b56c2b25126fd11a9e191f79473d13c33e6013", "extension": "py", "fi...
2.328125
stackv2
import argparse import re import os import pickle import numpy as np from tqdm import tqdm from rdkit import Chem from collections import Counter import torch import random from typing import Optional def seed_everything(seed: Optional[int] = 0) -> None: torch.manual_seed(seed) random.seed(seed) os.enviro...
214
32.4
120
17
1,954
python
[{"finding_id": "semgrep_rules.python.lang.best-practice.unspecified-open-encoding_5a2bfd534c523d14_f9b8723f", "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...
9
true
[ "CWE-502" ]
[ "rules.python.lang.security.deserialization.avoid-pickle" ]
[ "security" ]
[ "LOW" ]
[ "MEDIUM" ]
[ 99 ]
[ 99 ]
[ 25 ]
[ 39 ]
[ "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" ]
prepare_train_error_aug.py
/rxnebm/proposer/retroxpert/prepare_train_error_aug.py
rnaimehaom/rxn-ebm
MIT
2024-11-19T02:46:08.352236+00:00
1,440,753,547,000
c48e096f168b94d17134eb90831ccd3ea3c85d35
3
{ "blob_id": "c48e096f168b94d17134eb90831ccd3ea3c85d35", "branch_name": "refs/heads/master", "committer_date": 1440753547000, "content_id": "2e54e07aff1e0e16d74f8f882660658b50790dbd", "detected_licenses": [ "MIT" ], "directory_id": "a1a77e79ef724538966a40702ab472f0092f4c35", "extension": "py", "fi...
2.65625
stackv2
"""alembic-offline decorators.""" from itertools import chain from collections import Iterable from functools import wraps import alembic PHASE_FORMAT = '-- PHASE::{0}::' def phased(func): """Convert upgrade function into phased one.""" @wraps(func) def decorated(*args, **kwargs): iterator = fun...
30
34.37
93
15
225
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.formatted-sql-query_beb5be73179aedbc_37d0c930", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.formatted-sql-query", "finding_type": "security", "severity": "medium", "confidence": "low", "message": "Detected possible formatted SQL query. U...
2
true
[ "CWE-89", "CWE-89" ]
[ "rules.python.lang.security.audit.formatted-sql-query", "rules.python.sqlalchemy.security.sqlalchemy-execute-raw-query" ]
[ "security", "security" ]
[ "LOW", "LOW" ]
[ "MEDIUM", "HIGH" ]
[ 26, 26 ]
[ 26, 26 ]
[ 13, 13 ]
[ 67, 67 ]
[ "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" ]
decorators.py
/alembic_offline/decorators.py
movermeyer/alembic-offline
MIT
2024-11-19T02:46:12.073500+00:00
1,533,986,290,000
607c4f6f435d5d6b60507f2dec752419a16ec8b3
3
{ "blob_id": "607c4f6f435d5d6b60507f2dec752419a16ec8b3", "branch_name": "refs/heads/master", "committer_date": 1533986290000, "content_id": "35169e25f6a64b952be2dad7e77ea5f3c3364d66", "detected_licenses": [ "MIT" ], "directory_id": "83886f19277eb854067de7fdcbf4607ddfdebab2", "extension": "py", "fi...
2.578125
stackv2
import numpy as np import subprocess import re import sys sys.path.insert(0, '/home/jhjensen/github/xyz2mol') import xyz2mol def shell(cmd, shell=False): if shell: p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) else: cmd = cmd.spli...
57
32.86
116
15
532
python
[{"finding_id": "semgrep_rules.python.lang.security.audit.dangerous-subprocess-use-audit_6f64ff27779f04f0_2ce0e079", "tool_name": "semgrep", "rule_id": "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "finding_type": "security", "severity": "high", "confidence": "low", "message": "Detected subprocess ...
3
true
[ "CWE-78", "CWE-78", "CWE-78" ]
[ "rules.python.lang.security.audit.dangerous-subprocess-use-audit", "rules.python.lang.security.audit.subprocess-shell-true", "rules.python.lang.security.audit.dangerous-subprocess-use-audit" ]
[ "security", "security", "security" ]
[ "LOW", "MEDIUM", "LOW" ]
[ "HIGH", "HIGH", "HIGH" ]
[ 11, 11, 14 ]
[ 11, 11, 14 ]
[ 13, 41, 13 ]
[ 117, 45, 105 ]
[ "A01:2017 - Injection", "A01:2017 - Injection", "A01:2017 - Injection" ]
[ "Detected subprocess function 'Popen' without a static string. If this data can be controlled by a malicious actor, it may be an instance of command injection. Audit the use of this call to ensure it is not controllable by an external resource. You may consider using 'shlex.escape()'.", "Found 'subprocess' functi...
[ 7.5, 7.5, 7.5 ]
[ "LOW", "HIGH", "LOW" ]
[ "HIGH", "LOW", "HIGH" ]
read_xtbout_file.py
/read_xtbout_file.py
plin1112/take_elementary_step
MIT