added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T02:56:02.617108+00:00 | 1,454,621,883,000 | cf4ef95a6614f72f8667b2db8b7b7f7050130852 | 3 | {
"blob_id": "cf4ef95a6614f72f8667b2db8b7b7f7050130852",
"branch_name": "refs/heads/master",
"committer_date": 1454621883000,
"content_id": "feddf79661db87eced333797c0d2cfdfdf9e88c2",
"detected_licenses": [
"MIT"
],
"directory_id": "f2bf47867ef319143d64b5c84b7f0fe016cadfa8",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python
## Simple command line utility to send mail notifications via sendgrid from the command line
import sendgrid
import sys, getopt, re
from ConfigParser import SafeConfigParser
import os.path
## Global Variables
_VERSION='20160204'
_debug = 0
_CONFIG_FILE_NAME = 'sgsend.cnf'
_CONFIG = None
_DEFAULT... | 268 | 32.65 | 129 | 20 | 2,174 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_8448edf39fb84945_ef245ec5", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text."
] | [
123
] | [
null
] | [
20
] | [
26
] | |
2024-11-19T03:10:25.793962+00:00 | 1,575,862,234,000 | c8042538ebb95009c138c52b2bc561345de17747 | 3 | {
"blob_id": "c8042538ebb95009c138c52b2bc561345de17747",
"branch_name": "refs/heads/master",
"committer_date": 1575862234000,
"content_id": "c4e3edb8c9faba7221b28337d09d1d983348d9ae",
"detected_licenses": [],
"directory_id": "2b576a088b0ef868a18b06d7e997a607c2826b93",
"extension": "py",
"filename": "uti... | 2.59375 | stackv2 | import hashlib
import random
from .models import GuacamoleUser, GuacamoleConnection
from .models import GuacamoleConnectionParameter, GuacamoleConnectionPermission
def quick_rdp_conn(username, password, hostname):
"""
Make a GuacamoleConnection with the passed parameters; return said
Connection.
"""
... | 116 | 33.16 | 79 | 15 | 851 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_59903285a6f8620e_fbada855", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
50
] | [
null
] | [
36
] | [
55
] | |
2024-11-19T03:10:32.330744+00:00 | 1,544,521,822,000 | 173d791d08a130ab4c77dce9bb98e1d55348113f | 3 | {
"blob_id": "173d791d08a130ab4c77dce9bb98e1d55348113f",
"branch_name": "refs/heads/master",
"committer_date": 1544521822000,
"content_id": "6b13fe35b49beb11f807662230adcfd4b9d64771",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "edbbceedd8e57be9a8d254af244a084381fa39d5",
"extension": "py"... | 2.515625 | stackv2 | import os
import tarfile
from multiprocessing import Pool
from PIL import Image
from tqdm import tqdm
from mtcnn.detector import detect_faces
from utils import ensure_folder
def extract(filename):
print('Extracting {}...'.format(filename))
with tarfile.open(filename) as tar:
tar.extractall('data')
... | 62 | 24.95 | 93 | 14 | 402 | python | [{"finding_id": "codeql_py/tarslip_2ccd14916ef57728_032a1387", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
15
] | [
null
] | [
9
] | [
12
] | |
2024-11-19T03:10:49.891447+00:00 | 1,586,024,717,000 | 4cb7bd13703e6e55920559fed8c167e6639e9cd9 | 2 | {
"blob_id": "4cb7bd13703e6e55920559fed8c167e6639e9cd9",
"branch_name": "refs/heads/master",
"committer_date": 1586024717000,
"content_id": "07dc0011d32db7931d53fd8bb7b9b3931b51e61b",
"detected_licenses": [
"MIT"
],
"directory_id": "c2fb99517c3c83437702ec194ac3eb20963f64fc",
"extension": "py",
"fi... | 2.34375 | stackv2 | import os
import logging
import pandas as pd
import numpy as np
import urllib.request
import requests
import re
import io
import zipfile
import json
from pyseir import OUTPUT_DIR
DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'data')
def load_zip_get_file(url, file, decoder='utf-8'):
... | 340 | 32.04 | 147 | 16 | 3,000 | python | [{"finding_id": "codeql_py/request-without-cert-validation_b760d03ad33b5d76_24107da7", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
148
] | [
null
] | [
12
] | [
43
] | |
2024-11-19T03:10:50.957105+00:00 | 1,513,662,328,000 | 606cca8311c18e46fc8b7bb04f17007ad5cc292f | 3 | {
"blob_id": "606cca8311c18e46fc8b7bb04f17007ad5cc292f",
"branch_name": "refs/heads/master",
"committer_date": 1513662328000,
"content_id": "8cf15364f65107d7ada681a1707b123a2617c3ed",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "d7822637771c136601b31325c17b8717f4da7009",
"extension": "p... | 2.609375 | stackv2 |
#coding=utf-8
import sys
sys.path.insert(0, "../")
from bottle import route ,run, request
import aiml
# The Kernel object is the public interface to
# the AIML interpreter.
#k = aiml.Kernel()
# Use the 'learn' method to load the contents
# of an AIML file into the Kernel.
#k.learn("cn-startup.xml")
# Use the 're... | 66 | 24.39 | 104 | 10 | 415 | python | [{"finding_id": "codeql_py/reflective-xss_d4acf9dc0c3ebc58_6356c0a9", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
63
] | [
null
] | [
12
] | [
61
] | |
2024-11-19T03:21:49.403144+00:00 | 1,498,228,100,000 | b0fd020f25f1c64a188dcc09626e56ad88ae5b8f | 3 | {
"blob_id": "b0fd020f25f1c64a188dcc09626e56ad88ae5b8f",
"branch_name": "refs/heads/master",
"committer_date": 1498228100000,
"content_id": "b6f3a1bea7fce738f03102025368760de1f97373",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "db30b0c6aeaa36cd8172495993cc973c31fefc1c",
"extension": "py"... | 2.546875 | stackv2 | from flask import request, jsonify, make_response
from flask_restful import Resource
from sqlalchemy.exc import DatabaseError
from homeautomation.mysecurity import auth_required
class BaseResource(Resource):
"""
Base CRUD services class
it requires SQLAlchemy model, Marshmallow schema and model qualifier... | 170 | 30.14 | 79 | 20 | 1,104 | python | [{"finding_id": "codeql_py/stack-trace-exposure_b5bbf11bf6a2ae6b_cf7f8316", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 5 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
54,
82,
117,
141,
167
] | [
null,
null,
118,
143,
169
] | [
25,
25,
25,
25,
25
] | [
55,
55,
32,
18,
18
] | |
2024-11-19T03:22:06.080880+00:00 | 1,553,791,929,000 | 6aabb480f1cecaa47c8c6c49e18f500640627b68 | 3 | {
"blob_id": "6aabb480f1cecaa47c8c6c49e18f500640627b68",
"branch_name": "refs/heads/master",
"committer_date": 1553791929000,
"content_id": "41510b5f70f21da992416c38d0eced85c71f88ee",
"detected_licenses": [
"MIT"
],
"directory_id": "db2e1881d5062abf19e0fcdb572bcb3af7b07576",
"extension": "py",
"fi... | 2.96875 | stackv2 | import logging
import os
import requests
import socket
import time
from urllib3.exceptions import NewConnectionError
class GoogleMaps:
"""
Find the coordinates of a location
"""
def __init__(self, location):
self.location = location
logging.info(self.location)
def _api_request(se... | 65 | 29.31 | 82 | 20 | 386 | python | [{"finding_id": "codeql_py/request-without-cert-validation_dae78a49fab6246b_755c676d", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
28,
33,
38,
42
] | [
null,
null,
null,
null
] | [
23,
27,
31,
31
] | [
69,
73,
77,
77
] | |
2024-11-19T03:43:54.659262+00:00 | 1,524,747,727,000 | e4afe79dde8d680e67f2773f61b594c16573489d | 2 | {
"blob_id": "e4afe79dde8d680e67f2773f61b594c16573489d",
"branch_name": "refs/heads/master",
"committer_date": 1524747727000,
"content_id": "5cc9b7ed717ab759b54763a8cacea8e89d42ebcc",
"detected_licenses": [
"MIT"
],
"directory_id": "301d0f2bf9c6bdab05c121db71a691ce111be7dd",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/python
"""
Save this file as server.py
>>> python server.py 0.0.0.0 8001
serving on 0.0.0.0:8001
or simply
>>> python server.py
Serving on localhost:8000
You can use this to test GET and POST methods.
"""
import SimpleHTTPServer
import SocketServer
import logging
import cgi
import sys
if len(sys.arg... | 99 | 28.2 | 95 | 15 | 702 | python | [{"finding_id": "codeql_py/log-injection_fc98f7c18af36d69_50d282d2", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
40,
45
] | [
null,
null
] | [
25,
25
] | [
37,
37
] | |
2024-11-19T03:44:07.412637+00:00 | 1,495,122,158,000 | 8ba0cf4a062691d5734b7568b0e244911c56ed64 | 3 | {
"blob_id": "8ba0cf4a062691d5734b7568b0e244911c56ed64",
"branch_name": "refs/heads/master",
"committer_date": 1495122158000,
"content_id": "f07f79ea707f886529c77356ebf3c8c8f665c9a7",
"detected_licenses": [],
"directory_id": "20cfeb48b682299c7fc3bee70750dde730b2f03f",
"extension": "py",
"filename": "vie... | 2.625 | stackv2 | """
sqmpy.security.views
~~~~~~~~~~~~~~~~~~~~~
View functions for security module
"""
import base64
from flask import flash, url_for, request, redirect, render_template, session,\
Blueprint
from flask_login import login_user, logout_user, login_required,\
LoginManager
from sqmpy.database import d... | 114 | 31.52 | 79 | 19 | 730 | python | [{"finding_id": "codeql_py/url-redirection_6be3f0c493447ddf_c50e5baf", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
68,
110
] | [
69,
111
] | [
33,
33
] | [
55,
55
] | |
2024-11-19T03:44:25.734555+00:00 | 1,607,685,347,000 | 24f2d54a7e3799d6f77953c4f5bbab6ec28d610f | 4 | {
"blob_id": "24f2d54a7e3799d6f77953c4f5bbab6ec28d610f",
"branch_name": "refs/heads/master",
"committer_date": 1607685347000,
"content_id": "ce9645c5be850abd7ea8d9195dcaf3054e655d29",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9420f754ed145983e2a55aec29267f6f5952500a",
"extension": "py"... | 4.03125 | stackv2 | #Users:
class User():
""" Making a USER class."""
def __init__(self, first_name, last_name, age, gender):
self.first_name = first_name.title()
self.last_name = last_name.title()
self.age = age
self.gender = gender.title()
def describe_user(self):
""" Metho... | 34 | 26.91 | 89 | 10 | 236 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_89f13f21a9b57828_4fcd9676", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
19,
23
] | [
null,
null
] | [
33,
47
] | [
44,
58
] | |
2024-11-19T03:44:28.542863+00:00 | 1,596,381,251,000 | 2726bd0385ade995e99e8b94e99cb5c9cf0aabd3 | 2 | {
"blob_id": "2726bd0385ade995e99e8b94e99cb5c9cf0aabd3",
"branch_name": "refs/heads/master",
"committer_date": 1596381511000,
"content_id": "d5c7efe2ee9ad1f790ef599c4cc1546d87f97e8e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "afda04bc1b13f87275869fed69d8d4346d8930c8",
"extension": "p... | 2.484375 | stackv2 | """
Utilities for importing data
See example usage at the bottom.
"""
import json, numbers
import os
import psycopg2
import mysql.connector
import re
try:
import vertica_python
except:
pass
try:
import pyaccumulo
except:
pass
from Util import Util
supportedTypes = ['PostgreSQL', 'MySQL', 'Vertica'... | 436 | 36.94 | 175 | 23 | 3,501 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0affdc883d428397_d16f5590", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
375,
384,
407
] | [
null,
null,
null
] | [
15,
15,
15
] | [
104,
104,
104
] | |
2024-11-19T03:44:34.208837+00:00 | 1,606,028,849,000 | a7f58c9e8c3f5e2ef8ff46821e92c8db7a41bdd8 | 3 | {
"blob_id": "a7f58c9e8c3f5e2ef8ff46821e92c8db7a41bdd8",
"branch_name": "refs/heads/main",
"committer_date": 1606028849000,
"content_id": "d25d886278a4ec1e685501e0a40be88e114411b0",
"detected_licenses": [
"MIT"
],
"directory_id": "471bac99923b1a5aa24a0080c3508705e7e7ea30",
"extension": "py",
"file... | 2.953125 | stackv2 | """Import"""
from flask import Flask, request, jsonify,json
from flask_cors import CORS
import numpy as np
import json
import os
app = Flask(__name__)
CORS(app)
"""Constants"""
FRAMES = 16
BODY_PARTS = 17
N_SAMPLES = 100
GESTURES = {'loop', 'branch'}
DIMS = 2
samples_dict = {}
MODE = "DEV" # "DEV" or "PROD"
DUMMY_DA... | 132 | 23.51 | 114 | 14 | 857 | python | [{"finding_id": "codeql_py/path-injection_0923f932b6589fd4_02b50583", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
122
] | [
null
] | [
15
] | [
41
] | |
2024-11-19T03:44:34.311607+00:00 | 1,594,033,152,000 | df442ce667bafb32ed6fb63081a019434b047ee8 | 2 | {
"blob_id": "df442ce667bafb32ed6fb63081a019434b047ee8",
"branch_name": "refs/heads/master",
"committer_date": 1594033152000,
"content_id": "5e2336d66cf02315392aab9908e5ec785d6b4125",
"detected_licenses": [
"MIT"
],
"directory_id": "80202ef34298dac07d59ce17dfc6a89995c5d65a",
"extension": "py",
"fi... | 2.421875 | stackv2 | import tensorflow as tf
from tensorflow.python.keras.backend import set_session
from keras.models import model_from_json,load_model
import numpy as np
import os,pickle
# os.environ["CUDA_VISIBLE_DEVICES"]="-1"
word_index_emotion = pickle.load(open("./Model_files/Emotion/word_index_emotion.pkl","rb"))
word_index_intent ... | 229 | 32.93 | 116 | 21 | 1,950 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_58e0745f0444aa4c_fa9f6876", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-215"
] | [
"py/clear-text-logging-sensitive-data",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
220,
229
] | [
null,
null
] | [
15,
5
] | [
21,
39
] | |
2024-11-19T03:44:34.723746+00:00 | 1,628,185,749,000 | e0612e99a282480d1cc6ab7e91bfd3db1b3e2a53 | 3 | {
"blob_id": "e0612e99a282480d1cc6ab7e91bfd3db1b3e2a53",
"branch_name": "refs/heads/master",
"committer_date": 1628185749000,
"content_id": "631258d713c581975d0ca3c6e922dff37f058a03",
"detected_licenses": [
"MIT"
],
"directory_id": "934d4c03dde3ecb6090c8c91001a7a6bbea47ea4",
"extension": "py",
"fi... | 3.015625 | stackv2 | import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
import json
import time
from prettytable import PrettyTable
from .error_handling_class import check_error
from .tenant_class import Tenant
class Apic:
def __init__(self, apic):
""" Return a new instance of the APIC ... | 264 | 37.39 | 120 | 18 | 2,093 | python | [{"finding_id": "codeql_py/request-without-cert-validation_1dde6ba4a7b91cc1_4b12ed68", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
83,
116,
137
] | [
null,
null,
null
] | [
19,
19,
19
] | [
82,
67,
67
] | |
2024-11-19T01:44:05.949189+00:00 | 1,637,687,838,000 | 2ef9a8c8ed54f0f46ca0781d7a40f2ef2b03247d | 3 | {
"blob_id": "2ef9a8c8ed54f0f46ca0781d7a40f2ef2b03247d",
"branch_name": "refs/heads/master",
"committer_date": 1637687838000,
"content_id": "dd47058d50d7bd071406157ed18f9280fd725fad",
"detected_licenses": [
"MIT"
],
"directory_id": "2e92621febf10b264bf3b0cc924d244eb63b1da1",
"extension": "py",
"fi... | 2.703125 | stackv2 | #!/usr/bin/env python
import os
import shutil
from pathlib import Path
from ftarc.cli.util import print_log, read_yml
from jinja2 import Environment, FileSystemLoader
def write_config_yml(path, src_yml='example_vcline.yml'):
if Path(path).is_file():
print_log(f'The file exists:\t{path}')
else:
... | 48 | 28.17 | 79 | 26 | 341 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e6c1c3d5d50d22e3_a888a233", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
27
] | [
32
] | [
13
] | [
14
] | |
2024-11-19T01:44:08.869890+00:00 | 1,599,833,534,000 | bff76b41e720587c6b6e9f57939c6d4d3ef9c794 | 2 | {
"blob_id": "bff76b41e720587c6b6e9f57939c6d4d3ef9c794",
"branch_name": "refs/heads/master",
"committer_date": 1599833534000,
"content_id": "58d29db025cb8f89842bdb2fd595ca27bbcd67d3",
"detected_licenses": [
"MIT"
],
"directory_id": "d6061c3961a55ec4b524cfbe691bf4d4f3fa08db",
"extension": "py",
"fi... | 2.484375 | stackv2 | import argparse
import jinja2
import json
import os.path
import shutil
import subprocess
import sys
import tempfile
import yaml
TPLATE_SUFFIX = '.j2'
# files in this list are allowed in the output directory.
ALLOW_IN_OUTDIR_LIST = ['.DS_Store', 'tplate.yaml', 'tplate.json']
NOCOPY_LIST = ['tplate.yaml', 'tplate.json'... | 187 | 35.4 | 120 | 20 | 1,462 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2a18b4e8b56e666c_f751c058", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
168
] | [
null
] | [
20
] | [
117
] | |
2024-11-19T02:08:37.151590+00:00 | 1,542,266,558,000 | f968b277106cd089317422504a0212e8be9dd1af | 3 | {
"blob_id": "f968b277106cd089317422504a0212e8be9dd1af",
"branch_name": "refs/heads/master",
"committer_date": 1542266558000,
"content_id": "c4402a2f92dec5be2c528fcb7eac70ef602882cc",
"detected_licenses": [
"MIT"
],
"directory_id": "b196fe4b6318d73a57a4d7d6f591f771d90ff6c2",
"extension": "py",
"fi... | 2.6875 | stackv2 | import requests
import time
import myconfig as cfg
class whittime:
def __init__(self):
pass
def dfun(self,fun,time = 5):
count = 1
while count <= time:
r = fun()
if "err" in r:
count = count+1
else:
return r
class Pho... | 96 | 27.74 | 149 | 16 | 701 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_64d7d548c17acb83_164c6762", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 7 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data... | [
29,
31,
43,
47,
60,
90,
96
] | [
null,
null,
null,
null,
null,
null,
null
] | [
19,
19,
19,
19,
23,
15,
11
] | [
44,
35,
45,
38,
42,
41,
37
] | |
2024-11-19T02:21:31.438889+00:00 | 1,541,809,249,000 | 42a24d11f581b1feb1b7cf16994743c2625b8a24 | 3 | {
"blob_id": "42a24d11f581b1feb1b7cf16994743c2625b8a24",
"branch_name": "refs/heads/master",
"committer_date": 1541809249000,
"content_id": "9478b97e9548388fb68759351010653df371bece",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "60593615ac4f6dff7053b277611104c1f0a896c1",
"extension": "py"... | 3.109375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: djokester
Samriddhi Sinha,
IIT Kharagpur
"""
from sklearn.neural_network import MLPClassifier
import lingatagger.sentence as sent
import lingatagger.gender as gndr
import lingatagger.genderlist as gndrlist
import lingatagger.tokenizer as tok
import gensim
imp... | 202 | 30.85 | 109 | 20 | 1,695 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5225852459d16b4a_684528b1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
164,
200,
201
] | [
null,
null,
null
] | [
11,
11,
11
] | [
15,
28,
36
] | |
2024-11-19T02:58:03.038315+00:00 | 1,688,684,594,000 | 6f9ab1235df758e06e52e18322e34f3ad991329a | 2 | {
"blob_id": "6f9ab1235df758e06e52e18322e34f3ad991329a",
"branch_name": "refs/heads/master",
"committer_date": 1688684594000,
"content_id": "bffaec8496670dcf2258ab84c9ede27ed01eeca0",
"detected_licenses": [
"NIST-Software",
"BSD-3-Clause",
"MIT"
],
"directory_id": "88a433b6010d625a953a7569a7fa... | 2.4375 | stackv2 | """ Abstract view for Account Request
"""
from abc import ABCMeta, abstractmethod
from django.http import Http404
from django.utils.decorators import method_decorator
from rest_framework import status
from rest_framework.exceptions import ValidationError
from rest_framework.response import Response
from rest_framework... | 89 | 31.97 | 77 | 16 | 566 | python | [{"finding_id": "codeql_py/stack-trace-exposure_016161aaea8d2925_3dc55d6c", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
78,
84,
88
] | [
null,
null,
null
] | [
29,
29,
17
] | [
36,
36,
24
] | |
2024-11-19T03:10:05.648258+00:00 | 1,626,014,644,000 | 038c04740b292c28bce5d8fac91791c1ee001218 | 2 | {
"blob_id": "038c04740b292c28bce5d8fac91791c1ee001218",
"branch_name": "refs/heads/master",
"committer_date": 1626014644000,
"content_id": "12c54e721fe038760ae6529b5d58e2025c151c13",
"detected_licenses": [
"MIT"
],
"directory_id": "88e5686b216daca1f273e3486c3be32a68ad29a8",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python3
from crcmod.predefined import Crc
import socketserver
import socket
from struct import pack, unpack, error
from datetime import datetime, timedelta
from osm_shortlink import short_osm
from binascii import hexlify
from models import initDB, Device, Position, connectDB, disconnectDB
from notify i... | 252 | 28.3 | 86 | 16 | 1,880 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_baeb842dcc66d5b8_fcc850d6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
101
] | [
123
] | [
15
] | [
14
] | |
2024-11-19T03:10:28.422192+00:00 | 1,586,811,425,000 | b607a2956424114589782bef30ef5ad7f52a0d3e | 2 | {
"blob_id": "b607a2956424114589782bef30ef5ad7f52a0d3e",
"branch_name": "refs/heads/master",
"committer_date": 1586811425000,
"content_id": "25eb7d9dc688b69a10644a72054a61f5b2826b1d",
"detected_licenses": [
"MIT"
],
"directory_id": "005891345cd34676b59525e2d893c6c91b4afebe",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python3
import os
import sys
import platform
import importlib
from subprocess import call, DEVNULL
PIP_DEPENDENCIES = [
'setuptools',
'pymongo',
'mongoengine',
'progressbar2',
'tabulate',
'numpy',
'scipy',
'plotly',
'psutil'
]
de... | 89 | 26.38 | 96 | 14 | 585 | python | [{"finding_id": "codeql_py/overly-permissive-file_c22f70f12e8e4ada_62617562", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 2 | true | [
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable.",
"Overly permissive mask in chmod sets file to world writable."
] | [
38,
40
] | [
null,
null
] | [
13,
13
] | [
55,
55
] | |
2024-11-19T03:22:32.258778+00:00 | 1,614,768,153,000 | ded0cf468632e64d55b5bf8e8b6d74acc8ed4691 | 3 | {
"blob_id": "ded0cf468632e64d55b5bf8e8b6d74acc8ed4691",
"branch_name": "refs/heads/main",
"committer_date": 1614768153000,
"content_id": "f035a4332eda2c96146a8a75c178a1760f6e7c02",
"detected_licenses": [
"MIT"
],
"directory_id": "dc36ff0a1ff5593fda9349dcd8eb237f03a2241c",
"extension": "py",
"file... | 3.484375 | stackv2 |
mac_chrs = [
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
"a", "b", "c", "d", "e", "f",
"A", "B", "C", "D", "E", "F",
]
def get_mac_addr(mac_address, concat_str="-", is_upper=True, part=6):
"""
获取Mac地址(默认6段式大写)
"""
mac_address = mac_address.replace("-", "").replace(".", "").replace("... | 35 | 40.69 | 105 | 17 | 564 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f3b5969ef0664024_df42c597", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 8 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (priva... | [
27,
28,
29,
30,
32,
33,
34,
35
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
21,
21,
21,
21,
21,
21,
21,
21
] | [
94,
93,
94,
93,
91,
90,
91,
90
] | |
2024-11-19T03:22:44.336142+00:00 | 1,476,605,354,000 | 90f879a3083a32869fb2710dccb5799401c5b216 | 2 | {
"blob_id": "90f879a3083a32869fb2710dccb5799401c5b216",
"branch_name": "refs/heads/master",
"committer_date": 1476605354000,
"content_id": "457ab90a221d4a48d0801db075d003d4ef535905",
"detected_licenses": [
"MIT"
],
"directory_id": "ef3edc1236e20aea3e0bfbe6e8b120eaa8c37fdf",
"extension": "py",
"fi... | 2.5 | stackv2 | # Volta Streaming Backend - Asynchronous Web Server
# Written by Nick Pleatsikas - pleatsikas.me
# Contact admin@volta.network to report any bugs.
# View the README for more information.
# Modules: ---------------------------------------------------------------------
# Full Modules:
# import os
# Partial Modules:
f... | 109 | 31.9 | 135 | 15 | 771 | python | [{"finding_id": "codeql_py/regex-injection_70cfd77b65bb241d_20662408", "tool_name": "codeql", "rule_id": "py/regex-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This regular expression depends on a [user-provided value](1) and is executed by [re.sub](2).\nThis regul... | 1 | true | [
"CWE-730"
] | [
"py/regex-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression depends on a [user-provided value](1) and is executed by [re.sub](2).\nThis regular expression depends on a [user-provided value](3) and is executed by [re.sub](2)."
] | [
76
] | [
null
] | [
20
] | [
31
] | |
2024-11-19T03:23:02.044754+00:00 | 1,592,832,700,000 | da8a19450d14a892f7f735cabc271b3050d80279 | 2 | {
"blob_id": "da8a19450d14a892f7f735cabc271b3050d80279",
"branch_name": "refs/heads/master",
"committer_date": 1592832700000,
"content_id": "837e1e62b85d88aba95b8d2c019b267f7f42ab0b",
"detected_licenses": [
"Unlicense"
],
"directory_id": "220b598bd6e5d09b2f0127434d03e8d1c9a528d3",
"extension": "py",... | 2.328125 | stackv2 | 'CORS proxy for github API.'
import os
import flask
import flask_cors
import requests
app = flask.Flask('ezeki')
app.config['SECRET_KEY'] = os.urandom(24)
flask_cors.CORS(app, resources={'*': {'origins': '*'}})
@app.route('/')
@app.route('/<path:path>', methods=['GET'])
def catch_all_handler(path=''):
'Get cont... | 18 | 26.39 | 109 | 13 | 127 | python | [{"finding_id": "codeql_py/partial-ssrf_3a6c4d892ab5e6b4_a98df251", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
17
] | [
18
] | [
27
] | [
75
] | |
2024-11-19T03:23:06.696760+00:00 | 1,625,517,320,000 | d11720bf43488ae6dbee62e592ff6d6b688b0aef | 3 | {
"blob_id": "d11720bf43488ae6dbee62e592ff6d6b688b0aef",
"branch_name": "refs/heads/master",
"committer_date": 1625517320000,
"content_id": "4b84c78dd3d1569fa271658cb3a6f36971fd0a67",
"detected_licenses": [
"MIT"
],
"directory_id": "a4ea6f649f56fac70b24dab964483a2671e3e8be",
"extension": "py",
"fi... | 3.015625 | stackv2 | """thoryvos backend for encryption & decryption."""
# Importing Dependenciess
from Crypto.Cipher import AES, Salsa20, DES3
from Crypto import Random
from Crypto.Protocol.KDF import scrypt
from hashlib import sha512
from Crypto.Util.Padding import pad, unpad
def get_key(password: str, length: int):
"""Generate the... | 100 | 32.83 | 76 | 14 | 829 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_57a8b77e415d484b_0235926b", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally... | [
51,
100,
12
] | [
null,
null,
null
] | [
36,
22,
19
] | [
76,
49,
36
] | |
2024-11-19T03:44:13.813040+00:00 | 1,461,068,627,000 | 586e39bee2b7954fcb19833b7e8cf6aeab07f0a7 | 2 | {
"blob_id": "586e39bee2b7954fcb19833b7e8cf6aeab07f0a7",
"branch_name": "refs/heads/master",
"committer_date": 1461068627000,
"content_id": "9ec2df790c740fefe9d40ced1a2275b962c938c6",
"detected_licenses": [
"MIT"
],
"directory_id": "62bcdba02671744a9838475f2f1b2d4608a67dd2",
"extension": "py",
"fi... | 2.40625 | stackv2 | # -*- coding: utf-8 -*-
import core
import core.Rpg
from core import utils, config
from models import player, gender, species, saved_game
from core.localisation import _
from core import command, command_factory
import readline
class main:
_debug = False
def __init__(self, debug=False, world=''):
self._engine =... | 233 | 23.17 | 76 | 18 | 1,571 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7f03e56179ebb481_2987c7ed", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
214
] | [
null
] | [
10
] | [
41
] | |
2024-11-19T01:34:47.285354+00:00 | 1,407,012,538,000 | 5639b3881dc2ae260ac562fd78d98eb69c001d2a | 3 | {
"blob_id": "5639b3881dc2ae260ac562fd78d98eb69c001d2a",
"branch_name": "refs/heads/master",
"committer_date": 1407012538000,
"content_id": "dd9f4d0249286664d81526a9b5b095234995bda5",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "58629daf8185985ac2bbabf3c0538703523e1a88",
"extension": "py",
... | 2.8125 | stackv2 | import xml.etree.ElementTree as ET
import re
import sys
import os
import csv
from urllib.parse import quote
import difflib
from collections import defaultdict
if sys.version_info[0] < 3:
raise Exception("This script requires Python 3")
def main():
filenameParam = sys.argv[1]
# Determine the type of i... | 201 | 36.66 | 149 | 21 | 1,632 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_d77c2fe3563308fc_4e19d14b", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'loc.gov/', so it might match more h... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'loc.gov/', so it might match more hosts than expected."
] | [
178
] | [
null
] | [
43
] | [
85
] | |
2024-11-19T01:35:02.171108+00:00 | 1,568,395,963,000 | 6992cb24a9151e74733146998deac6aa4d49a4ea | 2 | {
"blob_id": "6992cb24a9151e74733146998deac6aa4d49a4ea",
"branch_name": "refs/heads/master",
"committer_date": 1568395963000,
"content_id": "fd3e5a32781cd0295331336827123d7fd38d383b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "eacb726dfb05071fa65877f44960826fb4561af0",
"extension": "py"... | 2.5 | stackv2 | from django.core.management.base import BaseCommand
from optparse import make_option
from oauth2_provider.models import Application
from django.contrib.auth.models import User
class Command(BaseCommand):
help = "This creates a new client oauth app."
def add_arguments(self, parser):
parser.add_argumen... | 51 | 38.02 | 78 | 13 | 338 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_eaf6b96aa48564d1_abc99b60", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](1) as clear text."
] | [
50
] | [
51
] | [
15
] | [
61
] | |
2024-11-19T01:35:05.308983+00:00 | 1,403,096,457,000 | 10f19dde05cf307f71e7170d9250f87826f89b85 | 2 | {
"blob_id": "10f19dde05cf307f71e7170d9250f87826f89b85",
"branch_name": "refs/heads/master",
"committer_date": 1403096457000,
"content_id": "4d0a5f7bb251b5dcb66f948a6c3b458b8689acf8",
"detected_licenses": [
"MIT"
],
"directory_id": "bade4938c10faf4b7aebe60f2730513233bac280",
"extension": "py",
"fi... | 2.453125 | stackv2 | # -*- coding: utf8 -*-
"""
Usage:
hookit [--scripts=<dir>] [--listen=<address>] [--port=<port>]
args:
-v --version Show version
--scripts=<dir> Where to look for hook scripts [default: .]
--listen=<address> Server address to listen on [default: 0.0.0.0]
--port=<port> Server port to listen ... | 142 | 25.67 | 71 | 13 | 873 | python | [{"finding_id": "codeql_py/command-line-injection_07f6c9f6fcb23b4a_e5246164", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 6 | true | [
"CWE-078",
"CWE-022",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/command-line-injection",
"py/path-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends... | [
112,
107,
90,
103,
108,
111
] | [
null,
null,
null,
null,
null,
null
] | [
11,
27,
23,
25,
22,
18
] | [
18,
34,
50,
70,
53,
51
] | |
2024-11-19T01:35:06.227780+00:00 | 1,630,540,441,000 | fd786bcf5db91202f9d9560fdd45c38477d18dc8 | 2 | {
"blob_id": "fd786bcf5db91202f9d9560fdd45c38477d18dc8",
"branch_name": "refs/heads/main",
"committer_date": 1630540441000,
"content_id": "90a6688478d8460c8ec79f3dd6b7ab185ab5be2a",
"detected_licenses": [
"MIT"
],
"directory_id": "ce4b74556dbe1705a445b3bc9d9fd9e9715f0312",
"extension": "py",
"file... | 2.46875 | stackv2 | from flask import Flask, jsonify
import mysql.connector as mysql
servico = Flask(__name__)
IS_ALIVE = "yes"
DEBUG = True
TAMANHO_PAGINA = 4
MYSQL_SERVER = "10.0.0.117"
MYSQL_USER = "root"
MYSQL_PASS = "m4rc4s"
MYSQL_BANCO = "marcas"
def get_conexao_bd():
conexao = mysql.connect(
host=MYSQL_SERVER, port... | 201 | 35.38 | 125 | 23 | 1,885 | python | [{"finding_id": "codeql_py/flask-debug_b306ae78abbc54f5_6ac3bca8", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 5 | true | [
"CWE-215",
"CWE-089",
"CWE-089",
"CWE-089",
"CWE-089"
] | [
"py/flask-debug",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1).",
"This SQL query de... | [
197,
108,
131,
156,
179
] | [
201,
115,
140,
164,
187
] | [
5,
9,
9,
9,
9
] | [
6,
41,
83,
83,
83
] | |
2024-11-19T01:35:19.196692+00:00 | 1,619,177,512,000 | 832ea0e132715789e3673ab506b8985d5aa1e101 | 3 | {
"blob_id": "832ea0e132715789e3673ab506b8985d5aa1e101",
"branch_name": "refs/heads/master",
"committer_date": 1619177512000,
"content_id": "9f5192c505f69d7bc4d664d6672c989c65ef2401",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "568cdc8456dfe67c82fbf49a70432462c0b902c3",
"extension": "py"... | 3.109375 | stackv2 | import hashlib
import csv
def hash_password_hack(input_file_name, output_file_name):
def hashin(myPassword):
myHash= hashlib.sha256(myPassword.encode('utf-8')).hexdigest()
return(myHash)
def read_csv(adres):
with open(adres) as f:
lines=csv.reader(f)
read_d... | 48 | 26.4 | 70 | 17 | 328 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_8f017ad0fcb35a8c_a1cc8592", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
6
] | [
null
] | [
32
] | [
58
] | |
2024-11-19T02:07:58.459972+00:00 | 1,480,526,697,000 | c20fab3f854a4f71ac6b4f9e85b0ae0d7b55d01d | 3 | {
"blob_id": "c20fab3f854a4f71ac6b4f9e85b0ae0d7b55d01d",
"branch_name": "refs/heads/master",
"committer_date": 1480591638000,
"content_id": "06385c59a0dfe0307721dc291f61f9649c9b1b87",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ee49cc731132196fe544b6f569854a7c11280e43",
"extension": "py"... | 2.5625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Generate grafana dashboard in json format from the yaml templates
import json
import yaml
import argparse
from jinja2 import Environment, FileSystemLoader
def render(name, env_var):
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template('%... | 81 | 35.35 | 100 | 13 | 596 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1f649691ccb376b2_83d89b3d", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
13
] | [
null
] | [
11
] | [
52
] | |
2024-11-19T02:17:20.799781+00:00 | 1,597,400,824,000 | 36371d74647ec5b51ae839bc69468737b43ff404 | 3 | {
"blob_id": "36371d74647ec5b51ae839bc69468737b43ff404",
"branch_name": "refs/heads/master",
"committer_date": 1597400824000,
"content_id": "b2e9c1c0c3cf0256a3c80bf57cdbc9f1d8b8b1e2",
"detected_licenses": [
"MIT"
],
"directory_id": "f3aeb50ddd390878249ce4dcc23d95d255cc843b",
"extension": "py",
"fi... | 2.90625 | stackv2 | from flask import Flask, render_template, request, send_file
from werkzeug.utils import secure_filename
from geopy.geocoders import ArcGIS
import pandas
from os import remove
app = Flask(__name__)
output_filename = "yourfile.csv"
@app.route("/")
def index():
"""Shows the main page of the webapp"""
return re... | 95 | 26.27 | 79 | 16 | 528 | python | [{"finding_id": "codeql_py/path-injection_79dbe06383776ba1_bdc4fc32", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
33
] | [
null
] | [
20
] | [
28
] | |
2024-11-19T02:17:28.754663+00:00 | 1,595,401,229,000 | 0f649f07b5035fa8c97b0f7b6881187e7f355a79 | 2 | {
"blob_id": "0f649f07b5035fa8c97b0f7b6881187e7f355a79",
"branch_name": "refs/heads/master",
"committer_date": 1595402555000,
"content_id": "cebf3fa8fa705668c83794a117d56b80702a254e",
"detected_licenses": [
"MIT"
],
"directory_id": "c78d002aa75d0e3ea96469176bab2b080b739dde",
"extension": "py",
"fi... | 2.375 | stackv2 | from flask import render_template, flash, redirect, session, url_for, request, g
from app import app, db, lm
from .models import User, Post
from .forms import LoginForm, EditForm, PostForm
from flask_login import login_user, logout_user, current_user, login_required
from datetime import datetime
from config import POST... | 198 | 32.75 | 110 | 16 | 1,533 | python | [{"finding_id": "codeql_py/url-redirection_59afab2dfebc1a4f_b5563859", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
45,
83
] | [
null,
null
] | [
29,
29
] | [
73,
73
] | |
2024-11-19T02:17:32.055291+00:00 | 1,634,651,696,000 | 2be18acc91973dab0c594939d1cee91e89b6fa82 | 3 | {
"blob_id": "2be18acc91973dab0c594939d1cee91e89b6fa82",
"branch_name": "refs/heads/main",
"committer_date": 1634651696000,
"content_id": "b1f402e01376d162785644680f64c8da98397deb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "09a675c485732b9006e9ed59e9c2afc855cbda86",
"extension": "py",
... | 2.765625 | stackv2 | from flask import Flask
from flask import request
import json
import send
app = Flask(__name__)
def load_config():
with open('./configurations.json') as json_file:
configs = json.load(json_file)
key = configs['configurations']['key']
host = configs['configurations']['host']
return ... | 36 | 24.17 | 90 | 13 | 217 | python | [{"finding_id": "codeql_py/reflective-xss_5b3fa75b99d943ec_fc2bd275", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
36
] | [
null
] | [
12
] | [
27
] | |
2024-11-19T02:17:45.795293+00:00 | 1,618,759,697,000 | b1c0765e70879b041fdb505daa8e669262555b40 | 2 | {
"blob_id": "b1c0765e70879b041fdb505daa8e669262555b40",
"branch_name": "refs/heads/main",
"committer_date": 1618759697000,
"content_id": "b873b6e326487388ab21c6f782e296042e71b92b",
"detected_licenses": [
"MIT"
],
"directory_id": "6bfbd232b5d3038e8d8d1b53bce31482fdaf530e",
"extension": "py",
"file... | 2.4375 | stackv2 | # -*- coding = utf-8 -*-
# yxr 计算机网络课程设计大作业——课程表爬取
import hashlib
import io
import json
import os
from typing import List
import pandas # excel操作
import requests
from PIL import Image
'''
爬取网页
解析数据
保存数据
'''
base_dir = os.path.dirname(__file__)
class StuStudent(object):
def __init__(self,) -> None:... | 173 | 34.85 | 170 | 22 | 1,698 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_ef21acb2f10ab930_178aefeb", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
58
] | [
null
] | [
18
] | [
40
] | |
2024-11-19T02:29:57.995971+00:00 | 1,548,062,769,000 | 0e9c2b3788a482606d066635ead39f17e960c8f2 | 3 | {
"blob_id": "0e9c2b3788a482606d066635ead39f17e960c8f2",
"branch_name": "refs/heads/master",
"committer_date": 1548062769000,
"content_id": "ca2e911d369cc6167ccb787f7c4e18c94bcaa575",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "12ad69afd6a88e172833e94a5ce9880adeff2aa5",
"extension": "py"... | 2.84375 | stackv2 | # This is a demonstration of how to use RA-TLS without actually
# interfacing with the RA-TLS library directly. Instead, the RA-TLS
# key and certificate are generated at startup and exposed through the
# file system. The application accesses the key and certificate by
# reading from the file system.
import base64
imp... | 33 | 34.85 | 112 | 11 | 332 | python | [{"finding_id": "codeql_py/insecure-default-protocol_6fa03da4a52c1b7b_29cefea7", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
32
] | [
null
] | [
16
] | [
113
] | |
2024-11-19T02:30:19.375702+00:00 | 1,573,225,076,000 | be0ea48ae4df0f9bd876f4ea1e85fcbd631d12e0 | 3 | {
"blob_id": "be0ea48ae4df0f9bd876f4ea1e85fcbd631d12e0",
"branch_name": "refs/heads/master",
"committer_date": 1573225076000,
"content_id": "246d5ca0ea3d3cb6c919d6b0cd51affbf4591265",
"detected_licenses": [
"MIT"
],
"directory_id": "4fffe6fd42705dfd803941c1c9b79f9dd7922f51",
"extension": "py",
"fi... | 2.546875 | stackv2 | import os
from flask import current_app, make_response, request
from flask import send_file, render_template
from flaskapi.core.worker import celery
import celery.states as states
from flask import Blueprint
route_blueprint = Blueprint('route_blueprint', __name__)
# Create a URL route in our current_application fo... | 64 | 32.95 | 74 | 13 | 498 | python | [{"finding_id": "codeql_py/path-injection_3119aa4a5526d984_e7470282", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
59,
60
] | [
null,
null
] | [
23,
26
] | [
32,
35
] | |
2024-11-19T02:30:28.848817+00:00 | 1,571,473,549,000 | 63065213068e973188a15083bc2221bbcf5b8bca | 2 | {
"blob_id": "63065213068e973188a15083bc2221bbcf5b8bca",
"branch_name": "refs/heads/master",
"committer_date": 1571473549000,
"content_id": "f5ea0a07248323495f7de048ff658c1fdb0a3da8",
"detected_licenses": [
"MIT"
],
"directory_id": "8a77fdfd07a52a22d96a72083f847fc468c5ada4",
"extension": "py",
"fi... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
from enum import Enum
import json
class JsonEncoder(json.JSONEncoder):
def default(self, o):
if type(o) is Status:
return {o.__class__.__name__: o.value}
else:
return {o.__class__.__name__: o.__dict__}
def json_decode(dct):
keys = list(dct.keys... | 247 | 22.57 | 65 | 15 | 1,319 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_4819daca2e354c59_84ad7e78", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
102
] | [
103
] | [
9
] | [
38
] | |
2024-11-19T02:30:32.559692+00:00 | 1,634,146,501,000 | 0d25615214797b580e1bf9db788eb404d1f8e797 | 3 | {
"blob_id": "0d25615214797b580e1bf9db788eb404d1f8e797",
"branch_name": "refs/heads/master",
"committer_date": 1634146501000,
"content_id": "3ccfea31ace35e9a510d5afce4b4b7c4786a0d21",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "91ff4e4da7bfc7ff4235a0c4b4ca10eb1b59b2c6",
"extension": "py"... | 3.171875 | stackv2 | import os
import sys
import getopt
from pwinput import pwinput
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from Crypto import Random
# --- SET DEFAULTS ---
is_encrypt = False
is_decrypt = False
org_file_name = ''
argumentList = sys.argv[1:]
options = 'e:d:'
# --- DEFINE ARG OPERATIONS ---
try:
ar... | 95 | 29.73 | 71 | 22 | 682 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_57e3edcd756e84f1_654f544d", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
71
] | [
null
] | [
25
] | [
49
] | |
2024-11-19T02:30:33.775601+00:00 | 1,612,828,918,000 | 931dd0e156a4d13a87bead9804b9016c53568c53 | 2 | {
"blob_id": "931dd0e156a4d13a87bead9804b9016c53568c53",
"branch_name": "refs/heads/master",
"committer_date": 1612828918000,
"content_id": "b262c00263dba552932ec0314f09ef8182dfc7a5",
"detected_licenses": [
"MIT"
],
"directory_id": "a229fb1d59c65e6cc31b799d8856bcba7ee4866f",
"extension": "py",
"fi... | 2.40625 | stackv2 | import os
import json
import gzip
import time
import hmac
import random
import asyncio
import hashlib
from urllib.parse import urljoin
import aiohttp
from aiohttp.client_exceptions import ContentTypeError
class ApiError(Exception):
pass
class ApiProvider:
"""Provides HTTP-api requests and websocket reque... | 199 | 34.66 | 78 | 24 | 1,440 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_99485a9616ad5ccd_8db86cb4", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
74
] | [
null
] | [
13
] | [
36
] | |
2024-11-19T02:41:43.871900+00:00 | 1,615,735,926,000 | 1597f2677c2560be7564d0f0fcc0a1396c3e4f65 | 3 | {
"blob_id": "1597f2677c2560be7564d0f0fcc0a1396c3e4f65",
"branch_name": "refs/heads/master",
"committer_date": 1615735929000,
"content_id": "a7a78d9be8d79fa5b02f83d1731339a498d65258",
"detected_licenses": [
"MIT"
],
"directory_id": "cb82c37bbecc1a069b0b86ae69cefecb7c275c6f",
"extension": "py",
"fi... | 2.6875 | stackv2 | import yaml, os, sys, logging
from jinja2 import Environment, FileSystemLoader
from juliet import paths, defaults
def configure_jinja(theme, src):
""" Configure and return Jinja2 Environment. """
# Do not enable autoescape since we actually *do not* want it. Otherwise, we
# wouldn't be able to integrate h... | 46 | 32.33 | 86 | 16 | 318 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_7902fe7e6c294ab5_34ce8477", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
14
] | [
null
] | [
12
] | [
78
] | |
2024-11-19T02:41:52.349159+00:00 | 1,616,275,591,000 | 11b72b06ae1b21932363ff2434d0281032e497d7 | 2 | {
"blob_id": "11b72b06ae1b21932363ff2434d0281032e497d7",
"branch_name": "refs/heads/master",
"committer_date": 1616275591000,
"content_id": "b3c278a9709ee1f113a4bbf35b8391032529f073",
"detected_licenses": [
"MIT"
],
"directory_id": "7743369bdbe63357f16d80c0c66617a4fefdd1d6",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import Flask, jsonify, request
from firestore import *
from pyotp import TOTP
import requests
import json
import re
import os
import logging
SLACK_TOKEN = os.environ['SLACK_TOKEN']
SLACK_WEBHOOK = os.environ['SLACK_WEBHOOK']
app = Flask(__name__)
app.logger.setLevel(logging.DEBUG)
@app.route('/slash', m... | 78 | 23.92 | 119 | 14 | 472 | python | [{"finding_id": "codeql_py/flask-debug_8398c38da6c4100f_0daa693d", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
78,
75
] | [
null,
null
] | [
5,
12
] | [
53,
20
] | |
2024-11-19T02:41:56.944415+00:00 | 1,509,745,971,000 | dd9653a1e49c5f0d74094d4df904e2c6da7d9c90 | 3 | {
"blob_id": "dd9653a1e49c5f0d74094d4df904e2c6da7d9c90",
"branch_name": "refs/heads/master",
"committer_date": 1509745971000,
"content_id": "964137c2095f58b47fc95c851cbd1e1268619b40",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "9c9df526372e5a1b1515f45ac36df10c8fc64f47",
"extension": "p... | 2.625 | stackv2 |
import logging
from flask import jsonify
from flask import request
import predix.data.timeseries
from . import api
timeseries = predix.data.timeseries.TimeSeries()
@api.route('/datapoints')
def datapoints():
"""
Data points collected for the given nodes and sensors.
- *x*: epoch in millisecond timest... | 99 | 26.45 | 78 | 18 | 830 | python | [{"finding_id": "codeql_py/log-injection_9e707a749a8f7eac_c7c5204e", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
66
] | [
null
] | [
18
] | [
51
] | |
2024-11-18T18:05:52.909060+00:00 | 1,601,014,139,000 | b3e2a8ad4a96fff12cd29539d4f3604bf9f503bc | 3 | {
"blob_id": "b3e2a8ad4a96fff12cd29539d4f3604bf9f503bc",
"branch_name": "refs/heads/master",
"committer_date": 1601014139000,
"content_id": "ffa7e2a6ed95885a4b94ce7356c49b11a9249ab8",
"detected_licenses": [
"MIT"
],
"directory_id": "ba29cf7022df44f20aecdf1a3ef759b6e0090bba",
"extension": "py",
"fi... | 2.71875 | stackv2 | import string, random, base64, os
from captcha.image import ImageCaptcha
import struct
import time
import hmac
import hashlib
import base64
from Crypto.Cipher import DES
from Crypto import Random
import pickle
KEY = '12345678'
def generate_captcha_string(N):
"""
:return: random N character alphanumeric strin... | 129 | 31.89 | 108 | 17 | 1,075 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_27fdb6c4c02b7348_1e7801d9", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm DES](1) is broken or weak, and should not be used.", "r... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The cryptographic algorithm DES](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm DES](1) is broken or weak, and should not be used."
] | [
49,
79
] | [
null,
null
] | [
19,
16
] | [
36,
44
] | |
2024-11-18T17:59:50.035956+00:00 | 1,526,412,529,000 | 3565c89d0abca7fa2be99a81ba8a939d91e5792b | 3 | {
"blob_id": "3565c89d0abca7fa2be99a81ba8a939d91e5792b",
"branch_name": "refs/heads/master",
"committer_date": 1526412529000,
"content_id": "d3cd9cf953386b3dc89769a1f86f32f9ff28ab90",
"detected_licenses": [
"MIT"
],
"directory_id": "bcc26bc9caf8f03e9ce0406c31226434feb56ab7",
"extension": "py",
"fi... | 2.828125 | stackv2 | """
script that works with parstubuilder to decompress simulation vtk files
for a parametric study (assumes the data has already been compressed).
"""
import tarfile
import datetime as dt
import shutil
import os
# name of the parametric study who's data you wish to decompress
studyDir = '/absolute/path/to/parstubuilde... | 60 | 35.33 | 107 | 18 | 474 | python | [{"finding_id": "codeql_py/tarslip_bf2430c4aa4555b1_995b7d43", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
43
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T18:16:14.269356+00:00 | 1,677,534,722,000 | e0e0e8747466d4f7a9e1ef45ea6db71612cba258 | 2 | {
"blob_id": "e0e0e8747466d4f7a9e1ef45ea6db71612cba258",
"branch_name": "refs/heads/master",
"committer_date": 1677534722000,
"content_id": "f64cc0a8b607d724f9bec6f57b8f83fc366e85a6",
"detected_licenses": [
"MIT"
],
"directory_id": "96bee553d3189b0f18643f33b82ba344e9e42c74",
"extension": "py",
"fi... | 2.40625 | stackv2 | from resource_validator import validate_json
from flask import request
from flask import Flask
import os
import json
import uuid
import boto3
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.core import patch_all
from aws_xray_sdk.ext.flask.middleware import XRayMiddleware
app = Flask(__name__)
resource_c... | 111 | 28.27 | 93 | 15 | 757 | python | [{"finding_id": "codeql_py/reflective-xss_3b473ba740df66ec_963e4032", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
34,
65
] | [
null,
null
] | [
12,
12
] | [
53,
35
] | |
2024-11-18T20:08:57.249448+00:00 | 1,602,439,045,000 | ed57ad9190ff1ea2cb7a3b1a9eb68b3020bd76c5 | 3 | {
"blob_id": "ed57ad9190ff1ea2cb7a3b1a9eb68b3020bd76c5",
"branch_name": "refs/heads/master",
"committer_date": 1602439045000,
"content_id": "540989eba5d0687ef375ee6e455c6df35ec25b3f",
"detected_licenses": [
"MIT"
],
"directory_id": "2b7b0e584a42ac65a3c2e0612be2c562e3bebf96",
"extension": "py",
"fi... | 2.703125 | stackv2 | """
Created by Epic at 10/10/20
"""
from .exceptions import IncorrectModuleFormat
from pathlib import Path
from asyncio import get_event_loop, Future
from aiohttp import ClientSession
from typing import Optional
from re import compile
from colorama import init, Fore, Style
regex = compile("(\w+@)?([A-z0-9-_]+)/([A-z0... | 92 | 23.2 | 106 | 13 | 531 | python | [{"finding_id": "codeql_py/overly-large-range_7b0230e170d0d9bf_b8f1fe93", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
13,
13
] | [
null,
null
] | [
27,
41
] | [
30,
44
] | |
2024-11-18T18:59:36.374691+00:00 | 1,501,747,129,000 | c9dc0837639b318c1a10722d436c7700fc8bdfeb | 3 | {
"blob_id": "c9dc0837639b318c1a10722d436c7700fc8bdfeb",
"branch_name": "refs/heads/master",
"committer_date": 1501747129000,
"content_id": "6760d76f16179b4795af130720b4d9e402960412",
"detected_licenses": [
"MIT"
],
"directory_id": "2474b47e17c76c0134522a623500435f5814a090",
"extension": "py",
"fi... | 2.90625 | stackv2 | #!/usr/bin/env python
#-*-coding:utf-8-*-
from flask import Flask,url_for,request
from flask import render_template #para renderizar templates
import datetime #para el manejo de fechas
from datetime import datetime,timedelta,date
import calendar
import requests #para hacer la peticion a una URL
from dateutil import re... | 218 | 37.64 | 125 | 21 | 2,438 | python | [{"finding_id": "codeql_py/partial-ssrf_14b032f134d83f3b_16e4891d", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
25
] | [
null
] | [
6
] | [
96
] | |
2024-11-18T19:11:52.707966+00:00 | 1,626,140,889,000 | b22c95be6e6d933a97da3389957062093996c925 | 3 | {
"blob_id": "b22c95be6e6d933a97da3389957062093996c925",
"branch_name": "refs/heads/main",
"committer_date": 1626140889000,
"content_id": "45cf8d20c3d3e94d6e22ebe254d8bcdcee4fb8cb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "55c2830faf938c0d6d2f9012a5b14a0a577c641d",
"extension": "py",
... | 2.5625 | stackv2 | # This is a Flask Server
from flask import Flask, request, jsonify, send_from_directory
import websocket
import threading
import json
import time
import configparser
import collections
import sys
sys.path.append(r'./utility')
sys.path.append(r'./Response_model')
from rdf_utility import rdfUtility
from preprocess_utili... | 213 | 33.18 | 115 | 21 | 1,648 | python | [{"finding_id": "codeql_py/reflective-xss_5e784cf41736b201_56be5c22", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
64
] | [
null
] | [
20
] | [
50
] | |
2024-11-18T19:11:53.822925+00:00 | 1,583,531,101,000 | 8aaf4dd43a172a2e28f9a3dd069ad9dfa88c5dfc | 3 | {
"blob_id": "8aaf4dd43a172a2e28f9a3dd069ad9dfa88c5dfc",
"branch_name": "refs/heads/master",
"committer_date": 1583531101000,
"content_id": "e4c7853c3d5007e8232479010ee6a7e5b3fd7d28",
"detected_licenses": [
"MIT"
],
"directory_id": "4a5f0646fc7ece8f35c2a602a545e74e76c456df",
"extension": "py",
"fi... | 2.859375 | stackv2 | from flask import request, render_template
from bs4 import BeautifulSoup
import requests
from app import app
def getSiteTitle(site):
header = requests.utils.default_headers()
req = requests.get(site, header)
soup = BeautifulSoup(req.content, 'html.parser')
soup.prettify()
siteTitle = ''
if site.find("title") ... | 40 | 25.05 | 73 | 11 | 260 | python | [{"finding_id": "codeql_py/full-ssrf_c52afa90fb629de7_cb43b3a5", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 1 | true | [
"CWE-918"
] | [
"py/full-ssrf"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1)."
] | [
8
] | [
null
] | [
8
] | [
34
] | |
2024-11-18T19:23:53.460219+00:00 | 1,516,172,697,000 | a33cbf980c71f1dd2d88393e8602d78d8976326e | 2 | {
"blob_id": "a33cbf980c71f1dd2d88393e8602d78d8976326e",
"branch_name": "refs/heads/master",
"committer_date": 1516172697000,
"content_id": "7a7487fc5d92be1abf148978651cd8c844f97b02",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "83b27d9ad74dab585267b0c0df2ea8555bc5f98d",
"extension": "p... | 2.453125 | stackv2 | from flask import Flask, redirect, url_for, request, render_template
from werkzeug import secure_filename
from flask_mail import Mail, Message
import csv
app = Flask(__name__)
@app.route('/successArgument/<name>')
def success(name):
return 'welcome %s' % name
@app.route("/renderTemplate/")
def index():
return... | 77 | 24.69 | 105 | 14 | 478 | python | [{"finding_id": "codeql_py/flask-debug_f3fe975b2fbe07b4_405c1285", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
77,
9
] | [
null,
null
] | [
4,
11
] | [
25,
30
] | |
2024-11-18T18:39:25.150437+00:00 | 1,607,070,109,000 | 08200e005e46fe42b5780b317c3290a5686cefd3 | 2 | {
"blob_id": "08200e005e46fe42b5780b317c3290a5686cefd3",
"branch_name": "refs/heads/main",
"committer_date": 1607070109000,
"content_id": "2f9a4eab095f25a5aeb9d7a5ccac724f93c5ea58",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e4bcea8351cae2c192fbf1f409e9ba3159ee42aa",
"extension": "py",
... | 2.484375 | stackv2 | import requests
import json
import logging
log = logging.getLogger(__name__)
def request(url, hostcert=None, hostkey=None, verify=False):
log.debug('Retrieving {}'.format(url))
if hostcert and hostkey:
req = requests.get(url, verify=verify, timeout=120, cert=(hostcert, hostkey))
else:
req... | 140 | 34.41 | 96 | 19 | 1,095 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e66bbad0bbae1221_f3e04d27", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2).\nThis request may run without certificate validation because [it is disabled](1) by [this value](3).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2).\nThis req... | [
11,
13
] | [
null,
null
] | [
15,
15
] | [
86,
60
] | |
2024-11-18T18:40:04.915374+00:00 | 1,581,426,054,000 | f1647f289c19e6262403e2bc141a8d1bb87c2e53 | 2 | {
"blob_id": "f1647f289c19e6262403e2bc141a8d1bb87c2e53",
"branch_name": "refs/heads/master",
"committer_date": 1581426054000,
"content_id": "a64afbc2d36349b0e27d0fb0ede457289947baaf",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "75676ea392e9e4fd8a5c33f071d5f4455f854351",
"exten... | 2.34375 | stackv2 | import hashlib
import json
import os
import sys
import threading
import time
from urllib.parse import urlparse
from uuid import uuid4
import ipfsapi
from flask import (Flask, Response, jsonify, request, send_file,
send_from_directory)
from werkzeug import secure_filename
import objectpath as op
from ... | 369 | 27.91 | 100 | 22 | 2,489 | python | [{"finding_id": "codeql_py/reflective-xss_6ac6ef96c97282f4_3156711c", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-022"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
310,
333,
272
] | [
null,
null,
null
] | [
20,
20,
22
] | [
101,
101,
35
] | |
2024-11-18T20:52:24.923268+00:00 | 1,503,374,193,000 | 9072d19243d02c8acfbb3909a909ba0feceb99c9 | 2 | {
"blob_id": "9072d19243d02c8acfbb3909a909ba0feceb99c9",
"branch_name": "refs/heads/master",
"committer_date": 1503374193000,
"content_id": "1415e24ac72ca71b661597c1fc8bf407634fd70e",
"detected_licenses": [
"MIT"
],
"directory_id": "f654f5f07dd8109c0ee31ba89dd4804e6b288343",
"extension": "py",
"fi... | 2.421875 | stackv2 | """
Copyright (c) 2016-17 Keith Sterling http://www.keithsterling.com
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
the rights to use, copy, mod... | 124 | 36.32 | 126 | 17 | 950 | python | [{"finding_id": "codeql_py/stack-trace-exposure_7d1c711a0c6bb3e8_6478cfff", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
105
] | [
null
] | [
24
] | [
46
] | |
2024-11-18T20:58:17.411205+00:00 | 1,616,711,733,000 | 28b8907142d9c2160b0ff8169b979b8ffa6e06ca | 4 | {
"blob_id": "28b8907142d9c2160b0ff8169b979b8ffa6e06ca",
"branch_name": "refs/heads/main",
"committer_date": 1616711733000,
"content_id": "215cb3ce7c181d4c8ca8857e2ec476f1845e0359",
"detected_licenses": [
"MIT"
],
"directory_id": "6e1cee9e21d5c0ab3e4b983896b65d532440fada",
"extension": "py",
"file... | 3.53125 | stackv2 | #!/usr/bin/env python3
"""
extraction.py
This script takes the .conll files and converts them into SpaCy format.
"""
import pickle
import re
def extract_from_conll(filename):
"""
Extract relevant data from the .conll files.
Also converts the data to a spaCy-friendly format.
Parameters
----------... | 129 | 23.03 | 71 | 17 | 660 | python | [{"finding_id": "codeql_py/overly-large-range_8bfb26d72bd3afce_815b8d44", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
83
] | [
null
] | [
25
] | [
28
] | |
2024-11-18T19:49:08.829184+00:00 | 1,677,777,947,000 | b65135852310dbd790b205e0e5c608ee42e43872 | 3 | {
"blob_id": "b65135852310dbd790b205e0e5c608ee42e43872",
"branch_name": "refs/heads/main",
"committer_date": 1677777947000,
"content_id": "10763e06b84bcaac34577fcdba60846f9083db0d",
"detected_licenses": [
"MIT"
],
"directory_id": "618cc086351197d54dabc83a9fccec74850d83a2",
"extension": "py",
"file... | 3.015625 | stackv2 | from typing import Optional
import gzip
import os
import requests
import shutil
import tarfile
import zipfile
from filepaths import downloads_folder, data_folder
from logging_util import get_logger
logger = get_logger(__name__)
def download_helper(
input_url: str,
download_path: str,
output_path: Option... | 323 | 35.11 | 132 | 18 | 2,888 | python | [{"finding_id": "codeql_py/tarslip_554b598180dccfa4_e8f1de99", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
66,
131
] | [
null,
null
] | [
13,
9
] | [
16,
12
] | |
2024-11-18T19:49:12.189103+00:00 | 1,636,232,423,000 | 91dbad404ca722c78cefe9bdcfe979af4cf53fc8 | 3 | {
"blob_id": "91dbad404ca722c78cefe9bdcfe979af4cf53fc8",
"branch_name": "refs/heads/main",
"committer_date": 1636232423000,
"content_id": "e3aafdad9e0e704b9732cd888ef67fa2fce3175b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "38e2e46777632e9fa5a516858890d3810cd88a53",
"extension": "py",
... | 2.765625 | stackv2 | import pandas as pd
import numpy as np
from sklearn.preprocessing import MinMaxScaler
from sklearn.model_selection import train_test_split, RandomizedSearchCV
from sklearn.pipeline import Pipeline
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score, precision_score, recall_sc... | 128 | 36.88 | 139 | 19 | 1,088 | python | [{"finding_id": "codeql_py/flask-debug_615f3501a8b00cca_1a948165", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
128,
106
] | [
null,
null
] | [
5,
27
] | [
35,
36
] | |
2024-11-18T20:16:05.025302+00:00 | 1,546,914,277,000 | 13c3c93345d8c2059b68fcf7c16ba1630c220211 | 3 | {
"blob_id": "13c3c93345d8c2059b68fcf7c16ba1630c220211",
"branch_name": "refs/heads/master",
"committer_date": 1546914277000,
"content_id": "6df74d9ceb32009f72f22bc761ad85b9a40499d1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "831d6f27f1e420cdce37d76d1c93356cc735b07c",
"extension": "py"... | 2.53125 | stackv2 | def generate(self, bits, randfunc=None, progress_func=None,**kwargs):
for i in (0, 1, 2, 3, 4, 5, 6, 7, 8):
if bits == 512 + 64*i:
return self._generate(bits, randfunc, progress_func, **kwargs)
raise ValueError("Number of bits in p must be a multiple of 64 between 512 and 1024, not %d bits" ... | 63 | 34.81 | 112 | 14 | 631 | python | [{"finding_id": "codeql_py/weak-crypto-key_fb9bd6be5a47a4f5_1461bb6d", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an DSA key uses [1024](1) bits, which is below 2048 and considered breakable.", "remediation": "",... | 1 | true | [
"CWE-326"
] | [
"py/weak-crypto-key"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Creation of an DSA key uses [1024](1) bits, which is below 2048 and considered breakable."
] | [
36
] | [
null
] | [
11
] | [
31
] | |
2024-11-18T19:38:16.578954+00:00 | 1,423,428,773,000 | 632f407a1a3e68974d63ea5665205a7a7c74d41c | 3 | {
"blob_id": "632f407a1a3e68974d63ea5665205a7a7c74d41c",
"branch_name": "refs/heads/master",
"committer_date": 1423428773000,
"content_id": "230cddb1242211ed0e1acd3521880ce1e5c5de46",
"detected_licenses": [
"MIT"
],
"directory_id": "bd3ffbbb2ebc59ca2e27e97434b0940e54040ab3",
"extension": "py",
"fi... | 2.53125 | stackv2 | import re
from django.http import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from django.conf import settings
import twilio.twiml
from backend.models import Property, Applicant
@csrf_exempt
def hello(request):
r = twilio.twiml.Response()
r.message("Hello from A... | 106 | 27.23 | 126 | 16 | 697 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2a8c06e75d21ce12_7721d0d9", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
62
] | [
null
] | [
15
] | [
55
] | |
2024-11-18T19:38:21.926725+00:00 | 1,599,660,064,000 | 22d851c6c70cf57d52a1ce083ab87a3fc0a0308c | 3 | {
"blob_id": "22d851c6c70cf57d52a1ce083ab87a3fc0a0308c",
"branch_name": "refs/heads/master",
"committer_date": 1599660064000,
"content_id": "2adc926e18a2581b62ec72748416772ef29f4501",
"detected_licenses": [
"MIT"
],
"directory_id": "924403abd8a5178146db6081d646e2f8089a90a4",
"extension": "py",
"fi... | 2.703125 | stackv2 | import json
import os
from util import Util
# Define the util object
util = Util()
class SettingsTester:
def __init__(self):
print(
"\t[+]\t\t Testing provided config...")
# Test to see if the file even exists
def fileExists(self):
retVal = False
print(
"\... | 183 | 36.75 | 120 | 16 | 1,677 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_446945f2f9831bc4_85bab215", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
71,
75
] | [
null,
null
] | [
17,
17
] | [
72,
106
] | |
2024-11-18T19:38:25.898629+00:00 | 1,636,257,057,000 | 98473f009fdbe9e8fbac6da24f6e5ed0e6fba806 | 2 | {
"blob_id": "98473f009fdbe9e8fbac6da24f6e5ed0e6fba806",
"branch_name": "refs/heads/master",
"committer_date": 1636257057000,
"content_id": "7bf202611d4b5c241d5d9a5b6b78607a75949ae4",
"detected_licenses": [
"MIT"
],
"directory_id": "cc8ab4b0034a89896979824fd2cddc09791ce1de",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python
import rospy
import rospkg
import time
import sys
from sensor_msgs.msg import NavSatFix
from datetime import datetime
def status_to_string(status):
if status == -1:
return "STATUS_NO_FIX"
elif status == 0:
return "STATUS_FIX"
elif status == 1:
return "STATUS_SB... | 61 | 28.75 | 74 | 13 | 487 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_870a989d2eec1c6c_3df466a0", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
28
] | [
null
] | [
17
] | [
25
] | |
2024-11-18T19:38:36.141170+00:00 | 1,585,837,197,000 | 30edc9fa27f58f7962d3c35726ae80d2e5af0343 | 3 | {
"blob_id": "30edc9fa27f58f7962d3c35726ae80d2e5af0343",
"branch_name": "refs/heads/master",
"committer_date": 1585837197000,
"content_id": "d1c3cd81ef0d41feabc23dc2b73dc0c3a8aa8fc4",
"detected_licenses": [
"ISC"
],
"directory_id": "f8de3e13bcbe23aa1c823c5e4ef4c08f5816fb75",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python
# 5000 IRC Bot - Developed by acidvegas in Python (https://acid.vegas/trollbots)
'''
Requirements
* Python (https://www.python.org/downloads/)
Note: This script was developed to be used with the latest version of Python.
Information:
This bot requires network operator privledges in order to u... | 81 | 39.36 | 120 | 25 | 1,015 | python | [{"finding_id": "codeql_py/insecure-default-protocol_ccb577f373fb7a4f_1a8338d9", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
50
] | [
null
] | [
8
] | [
73
] | |
2024-11-18T20:10:37.726499+00:00 | 1,592,173,974,000 | f3ce97a08c3a61fb369b7745db72f2c06dc244d4 | 2 | {
"blob_id": "f3ce97a08c3a61fb369b7745db72f2c06dc244d4",
"branch_name": "refs/heads/master",
"committer_date": 1592173974000,
"content_id": "31bc885b25a1dae0cfa5b9df3192c7e0fe43ee47",
"detected_licenses": [
"MIT"
],
"directory_id": "ea545bea9a5b4e8f9c80875197b08ed82b0b4486",
"extension": "py",
"fi... | 2.390625 | stackv2 |
from bson.json_util import dumps
import os
from functools import wraps
import json
from six.moves.urllib.request import urlopen
from flask import Flask, request, jsonify, _request_ctx_stack
from flask_cors import cross_origin
from flask_api import status
from jose import jwt
import requests
import http.client
from . ... | 396 | 30.41 | 95 | 19 | 2,720 | python | [{"finding_id": "codeql_py/stack-trace-exposure_4ecc320a9a6cd2ba_e80e7784", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 5 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
166,
197,
245,
291,
342
] | [
null,
null,
null,
null,
null
] | [
16,
16,
16,
16,
16
] | [
62,
62,
62,
62,
62
] | |
2024-11-18T20:10:54.998709+00:00 | 1,595,640,607,000 | 4e25eab87668d448d741c6a76a90e40b471034c7 | 2 | {
"blob_id": "4e25eab87668d448d741c6a76a90e40b471034c7",
"branch_name": "refs/heads/master",
"committer_date": 1595640607000,
"content_id": "2b7d6dece9333d010c603bcf1cc474d1663eb2a2",
"detected_licenses": [
"MIT"
],
"directory_id": "bb7b1c929f421ee5f690931759f933912e5d2453",
"extension": "py",
"fi... | 2.328125 | stackv2 | ''' Predict vegitables code here '''
#imports
import os
import io
import numpy as np
import keras
from keras.preprocessing import image
from keras.preprocessing.image import img_to_array
from keras.applications.xception import (
Xception, preprocess_input, decode_predictions)
from keras import backend as K
from f... | 210 | 27.39 | 144 | 18 | 1,326 | python | [{"finding_id": "codeql_py/flask-debug_b5fa7dea894c9d39_d243a455", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
210,
70
] | [
null,
null
] | [
5,
23
] | [
24,
31
] | |
2024-11-18T20:26:04.298986+00:00 | 1,631,627,383,000 | 79f4fda1cdcac40024e9bf2191532a6e508845c9 | 3 | {
"blob_id": "79f4fda1cdcac40024e9bf2191532a6e508845c9",
"branch_name": "refs/heads/main",
"committer_date": 1631627383000,
"content_id": "083b2971a01a5a5d713c5637972bc0ef5c3e4319",
"detected_licenses": [
"MIT"
],
"directory_id": "f40a84ba4098dae2bfc1da285274c89cf0374f27",
"extension": "py",
"file... | 2.671875 | stackv2 | from io import BytesIO
import redis
import requests
from flask import send_file, Flask
def create_app():
app = Flask(__name__)
redis_server = redis.StrictRedis(host='localhost', port=6379, db=2)
@app.route('/img/<path:image_url>')
def image(image_url):
cached = redis_server.get(image_url)
... | 26 | 26.85 | 86 | 17 | 172 | python | [{"finding_id": "codeql_py/full-ssrf_b391c33fd0df8755_841dea5e", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 2 | true | [
"CWE-918",
"CWE-022"
] | [
"py/full-ssrf",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
19,
24
] | [
null,
null
] | [
17,
26
] | [
52,
38
] | |
2024-11-18T20:26:07.818313+00:00 | 1,470,971,558,000 | 3ea6179a7e35456b6877a051db56eb8f57c18cf8 | 3 | {
"blob_id": "3ea6179a7e35456b6877a051db56eb8f57c18cf8",
"branch_name": "refs/heads/master",
"committer_date": 1470971558000,
"content_id": "fb3fed12577ba7bdeb0342c89253ae83f304b546",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b700a36ec2b8cf3133a0d03a2095f978d878700e",
"extension": "py"... | 2.921875 | stackv2 | from SailboatAI.model import Boat, Environment
import math
from twisted.internet import task
class SailboatAIController(object):
def __init__(self):
self.boat = Boat()
self.delta_time = 0
self.environment = Environment()
self.is_simulation = False
self.current_waypoint_idx ... | 60 | 39.17 | 112 | 17 | 549 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a7f8c2212d302dc0_f11263fb", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
48
] | [
null
] | [
15
] | [
98
] | |
2024-11-18T20:26:52.184408+00:00 | 1,657,426,087,000 | 6e3f5407d4e3893e9037a7b5f279f6ab809be6bf | 2 | {
"blob_id": "6e3f5407d4e3893e9037a7b5f279f6ab809be6bf",
"branch_name": "refs/heads/master",
"committer_date": 1657426087000,
"content_id": "ac5071e11b1b10044dbd8d61ff853f086ac4e744",
"detected_licenses": [
"MIT"
],
"directory_id": "8f2c06ab584e4839755df24a22eee0296bdc8a4c",
"extension": "py",
"fi... | 2.375 | stackv2 | import json
import logging
import os
from google.api_core.exceptions import RetryError
from google.auth.exceptions import TransportError
from google.cloud import storage
from google.cloud.exceptions import NotFound
from requests.exceptions import ConnectTimeout
from urllib3.exceptions import ConnectTimeoutError, MaxRe... | 127 | 31.25 | 81 | 17 | 862 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5bbf5e7df41fe45c_eb531eae", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
46
] | [
null
] | [
21
] | [
56
] | |
2024-11-18T20:26:58.776714+00:00 | 1,660,826,764,000 | 15ae1f69156567013524fe49e04a20db0f18b5c4 | 3 | {
"blob_id": "15ae1f69156567013524fe49e04a20db0f18b5c4",
"branch_name": "refs/heads/master",
"committer_date": 1660826764000,
"content_id": "58155fff0b07a4c88887e217e3113e7d04d08bb8",
"detected_licenses": [
"MIT"
],
"directory_id": "83544ef94ce2c1a05b6028ae2ce58ef8acfb6fa8",
"extension": "py",
"fi... | 2.78125 | stackv2 | """Methods for reading and writing spk files"""
try:
from Cryptodome.Cipher import AES
from Cryptodome.PublicKey import RSA
from Cryptodome.Util.number import bytes_to_long, long_to_bytes
except ImportError:
from Crypto.Cipher import AES
from Crypto.PublicKey import RSA
from Crypto.Util.number import bytes_to_lo... | 82 | 31.28 | 135 | 14 | 652 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_93182960381de224_c55a514f", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
77,
82
] | [
null,
null
] | [
29,
18
] | [
43,
65
] | |
2024-11-18T20:38:54.700743+00:00 | 1,606,353,296,000 | c53de3bc0bbf439fdd50c3650bbabfdac62940e4 | 2 | {
"blob_id": "c53de3bc0bbf439fdd50c3650bbabfdac62940e4",
"branch_name": "refs/heads/main",
"committer_date": 1606353296000,
"content_id": "8a676b752c12042ce2804b4be342e87e83341a8f",
"detected_licenses": [
"MIT"
],
"directory_id": "2c045636c75caf207af44ac290502b973fbb16bc",
"extension": "py",
"file... | 2.390625 | stackv2 | #
# @name: Addo Kwame Dennis
# @file: sds.py --> Service discovery script (sds)
# @brief: simple script leveraging the exoscale python api for itrating with the exoscale compute
#
#
#
import exoscale
import os
import json
import pathlib
import time
import signal
import logging as pylogger
import sys
import os.path
sta... | 114 | 37.64 | 113 | 18 | 1,035 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9fc5725208db97ce_e4b1dd99", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text.",
"This expression logs [sensitive data (passw... | [
57,
62,
90,
107
] | [
null,
null,
92,
108
] | [
31,
19,
24,
27
] | [
60,
87,
95,
91
] | |
2024-11-18T20:52:10.403548+00:00 | 1,605,759,221,000 | 69c0ae8e555f1eb6d457bcfa6fd6dfeee0a153af | 2 | {
"blob_id": "69c0ae8e555f1eb6d457bcfa6fd6dfeee0a153af",
"branch_name": "refs/heads/master",
"committer_date": 1605759221000,
"content_id": "1ed0cf60dfd31f681e3c37b76c54e47fe3b91090",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "1087cb2be728e74e94fa2a692a1e8ff144a76799",
"extension": "p... | 2.34375 | stackv2 | from __future__ import print_function
import jinja2
import os
import os.path
import random
import shutil
import pwd
import sys
def total_mem_megs():
with open('/proc/meminfo','r') as f:
meminfo = f.read()
lines = meminfo.splitlines()
theline = [l for l in lines if l.find('MemTotal') >= 0][0]
memstr = theline.sp... | 129 | 33.47 | 170 | 16 | 1,127 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5d7a60903fea48dd_93d31bfd", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
65
] | [
null
] | [
17
] | [
171
] | |
2024-11-18T20:52:20.285759+00:00 | 1,563,601,985,000 | 3ff44bc31c7363044757a4ada401d9a97cf3e3f4 | 3 | {
"blob_id": "3ff44bc31c7363044757a4ada401d9a97cf3e3f4",
"branch_name": "refs/heads/master",
"committer_date": 1563601985000,
"content_id": "0022348df32b673a17d76656af76279037becef7",
"detected_licenses": [
"MIT"
],
"directory_id": "2d1bd45c45d97dacd63085e37e11771a4de73f8c",
"extension": "py",
"fi... | 2.96875 | stackv2 | import re
try:
compat_str = unicode # Python 2
from HTMLParser import HTMLParser as compat_HTMLParser
except NameError:
compat_str = str
from html.parser import HTMLParser as compat_HTMLParser
try: # Python 2
from HTMLParser import HTMLParseError as compat_HTMLParseError
except ImportError: # P... | 94 | 29.86 | 75 | 13 | 726 | python | [{"finding_id": "codeql_py/bad-tag-filter_c3fa74f895cf7e12_0f97d4c8", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines."
] | [
82
] | [
null
] | [
22
] | [
43
] | |
2024-11-18T20:52:46.607799+00:00 | 1,612,857,856,000 | 5542f29e96a821de289526cfd09ce52c088436b3 | 2 | {
"blob_id": "5542f29e96a821de289526cfd09ce52c088436b3",
"branch_name": "refs/heads/master",
"committer_date": 1612857856000,
"content_id": "02ac0b8b340cbe5413a88e312446dfc8a31a1473",
"detected_licenses": [
"MIT"
],
"directory_id": "451783a4a934432fb742c6a35106b312200b1045",
"extension": "py",
"fi... | 2.390625 | stackv2 | #-*- coding:utf-8 _*-
"""
@file: douyin.py
@time: 2020/08/21
@site:
@software: PyCharm
# code is far away from bugs with the god animal protecting
I love animals. They taste delicious.
┏┓ ┏┓
┏┛┻━━━┛┻┓
┃ ☃ ┃
┃ ┳┛ ┗┳ ┃
┃ ┻ ... | 115 | 30.31 | 159 | 24 | 1,092 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_1f6655067cdc52d4_df669826", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [www.iesdouyin.com](1) may be at an arbitrary position ... | 3 | true | [
"CWE-020",
"CWE-020",
"CWE-295"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/request-without-cert-validation"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [www.iesdouyin.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [v.douyin.com](1) may be at an arbitrary position in the sanitized URL.",
"This request may run without certificate validation because [it is disabled](1)."
] | [
100,
102,
56
] | [
null,
null,
null
] | [
16,
16,
19
] | [
47,
42,
65
] | |
2024-11-18T19:02:47.350892+00:00 | 1,558,764,137,000 | 8123527d14106c25a6792bc70e306c5edf8cc7af | 3 | {
"blob_id": "8123527d14106c25a6792bc70e306c5edf8cc7af",
"branch_name": "refs/heads/master",
"committer_date": 1558764137000,
"content_id": "bcd59ebb8eac8089cdbe852a1bebd5a68cc45f4a",
"detected_licenses": [
"MIT"
],
"directory_id": "2c1565772952cee77c36821e11db4871a34ca228",
"extension": "py",
"fi... | 2.59375 | stackv2 | from pymongo import MongoClient
import datetime
import hashlib
class BackendLogic:
def __init__(self):
self.client = MongoClient('mongodb://zapy:Nickpt98@ds261128.mlab.com:61128/osl_mini_project_prod')
self.db = self.client['osl_mini_project_prod']
self.manager_account_collection = self.db... | 99 | 32.87 | 106 | 18 | 728 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_4ad26d73d6afcb2b_82e439d9", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA3224) that is i... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA3224) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
40
] | [
null
] | [
33
] | [
50
] | |
2024-11-18T19:02:58.271653+00:00 | 1,420,177,814,000 | 22b2e22446fbf8814b17e5955fa94bca4bbad1d8 | 3 | {
"blob_id": "22b2e22446fbf8814b17e5955fa94bca4bbad1d8",
"branch_name": "refs/heads/master",
"committer_date": 1420177814000,
"content_id": "0c60264d82c45c413b7b35319da9be512ffedce1",
"detected_licenses": [
"MIT"
],
"directory_id": "768716b8b494a3cbd298b7ad3d079e4a78d21b5b",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/env python3
#
# Generates LaTeX, markdown, and plaintext copies of my CV.
#
# Brandon Amos <http://bamos.io>
# 2013.12.28
import re
import yaml
import sys
from bibtexparser.customization import *
from bibtexparser.bparser import BibTexParser
from datetime import date
from jinja2 import Environment, FileSys... | 158 | 29.85 | 71 | 22 | 1,418 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_da470e549b139982_bf48f254", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
17
] | [
20
] | [
7
] | [
56
] | |
2024-11-18T19:14:36.424721+00:00 | 1,514,584,848,000 | c593e968f916d1766eb7e611d141150c151e2d6a | 2 | {
"blob_id": "c593e968f916d1766eb7e611d141150c151e2d6a",
"branch_name": "refs/heads/master",
"committer_date": 1514584912000,
"content_id": "be2d3d01148104037766c9a9f5bd3d473ad2a184",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "268c7d6d39cfda1fd9758f86e48fdcfd28d21ab5",
"extension": "p... | 2.328125 | stackv2 | # -*- coding:utf-8 -*-
from . import application, BASE_URL
from flask import render_template, request, json, flash, redirect, session
from flaskext.mysql import MySQL
from werkzeug import generate_password_hash, check_password_hash
from os import path
import uuid
from app.utility import visit_directory
mysql = MySQL(... | 357 | 38.84 | 80 | 27 | 2,718 | python | [{"finding_id": "codeql_py/path-injection_d2c4aad331cc6f92_cdcc43bf", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
341
] | [
null
] | [
23
] | [
55
] | |
2024-11-18T19:14:39.127614+00:00 | 1,604,069,298,000 | 52e244054f5c2d2632b8d40e0dc0117296be666d | 4 | {
"blob_id": "52e244054f5c2d2632b8d40e0dc0117296be666d",
"branch_name": "refs/heads/master",
"committer_date": 1604069298000,
"content_id": "9cdd62168056b686295553625b4fcc7689e958fe",
"detected_licenses": [
"MIT"
],
"directory_id": "8882b84f27d09f9e1bdfd9d7abce71b7c1d30b87",
"extension": "py",
"fi... | 4.125 | stackv2 | # Dictionary Comprehension
# https://www.python.org/dev/peps/pep-0274/
# plain_squares = {n: n*n for n in range(5)} # dictionary comprehension
# print(plain_squares)
# my_squares = {str(n): n*n for n in range(5)} # dictionary comprehension
# print(my_squares)
# # so same as doing the following
# squares = {}
# for n i... | 60 | 31.82 | 118 | 11 | 594 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_318b65a35500420a_307d1470", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
28,
29,
30
] | [
null,
null,
null
] | [
7,
7,
7
] | [
20,
21,
23
] | |
2024-11-18T19:14:41.482688+00:00 | 1,462,055,600,000 | 06cfda27ee5e9cc5886b5a1dc1b0fa39ff4980f4 | 3 | {
"blob_id": "06cfda27ee5e9cc5886b5a1dc1b0fa39ff4980f4",
"branch_name": "refs/heads/master",
"committer_date": 1462055600000,
"content_id": "7c617f1f8ec5a6bdb47eb4a34c9639428b94bdaa",
"detected_licenses": [
"MIT"
],
"directory_id": "bc8936ab06482698a33b2d31e328080d491c5e3d",
"extension": "py",
"fi... | 3.09375 | stackv2 | #!/opt/local/bin/python3.4
"""
Tachun Lin
Dept. of Computer Science & Information Systems
Bradley University
djlin@bradley.edu
To convert special DOCX to JSON format
"""
from docx import Document
import re
import sys, getopt
def usage():
print("%s [-h] -i [input file (DOCX)] -o [output file (JSON)]"% __file__)
... | 226 | 28.61 | 82 | 15 | 1,721 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_609d9a2dc06ae9e1_5387693a", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text."
] | [
60
] | [
null
] | [
21
] | [
57
] | |
2024-11-18T19:14:46.283896+00:00 | 1,522,405,481,000 | a74c59e80719b9e1a302b2ea8b2d34613804ebcf | 3 | {
"blob_id": "a74c59e80719b9e1a302b2ea8b2d34613804ebcf",
"branch_name": "refs/heads/master",
"committer_date": 1522405481000,
"content_id": "e1cf81575ea388c83139148ebd84dd3e3a5c75df",
"detected_licenses": [
"MIT"
],
"directory_id": "801db70986213ca6348954510454ff2e6f19c23d",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
import os
import sys
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer, test as _test
import subprocess
from SocketServer import ThreadingMixIn
import argparse
import json
import time
map = {
"gpu_temp" : lambda: get_nvidia_smi("gpu_temp"),
... | 128 | 32.79 | 144 | 18 | 1,082 | python | [{"finding_id": "codeql_py/command-line-injection_5a17a924551b33eb_5c0bc5d2", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 2 | true | [
"CWE-078",
"CWE-022"
] | [
"py/command-line-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
61,
46
] | [
null,
null
] | [
9,
26
] | [
52,
58
] | |
2024-11-18T19:14:48.531366+00:00 | 1,523,967,230,000 | dcaa6577c403a5f58853a87c7056ed19175c042a | 3 | {
"blob_id": "dcaa6577c403a5f58853a87c7056ed19175c042a",
"branch_name": "refs/heads/master",
"committer_date": 1523967230000,
"content_id": "54ca5a5577b41d975d639a11645cf924e6c9fed1",
"detected_licenses": [
"ISC"
],
"directory_id": "55ede51dbd9056ede8f4ec385286452f47d60e59",
"extension": "py",
"fi... | 2.78125 | stackv2 | import os
from collections import namedtuple
from hashlib import sha256
import base58
import msgpack
from Crypto.Cipher import AES
from Crypto.Hash import SHA256
from ecdsa import SECP256k1, SigningKey, VerifyingKey
import ecdsa
class SignableTransaction:
def __init__(self, tx_json_data):
self.tx_json_d... | 102 | 33.38 | 91 | 15 | 837 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_6f97f119c46b4c48_40a2d20c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
77
] | [
null
] | [
21
] | [
25
] | |
2024-11-18T19:27:23.568205+00:00 | 1,560,762,412,000 | e21f98f037c76e29d4d2701e75a8caca246bc53a | 3 | {
"blob_id": "e21f98f037c76e29d4d2701e75a8caca246bc53a",
"branch_name": "refs/heads/master",
"committer_date": 1560762412000,
"content_id": "397b352c30a866e9f51f9fca0cd9016e50b00f6b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9b448479e4bfbb08bae85237d1744297d91f95ab",
"extension": "py"... | 2.65625 | stackv2 | import requests
import urllib3
urllib3.disable_warnings()
class author(object):
def __init__(self):
self.auth_URL = "https://scripts.cisco.com/api/v2/auth/login"
def authenticate(self, cec, password):
self.cec = cec
self.password = password
self.s = requests.Session()
... | 22 | 30.55 | 74 | 13 | 164 | python | [{"finding_id": "codeql_py/request-without-cert-validation_90fde63cd60a5bfb_0e489261", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
16
] | [
null
] | [
20
] | [
75
] | |
2024-11-18T19:38:30.731713+00:00 | 1,557,224,927,000 | f46468bc86642c188766b5a4a0a6f2dbaecbe326 | 2 | {
"blob_id": "f46468bc86642c188766b5a4a0a6f2dbaecbe326",
"branch_name": "refs/heads/master",
"committer_date": 1557224927000,
"content_id": "7e86725968cc76767a2609ad1ae9f69d7f1ea264",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "4c5a36f32a4d870361fbfc7d762754ac52aa9962",
"extension": "py",
... | 2.421875 | stackv2 | #!/usr/bin/python2
import pwn
import random
import hashlib
from Crypto.Cipher import AES
r = pwn.remote('quals.shadow-league.org', 5002)
print(r.recvuntil('key is ').decode())
secretkey = r.recvline()
print(secretkey.decode())
deb = secretkey[:15].decode()
fin = secretkey[-17:-2].decode()
for s in range(1, 10000):
... | 33 | 25.03 | 77 | 10 | 259 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7484aa820183f7a2_6560401b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
12
] | [
null
] | [
7
] | [
25
] | |
2024-11-18T19:38:45.069763+00:00 | 1,572,432,805,000 | 5298d28928a9094be64d41bf8eb9f4f83e469a30 | 2 | {
"blob_id": "5298d28928a9094be64d41bf8eb9f4f83e469a30",
"branch_name": "refs/heads/master",
"committer_date": 1572432805000,
"content_id": "6a97c21944d85bc6d93f646075f13a435f903c6a",
"detected_licenses": [
"MIT"
],
"directory_id": "a109227ed6a49448eebba0b6fd95bb0dd0a44c74",
"extension": "py",
"fi... | 2.4375 | stackv2 | from threading import Thread, Lock
from random import choice, random
from time import sleep, strftime
from termcolor import colored
import logging
import os
import requests
import json
logger = logging.basicConfig()
lock = Lock()
base_url = 'https://eentegen100.gamedia.nl/eentegen100/api/'
register = 'user/registe... | 406 | 31.02 | 90 | 21 | 2,823 | python | [{"finding_id": "codeql_py/request-without-cert-validation_09353da1db58ff0e_9cf3e8ba", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
63
] | [
null
] | [
12
] | [
71
] | |
2024-11-18T19:38:48.497671+00:00 | 1,621,503,973,000 | ac1b7324a1acf84a000ff974a13fd58d7692231b | 2 | {
"blob_id": "ac1b7324a1acf84a000ff974a13fd58d7692231b",
"branch_name": "refs/heads/master",
"committer_date": 1621503973000,
"content_id": "e7b1e079174f4e8640cc9f5fddb0e9da056e662e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "44d7bd3f87f24374d4e61d9190416319cc2b00a4",
"extension": "py"... | 2.40625 | stackv2 | # compose_flask/app.py
from flask import Flask, jsonify, request
from redis import Redis
from connection import get_connection
import json
app = Flask(__name__)
redis = Redis(host='redis', port=6379)
@app.route('/redis/user')
def redis_get_user():
try:
userId = request.args.get('userId', 0)
key = "user"+str(user... | 195 | 19.04 | 83 | 14 | 1,116 | python | [{"finding_id": "codeql_py/stack-trace-exposure_655a2a5b8ec51718_e8c162f6", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 8 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-215"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/flask-debug"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
30,
51,
72,
100,
130,
160,
191,
195
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
17,
17,
17,
17,
17,
17,
17,
2
] | [
23,
23,
23,
23,
23,
23,
23,
48
] | |
2024-11-18T20:06:00.365471+00:00 | 1,615,042,766,000 | 4c00dcf469d77f680c62fa58ebb61d23bee4cba3 | 2 | {
"blob_id": "4c00dcf469d77f680c62fa58ebb61d23bee4cba3",
"branch_name": "refs/heads/master",
"committer_date": 1615042766000,
"content_id": "b9d2bc59900b3e31f5af15e73d6dcddaac2c51b7",
"detected_licenses": [
"MIT"
],
"directory_id": "7d84ebf0e6fdca900f728162d627cb5aca50cd03",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python
__author__ = "P.K.V.M. @koudjo-mvp"
# Build v${BUILD-VERSION} #
# Standard Imports
import os
import sys
import csv
import traceback
import pickle
import pprint
import tarfile,zipfile
import ConfigParser
from time import time, strftime, localtime
from string import zfill, split, strip, Template
i... | 167 | 26.98 | 101 | 16 | 1,131 | python | [{"finding_id": "codeql_py/tarslip_bed94f8207dfc96b_21a286a8", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
98,
100
] | [
null,
null
] | [
17,
17
] | [
20,
20
] | |
2024-11-18T20:06:03.274839+00:00 | 1,418,450,773,000 | a13f44e7ec3a6efff02a2166b051bc1dbb5452df | 3 | {
"blob_id": "a13f44e7ec3a6efff02a2166b051bc1dbb5452df",
"branch_name": "refs/heads/master",
"committer_date": 1418450773000,
"content_id": "6d4c5d805c659c47c032d55c769c8e6c4ea1b494",
"detected_licenses": [
"MIT"
],
"directory_id": "379593f4db1f66bc46a904c83a8d74445d5adb14",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/python
# python scraper.py <# files you want to download>
# import modules
import urllib2
import re
import os
def main():
res = urllib2.urlopen("http://www.free-midi.org/midi/g/green-day/pg4/")
html = res.read()
for match in re.findall(r'<a href="(http://www.free-midi.org/song/green.*)" itemprop=', htm... | 26 | 24.54 | 104 | 14 | 193 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_e240d0396a90c30a_f816ed1c", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'free-midi.org/song/green', so it mi... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-hostname-regexp",
"py/incomplete-hostname-regexp"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'free-midi.org/song/green', so it might match more hosts than expected.",
"This regular expression has an unescaped '.' before 'free-midi.org/midi1/g/', so it might match more hosts than expected."
] | [
13,
17
] | [
null,
null
] | [
38,
33
] | [
75,
73
] | |
2024-11-18T20:06:13.442731+00:00 | 1,585,755,453,000 | 90f5e9ce76a33c9331e026e1ba397d03ee36104e | 3 | {
"blob_id": "90f5e9ce76a33c9331e026e1ba397d03ee36104e",
"branch_name": "refs/heads/master",
"committer_date": 1585755453000,
"content_id": "5362f0f5e0626ec02184da323ebd91913d3c1139",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a34985e674314acf616788f700514b5f770ad6ed",
"extension": "py"... | 2.875 | stackv2 | """
Pascal VOC writer, forked from https://github.com/AndrewCarterUK/pascal-voc-writer
"""
import os
from jinja2 import Environment, FileSystemLoader
class Writer:
"Class for writing Pascal VOC annotation formats."
def __init__(self, path, width, height):
root = os.path.dirname(os.path.abspath(__file... | 69 | 35.2 | 104 | 17 | 557 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_213e98cd648a6ed9_4d69a4cb", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
14
] | [
null
] | [
23
] | [
105
] | |
2024-11-18T20:06:33.044762+00:00 | 1,610,775,418,000 | 9a270621206501f717ccb0f7e9781776c6c099ac | 3 | {
"blob_id": "9a270621206501f717ccb0f7e9781776c6c099ac",
"branch_name": "refs/heads/master",
"committer_date": 1610775418000,
"content_id": "3740ddd7b4a69e39bc5946ead95e370a335c5d97",
"detected_licenses": [
"MIT"
],
"directory_id": "acb9a7bd95b3b4f0da5d17e9b36186b9094e081e",
"extension": "py",
"fi... | 3.03125 | stackv2 | import argparse
import os
from jinja2 import Template
def load_config(input_file, variable_file=""):
"""
read input_file and render it with variable file
"""
with open(input_file) as f:
template = Template(f.read())
variable = os.environ.copy()
if variable_file != "":
with op... | 34 | 20.79 | 58 | 13 | 162 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d94abeeaf0591b24_2f2d5d92", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
12
] | [
null
] | [
20
] | [
38
] | |
2024-11-18T20:18:19.252479+00:00 | 1,625,146,355,000 | 76bac1daadb84721f3f7e6b8cd639b7c7bb11316 | 3 | {
"blob_id": "76bac1daadb84721f3f7e6b8cd639b7c7bb11316",
"branch_name": "refs/heads/master",
"committer_date": 1625146355000,
"content_id": "6dbef008a11bc05f922836b21f6f90922ef8c787",
"detected_licenses": [
"MIT"
],
"directory_id": "098454ec66ea9035d7cd427c57e8459d27d82ec4",
"extension": "py",
"fi... | 2.765625 | stackv2 | """Webscraping functions."""
import requests
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4)\
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 \
Safari/537.36"}
def search_yts(name, chatid, obj):
"""Search from yts."""
obj.reset(chatid)
... | 52 | 32.48 | 77 | 13 | 465 | python | [{"finding_id": "codeql_py/request-without-cert-validation_2939f7ab5e0cdc0b_48812b1d", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
15
] | [
null
] | [
16
] | [
64
] | |
2024-11-18T20:18:23.253903+00:00 | 1,590,763,781,000 | 49157ed488927ff8d983fbb0860eda77e14d6422 | 3 | {
"blob_id": "49157ed488927ff8d983fbb0860eda77e14d6422",
"branch_name": "refs/heads/master",
"committer_date": 1590763781000,
"content_id": "4e736dfb16e0ea7a54c1b1aa46a66bd1dc2c59ab",
"detected_licenses": [
"MIT"
],
"directory_id": "61c1a2d4504b2eb796bae2b87cd0551d4ee76a95",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/env python
"""
Usage:
python meta_data_collection.py <phone_ip_address> <token> <phantom server>
Copyright (c) 2016 World Wide Technology, Inc.
All rights reserved.
author: joel.king@wwt.com
Revision history:
26 March 2016 | 1.0 - initial release
1 April 2016 | 1.1 - we now ha... | 218 | 25.97 | 106 | 18 | 1,415 | python | [{"finding_id": "codeql_py/request-without-cert-validation_da518ad3f9c956e8_c3546625", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
65,
128,
172
] | [
null,
null,
null
] | [
13,
9,
9
] | [
44,
80,
80
] | |
2024-11-18T20:31:21.635939+00:00 | 1,477,556,734,000 | e1828c25e5e4c53200b80396779a6b9b9968ec2e | 3 | {
"blob_id": "e1828c25e5e4c53200b80396779a6b9b9968ec2e",
"branch_name": "refs/heads/master",
"committer_date": 1477556734000,
"content_id": "f0039163016393819fbdcae68cf485c6c4815964",
"detected_licenses": [
"MIT"
],
"directory_id": "4456d44ba775b1063dcf1456c5c7e5a12eacfb53",
"extension": "py",
"fi... | 2.6875 | stackv2 | """Loads data from the Hansard."""
import collections
import datetime
import json
import logging
import re
from bs4 import BeautifulSoup
import requests
import sqlalchemy as sa
from sqlalchemy import ext
from sqlalchemy import orm
import sqlalchemy.ext.declarative
PS_URL = 'https://api.parliament.nsw.gov.au/api/hans... | 134 | 32.49 | 81 | 21 | 1,002 | python | [{"finding_id": "codeql_py/bad-tag-filter_485a06d61c9a6f6f_0e77b9cb", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines."
] | [
28
] | [
null
] | [
20
] | [
29
] | |
2024-11-18T20:43:55.842269+00:00 | 1,562,683,841,000 | 61399623115b8bc74758aac67036ef7a8fec97e6 | 3 | {
"blob_id": "61399623115b8bc74758aac67036ef7a8fec97e6",
"branch_name": "refs/heads/master",
"committer_date": 1562683841000,
"content_id": "fb06d90adcd31d099f0bd07672ae3cc3eec13c24",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "36a130f97ba2cc9e5ec322ff5c05e77c92dd7d33",
"extension": "py"... | 3.234375 | stackv2 | #!/usr/bin/env python3
import sys
import requests
import re
def check_mac(mac):
"""use this function to check if a string supplied is a mac address"""
return re.match('[0-9a-f]{2}([-:.]?)[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$', mac.lower())
def getCompany():
"""use this function to query the macaddress.io API w... | 30 | 30.27 | 96 | 11 | 245 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6d3bfe6e65f9fabc_5fe8ea9d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
26
] | [
null
] | [
15
] | [
24
] | |
2024-11-18T20:44:15.823835+00:00 | 1,477,908,654,000 | c9505af31e015af402eda3e5865e1a34b6ae9203 | 3 | {
"blob_id": "c9505af31e015af402eda3e5865e1a34b6ae9203",
"branch_name": "refs/heads/master",
"committer_date": 1477908654000,
"content_id": "e3c52f30d7ddf92be29f69eecf4c0ceea2d44717",
"detected_licenses": [
"MIT"
],
"directory_id": "257b4cb470ad5955c6c91fa518bcc2c3cf2e406f",
"extension": "py",
"fi... | 3.15625 | stackv2 | # A Web crawler consists of a computer program that browses the Web to
# search for information on pages. The scenario to be analyzed is a
# problem in which a sequential Web crawler is fed by a variable number
# of Uniform Resource Locators (URLs), and it has to search all the links
# within each URL provided. Imagini... | 102 | 34.04 | 82 | 14 | 846 | python | [{"finding_id": "codeql_py/redos_2ae8f40480e6c902_4d2425e0", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '<a ' and containing many repetiti... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<a ' and containing many repetitions of ' '."
] | [
40
] | [
null
] | [
24
] | [
27
] | |
2024-11-18T20:58:04.311753+00:00 | 1,463,437,073,000 | 9777ca480937e6caee71594955f581e32fb6313a | 3 | {
"blob_id": "9777ca480937e6caee71594955f581e32fb6313a",
"branch_name": "refs/heads/master",
"committer_date": 1463437073000,
"content_id": "72fe171f977cf041f35b33bcb6187552c2a1d143",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "86a4da82ab90a74221409ecb1d54daa92236e6ca",
"extension": "py"... | 2.53125 | stackv2 | #!/usr/bin/env python
import argparse
import os
import shutil
import signal
import subprocess
import sys
import time
import zipfile
DEPLOY_DIR = "/home/server-snapshots"
CURRENT_DEPLOY_DIR = os.path.join(DEPLOY_DIR, "whereuat-server")
BACKUP_DIR = os.path.join(DEPLOY_DIR, "_whereuat-server")
TMP_DIR = os.path.join(DEP... | 127 | 24.02 | 80 | 16 | 840 | python | [{"finding_id": "codeql_py/overly-permissive-file_43ed0cf3e4b073cf_2e04957f", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 2 | true | [
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable.",
"Overly permissive mask in chmod sets file to world writable."
] | [
76,
78
] | [
null,
null
] | [
7,
7
] | [
44,
44
] | |
2024-11-18T20:58:19.614774+00:00 | 1,615,906,399,000 | a7ddd6e4758a771b333aee04d8742fc967dabfac | 4 | {
"blob_id": "a7ddd6e4758a771b333aee04d8742fc967dabfac",
"branch_name": "refs/heads/main",
"committer_date": 1615906399000,
"content_id": "87d88bd618f49db0d8925cf945153a4b08659ba9",
"detected_licenses": [
"BSL-1.0"
],
"directory_id": "7451470693b63b2a9c0b370855b5b5c08660eaf1",
"extension": "py",
"... | 3.78125 | stackv2 | import random
def generate(length):
counter = 1
password_list = []
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z']
numbers = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
symbols = ['... | 25 | 29.4 | 120 | 14 | 232 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_31701fe848c5acbc_b0d9a6fd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
22
] | [
null
] | [
11
] | [
29
] | |
2024-11-18T20:58:32.751757+00:00 | 1,581,619,810,000 | 0c4e494f59d9b53a4255cdc3f52981e8cea1b6bf | 3 | {
"blob_id": "0c4e494f59d9b53a4255cdc3f52981e8cea1b6bf",
"branch_name": "refs/heads/master",
"committer_date": 1581619810000,
"content_id": "bfdaa98970d65a355950638e0cfc6fe3fb686b61",
"detected_licenses": [
"MIT"
],
"directory_id": "0b4bab4abddc02da490a83202d0abe3dcd7cab79",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python3
# This script is run on a target machine. It expects to be in the "./run"
# directory. It uses the config from run_config.yml to run a vasaplaten node.
import yaml
import pathlib
import subprocess
import threading
import time
import tempfile
class Validate:
def __init__(self, parsed_toml)... | 176 | 33.32 | 79 | 17 | 1,389 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9bcb2ec720c96e05_769733e2", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
124,
160
] | [
null,
null
] | [
55,
52
] | [
62,
59
] | |
2024-11-18T20:58:36.907756+00:00 | 1,570,679,259,000 | 7921faf80cd714fb281c474794a8fbb870362952 | 3 | {
"blob_id": "7921faf80cd714fb281c474794a8fbb870362952",
"branch_name": "refs/heads/master",
"committer_date": 1570679259000,
"content_id": "ae77a05863f62a53f8331731ce7a1c300fd05bd5",
"detected_licenses": [
"MIT"
],
"directory_id": "7412df593bc98eb7972867994fde1eb5e86efe2d",
"extension": "py",
"fi... | 2.5625 | stackv2 | import chromedriver_binary # Adds chromedriver binary to path
import os
import pickle
import urllib3
import time
from discord_webhook import DiscordWebhook
from lxml import etree
from lxml import html
from requests import get
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.web... | 288 | 35.54 | 125 | 19 | 2,244 | python | [{"finding_id": "codeql_py/request-without-cert-validation_bd2792fbce1dc952_acac4638", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
135
] | [
null
] | [
16
] | [
67
] | |
2024-11-18T21:10:15.301991+00:00 | 1,461,073,834,000 | 3865db267c1a8a4275f392699c3043622b9c6a4e | 2 | {
"blob_id": "3865db267c1a8a4275f392699c3043622b9c6a4e",
"branch_name": "refs/heads/master",
"committer_date": 1461073834000,
"content_id": "17e28ad922c9248b7ac07cf46d5deb684f5a8cf4",
"detected_licenses": [
"MIT"
],
"directory_id": "1257a7d7956a17a3651641276acf24d1a8177f2d",
"extension": "py",
"fi... | 2.390625 | stackv2 | # coding: utf-8
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from datetime import datetime
from itertools import chain
import json
try:
from http import client
except ImportError:
import httplib as client
from jinja2 import Environment
from errbo... | 171 | 32.95 | 77 | 21 | 1,299 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_87ca70e710a87abc_9ebe0298", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
167
] | [
null
] | [
15
] | [
28
] | |
2024-11-18T21:10:18.774582+00:00 | 1,559,550,460,000 | 03660766431ea9f64565c95ebcc401c481b24827 | 2 | {
"blob_id": "03660766431ea9f64565c95ebcc401c481b24827",
"branch_name": "refs/heads/master",
"committer_date": 1559550460000,
"content_id": "f9c364d8d9c1f71d228466d4679c4fa9927eef24",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a633915016e591348accf69638e2c2fc7f3c9ce4",
"extension": "py"... | 2.359375 | stackv2 | from django.http import HttpResponseRedirect
# Create your views here.
from django.http import HttpResponse
from booking import models
from django.shortcuts import render, redirect
from .forms import UserForm, RegisterForm
import hashlib
from django.forms.models import model_to_dict
import datetime
import re
def hash... | 463 | 31.78 | 121 | 20 | 3,516 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f0b05ea6b3fc0b54_afbe7288", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA3256) that is i... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA3256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA3256) that is insecure for password hashing, since it is not a computationally... | [
16
] | [
null
] | [
14
] | [
24
] | |
2024-11-18T21:10:26.416657+00:00 | 1,583,357,594,000 | 63b48db5e11136c3231e11b16ea944fea2abbbd8 | 3 | {
"blob_id": "63b48db5e11136c3231e11b16ea944fea2abbbd8",
"branch_name": "refs/heads/master",
"committer_date": 1583357594000,
"content_id": "b86b167d1fcd7d6865827f1bf79cfca6cb32708c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2416afd97ffb13c9bc27456b7a7b095688aeffea",
"extension": "py"... | 2.515625 | stackv2 | import cfnresponse
import boto3
iam = boto3.client('iam')
def is_bool(value):
return value.lower() == 'true'
password_policy_keys = dict(
MinimumPasswordLength=int,
RequireSymbols=is_bool,
RequireNumbers=is_bool,
RequireUppercaseCharacters=is_bool,
RequireLowercaseCharacters=is_bool,
Allo... | 38 | 31 | 95 | 15 | 251 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b66aa159ba26126c_8f50b424", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
29
] | [
null
] | [
19
] | [
36
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.