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-18T22:24:04.802915+00:00 | 1,648,606,352,000 | fc814a626ca3956cddc907a20f49fb43f6b3de8e | 2 | {
"blob_id": "fc814a626ca3956cddc907a20f49fb43f6b3de8e",
"branch_name": "refs/heads/master",
"committer_date": 1648606352000,
"content_id": "633a870625551e69764ea17860487bbcaa44bf8e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d29651dc2ce6e06ec2f47a05576893a1a83d78bb",
"extension": "py"... | 2.3125 | stackv2 | import logging
import os
import paramiko
import six
from oslo_concurrency import processutils
DEFAULT_PKFILE = os.path.expanduser('~/.ssh/id_rsa')
DEFAULT_KHFILE = os.path.expanduser('~/.ssh/known_hosts')
LOG = logging.getLogger(__name__)
class SSHClient(object):
def __init__(self, hostip, user='ubuntu', pwd="... | 52 | 35.88 | 82 | 16 | 386 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_b4638211295b17e0_9072e332", "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."
] | [
19
] | [
null
] | [
13
] | [
75
] | |
2024-11-18T22:24:07.390684+00:00 | 1,490,458,428,000 | a86dab881f7c8a6997ff7fe968b6b3b1e5a6ec2e | 3 | {
"blob_id": "a86dab881f7c8a6997ff7fe968b6b3b1e5a6ec2e",
"branch_name": "refs/heads/master",
"committer_date": 1490458428000,
"content_id": "7c10396eedea79b92a1f5433defa664bb2ef8b80",
"detected_licenses": [
"MIT"
],
"directory_id": "e2bf843a5bc1c3401b4eb99d7109f532f37436b6",
"extension": "py",
"fi... | 2.734375 | stackv2 | from flask import Flask, request
from flask_restful import Resource, Api
from sqlalchemy import create_engine
from json import dumps
base = create_engine('sqlite:///Weather.db')
app = Flask(__name__)
api = Api(app)
class AllDates(Resource):
def get(self, sensor):
"""
:param sensor:
:ret... | 47 | 29.11 | 99 | 19 | 336 | python | [{"finding_id": "codeql_py/sql-injection_c38528a8923bf5ac_f145cc9e", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 2 | true | [
"CWE-089",
"CWE-089"
] | [
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2).\nThis SQL query depends on a [user-provided value](3).\nThis SQL query depends on a [user-provided value](4)."
] | [
20,
36
] | [
null,
38
] | [
30,
30
] | [
84,
86
] | |
2024-11-18T22:36:02.167213+00:00 | 1,516,197,309,000 | 9052dda19c0bd135867cadf093a0c4fdd15f4520 | 3 | {
"blob_id": "9052dda19c0bd135867cadf093a0c4fdd15f4520",
"branch_name": "refs/heads/master",
"committer_date": 1516197381000,
"content_id": "8eaaa183e236c0f0577ae698e9f17d853a870c2d",
"detected_licenses": [
"MIT"
],
"directory_id": "c2250f39bfdc76724ae02ce9778d5e8556f51db8",
"extension": "py",
"fi... | 3 | stackv2 | import random
import logging
from flask import Flask
from flask import g
import helpers
# Set up logging
logging.basicConfig(format='%(asctime)-15s %(levelname)s %(message)s')
logger = logging.getLogger('logger')
logger.setLevel(logging.INFO)
# Path to the DB file
DATABASE = '../moves.db'
# How many entries the DB... | 189 | 28.42 | 136 | 17 | 1,754 | python | [{"finding_id": "codeql_py/log-injection_c03558f6c085b0a5_a1678fb0", "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).\nThis log entry depends on a [user-provided value](2)... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2).\nThis log entry depends on a [user-provided value](3).\nThis log entry depends on a [user-provided value](4).\nThis log entry depends on a [user-provided value](5).\nThis log entry depends on a [user-provid... | [
150
] | [
null
] | [
14
] | [
133
] | |
2024-11-18T22:36:28.373849+00:00 | 1,584,001,979,000 | f7ae395c4f32fb7511a2ed9ddc63d11035514c5e | 2 | {
"blob_id": "f7ae395c4f32fb7511a2ed9ddc63d11035514c5e",
"branch_name": "refs/heads/master",
"committer_date": 1584001979000,
"content_id": "be7f318d9a16786e78f65cb56765713738f06bab",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c9a9900ecfa11be5ab4da27d97eaa03a665806be",
"extension": "py"... | 2.453125 | stackv2 | import os
import platform
import re
import shutil
import sys
import tarfile
import tempfile
import zipfile
from pathlib import Path
from typing import Dict, List, Tuple, Union
from goldenmask import GOLDENMASK
from goldenmask.exceptions import UnsupportedFileError
def remove_python_files(dir_: str) -> None:
for ... | 227 | 29.69 | 101 | 20 | 1,561 | python | [{"finding_id": "codeql_py/tarslip_266fc4e06739c216_ed696be5", "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)."
] | [
65
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T22:36:29.768807+00:00 | 1,601,253,931,000 | fb4e78b539a932960ca5145148f6d6bdb60d0dc5 | 4 | {
"blob_id": "fb4e78b539a932960ca5145148f6d6bdb60d0dc5",
"branch_name": "refs/heads/master",
"committer_date": 1601253931000,
"content_id": "d07df8be6ff981758632594898399265485dac2b",
"detected_licenses": [
"MIT"
],
"directory_id": "3061873703622597f912c2098014551a2b02ed8e",
"extension": "py",
"fi... | 3.578125 | stackv2 | """
Module for automate the generation of markdown docs. Documenting
individual functions, objects, and classes is supported, as well
as modules.
"""
from typing import Any, Callable, Dict, Tuple, TypeVar
from operator import attrgetter
from jinja2 import Template
from mkdocs_apidoc.config import logger
from mkdocs_... | 143 | 22.17 | 99 | 11 | 789 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3a1fc27a6610555e_c44982d0", "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."
] | [
140
] | [
null
] | [
9
] | [
23
] | |
2024-11-18T22:36:42.279766+00:00 | 1,621,525,850,000 | 08361247b92e2a1cd3871619adf95fa416e8ec9d | 2 | {
"blob_id": "08361247b92e2a1cd3871619adf95fa416e8ec9d",
"branch_name": "refs/heads/master",
"committer_date": 1621525850000,
"content_id": "1cfd174bcfca5cbd667c8dd7d8e6bb18d0d500a4",
"detected_licenses": [
"MIT"
],
"directory_id": "e98ee0f928c7bd33910a45eae6389d89337e32be",
"extension": "py",
"fi... | 2.46875 | stackv2 | from phone_iso3166.country import phone_country_prefix
from phone_iso3166.network import country_networks
import requests
import datetime
import random
import string
import os
import re
onboarding_json_tmpl = {
"countryCode": "bd",
"dialingCode": 880,
"installationDetails": {
"app": {
"... | 199 | 29.96 | 87 | 17 | 1,715 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ad779e7f123cbaed_7778419b", "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."
] | [
178
] | [
null
] | [
26
] | [
50
] | |
2024-11-18T22:36:51.598833+00:00 | 1,612,990,694,000 | dd3c08f4cfba54cc40d933cc32371f7038a092fe | 2 | {
"blob_id": "dd3c08f4cfba54cc40d933cc32371f7038a092fe",
"branch_name": "refs/heads/master",
"committer_date": 1612990694000,
"content_id": "43b89cb5552bdfafa175ccc62d1057b991c5d50d",
"detected_licenses": [
"MIT"
],
"directory_id": "58587315342f638930f710e376338b64a18c9860",
"extension": "py",
"fi... | 2.421875 | stackv2 | from datetime import datetime as dt
from os import path, system
from flask import Blueprint, render_template, request
from flask_paginate import Pagination, get_page_parameter
from pandas import read_csv
from db.connection import Database
from log_generator import RegisterLogs
app_web = Blueprint(
'app_web', __n... | 95 | 25.37 | 74 | 17 | 584 | python | [{"finding_id": "codeql_py/path-injection_2d1e87cdb6ae67cb_7ccefde1", "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)."
] | [
31
] | [
null
] | [
9
] | [
42
] | |
2024-11-18T20:23:17.548799+00:00 | 1,652,424,767,000 | 2f4e0d0010a6ee8a7fcd3e155266104275207a5f | 2 | {
"blob_id": "2f4e0d0010a6ee8a7fcd3e155266104275207a5f",
"branch_name": "refs/heads/master",
"committer_date": 1652424767000,
"content_id": "9f9f58ac50fb973ce4243e87c22635ad396853a5",
"detected_licenses": [
"MIT"
],
"directory_id": "818011a54e491bca864b32245c5f490da2a155d4",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from socket import *
import time
import ssl
import base64
try:
from StringIO import StringIO ## for Python 2
except ImportError:
from io import StringIO ## for Python 3
class MailSender(object):
def __init__(self):
self.mail_server =""
self.rcpt_to = ""
se... | 159 | 27.14 | 161 | 22 | 1,245 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5b9f5d58211259ae_38729225", "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... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
122
] | [
null
] | [
9
] | [
21
] | |
2024-11-18T20:23:20.532992+00:00 | 1,425,343,154,000 | ab94a52e37bcbf06fd35c64cf2f61cceefbad0f6 | 3 | {
"blob_id": "ab94a52e37bcbf06fd35c64cf2f61cceefbad0f6",
"branch_name": "refs/heads/master",
"committer_date": 1425343154000,
"content_id": "567b839e283ed756620c1a1ed4be4560e772ab9e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ffd27f606aa624265a15204220322d1d8a628608",
"extension": "py"... | 2.703125 | stackv2 | #!/usr/bin/env python3
# Copyright 2014 Martin Robinson
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 104 | 34.11 | 95 | 18 | 881 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_026f55ed0beb6be6_19a459bb", "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."
] | [
101
] | [
null
] | [
24
] | [
52
] | |
2024-11-18T20:23:35.210732+00:00 | 1,607,768,132,000 | be22c72508d304b9eddebc2d41aaae4dcd1ff386 | 2 | {
"blob_id": "be22c72508d304b9eddebc2d41aaae4dcd1ff386",
"branch_name": "refs/heads/master",
"committer_date": 1607768132000,
"content_id": "2b31739da8a1cc58a7ceeb2a6ecb3ca2edf2ab96",
"detected_licenses": [
"MIT"
],
"directory_id": "970cf0f46f5d1a7ea0c1b08c309c1b9f020c34f9",
"extension": "py",
"fi... | 2.3125 | stackv2 | import argparse
from .parsing import parsing
from .utilities import utilities
import os
from jinja2 import Environment, FileSystemLoader
def main():
role = False
molecule = False
role_model = ['meta', 'templates', 'handlers',
'tasks', 'defaults', 'files', 'vars', 'tests']
parser =... | 84 | 33.45 | 149 | 13 | 612 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_dc0d6b252a0749bc_3335ca5c", "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."
] | [
72
] | [
73
] | [
15
] | [
28
] | |
2024-11-18T20:23:40.739801+00:00 | 1,660,187,902,000 | 1a3e50ad93864d9d9b12faf5e2f5b05705c784bf | 3 | {
"blob_id": "1a3e50ad93864d9d9b12faf5e2f5b05705c784bf",
"branch_name": "refs/heads/master",
"committer_date": 1660187902000,
"content_id": "427b821254cb8338f77ba8a30789017c1b0c1745",
"detected_licenses": [
"MIT"
],
"directory_id": "8afb5afd38548c631f6f9536846039ef6cb297b9",
"extension": "py",
"fi... | 2.75 | stackv2 | #!/usr/bin/env python
print("Content-type: text/html\n")
from os.path import join, abspath
import cgi, sys
BASE_DIR = abspath("data")
form = cgi.FieldStorage()
filename = form.getvalue("filename")
if not filename:
print("Please enter a file name")
sys.exit()
text = open(join(BASE_DIR, filename)).read()
pri... | 38 | 22.39 | 73 | 10 | 235 | python | [{"finding_id": "codeql_py/path-injection_08f24b74ee7abeb6_98ed2d88", "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)."
] | [
15
] | [
null
] | [
13
] | [
37
] | |
2024-11-18T21:22:13.574838+00:00 | 1,509,671,876,000 | 18eb9ec59543047c076800149fd8f80440f81683 | 3 | {
"blob_id": "18eb9ec59543047c076800149fd8f80440f81683",
"branch_name": "refs/heads/master",
"committer_date": 1509671876000,
"content_id": "28ba564a67a31fbcb02df33a8b1009ff5c589518",
"detected_licenses": [
"MIT"
],
"directory_id": "a1e00921dba2a1ebb572407e935a3c884e9ea83a",
"extension": "py",
"fi... | 2.8125 | stackv2 | import pandas as pd
import re
import requests
import time
import matplotlib.pyplot as plt # noqa
df = pd.read_csv('lessons/shared-resources/crimedata.csv', index_col='id')
del(df['Unnamed: 0'])
# del(df['Unnamed: 0'])
# print(df.head())
h = '3376+NE+Hoyt+St.,+Portland,+OR'
def geocode_osm(address, polygon=0):
... | 119 | 26.93 | 79 | 15 | 928 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1fc1828b463bad6f_3b854d59", "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... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
75
] | [
null
] | [
15
] | [
18
] | |
2024-11-18T21:22:23.886281+00:00 | 1,632,234,159,000 | 6e6a50744aad518130f21d5630d0cb7c11dd745f | 3 | {
"blob_id": "6e6a50744aad518130f21d5630d0cb7c11dd745f",
"branch_name": "refs/heads/master",
"committer_date": 1632234159000,
"content_id": "bcd7840f0f19d1b4ccaa1db0ec9bf9edc742f1b5",
"detected_licenses": [
"MIT"
],
"directory_id": "46a4a0af3dad3442719b9827053bd17a36c36cdd",
"extension": "py",
"fi... | 2.625 | stackv2 | """Contains serializers for the abstract tasks models."""
from django.core.exceptions import ValidationError
from rest_framework import serializers
from tasksapi.models import AbstractTaskInstance, AbstractTaskType
from tasksapi.utils import get_allowed_queues_sorted
class AbstractTaskTypeSerializer(serializers.Mode... | 139 | 34.22 | 109 | 17 | 928 | python | [{"finding_id": "codeql_py/stack-trace-exposure_6cee749de6d64402_6cb8fb03", "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."
] | [
76
] | [
null
] | [
47
] | [
53
] | |
2024-11-18T21:22:38.180354+00:00 | 1,685,870,376,000 | d370e48216c564c6ec7d348a27850baf65c5d86e | 2 | {
"blob_id": "d370e48216c564c6ec7d348a27850baf65c5d86e",
"branch_name": "refs/heads/master",
"committer_date": 1685870376000,
"content_id": "626d9efb10162dc87a6c34cf81b9e2b69faf0f1c",
"detected_licenses": [
"MIT"
],
"directory_id": "873b3289e7e2c5945687454d01214db3290a4240",
"extension": "py",
"fi... | 2.34375 | stackv2 | import requests
import json
import sys
username = "" # Fill it
passwd = "" # Fill it
session = requests.Session()
url = 'https://judgeapi.u-aizu.ac.jp'
loginUrl = url + '/session'
formData = {
'id': username,
'password': passwd,
}
headers = {'content-type': "application/json"}
r = session.post(loginUrl, data =... | 42 | 17.14 | 90 | 9 | 210 | python | [{"finding_id": "codeql_py/request-without-cert-validation_8caf7f34a63fab6e_178ed981", "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)."
] | [
21,
34,
40
] | [
null,
null,
null
] | [
5,
5,
5
] | [
91,
89,
40
] | |
2024-11-18T21:22:43.048846+00:00 | 1,617,921,869,000 | 3a17c4bda84e0da28e94917619a0dc76c2777016 | 2 | {
"blob_id": "3a17c4bda84e0da28e94917619a0dc76c2777016",
"branch_name": "refs/heads/master",
"committer_date": 1617921869000,
"content_id": "1c50dd8dc8ae28fb6a2a5b3019f0e914316a3854",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6279e260bba8d284e6051a662760e13ec39c9aa8",
"extension": "py"... | 2.34375 | stackv2 | #!/usr/bin/python3
import asyncio
import logging
import time
from hashlib import md5
from typing import List, Any
import aiohttp
from .constants import WyzeApiConstants
from .devices import *
from .interfaces.ISwitchable import ISwitchable
_LOGGER = logging.getLogger(__name__)
class WyzeApiClient:
__access_to... | 337 | 38.43 | 119 | 23 | 2,598 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_8b2cd8c048d3a6af_d6eec414", "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.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
104
] | [
null
] | [
23
] | [
47
] | |
2024-11-18T21:37:17.872775+00:00 | 1,551,654,809,000 | b987d4bc65c9f7f4f4b46d0a12c5f6a98528578c | 3 | {
"blob_id": "b987d4bc65c9f7f4f4b46d0a12c5f6a98528578c",
"branch_name": "refs/heads/master",
"committer_date": 1551654809000,
"content_id": "5636f38568fedaee4d59fd3098fdca9d573475f5",
"detected_licenses": [
"MIT"
],
"directory_id": "4d83a1e118eee9d9934a77c75987deb642b1f2cf",
"extension": "py",
"fi... | 3.203125 | stackv2 | """
8-6 code
"""
def print_student_files(name, gender='男', age='8',
college='人民路小学'):
print('我叫' + name)
print('我今年' + age + '岁')
print('我是' + gender + '生')
print('我在' + college + '上学')
# print_student_files('鸡小萌', '男', '8', '人民路小学')
print_student_files('果果', gender='女', '7',... | 18 | 17.89 | 58 | 10 | 110 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b56821277689ff3b_5c0ddbaa", "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."
] | [
10
] | [
null
] | [
11
] | [
30
] | |
2024-11-18T21:51:08.800373+00:00 | 1,526,412,693,000 | 02b9b1f9469158c63423b2fcdb48ca8b2ae439b2 | 3 | {
"blob_id": "02b9b1f9469158c63423b2fcdb48ca8b2ae439b2",
"branch_name": "refs/heads/master",
"committer_date": 1526412693000,
"content_id": "1731b4d61f246381b9e191915d6820c6f13cfa37",
"detected_licenses": [
"MIT"
],
"directory_id": "830c99384f689772296ae791f25e273fc15303db",
"extension": "py",
"fi... | 2.953125 | stackv2 | import rumps
import requests
import webbrowser
from datetime import datetime, timedelta
from typing import Dict, Tuple, List, Union
Token = str
Project = Dict[str, str]
Update = Tuple[int, float, List[Project]]
MenuItem = Union[str, rumps.MenuItem, rumps.separator.__class__]
Menu = List[MenuItem]
def parse_project(... | 155 | 30.85 | 79 | 15 | 1,130 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c5812e552353b762_a7030dae", "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)."
] | [
30
] | [
33
] | [
11
] | [
22
] | |
2024-11-18T21:51:09.592203+00:00 | 1,562,593,409,000 | 3facf6d9a53bb08eb8ccf414a7fcdcc6c560f029 | 2 | {
"blob_id": "3facf6d9a53bb08eb8ccf414a7fcdcc6c560f029",
"branch_name": "refs/heads/master",
"committer_date": 1562593409000,
"content_id": "12ae6a6952af0afc3cae6ac9e95c5fca35273024",
"detected_licenses": [
"MIT"
],
"directory_id": "9f3bd35d159b1fa75ca0004757b15d55001b36d1",
"extension": "py",
"fi... | 2.375 | stackv2 | from flask import (render_template_string,
render_template, jsonify,
request, g, session, redirect,
url_for, Blueprint)
import requests, json
from flask_github import GitHub
from api.utils.db import db
from .models import User
from config import Config
from flask... | 163 | 26.8 | 97 | 15 | 1,017 | python | [{"finding_id": "codeql_py/url-redirection_2bbd3368db2df837_66a523df", "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)."
] | [
58,
87
] | [
null,
null
] | [
25,
21
] | [
33,
29
] | |
2024-11-18T21:51:11.319400+00:00 | 1,632,423,542,000 | 8a0e0df2eb36722519e03bcd170f2a94fb49417b | 3 | {
"blob_id": "8a0e0df2eb36722519e03bcd170f2a94fb49417b",
"branch_name": "refs/heads/main",
"committer_date": 1632423542000,
"content_id": "c266ef9e49751f9dfec58ac3f48b1725d8a5c7a5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4928856a757ad4fe99a28c270c728f43e7a616db",
"extension": "py",
... | 2.75 | stackv2 | # -*- coding: utf-8 -*-
"""
UserController module
This module is the controller that facilitates all user actions
"""
# Builtins
import getpass
import logging
import sys
import requests
# Internals
from conjur.errors import InvalidPasswordComplexityException, \
OperationNotCompletedException
from conjur.errors_... | 78 | 40.17 | 141 | 15 | 625 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_33f64df44d9fd15a_7516b874", "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."
] | [
56
] | [
null
] | [
27
] | [
88
] | |
2024-11-18T21:51:20.744273+00:00 | 1,490,572,626,000 | d6a6dc2e34d7f708503fa0875a192ca627c4f531 | 3 | {
"blob_id": "d6a6dc2e34d7f708503fa0875a192ca627c4f531",
"branch_name": "refs/heads/master",
"committer_date": 1490572626000,
"content_id": "8649c90fee1f1d0cbd26a1693dd3662bbe30b9e3",
"detected_licenses": [
"MIT"
],
"directory_id": "d4de50cc2c4918ead237e29624d2e881228adda2",
"extension": "py",
"fi... | 2.59375 | stackv2 | #!/usr/bin/env python3
import logging
import cmd
import ntpath
import os
import shlex
import getpass
import argparse
import inspect
from smb.smb_structs import OperationFailure
from smb.SMBConnection import SMBConnection
from nmb.NetBIOS import NetBIOS
DEFAULT_TIMEOUT = 5
DEFAULT_PORT = 139
DEFAULT_SERVICE = "micro... | 444 | 27.33 | 78 | 20 | 2,856 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3aea52a5e48c784b_c3f758ba", "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."
] | [
400
] | [
null
] | [
31
] | [
49
] | |
2024-11-18T21:51:24.967233+00:00 | 1,423,234,589,000 | a65f9d3cb0d10d7b0461eb8c2e60baf495cd1b01 | 3 | {
"blob_id": "a65f9d3cb0d10d7b0461eb8c2e60baf495cd1b01",
"branch_name": "refs/heads/master",
"committer_date": 1423234589000,
"content_id": "7a55e6a0d52498b44a44d6d056b1d972c0f191e4",
"detected_licenses": [
"MIT"
],
"directory_id": "7631d35e6e045f07f70f969a3150b3189a908e4f",
"extension": "py",
"fi... | 2.890625 | stackv2 | # -*- coding: utf-8 -*-
import os
from os.path import join as join_path
from codecs import open
# import json
import re
from ntpath import basename
import shutil
import sys
import urllib2
from jinja2 import FileSystemLoader, Environment
from time import strptime, strftime
from fnmatch import fnmatch
from markdown impor... | 212 | 33.97 | 93 | 20 | 1,652 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3245b9ad43d4a181_d1a7156e", "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."
] | [
147
] | [
null
] | [
15
] | [
71
] | |
2024-11-18T21:51:38.828477+00:00 | 1,573,968,116,000 | 6d4b03e8b136b13a106a4d4ce3e9f7a73e39c44a | 3 | {
"blob_id": "6d4b03e8b136b13a106a4d4ce3e9f7a73e39c44a",
"branch_name": "refs/heads/master",
"committer_date": 1573968116000,
"content_id": "56de6b9fc5e5ebd3b374e516b805e4fd863e9bc1",
"detected_licenses": [
"MIT"
],
"directory_id": "0c7df95fcab916d93f5fb5d0b1bd13acb547963d",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python3
import requests
import base64
import re
from levels_credentials import credentials, folder
level_url = credentials[7]["url"]
level_username = credentials[7]["level"]
level_password = credentials[7]["password"]
next_level_url = credentials[8]["url"]
next_level_username = credentials[8]["level"]... | 27 | 30.85 | 93 | 10 | 215 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3c7128ab1cd32a32_749c2ebc", "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."
] | [
27
] | [
null
] | [
7
] | [
20
] | |
2024-11-18T21:51:41.635635+00:00 | 1,581,080,162,000 | 36c54ae4c6be9120d0b5126327da7f9b9b3ce3eb | 3 | {
"blob_id": "36c54ae4c6be9120d0b5126327da7f9b9b3ce3eb",
"branch_name": "refs/heads/master",
"committer_date": 1581080162000,
"content_id": "2744306e5e97ccba8ec10e94e90672735b662702",
"detected_licenses": [
"MIT"
],
"directory_id": "26bcf0486500a3dae1b6b5fb50860f5dfe0119cb",
"extension": "py",
"fi... | 2.859375 | stackv2 | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html
class IwataPipeline(object):
def process_item(self, item, spider):
return item
import json
class JsonWriterPipel... | 105 | 34.7 | 172 | 20 | 1,002 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d0ee53bb1bcff5a5_db45813a", "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."
] | [
61
] | [
null
] | [
26
] | [
51
] | |
2024-11-18T21:51:51.757477+00:00 | 1,604,934,828,000 | 4fcdb3c3498e574fad2d5ac5701c071d5e6f29ab | 3 | {
"blob_id": "4fcdb3c3498e574fad2d5ac5701c071d5e6f29ab",
"branch_name": "refs/heads/main",
"committer_date": 1604934828000,
"content_id": "457a4b2c774ced71478754ecfb30f97e25d10959",
"detected_licenses": [
"MIT"
],
"directory_id": "45e8f60f0770cf743fc1eea7ac15252af72678c2",
"extension": "py",
"file... | 2.875 | stackv2 | # import libraries
import sys
import pandas as pd
import numpy as np
import sqlite3
import pickle
import re
import nltk
nltk.download('averaged_perceptron_tagger')
from nltk import pos_tag
from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
from nltk.tokenize import word_tokenize
from sq... | 194 | 30.27 | 125 | 21 | 1,412 | python | [{"finding_id": "codeql_py/overly-large-range_194626f17a0b22c2_ea0e5e40", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
61
] | [
null
] | [
48
] | [
51
] | |
2024-11-18T21:51:55.882212+00:00 | 1,625,355,493,000 | fde125d75e0a634f73571e0bbac16173cea2a1eb | 3 | {
"blob_id": "fde125d75e0a634f73571e0bbac16173cea2a1eb",
"branch_name": "refs/heads/main",
"committer_date": 1625355493000,
"content_id": "21757fa98a01cda27f330954590bf65bdc3e77e0",
"detected_licenses": [
"MIT"
],
"directory_id": "26be35af4a97b6b8783bbb00895cf47f95cd27ff",
"extension": "py",
"file... | 3.296875 | stackv2 | import os
import json
import pandas as pd
def save_data(json_data):
"""
This method saves the employee details into a pipe delimitted file.
id - gets created based on number of records in the file
name
dob
role
salary
joindate
return:
it returns a di... | 103 | 39.48 | 119 | 18 | 977 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_2689fae0f9de51d0_7ec3a79b", "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."
] | [
31
] | [
null
] | [
32
] | [
45
] | |
2024-11-18T21:51:56.856624+00:00 | 1,579,652,231,000 | 6801d9fe9051d5277b0a561323ea3967a5ee50d2 | 2 | {
"blob_id": "6801d9fe9051d5277b0a561323ea3967a5ee50d2",
"branch_name": "refs/heads/master",
"committer_date": 1579709452000,
"content_id": "8a80169c6f2e78df0d9949852a4b88194f938a39",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "854fcbe548b095c57e1205094a3df09fec8ab04d",
"extension": "py"... | 2.4375 | stackv2 | """ Define the endpoints for searching. """
import datetime
import json
import typing
import fastapi
import requests
from starlette import responses, status
import config
import schemas.financing_statement
import schemas.search
import repository.search_repository
router = fastapi.APIRouter()
# TODO: read the ims-... | 84 | 39.07 | 118 | 13 | 680 | python | [{"finding_id": "codeql_py/partial-ssrf_0c582a5148cdc667_dac90f49", "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)."
] | [
28
] | [
null
] | [
20
] | [
89
] | |
2024-11-18T21:52:11.836692+00:00 | 1,574,784,878,000 | 8a52b6973f157bbefdb6b0a638465c6a4b6163dc | 3 | {
"blob_id": "8a52b6973f157bbefdb6b0a638465c6a4b6163dc",
"branch_name": "refs/heads/master",
"committer_date": 1574784878000,
"content_id": "850ff6942db7f6cf3aafc20b58bc6317520c0200",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2fc683344c2a397cc181ae0ce8645eee64dd79d0",
"extension": "py"... | 2.90625 | stackv2 | #!/usr/bin/env python3
################## flask api callback ##################
#
# This is a very basic API callback handler using flask
#
# It will receive a message and print it to stdout
#
# written by Jeremy Eglen
# license: Apache version 2.0
# Created: November 26, 2019
# Last Modified: November 26, 2019
from f... | 40 | 20.5 | 69 | 14 | 217 | python | [{"finding_id": "codeql_py/log-injection_3544e7ded5660897_92514895", "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)."
] | [
35
] | [
null
] | [
25
] | [
69
] | |
2024-11-18T21:52:12.808150+00:00 | 1,519,038,398,000 | d756cfd5db0d4baa293300a7cf2ed3e36b6d90ba | 3 | {
"blob_id": "d756cfd5db0d4baa293300a7cf2ed3e36b6d90ba",
"branch_name": "refs/heads/master",
"committer_date": 1519038398000,
"content_id": "991feefb706127d38d5b44e0d9886dccf3af04c8",
"detected_licenses": [
"MIT"
],
"directory_id": "bc7e4f79983aeafb646c901386b35a2c8398f064",
"extension": "py",
"fi... | 2.578125 | stackv2 | """
FASTGenomics App-Creation-Suite:
Provides methods to check your create ... for testing
"""
import pathlib
import jinja2
from fastgenomics import io as fg_io
from logging import getLogger
logger = getLogger('fastgenomics.testing')
__version__ = fg_io.__version__
# set paths
RESOURCES_PATH = pathlib.Path(__file... | 85 | 31.69 | 98 | 15 | 631 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_659e9a6ac2fdff73_60b8e8b4", "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... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
42,
74
] | [
null,
null
] | [
20,
20
] | [
50,
50
] | |
2024-11-18T22:02:41.894548+00:00 | 1,543,435,687,000 | 76f32d954e02de2e4cd5ec4500b97104a9b94d54 | 2 | {
"blob_id": "76f32d954e02de2e4cd5ec4500b97104a9b94d54",
"branch_name": "refs/heads/master",
"committer_date": 1543435687000,
"content_id": "b86fec89019be5e8220e92235880d80b39783056",
"detected_licenses": [
"MIT"
],
"directory_id": "789e8bef6f87a4b8ecb6cb242ef1b3fb63925a25",
"extension": "py",
"fi... | 2.484375 | stackv2 | from escpos.printer import Usb
import requests, json
import random, string
import sys, os
import readline, glob
class tabCompleter(object):
def createListCompleter(self,ll):
def listCompleter(text,state):
line = readline.get_line_buffer()
if not line:
return [c + " ... | 85 | 26.75 | 80 | 17 | 663 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2b99af7864a507d1_df5a2e7f", "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-295"
] | [
"py/clear-text-logging-sensitive-data",
"py/request-without-cert-validation"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This request may run without certificate validation because [it is disabled](1)."
] | [
79,
50
] | [
null,
null
] | [
8,
7
] | [
31,
58
] | |
2024-11-18T22:02:48.995276+00:00 | 1,652,905,203,000 | 79ceaf24060f286f644198b96670d5a9ab3079a7 | 3 | {
"blob_id": "79ceaf24060f286f644198b96670d5a9ab3079a7",
"branch_name": "refs/heads/master",
"committer_date": 1652905203000,
"content_id": "5c7e0658841dbf6ea0c92ecc4c004a2d34765661",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7e5ed6053d71452a18ed13df9a8920772516cdce",
"extension": "p... | 2.546875 | stackv2 | #!/usr/bin/env python
import re
import tornado.httpserver
from tornado import web
class MainHandler(web.RequestHandler):
def prepare(self):
if self.request.protocol == "http":
redirect_to = re.sub(r'^([^:]+)', 'https', self.request.full_url())
self.redirect(redirect_to, permanent=... | 25 | 23.6 | 79 | 15 | 140 | python | [{"finding_id": "codeql_py/url-redirection_d613c2780bf5e6b8_7311ccac", "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_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
12
] | [
null
] | [
27
] | [
38
] | |
2024-11-18T22:16:42.541293+00:00 | 1,605,855,436,000 | 40dd66bf4bad8cfa6cd2e6c23b3f2eb11015d8b1 | 2 | {
"blob_id": "40dd66bf4bad8cfa6cd2e6c23b3f2eb11015d8b1",
"branch_name": "refs/heads/master",
"committer_date": 1605855436000,
"content_id": "c7fc9cbaf24be5bb58f203054367e073d4196a5b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "60cdc42ea4380626a192c36acc7abd1226db3c96",
"extension": "py"... | 2.453125 | stackv2 | # Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
import boto3
import logging
import os
import json
import re
import ssh
from ssm import SSM
from s3_key_updater import S3KeyUpdater
from botocore.config import Config
# Top-level element names for JSON structure ... | 287 | 37.23 | 153 | 15 | 2,456 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8c4a748e3efa198d_17d12f93", "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... | 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 (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.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive dat... | [
68,
72,
75,
78,
120,
134,
227,
234
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
15,
15,
15,
15,
15,
15,
23,
11
] | [
61,
89,
90,
98,
74,
96,
102,
110
] | |
2024-11-18T22:27:49.700588+00:00 | 1,553,790,221,000 | 3a2058f34527448175717889ce4e6017aacd8d19 | 3 | {
"blob_id": "3a2058f34527448175717889ce4e6017aacd8d19",
"branch_name": "refs/heads/master",
"committer_date": 1553790221000,
"content_id": "c69900eec52cd27bf47a5cf70fc60900e7caed83",
"detected_licenses": [
"MIT"
],
"directory_id": "11421530db18d3268612c95ff44e77817546a103",
"extension": "py",
"fi... | 2.8125 | stackv2 | # Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
auth_token = "your_auth_token"
client = Client(account_sid, auth_token)
# In the case you want to tr... | 21 | 42.48 | 75 | 11 | 211 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_80b5bc0262d05933_3be64abf", "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."
] | [
21
] | [
null
] | [
7
] | [
26
] | |
2024-11-18T22:27:52.799201+00:00 | 1,652,682,918,000 | 9d974e28043ce45c91e8061ae6a539a0e51269ee | 3 | {
"blob_id": "9d974e28043ce45c91e8061ae6a539a0e51269ee",
"branch_name": "refs/heads/master",
"committer_date": 1652682918000,
"content_id": "dd1cfd300b6a4655170884754ec312f349e7175f",
"detected_licenses": [
"MIT"
],
"directory_id": "33e5092283fb6060bd544d19f44151ec810be8e4",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/python3
# coding: UTF-8
#https://github.com/iceshijie/PocTools/edit/master/urlTest.py
#url连通性测试
import requests
import sys
import ssl
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
header = {
"User-Agent": "Mo... | 63 | 24.84 | 99 | 16 | 442 | python | [{"finding_id": "codeql_py/request-without-cert-validation_533ef2cbb6cd8612_28552c79", "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)."
] | [
24
] | [
null
] | [
15
] | [
71
] | |
2024-11-18T22:44:09.172192+00:00 | 1,535,223,799,000 | 9373aef72bb3d1356e5f7c50830be9de065e89be | 2 | {
"blob_id": "9373aef72bb3d1356e5f7c50830be9de065e89be",
"branch_name": "refs/heads/master",
"committer_date": 1535223799000,
"content_id": "0d04dd062f4ad2b18ada4df4a84a3e0cebd45903",
"detected_licenses": [
"MIT"
],
"directory_id": "4eb82c3531175dee474ed366eabdf623ba960b04",
"extension": "py",
"fi... | 2.390625 | stackv2 | from flask import Flask, request, jsonify, abort
import os
import requests
app = Flask(__name__)
app.debug = os.getenv('DEBUG', '') == 'True'
def access_token():
return os.getenv('ACCESS_TOKEN', '')
def check_user_id(user_id):
if user_id not in os.getenv('USER_IDS', ''):
return abort(403)
def check_user_nam... | 54 | 27.07 | 106 | 10 | 366 | python | [{"finding_id": "codeql_py/partial-ssrf_6afd90afc9735b22_bd92e967", "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).\nPart of the URL of this request depen... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depends on a [user-provided value](2).\nPart of the URL of this request depends on a [user-provided value](3)."
] | [
20
] | [
null
] | [
7
] | [
25
] | |
2024-11-18T22:44:10.066514+00:00 | 1,620,387,971,000 | 6b81866beaa9d355bbc6a9a2d0cd605849cb33f6 | 3 | {
"blob_id": "6b81866beaa9d355bbc6a9a2d0cd605849cb33f6",
"branch_name": "refs/heads/master",
"committer_date": 1620387971000,
"content_id": "41e2b5f34b1ab02c815400b8805bd6b0f235a4ff",
"detected_licenses": [
"MIT"
],
"directory_id": "53ead9a2764d0f13fc1afa0e844520baad4c6957",
"extension": "py",
"fi... | 2.578125 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 6 12:24:26 2019
@author: nk7g14
This file hold various auxilery functions used in FluxQuery.
"""
#TODO change name to utils
import os
import urllib.request
import shutil
import glob
import sys
import time
from pathlib import Path
import gzip
import... | 180 | 29.13 | 93 | 17 | 1,398 | python | [{"finding_id": "codeql_py/tarslip_00be0dcabd45d035_655fa155", "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)."
] | [
142
] | [
null
] | [
9
] | [
13
] | |
2024-11-18T22:44:17.094161+00:00 | 1,582,132,518,000 | c09faa3319f011b2811a2ac3d8e83b47bfda8b60 | 3 | {
"blob_id": "c09faa3319f011b2811a2ac3d8e83b47bfda8b60",
"branch_name": "refs/heads/master",
"committer_date": 1582132518000,
"content_id": "7d0de56430c77d1379756e38c022a7c36a1f22e0",
"detected_licenses": [
"MIT"
],
"directory_id": "4c24e3ebb2b3fbdbe03625761b4069642fa54540",
"extension": "py",
"fi... | 2.84375 | stackv2 | import re
import os
from mkdocs.plugins import BasePlugin
# For Regex, match groups are:
# 0: Whole markdown link e.g. [Alt-text](url)
# 1: Alt text
# 2: Full URL e.g. url + hash anchor
# 3: Filename e.g. filename.md
# 4: File extension e.g. .md, .png, etc.
# 5. hash anchor e.g. #my... | 63 | 38.84 | 112 | 19 | 612 | python | [{"finding_id": "codeql_py/redos_350e990281c0bda7_90e4973d", "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 '\\[\\\\\\]((.md#' and containing ... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '\\[\\\\\\]((.md#' and containing many repetitions of '#'."
] | [
13
] | [
null
] | [
56
] | [
58
] | |
2024-11-18T22:44:20.721604+00:00 | 1,576,445,821,000 | 0f82c95a3f8dbd0929466b4e6c42664e546588e6 | 2 | {
"blob_id": "0f82c95a3f8dbd0929466b4e6c42664e546588e6",
"branch_name": "refs/heads/master",
"committer_date": 1576445821000,
"content_id": "4ebb19c9418b1761fe9fbe1ad1c9824a95fbdddc",
"detected_licenses": [
"MIT"
],
"directory_id": "de6b6220deaf682ccc047621673b7ab16ca77a21",
"extension": "py",
"fi... | 2.390625 | stackv2 | import logging
import os
from flask import Flask, request, jsonify
from commons.encryption.encryption_service import EncryptionService
from federated_trainer.service.federated_trainer import FederatedTrainer
from logging.config import dictConfig
dictConfig({
'version': 1,
'formatters': {'default': {
... | 88 | 28.18 | 106 | 13 | 581 | python | [{"finding_id": "codeql_py/log-injection_d13e1691e920a6dd_22197599", "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... | 3 | true | [
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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)."
] | [
78,
79,
87
] | [
null,
null,
null
] | [
18,
18,
18
] | [
88,
106,
54
] | |
2024-11-18T22:44:22.129918+00:00 | 1,688,033,066,000 | 0d9ba1c7f9a6eee7bcf4a219b50c44f1319b3798 | 2 | {
"blob_id": "0d9ba1c7f9a6eee7bcf4a219b50c44f1319b3798",
"branch_name": "refs/heads/master",
"committer_date": 1688033066000,
"content_id": "826ef440cc07db0ecc49c53320d7f6862a6f5258",
"detected_licenses": [
"MIT"
],
"directory_id": "232e6b48261d97bf77313474e5a62ba334c1c659",
"extension": "py",
"fi... | 2.375 | stackv2 | import itertools
import json
import os
import socket
import subprocess
import threading
import tempfile
import re
import requests
from flask import Flask, request # ImportError? Try "pip install flask".
app = Flask(__name__)
handler = object() # Dict key cookie
composite_file = os.path.dirname(os.readlink(__file__)) ... | 331 | 37.42 | 98 | 20 | 3,728 | python | [{"finding_id": "codeql_py/log-injection_6ce329ac24c41811_8f0da36a", "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... | 6 | true | [
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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 on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depen... | [
248,
260,
261,
271,
271,
320
] | [
null,
null,
null,
null,
null,
null
] | [
43,
66,
49,
54,
57,
52
] | [
47,
67,
50,
55,
60,
56
] | |
2024-11-18T22:44:24.379086+00:00 | 1,690,851,575,000 | 9c41e5e86e523ff1c37fb118df2edbfb7616077e | 2 | {
"blob_id": "9c41e5e86e523ff1c37fb118df2edbfb7616077e",
"branch_name": "refs/heads/master",
"committer_date": 1690863000000,
"content_id": "cabf9a550fd23c044b03531b5830281489139588",
"detected_licenses": [
"BSD-2-Clause",
"BSD-3-Clause"
],
"directory_id": "6ff084d17f22cf3abc4f2cc3d881f4b8218e1c51... | 2.34375 | stackv2 | """
Mail.ru OAuth2 backend, docs at:
https://python-social-auth.readthedocs.io/en/latest/backends/mailru.html
"""
from hashlib import md5
from urllib.parse import unquote
from .oauth import BaseOAuth2
class MailruOAuth2(BaseOAuth2):
"""Mail.ru authentication backend"""
name = "mailru-oauth2"
ID_KEY ... | 75 | 34.96 | 85 | 19 | 612 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_18ebb8d62aa1fe24_ae3d7409", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
45
] | [
null
] | [
27
] | [
73
] | |
2024-11-18T22:44:30.163184+00:00 | 1,350,614,970,000 | 76de49520879bc3f77c54674fdfc49315a0dcde7 | 2 | {
"blob_id": "76de49520879bc3f77c54674fdfc49315a0dcde7",
"branch_name": "refs/heads/master",
"committer_date": 1350614970000,
"content_id": "4dc98646fc11b19fcd1bf9239ec93cad2ab4c174",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9fcb63f57bd1366b32ab7ab2e847e5078923fca7",
"extension": "py"... | 2.421875 | stackv2 | #!/usr/bin/python
# Copyright 2012 Carpcomm GmbH
# Author: Timothy Stranex <tstranex@carpcomm.com>
"""Methods for uploading streams."""
import client
import logging
import threading
import subprocess
import os
import base64
import json
import httplib
import socket
import ssl
import signalling
class _PipeWaitThrea... | 116 | 27.28 | 77 | 12 | 767 | python | [{"finding_id": "codeql_py/insecure-protocol_eae097a069592a47_6eba6c29", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).", "remediation": "", "l... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1)."
] | [
100
] | [
104
] | [
13
] | [
37
] | |
2024-11-18T20:59:36.656645+00:00 | 1,693,927,757,000 | 7015fccfa75132a928f26f97c7716f8ec4d97dba | 3 | {
"blob_id": "7015fccfa75132a928f26f97c7716f8ec4d97dba",
"branch_name": "refs/heads/master",
"committer_date": 1693927757000,
"content_id": "b4641f87befab667e5440c7b6eb91c5f8ef0637c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "94ca6ad1a5dd260f8a3022ddc833258c0200707f",
"extension": "p... | 2.65625 | stackv2 | from __future__ import absolute_import
from __future__ import print_function
import os.path
import jinja2
try:
from urllib.parse import quote
except ImportError:
from urllib import quote
try:
from shlex import quote as shell_quote
except ImportError:
from pipes import quote as shell_quote
from .cons... | 204 | 32.52 | 85 | 17 | 1,403 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_43805d6aa2ef1994_23854572", "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."
] | [
83
] | [
92
] | [
38
] | [
10
] | |
2024-11-18T21:00:10.581293+00:00 | 1,662,600,027,000 | 0e30b1ed4bc2ae57ed80a797fddd3b6ba3a6b6aa | 3 | {
"blob_id": "0e30b1ed4bc2ae57ed80a797fddd3b6ba3a6b6aa",
"branch_name": "refs/heads/main",
"committer_date": 1662600027000,
"content_id": "a203218cb23bc4337972630562b77e0bfe254646",
"detected_licenses": [
"MIT"
],
"directory_id": "fddc6bf97cd1dd5f7fbe81553740b61b0b00bfcc",
"extension": "py",
"file... | 2.875 | stackv2 | # -*- coding: utf-8 -*-
# Standard library imports
import re
from collections import namedtuple
from functools import total_ordering
# Local imports
from . import compat
__all__ = [
"ParseError",
"Version",
"parse_version",
"default_version",
]
# Strange nuke version pattern
nuke_version_pattern = ... | 188 | 26.64 | 88 | 15 | 1,303 | python | [{"finding_id": "codeql_py/redos_0e9ee8de2e36805c_d98e04b7", "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 containing many repetitions of '9'.", "remediati... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '9'."
] | [
42
] | [
null
] | [
42
] | [
45
] | |
2024-11-18T21:00:36.017443+00:00 | 1,550,098,944,000 | ea6ce4f1a907c628da259562f0d6555184cc8342 | 3 | {
"blob_id": "ea6ce4f1a907c628da259562f0d6555184cc8342",
"branch_name": "refs/heads/master",
"committer_date": 1550098944000,
"content_id": "5cf5d85c2870bf3fb92c0994ef665d8bc95e3ca1",
"detected_licenses": [
"MIT"
],
"directory_id": "705bed5ff23e8aac9c72e4f92cff770b83f37646",
"extension": "py",
"fi... | 3.015625 | stackv2 | '''
This code pulls Lightning Strike data from National Interagency Fire Center (NIFC)
This data has Strike Location, Current (the Strength), and Polarity of the strike
A bounding box in lat-long format is used to get the data of interest
Real time data must be collected, because historical data is limited
If this scr... | 178 | 38.19 | 152 | 24 | 2,009 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ad73e4c55987d605_290c88df", "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... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text.",
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
106,
167
] | [
null,
null
] | [
21,
21
] | [
152,
152
] | |
2024-11-18T21:00:38.022569+00:00 | 1,635,356,576,000 | 79096d71c30dfab6c91fcbf4bcb972f2f4707a05 | 3 | {
"blob_id": "79096d71c30dfab6c91fcbf4bcb972f2f4707a05",
"branch_name": "refs/heads/master",
"committer_date": 1635356576000,
"content_id": "366f54315207e375167e3d39b0e8a0c584927ed1",
"detected_licenses": [
"MIT"
],
"directory_id": "7f24d28abf9b30a0c7d5dd80d2e0dd513d39aa14",
"extension": "py",
"fi... | 3.28125 | stackv2 | # Hacker Rank Capture the Flag 2017-04-26
# Extract information from a given website and submit the specified output as Plain Text.
# https://www.hackerrank.com/contests/capture-the-flag/challenges/secret-key
import urllib.request, json
secret_keys_url = "https://cdn.hackerrank.com/hackerrank/static/contests... | 35 | 33.74 | 119 | 14 | 301 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a05c205b0072f094_d2566a72", "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... | 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.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
31,
34
] | [
null,
null
] | [
15,
15
] | [
19,
19
] | |
2024-11-18T21:00:56.567022+00:00 | 1,504,027,599,000 | 2305a03cddd720c18ccb52ba495556356344de48 | 3 | {
"blob_id": "2305a03cddd720c18ccb52ba495556356344de48",
"branch_name": "refs/heads/master",
"committer_date": 1504027599000,
"content_id": "d42dd5621d8465ebff3b2c49bee8fce5b0c7735b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7d75e6d97a75396fb4588f2b429019f6c69eff31",
"extension": "py"... | 2.546875 | stackv2 | """
Simple example of a RESTful PFA scoring engine
Leverages the open source Titus PFA engine:
https://github.com/opendatagroup/hadrian
Copyright 2017 Alpine Data
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy o... | 195 | 32.35 | 86 | 18 | 1,493 | python | [{"finding_id": "codeql_py/reflective-xss_09eb7576ca77ea0e_01631351", "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... | 14 | true | [
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scri... | [
150,
155,
161,
164,
175,
53,
58,
71,
75,
83,
86,
94,
97,
118
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
28,
20,
24,
24,
24,
27,
27,
27,
27,
27,
27,
27,
27,
27
] | [
63,
67,
70,
59,
59,
60,
60,
60,
86,
68,
68,
62,
68,
68
] | |
2024-11-18T21:01:30.531446+00:00 | 1,632,692,679,000 | ea644772c17e0a0cdb76c43e1a216a99443c90c0 | 3 | {
"blob_id": "ea644772c17e0a0cdb76c43e1a216a99443c90c0",
"branch_name": "refs/heads/main",
"committer_date": 1632692679000,
"content_id": "867636ea09d7f07d41a7baeb9890dde75cea840a",
"detected_licenses": [
"MIT"
],
"directory_id": "e3d281b04dca62bd58d489ec655e22eac76add7e",
"extension": "py",
"file... | 2.703125 | stackv2 | import os
import paramiko
class SftpLoader:
def __init__(self, server, username, password, port, directory):
self.client = paramiko.SSHClient()
self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
self.client.connect(
server,
username=username,
... | 31 | 26.45 | 73 | 14 | 188 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_0338611fc59fd3b6_95d3145a", "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."
] | [
9
] | [
null
] | [
9
] | [
74
] | |
2024-11-18T21:51:17.609758+00:00 | 1,377,837,753,000 | 946b83dcffbeb78240ff68a8a9a7f76e3cd8e4be | 2 | {
"blob_id": "946b83dcffbeb78240ff68a8a9a7f76e3cd8e4be",
"branch_name": "refs/heads/master",
"committer_date": 1377837753000,
"content_id": "8c1243072589c65b6989fde6c79d94d0f7f05854",
"detected_licenses": [
"MIT"
],
"directory_id": "7b0467d307662ef132b8dd46b142789d70a863e1",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
from flask import Flask, render_template, Response, send_from_directory, request, current_app
import glob
app = Flask(__name__, template_folder=os.path.join(os.getcwd(), 'templates'))
@app.route("/")
def main():
return render_template('main.html', title='pyDashie')
@app.route("/assets/application.js")
... | 122 | 32.61 | 126 | 19 | 927 | python | [{"finding_id": "codeql_py/path-injection_e0782e2e37f2ac9d_b0bba3ca", "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)."
] | [
82,
83
] | [
null,
null
] | [
23,
18
] | [
27,
22
] | |
2024-11-18T21:51:20.139409+00:00 | 1,395,684,342,000 | 60ec6ea3ca751372df1a4ca9d73b6f3f92c1aa4c | 3 | {
"blob_id": "60ec6ea3ca751372df1a4ca9d73b6f3f92c1aa4c",
"branch_name": "refs/heads/master",
"committer_date": 1395684342000,
"content_id": "d3a24555f2743a993e3d2ff6b4ae7e20015971b2",
"detected_licenses": [
"MIT"
],
"directory_id": "03740d60f5b46a5150f2261ab25ef72f8eee9325",
"extension": "py",
"fi... | 2.90625 | stackv2 | import argparse
import json
import requests
import sys
import file_download
from bs4 import BeautifulSoup, SoupStrainer
# Get the subreddit
def get_reddit_page(subreddit, post_type, limit, time):
url = "http://www.reddit.com/r/" + subreddit + "/" + post_type + \
".json" + "?limit=" + str(limit)
... | 108 | 31.15 | 155 | 18 | 842 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_67e1b81d34219471_8b34d38b", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [i.imgur.com/](1) may be at an arbitrary position in th... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [i.imgur.com/](1) may be at an arbitrary position in the sanitized URL."
] | [
61
] | [
null
] | [
14
] | [
35
] | |
2024-11-18T22:00:40.755473+00:00 | 1,611,673,086,000 | a15997e30e5fa86c72fc5b7405e6545eb88a7587 | 2 | {
"blob_id": "a15997e30e5fa86c72fc5b7405e6545eb88a7587",
"branch_name": "refs/heads/main",
"committer_date": 1611673086000,
"content_id": "6e59301306224d19db1bc8fa3730abdcd326f52b",
"detected_licenses": [
"MIT"
],
"directory_id": "2e3177ba54feccd4ab1e2c626eabbc5e1e83bb35",
"extension": "py",
"file... | 2.453125 | stackv2 | import locale
import json
import os
import re
import sys
import requests
import unicodedata
from collections import Counter, defaultdict
from datetime import datetime
from urllib.parse import urljoin
from tqdm import tqdm
import nltk
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplot... | 337 | 33.84 | 93 | 15 | 3,325 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_390a9926303b6e01_d4ddae23", "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.",... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.",
"This expression stores [sensitive data (private)](1) as clear text."
] | [
185,
187
] | [
null,
null
] | [
17,
17
] | [
30,
30
] | |
2024-11-18T22:00:45.010278+00:00 | 1,522,142,294,000 | d1bc0f6959e76f66841d1d0123efbb1edeb8394b | 3 | {
"blob_id": "d1bc0f6959e76f66841d1d0123efbb1edeb8394b",
"branch_name": "refs/heads/master",
"committer_date": 1522142294000,
"content_id": "b77e4b3c012720f20f9b0112338d7e1c69ae9d1b",
"detected_licenses": [
"MIT"
],
"directory_id": "d5973bd725c9ef974790187b094c5e9b525c80d4",
"extension": "py",
"fi... | 2.5625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2017/12/15 15:34
# @Author : glacier
# @Site :
# @File : zhihu.py
# @Software: PyCharm Edu
import requests
from bs4 import BeautifulSoup as BS
import time
from subprocess import Popen # 打开图片
import http.cookiejar
import re
import pymysql
def bs_text... | 141 | 22.22 | 134 | 16 | 1,032 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5b1b330fc1bf9ef6_afa60a43", "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."
] | [
72
] | [
null
] | [
11
] | [
15
] | |
2024-11-18T22:15:01.350547+00:00 | 1,693,844,327,000 | 2ebaaa47905e86b9fcd3e33a4386808d3b5fcaf9 | 3 | {
"blob_id": "2ebaaa47905e86b9fcd3e33a4386808d3b5fcaf9",
"branch_name": "refs/heads/main",
"committer_date": 1693844327000,
"content_id": "ec684c0ba48540f5545a11f2da50729812153b7b",
"detected_licenses": [
"MIT"
],
"directory_id": "4fd47b1425e2026443e26284cd910f7ab9655e01",
"extension": "py",
"file... | 2.546875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2014, Matt Martz <matt@sivel.net>
# (c) 2016, Justin Mayer <https://justinmayer.com/>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# =============================================================================
#
# T... | 141 | 33.35 | 110 | 17 | 1,146 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c90cdce0b3536e53_9899fd15", "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."
] | [
135
] | [
null
] | [
26
] | [
41
] | |
2024-11-18T22:25:56.835703+00:00 | 1,487,487,992,000 | eab8d5c5ab81f772ca1869bb95bf0f95758fd913 | 2 | {
"blob_id": "eab8d5c5ab81f772ca1869bb95bf0f95758fd913",
"branch_name": "refs/heads/master",
"committer_date": 1487487992000,
"content_id": "6007f97577608c60745e96c0908cfea5a9341cb6",
"detected_licenses": [
"MIT"
],
"directory_id": "01e22e4bece6fbc2ee8545feba9eed4c72d10d23",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python3
# You should configure this string to be whatever your IRCd names end with.
serversuffix = "overdrivenetworks.com"
import os
import sys
import itertools
import re
import socket
import ipaddress
import passwd
servers = sys.argv[1:]
curdir = os.path.dirname(os.path.abspath(__file__))
def getip... | 111 | 33.11 | 113 | 20 | 921 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_2e558fca781b8dbb_7b4a4ccb", "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.\... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression logs [sensi... | [
104,
111,
102,
109
] | [
null,
null,
null,
null
] | [
21,
21,
15,
15
] | [
22,
22,
16,
16
] | |
2024-11-18T22:25:57.762545+00:00 | 1,550,689,138,000 | 509cb2ccb10fe9b8f770f56b4c542c905be01e69 | 3 | {
"blob_id": "509cb2ccb10fe9b8f770f56b4c542c905be01e69",
"branch_name": "refs/heads/master",
"committer_date": 1550689138000,
"content_id": "c5267ea7789dff39315d581dddba337ced1277c1",
"detected_licenses": [
"MIT"
],
"directory_id": "c83fb494b9d28ae870080015a5b022428c56f218",
"extension": "py",
"fi... | 2.6875 | stackv2 | import pyspark
import subprocess
import os
import json
from flask import Flask, request, send_from_directory
op_map = {
"eq": "=",
"gt": ">",
"lt": "<",
"in": "in"
}
app = Flask(__name__)
sc = pyspark.SparkContext()
sql =pyspark.SQLContext(sc)
# get columns datatype metadata
def get_columns_obj():... | 127 | 28.94 | 119 | 18 | 952 | python | [{"finding_id": "codeql_py/stack-trace-exposure_2b1faf98e823188b_cb2adb6d", "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-215"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/flask-debug"
] | [
"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... | [
93,
105,
118,
120,
127
] | [
null,
null,
null,
null,
null
] | [
16,
16,
16,
16,
5
] | [
27,
27,
27,
27,
40
] | |
2024-11-18T21:08:06.395500+00:00 | 1,504,580,967,000 | ae947077aa2cfc45b9393a7ca5782f2801885dda | 3 | {
"blob_id": "ae947077aa2cfc45b9393a7ca5782f2801885dda",
"branch_name": "refs/heads/master",
"committer_date": 1504580967000,
"content_id": "7e59d43b5ba369590d3f2793d5961e415973385e",
"detected_licenses": [
"MIT"
],
"directory_id": "74f96faae04808dd3bfed55c80d389b979d14907",
"extension": "py",
"fi... | 2.6875 | stackv2 | #!/usr/bin/env python
# Import required modules
import requests
from lxml import html
# Describe are function
def ipfinder():
# Set up the variables
IPADDR='192.168.1.100'
requests.packages.urllib3.disable_warnings()
source = requests.get("https://ipfinder.rackspace.com/"+ IPADDR, verify=False).text
t... | 21 | 34.62 | 92 | 21 | 219 | python | [{"finding_id": "codeql_py/request-without-cert-validation_cb9ccf324710e88b_b8fe08fd", "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)."
] | [
12
] | [
null
] | [
14
] | [
83
] | |
2024-11-18T21:08:11.175501+00:00 | 1,522,030,953,000 | 36dfa99bba553cb2f69ae97d11b33978411aa0c3 | 3 | {
"blob_id": "36dfa99bba553cb2f69ae97d11b33978411aa0c3",
"branch_name": "refs/heads/master",
"committer_date": 1522030953000,
"content_id": "ab0a7d3daba0fd0e38b4d535db79ba985f171ba7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d027a210b5988064d1bb6817a879cd6beecb02d1",
"extension": "py"... | 3 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import hashlib
import os
from subprocess import Popen, PIPE
from jinja2 import Template
def calculate_hash(src):
m2 = hashlib.md5()
m2.update(str(src).encode("utf8"))
return m2.hexdigest()
def time2frame(t):
hms, sub = t.split(".")
h, m, s = hms.spl... | 77 | 35.9 | 123 | 20 | 791 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_c0f3954a51813888_c4c84446", "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."
] | [
41
] | [
null
] | [
24
] | [
42
] | |
2024-11-18T21:08:13.319309+00:00 | 1,476,385,749,000 | 44d94b8e734b14396cc13f8e58f40f7ff35591ba | 2 | {
"blob_id": "44d94b8e734b14396cc13f8e58f40f7ff35591ba",
"branch_name": "refs/heads/master",
"committer_date": 1476385749000,
"content_id": "0c67748aac1cc97b5e19f61675c5bb882d023e80",
"detected_licenses": [
"MIT"
],
"directory_id": "73522c182dcea84f1e15773a35e78ce1dc9c3927",
"extension": "py",
"fi... | 2.453125 | stackv2 | # encoding=utf-8
from jinja2 import Environment, PackageLoader
from utils import product_manager as pm
import sys
def make_pages (exp_dir):
env = Environment(loader=PackageLoader('page', 'templates'))
template = env.get_template('product/base.html')
for page in pm.fetch_product_data():
url = page[... | 18 | 30.78 | 64 | 15 | 142 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_dbaa4161427d48de_6e6db382", "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."
] | [
8
] | [
null
] | [
11
] | [
65
] | |
2024-11-18T21:08:15.670141+00:00 | 1,633,160,561,000 | 18b19a312f5127886b95fda4bbd507524ff93dfe | 2 | {
"blob_id": "18b19a312f5127886b95fda4bbd507524ff93dfe",
"branch_name": "refs/heads/main",
"committer_date": 1633160561000,
"content_id": "da7d3f48845f5031d9eb1e3d319d1cc6fa79b0b5",
"detected_licenses": [
"MIT"
],
"directory_id": "6f3c3a36fca317c9d1cb3d8f4e1234ee5a600dad",
"extension": "py",
"file... | 2.421875 | stackv2 | from flask import Blueprint, render_template, url_for, flash, request, redirect
from flask_login import login_user, current_user, logout_user, login_required
from app import db, bcrypt
from app.users.forms import RegistrationForm, LoginForm, UpdateAccountForm, RequestResetForm, ResetPasswordForm
from app.users.utils im... | 117 | 39.05 | 111 | 18 | 969 | python | [{"finding_id": "codeql_py/url-redirection_9014b8bab705a9de_b0bf506c", "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_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
42
] | [
null
] | [
33
] | [
42
] | |
2024-11-18T21:31:27.877357+00:00 | 1,594,807,001,000 | 7ca383d2d467113084faed8794e3d69b14f10fbe | 3 | {
"blob_id": "7ca383d2d467113084faed8794e3d69b14f10fbe",
"branch_name": "refs/heads/master",
"committer_date": 1594807001000,
"content_id": "7de829256f65dd89a3fac6d4b2f0d6f5560e86e4",
"detected_licenses": [
"MIT"
],
"directory_id": "d6a2eddca83007209ba6f2eda6c426df7a8b9f1c",
"extension": "py",
"fi... | 3.359375 | stackv2 | """ Transformation operations working on MPTs or BMPT words.
"""
import re
from collections import OrderedDict
from mptpy.node import Node
def word_to_nodes(word, idx=0):
""" Translate an MPT in the BMPT language (see Purdy & Batchelder 2009) to
a binary tree
Parameters
----------
word : MPTWo... | 187 | 21.49 | 79 | 17 | 1,009 | python | [{"finding_id": "codeql_py/overly-large-range_c9ceb734f669a1ab_4708b6e3", "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... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
111
] | [
null
] | [
25
] | [
28
] | |
2024-11-18T21:31:33.574996+00:00 | 1,493,485,977,000 | cbbd9222840711d20afd04305d05643f353a08eb | 3 | {
"blob_id": "cbbd9222840711d20afd04305d05643f353a08eb",
"branch_name": "refs/heads/master",
"committer_date": 1493485977000,
"content_id": "ba821b9c07d7a7951a0f5814f0e8bc84720ae841",
"detected_licenses": [
"MIT"
],
"directory_id": "30f8b21d7dde062698702149f5f5e84019916563",
"extension": "py",
"fi... | 2.71875 | stackv2 | """ This file contains all basic views and logic such as login/out and the homepage """
from datetime import datetime
from flask import Blueprint, render_template, request, g, flash, redirect, url_for, session
from app.validation import validate
from app.models import *
from app.logic import *
blueprint = Blueprint(... | 74 | 34.53 | 95 | 15 | 551 | python | [{"finding_id": "codeql_py/url-redirection_bb9ef0b7becbf788_c5b96476", "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_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
65
] | [
null
] | [
21
] | [
37
] | |
2024-11-18T21:31:35.464541+00:00 | 1,408,040,499,000 | 2d4314324c625c7a5c813d913172fea774033fb5 | 2 | {
"blob_id": "2d4314324c625c7a5c813d913172fea774033fb5",
"branch_name": "refs/heads/master",
"committer_date": 1408040499000,
"content_id": "52b3b9848e221da38c826c15d3772dbb919a7038",
"detected_licenses": [
"MIT",
"ISC"
],
"directory_id": "8864a6fe498efe60de8079f3af62a47ea8fc902b",
"extension": ... | 2.4375 | stackv2 | import json
import time
from requests import Request, Session
import requests.exceptions
from jinja2 import Environment, FileSystemLoader
from progress.spinner import Spinner
from .utils import abort, warn
def mchm_render(template_dir, params):
"""
Renders templates
"""
env = Environment(loader=File... | 99 | 27.2 | 76 | 15 | 661 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bc986925e3d287b7_69be9f25", "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."
] | [
16
] | [
null
] | [
11
] | [
61
] | |
2024-11-18T21:31:57.488862+00:00 | 1,630,247,757,000 | 068b48c3994ad36646b4edc3682cff17f8116128 | 3 | {
"blob_id": "068b48c3994ad36646b4edc3682cff17f8116128",
"branch_name": "refs/heads/main",
"committer_date": 1630247757000,
"content_id": "5b8055d1fb765d57d1d62a357c1a403dd98b80eb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5f0d45d34fe6fb2aef9cf7cc5f19ab82dae8d761",
"extension": "py",
... | 3 | stackv2 | """ Nitro Enclave and Attestation integration with KMS Sample """
import base64
import json
import socket
import ecdsa
import hashlib
import binascii
from Crypto.Cipher import AES
from kms import NitroKms
ENCLAVE_PORT = 5000
"""Client-side AES encryption"""
def add_to_16(value):
while len(value) % 16 != 0:
... | 113 | 34.92 | 123 | 16 | 967 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_cfba290637ed35ee_57a6e17b", "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."
] | [
24,
32
] | [
null,
null
] | [
19,
26
] | [
47,
55
] | |
2024-11-18T21:32:19.017944+00:00 | 1,629,594,599,000 | 4804e526a7e7c162aac37a394cf553d5ff2617d8 | 2 | {
"blob_id": "4804e526a7e7c162aac37a394cf553d5ff2617d8",
"branch_name": "refs/heads/master",
"committer_date": 1629594599000,
"content_id": "9480b5bb980438af5baad4f4fc8d40bcc82d7d47",
"detected_licenses": [
"MIT"
],
"directory_id": "50566ac0d8fbe8121c66cd479e626331ad10e740",
"extension": "py",
"fi... | 2.375 | stackv2 | import django
from core.models import Author, AuthorOrder, Bibtex, Book
from django.shortcuts import get_object_or_404
from rest_framework import serializers
from users.models import User
# -------------------------------------------------------------------
class UserSerializer(serializers.ModelSerializer):
class... | 137 | 26.12 | 80 | 15 | 770 | python | [{"finding_id": "codeql_py/stack-trace-exposure_997c32906eea9065_ed9e8637", "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."
] | [
99
] | [
null
] | [
47
] | [
80
] | |
2024-11-18T21:32:27.947273+00:00 | 1,678,137,174,000 | 6b6818cb998e0d580443ff30b80edf2967be9d8a | 3 | {
"blob_id": "6b6818cb998e0d580443ff30b80edf2967be9d8a",
"branch_name": "refs/heads/master",
"committer_date": 1678137174000,
"content_id": "513af4d57c3b57849c8fee16c391b0d08099fb14",
"detected_licenses": [
"MIT"
],
"directory_id": "2e7aaf5367b9555554ae22338b9184c616e3f69e",
"extension": "py",
"fi... | 2.78125 | stackv2 | from flask import Flask, request, abort, jsonify
import json
from sqlalchemy import create_engine, exc, orm
from contact_model import Base, Contact, Email
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
engine = create_engine(
'sqlite:///contact_manager.db',
connect_args={'check_same_thread': Fals... | 154 | 24.67 | 76 | 13 | 869 | python | [{"finding_id": "codeql_py/flask-debug_45f288e65cc4d08d_fafa363f", "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.", ... | 3 | true | [
"CWE-215",
"CWE-079",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"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.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
154,
92,
111
] | [
null,
null,
null
] | [
5,
12,
12
] | [
24,
32,
30
] | |
2024-11-18T21:32:30.209867+00:00 | 1,469,025,708,000 | c9facb44072641453803b5636b5487728911306c | 2 | {
"blob_id": "c9facb44072641453803b5636b5487728911306c",
"branch_name": "refs/heads/master",
"committer_date": 1469025708000,
"content_id": "f9c2abb3836cd3ec5ac3aabff7930235d792f2ad",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "422098e7e8fabb197a50cb32edefbbbf47f13179",
"extension": "py"... | 2.484375 | stackv2 | import httplib
import socket
import ssl
import sys
import json
import urllib
import urllib2
import uuid
import random
from argparse import ArgumentParser
# custom HTTPS opener, django-sslserver supports SSLv3 only
class HTTPSConnectionV3(httplib.HTTPSConnection):
def __init__(self, *args, **kwargs):
http... | 108 | 32.81 | 108 | 15 | 852 | python | [{"finding_id": "codeql_py/insecure-protocol_897c7a0bcb629424_dfc22b2d", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).", "remediation": "", "l... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/insecure-protocol",
"py/insecure-protocol"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).",
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1)."
] | [
25,
28
] | [
null,
null
] | [
25,
25
] | [
109,
109
] | |
2024-11-18T21:49:03.507734+00:00 | 1,613,892,505,000 | 76a17d06aacadaba5d39c033d09ea99cdbbe6467 | 2 | {
"blob_id": "76a17d06aacadaba5d39c033d09ea99cdbbe6467",
"branch_name": "refs/heads/main",
"committer_date": 1613892505000,
"content_id": "ea3189788128e5c60fccc52e48532ad9db4a104b",
"detected_licenses": [
"Unlicense"
],
"directory_id": "360dc97ced63fc43deef495d2e17eb242858f4c8",
"extension": "py",
... | 2.34375 | stackv2 | import subprocess
import os
import uuid
import paramiko
def handle_uploaded_file(f, user_id):
file_path = "files/" + user_id + ".py"
with open(file_path, "wb+") as destination:
for chunk in f.chunks():
destination.write(chunk)
return file_path
def copy_file_to_remote_machine(filepat... | 43 | 34.02 | 106 | 17 | 365 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_f96ce9dee16fd33d_20f921fb", "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... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation",
"py/paramiko-missing-host-key-validation"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe.",
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
20,
33
] | [
null,
null
] | [
5,
5
] | [
62,
62
] | |
2024-11-18T21:49:04.686013+00:00 | 1,581,237,619,000 | e9a4d773816cb7c14f5065b556d2d3efbfb35564 | 2 | {
"blob_id": "e9a4d773816cb7c14f5065b556d2d3efbfb35564",
"branch_name": "refs/heads/master",
"committer_date": 1581237619000,
"content_id": "96947aef080b77b127c23227a3f6e531600f81c9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "391459fb8aef96a26194a5612645657d274bba03",
"extension": "py"... | 2.40625 | stackv2 | from __future__ import division, print_function
from flask import Flask,abort,render_template,request,redirect,url_for
#from werkzeug import secure_filename
#from werkzeug.utils import secure_filename
from werkzeug.utils import secure_filename
# coding=utf-8
import sys
import os
import glob
import re
import numpy as n... | 147 | 26.96 | 145 | 16 | 1,032 | python | [{"finding_id": "codeql_py/url-redirection_bcb51beda6f08789_6baa750e", "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_... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
120
] | [
null
] | [
29
] | [
40
] | |
2024-11-18T21:49:11.751238+00:00 | 1,514,750,628,000 | 97b0edcd81b422fab105333ff588aebd495bed37 | 3 | {
"blob_id": "97b0edcd81b422fab105333ff588aebd495bed37",
"branch_name": "refs/heads/master",
"committer_date": 1514750628000,
"content_id": "ad4c90e1108060543bc8661c9d2ef089a5136c36",
"detected_licenses": [
"MIT"
],
"directory_id": "66cdc10340dd84ac4b44170b6d7a17453227cab4",
"extension": "py",
"fi... | 2.625 | stackv2 | # Note that before running this script, you must have initialized
# your local geth node. To do so, run
# datacoin/chains/local/run_chain.sh.
from populus import Project
from populus.utils.wait import wait_for_transaction_receipt
from web3 import RPCProvider
from web3 import Web3
def check_succesful_tx(web3, txid, t... | 72 | 43.69 | 78 | 13 | 707 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_76183dadb6a0f7cb_78d87a7f", "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."
] | [
47
] | [
null
] | [
29
] | [
40
] | |
2024-11-18T21:49:12.303563+00:00 | 1,540,905,022,000 | 3876537ed86e2d37abaa4e6ce09fa30c3d366b8f | 2 | {
"blob_id": "3876537ed86e2d37abaa4e6ce09fa30c3d366b8f",
"branch_name": "refs/heads/master",
"committer_date": 1540905022000,
"content_id": "4ce2faa2348e2995cbbc348b7a78bba9fed7334c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1d91ba4964580644147aab55b53c2e091d2722d7",
"extension": "py"... | 2.359375 | stackv2 | import ssl
import os
import http.server
from pathlib import Path
REAL_PATH = Path(__file__).resolve().parents[1]
CERT_PATH = os.path.join(REAL_PATH, 'certs/host.cert')
KEY_PATH = os.path.join(REAL_PATH, 'certs/host.key')
print(KEY_PATH)
SERVER_ADDRESS = ('0.0.0.0', 4443)
Handler = http.server.SimpleHTTPRequestHandl... | 21 | 26.71 | 77 | 10 | 158 | python | [{"finding_id": "codeql_py/insecure-protocol_3601f09f157c5475_ecca908b", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).", "remediation": "", "l... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1)."
] | [
17
] | [
18
] | [
16
] | [
78
] | |
2024-11-18T22:26:06.537697+00:00 | 1,399,820,117,000 | 0bbdce83391d539d5a84631cb99dad944a9c48f8 | 3 | {
"blob_id": "0bbdce83391d539d5a84631cb99dad944a9c48f8",
"branch_name": "refs/heads/master",
"committer_date": 1399820117000,
"content_id": "d6092fa5a4fb128bf852f46c018f0e9c87ace231",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "cfdf7a9ce00e7a444a58e177ebd2df8329c1ab83",
"extension": "p... | 3.125 | stackv2 | """pywebfaction
Usage:
pywebfaction generate_config --username=<username> --password=<password>
pywebfaction list_emails
pywebfaction create_email <addr>
pywebfaction create_forwarder <addr> <fwd1>
pywebfaction (-h | --help)
pywebfaction --version
Options:
-h --help Show this screen.
--version ... | 100 | 26.93 | 74 | 14 | 628 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3b385f50f1c22363_67c31788", "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."
] | [
65
] | [
66
] | [
11
] | [
50
] | |
2024-11-18T22:26:08.917244+00:00 | 1,642,582,439,000 | f060a1813c4a39db98a05531576a5e58de917e90 | 3 | {
"blob_id": "f060a1813c4a39db98a05531576a5e58de917e90",
"branch_name": "refs/heads/master",
"committer_date": 1642582439000,
"content_id": "03c22e3b733f21af7f44570ccabfcc7d19d6d292",
"detected_licenses": [
"MIT"
],
"directory_id": "2f1b372d9bc5d9ed968de3c4eaebb831368e3c40",
"extension": "py",
"fi... | 2.734375 | stackv2 | from flask import Flask, request, make_response, jsonify
import time, json, datetime
from MyMQTT import MyMQTT
######################################################################
#initialize the flask app
app = Flask(__name__)
#deafult route
@app.route('/')
def index():
return "This is the Virtual Security A... | 163 | 30.9 | 127 | 20 | 1,311 | python | [{"finding_id": "codeql_py/stack-trace-exposure_39b610c1a9b59111_5772e46a", "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.\n[S... | 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.\n[Stack trace information](2) flows to this location and may be exposed to an external user.\n[Stack trace information](3) flows to this location and may be exposed to an external user."
] | [
21
] | [
null
] | [
34
] | [
43
] | |
2024-11-18T20:31:25.300319+00:00 | 1,510,007,089,000 | 2f9532b0f396ea28030c0bff4c543798047a4207 | 2 | {
"blob_id": "2f9532b0f396ea28030c0bff4c543798047a4207",
"branch_name": "refs/heads/master",
"committer_date": 1510007089000,
"content_id": "2c52f4363479a3ec6b5a7311342606be083b790b",
"detected_licenses": [
"MIT"
],
"directory_id": "546e89a7bad0753b1213ce74612fbf9fb1a4e1e3",
"extension": "py",
"fi... | 2.375 | stackv2 | import re
import uuid
from flask import Flask
from flask import render_template
from flask import request
from flask import url_for
import flask
# to make call to JSON REST APIs
import json
import requests
app = Flask(__name__)
config = None
with open('config.json') as config_file:
config_json = json.load(confi... | 371 | 31.69 | 107 | 16 | 2,797 | python | [{"finding_id": "codeql_py/polynomial-redos_dc81ede22478b504_58a03462", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma... | 5 | true | [
"CWE-1333",
"CWE-918",
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"py/polynomial-redos",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of 'a'.",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request ... | [
227,
178,
193,
292,
356
] | [
null,
null,
null,
null,
null
] | [
48,
24,
24,
20,
20
] | [
62,
84,
84,
80,
80
] | |
2024-11-18T20:31:28.016321+00:00 | 1,573,101,967,000 | 91801d853e1fc0ee4b4aedf2567a024b96c55e9a | 2 | {
"blob_id": "91801d853e1fc0ee4b4aedf2567a024b96c55e9a",
"branch_name": "refs/heads/master",
"committer_date": 1573101967000,
"content_id": "4b3782facf5417332293c7fa6543f3b2daf88072",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "be011043fa79c6ca5670fadcfb67c5b98f418dda",
"extension": "py"... | 2.359375 | stackv2 | import json
import os
import random
import string
import traceback
import auth
import flask
import requests
app = flask.Flask(__name__)
content_header = {'Content-Type': 'application/json; charset=utf-8'}
def get_db_configuration():
# Return a list of [username, password, url]
properties = [None, None, None... | 150 | 32.2 | 105 | 19 | 1,223 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_043ff30e3eb6459b_8d9f38b9", "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.", ... | 13 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-079",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-918",
"CWE-918",
"CWE-918",
"CWE-918"
] | [
"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/reflective-xss",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/r... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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.",
"This expression logs [sensitive data (password)](1) as clear text.",
"Cross-site scripting vulner... | [
76,
96,
117,
132,
104,
72,
91,
112,
128,
72,
91,
112,
128
] | [
null,
null,
null,
null,
null,
74,
93,
114,
130,
74,
93,
114,
130
] | [
15,
15,
15,
15,
16,
23,
23,
23,
23,
23,
23,
23,
23
] | [
30,
30,
30,
30,
50,
6,
6,
6,
6,
6,
6,
6,
6
] | |
2024-11-18T20:31:51.037828+00:00 | 1,437,432,917,000 | 45266e4e2f096bc3bd76de4deb0fff50f2dd0a83 | 2 | {
"blob_id": "45266e4e2f096bc3bd76de4deb0fff50f2dd0a83",
"branch_name": "refs/heads/master",
"committer_date": 1437432917000,
"content_id": "8004d8bebf0d6067470b13c96c818cf7bdc9ea4d",
"detected_licenses": [
"Unlicense"
],
"directory_id": "8205bb0707c2ff873de891e6044a897a5dd2b0ab",
"extension": "py",... | 2.484375 | stackv2 | from flask import Flask, request
# you need to pip install flask-cors, or else you'll run into problems
from flask.ext.cors import CORS, cross_origin
import json
import math
import re
import urllib
app = Flask(__name__)
cors = CORS(app)
app.config['CORS_HEADERS'] = 'Content-Type'
import pandas as pd
usage = pd.read... | 50 | 28.18 | 70 | 12 | 333 | python | [{"finding_id": "codeql_py/regex-injection_863f81e0accc7882_c8b4db8c", "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.search](2).", "remed... | 1 | true | [
"CWE-730"
] | [
"py/regex-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression depends on a [user-provided value](1) and is executed by [re.search](2)."
] | [
33
] | [
null
] | [
39
] | [
47
] | |
2024-11-18T20:53:30.846369+00:00 | 1,605,268,764,000 | e0a1a1b66f9acf802f86ffbd3c4972f771604aa1 | 2 | {
"blob_id": "e0a1a1b66f9acf802f86ffbd3c4972f771604aa1",
"branch_name": "refs/heads/master",
"committer_date": 1605268764000,
"content_id": "377a5357857ce9e4f1944238197d97506e003092",
"detected_licenses": [
"MIT"
],
"directory_id": "f10f16d5bc25ad3f5027db5b2a5632f70949766d",
"extension": "py",
"fi... | 2.4375 | stackv2 | from jupyterhub.auth import Authenticator
from tornado import gen
import hashlib
import os
class PrivateKeyAuthenticator(Authenticator):
@gen.coroutine
def authenticate(self, handler, data):
password_hashed = data['password']
username = data['username']
private_key = os.getenv('DATA_SC... | 33 | 37.82 | 95 | 13 | 276 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_13e83f50a9a00557_75a77c34", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
22
] | [
null
] | [
30
] | [
47
] | |
2024-11-18T20:53:34.539408+00:00 | 1,530,591,414,000 | 6392c792d9d1e966a5199f1661bf6436cb4a2c78 | 3 | {
"blob_id": "6392c792d9d1e966a5199f1661bf6436cb4a2c78",
"branch_name": "refs/heads/master",
"committer_date": 1530591414000,
"content_id": "48d9aaad7c19315ee34901476b16b61bfda34068",
"detected_licenses": [
"MIT"
],
"directory_id": "2587a637b1804000e7323146d42b3e41decd1e38",
"extension": "py",
"fi... | 2.703125 | stackv2 | #!/usr/local/bin/python3
import time
import paramiko
import os
import json
from itertools import repeat
from multiprocessing import Pool
# Load the node ssh profile
def getNodeLogin(node_config_file):
with open(node_config_file) as node_confile:
node_config = json.load(node_confile)
node = []
... | 70 | 29.01 | 76 | 13 | 541 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_59429bc31e50c3af_b1a550ba", "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."
] | [
29
] | [
null
] | [
5
] | [
65
] | |
2024-11-18T21:10:21.010627+00:00 | 1,474,931,358,000 | a11c4df2b2aadeb19b21180dac650b598f024908 | 2 | {
"blob_id": "a11c4df2b2aadeb19b21180dac650b598f024908",
"branch_name": "refs/heads/master",
"committer_date": 1474931358000,
"content_id": "7c40b149f4758dd30a3258306f0140713904f02c",
"detected_licenses": [
"MIT"
],
"directory_id": "9498c15ecf0f71643af0e23466bce4052ffdb4be",
"extension": "py",
"fi... | 2.5 | stackv2 | import requests
import re
from hashlib import sha512
from webpageparser import WebPageParser, WebPageNode
class WebPage:
titles_seen = dict()
descriptions_seen = dict() # hash for description: id of the first webpage
regex_url = re.compile(r'(?:http[s]?:/|)/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-... | 318 | 34.57 | 139 | 21 | 2,363 | python | [{"finding_id": "codeql_py/overly-large-range_a2ce3d4ad5d82109_e3111206", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
10
] | [
null
] | [
65
] | [
68
] | |
2024-11-18T21:10:50.133430+00:00 | 1,621,238,522,000 | f3e6a1ce7372dc93c5e4e39600004ff0f2784e2b | 2 | {
"blob_id": "f3e6a1ce7372dc93c5e4e39600004ff0f2784e2b",
"branch_name": "refs/heads/master",
"committer_date": 1621238522000,
"content_id": "4ff41eda03f7bbc2e016f806a84f7fb292d9dce6",
"detected_licenses": [
"MIT"
],
"directory_id": "4166ac95af9d31f6380003ad8ee3a97fea9adc22",
"extension": "py",
"fi... | 2.34375 | stackv2 | from core.sys_modules.authentication.Users_model import UsersModel
from core.sys_modules.authentication.UserToken_model import UserTokenModel
from core.sys_modules.authentication.UsersPermissions_model import UsersPermissionsModel
import hashlib
import jwt
import datetime
from settings.settings import SETTINGS
from cor... | 98 | 38.46 | 115 | 22 | 692 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a638606ac619267a_c52cf3da", "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 (SHA3512) that is i... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA3512) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
23
] | [
null
] | [
49
] | [
73
] | |
2024-11-18T21:11:11.421942+00:00 | 1,557,048,350,000 | 718417d945e8385c25bad37b09f5bbeaccdf8d51 | 3 | {
"blob_id": "718417d945e8385c25bad37b09f5bbeaccdf8d51",
"branch_name": "refs/heads/master",
"committer_date": 1557048350000,
"content_id": "c7839841a84f3f55cab635d66a0bc4f755d2a178",
"detected_licenses": [
"MIT"
],
"directory_id": "da054140a745de32de96a0ba6a7f5dc268970f59",
"extension": "py",
"fi... | 3.171875 | stackv2 | """@package file_utils Package for file utilities
Import necessary libraries
"""
import urllib.request as url_req
import os, shutil, hashlib, tarfile, sys
import pickle as cPickle
import zipfile, glob, logging
log = logging.getLogger(__name__)
def mkdir_p(path, verbose=False):
"""
Creates a directory as decl... | 190 | 33.74 | 109 | 22 | 1,548 | python | [{"finding_id": "codeql_py/tarslip_8ef0a37baa0682c7_5ccfab8c", "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... | 3 | true | [
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
133,
138,
169
] | [
null,
null,
null
] | [
13,
13,
13
] | [
14,
14,
16
] | |
2024-11-18T21:11:14.553556+00:00 | 1,531,478,948,000 | 214dc9536b9b23f87e8b16884b1dc80233f73fe3 | 2 | {
"blob_id": "214dc9536b9b23f87e8b16884b1dc80233f73fe3",
"branch_name": "refs/heads/master",
"committer_date": 1531478948000,
"content_id": "dd80940482a8c5509e5cd7658ce135f011acafbe",
"detected_licenses": [
"MIT"
],
"directory_id": "19036e68c4e4462638d570e3a11afe5fbd8cb7bf",
"extension": "py",
"fi... | 2.40625 | stackv2 | import time
import hashlib
import json
try:
from urllib.parse import urlencode
except ImportError:
from urlparse import urlencode
class YoukuOpenApi(object):
def __init__(self, client_id, secret_key, tcp='https'):
self.client_id = client_id
self.secret_key = secret_key
if tcp in ['... | 38 | 30.55 | 84 | 16 | 279 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_fbba6563dc91f54b_039bd60d", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
32
] | [
null
] | [
28
] | [
72
] | |
2024-11-18T21:46:30.310573+00:00 | 1,521,908,650,000 | e3af04a0799faf2d1f7b2d678a08dc0a50281f90 | 3 | {
"blob_id": "e3af04a0799faf2d1f7b2d678a08dc0a50281f90",
"branch_name": "refs/heads/master",
"committer_date": 1521908650000,
"content_id": "25dd3fb86d2a0a0b4ecbc5a6f163b755886ba75d",
"detected_licenses": [
"MIT"
],
"directory_id": "2e937a5c021d895e3779d7934bdd4ff922298e45",
"extension": "py",
"fi... | 3.21875 | stackv2 | """This module provides adapters which takes setters, getters and delete
functions. The adapter itself provides GET, POST, PATCH and DELETE functions
which takes or provides JSONAPI encoded objects.
"""
import logging
from flask import request
from flask_restful import Resource
from marshmallow import ValidationError... | 165 | 36.02 | 102 | 18 | 1,339 | python | [{"finding_id": "codeql_py/log-injection_8b8a8ac3f44d70b4_783fcf31", "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... | 4 | true | [
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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 on a [user-provided value](1)."
] | [
65,
69,
105,
109
] | [
66,
70,
106,
110
] | [
28,
28,
28,
28
] | [
63,
60,
63,
60
] | |
2024-11-18T21:46:38.267198+00:00 | 1,571,508,293,000 | abacbd20eff9a3b623e6fa2eb8698471ea735889 | 4 | {
"blob_id": "abacbd20eff9a3b623e6fa2eb8698471ea735889",
"branch_name": "refs/heads/master",
"committer_date": 1571508293000,
"content_id": "777ef18f85b49eda7bc68f8bad4390dbf700cf3a",
"detected_licenses": [
"MIT"
],
"directory_id": "d2fbecb5613d970864bc7f0caf4bbede6127d808",
"extension": "py",
"fi... | 4.25 | stackv2 | #this is a guessing the no. game
import random
secretno=random.randint(1,20)
print("I guessed a number between 1 to 20","You need to guess what I guessed")
#ask the user to guess the no. giving a chance of 6 times
for guessesTaken in range(1,6):
print("Guess any no.")
guess=int(input())
if guess<secretno:
... | 20 | 31.9 | 78 | 11 | 182 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7db80854bc4c9076_011cf35e", "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."
] | [
19
] | [
null
] | [
11
] | [
64
] | |
2024-11-18T21:47:16.780470+00:00 | 1,631,677,077,000 | 61cb0f0acdd5cd98a72bdce5f6a0d1f7a3c1d420 | 2 | {
"blob_id": "61cb0f0acdd5cd98a72bdce5f6a0d1f7a3c1d420",
"branch_name": "refs/heads/master",
"committer_date": 1631677685000,
"content_id": "dcf6f36636c4f4511e14ad3281efa6377bc00ab8",
"detected_licenses": [
"MIT"
],
"directory_id": "c275d06a2b184ae402b0ae7a687b642037b6132b",
"extension": "py",
"fi... | 2.421875 | stackv2 | # -*- coding: utf-8 -*-
"""
Defines all success and error http response code and body.
For new exception, please define here.
"""
import traceback
import logging
from flask import request
from src.utils.http_exception import HiveException, InternalServerErrorException
def __get_restful_response_wrapper(func, is_do... | 50 | 32.74 | 96 | 17 | 327 | python | [{"finding_id": "codeql_py/log-injection_d174e7eef0b625d7_435d4dcf", "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)."
] | [
17
] | [
null
] | [
49
] | [
95
] | |
2024-11-18T21:47:24.845420+00:00 | 1,551,168,637,000 | 5ff127bc11c74fabfe00edc110b5a122164fde2a | 2 | {
"blob_id": "5ff127bc11c74fabfe00edc110b5a122164fde2a",
"branch_name": "refs/heads/master",
"committer_date": 1551168637000,
"content_id": "edcad0e725dcaee58a1b72be7bb3b88e8f32af90",
"detected_licenses": [
"MIT"
],
"directory_id": "4bb6ec737e7f170c8c42b4e4f0322b8957303e62",
"extension": "py",
"fi... | 2.453125 | stackv2 | from flask import Flask, render_template, request
from flask_bootstrap import Bootstrap
import json
from datetime import datetime
from influxdb import InfluxDBClient
import secrets
import settings
influx_client = InfluxDBClient(secrets.influx_database_server,
secrets.influx_database_port... | 101 | 30.64 | 122 | 19 | 611 | python | [{"finding_id": "codeql_py/reflective-xss_282f6f09c97d0343_5d4c16a3", "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)."
] | [
96
] | [
null
] | [
12
] | [
21
] | |
2024-11-18T22:28:50.394088+00:00 | 1,688,410,246,000 | 491a2f9c4c5aaff500b6c78f52ccca668a6df175 | 3 | {
"blob_id": "491a2f9c4c5aaff500b6c78f52ccca668a6df175",
"branch_name": "refs/heads/master",
"committer_date": 1688410246000,
"content_id": "baf933035bfd27c064598d4b97b7051fb2e35ad2",
"detected_licenses": [
"MIT"
],
"directory_id": "702347798650c4f125fcd5291a52e51e9d20c63c",
"extension": "py",
"fi... | 2.59375 | stackv2 | #!/usr/bin/env python3
import os
import io
import pickle
import tarfile
import numpy as np
import torch
import torch.utils.data as data
from PIL import Image
from learn2learn.data.utils import (
download_file_from_google_drive,
download_file,
)
class TieredImagenet(data.Dataset):
"""
[[Source]](ht... | 139 | 42.29 | 156 | 19 | 1,517 | python | [{"finding_id": "codeql_py/tarslip_a134258fb061e133_7689d1c3", "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)."
] | [
112
] | [
null
] | [
13
] | [
25
] | |
2024-11-18T22:28:50.444182+00:00 | 1,655,398,554,000 | 58ca063c8f2944d372f5dcc97c5b0bee6915640d | 2 | {
"blob_id": "58ca063c8f2944d372f5dcc97c5b0bee6915640d",
"branch_name": "refs/heads/master",
"committer_date": 1655398554000,
"content_id": "90f46bb84293bb94344766b164e65e43bc186e9b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f2d793ac30002cf56ac072ecd616a41d916fa995",
"extension": "py"... | 2.421875 | stackv2 | import os
from flask import Flask, request
import torch
model = torch.hub.load('ultralytics/yolov5', 'yolov5s')
app = Flask(__name__)
app.config["UPLOAD_FOLDER"] = "/var/lib/homebridge"
@app.route("/", methods=["POST"])
def upload_file():
if "imageFile" not in request.files:
return "there is no imageFile... | 30 | 30.7 | 90 | 11 | 257 | python | [{"finding_id": "codeql_py/path-injection_9a4f8cd267c5987c_8c3d8923", "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", ... | 3 | true | [
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
16,
21,
22
] | [
null,
null,
null
] | [
20,
23,
19
] | [
24,
30,
26
] | |
2024-11-18T22:28:59.015607+00:00 | 1,530,057,122,000 | a50b3c78d2f7ae14376f9075c17d8be20ced860b | 3 | {
"blob_id": "a50b3c78d2f7ae14376f9075c17d8be20ced860b",
"branch_name": "refs/heads/master",
"committer_date": 1530057122000,
"content_id": "e58e24fd3bed46365e56bc0eb545ada2fe214819",
"detected_licenses": [
"MIT"
],
"directory_id": "306751e413be454938800d2dc31ea99f57cf55b3",
"extension": "py",
"fi... | 2.734375 | stackv2 | # -*- coding: utf-8 -*-
""" Update Readme.md and cumulative_gans.jpg """
from __future__ import print_function
from __future__ import division
from wordcloud import WordCloud
from wordcloud import STOPWORDS
import numpy as np
import matplotlib.pyplot as plt
import sys
import datetime
import pandas as pd
def load_data... | 145 | 33.28 | 128 | 18 | 1,294 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_41227326948188cd_9febc29c", "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... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
30,
47
] | [
31,
48
] | [
14,
14
] | [
66,
66
] | |
2024-11-18T22:29:00.340074+00:00 | 1,610,474,323,000 | 279b1c3147472af0232993ff01812c69ce4f837e | 4 | {
"blob_id": "279b1c3147472af0232993ff01812c69ce4f837e",
"branch_name": "refs/heads/main",
"committer_date": 1610474323000,
"content_id": "c9db7e6ee7c8cb9794e86b614991dbb360cf21a8",
"detected_licenses": [
"MIT"
],
"directory_id": "efe329252385fc21d27ec57f1a2e56b190c6f564",
"extension": "py",
"file... | 3.96875 | stackv2 | # Title : Multilevel Inheritance
# Author : Kiran Raj R.
# Date : 08:11:2020
class Employee:
def __init__(self, emp_id, name, basicSalary, position):
self.emp_id = emp_id
self.name = name
self.basicSalary = basicSalary
self.position = position
def print_details(self):
... | 45 | 33.64 | 109 | 12 | 413 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_08a77c727e27de27_4a90f58d", "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.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text.\nThis expression logs [sensitive data (private)]... | [
13
] | [
null
] | [
15
] | [
109
] | |
2024-11-18T22:29:03.768624+00:00 | 1,575,769,373,000 | a8e2746561045c5a93d9af78ced3594ac12dc467 | 4 | {
"blob_id": "a8e2746561045c5a93d9af78ced3594ac12dc467",
"branch_name": "refs/heads/master",
"committer_date": 1575769373000,
"content_id": "0e45870a869f104023c25b94979b3b0179e5e2c4",
"detected_licenses": [
"MIT"
],
"directory_id": "47aa41e8a5180e5d1bba8d95c9814be434d1674e",
"extension": "py",
"fi... | 4.25 | stackv2 | # - It is a six-digit number.
# - The value is within the range given in your puzzle input.
# - Two adjacent digits are the same (like 22 in 122345).
# - Going from left to right, the digits never decrease; they only ever increase or stay the same (like 111123 or 135679).
# How many different passwords in your range?
#... | 17 | 36 | 122 | 12 | 200 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b5cb5ed878fdcb59_ff3a2648", "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... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
17
] | [
null
] | [
7
] | [
45
] | |
2024-11-18T22:29:21.173792+00:00 | 1,682,013,533,000 | 8488808aff01a4d0e16a180d2cfb9d3d62461cf1 | 3 | {
"blob_id": "8488808aff01a4d0e16a180d2cfb9d3d62461cf1",
"branch_name": "refs/heads/main",
"committer_date": 1682013533000,
"content_id": "8547c137686985702b2d46fe27b2140702cf6168",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "52c6fb3dae5eda67e112ff777dcce2daa3bcc8a2",
"extension": "py",
... | 3.328125 | stackv2 | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2022, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Editor
####################################
Text-editor-like functionality for programatically manipulating raw text input
and output data and converting this data into container... | 470 | 34.32 | 124 | 19 | 3,719 | python | [{"finding_id": "codeql_py/overly-large-range_fb89664e8e68f429_f7c7d359", "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\\]."
] | [
322,
323
] | [
null,
null
] | [
62,
35
] | [
65,
38
] | |
2024-11-18T22:29:32.303184+00:00 | 1,571,676,377,000 | 37e253c8283dc9a610d0388461183a3a8c1a4dfe | 2 | {
"blob_id": "37e253c8283dc9a610d0388461183a3a8c1a4dfe",
"branch_name": "refs/heads/master",
"committer_date": 1571676377000,
"content_id": "0af109bfa51b01ecb7eab98611217cc1a26117a1",
"detected_licenses": [
"MIT"
],
"directory_id": "f5bbb77375e9245d5445d56623d4c6178f4dc507",
"extension": "py",
"fi... | 2.34375 | stackv2 | #!/usr/bin/python
"""
This script generates a simple website showing examples and an about page.
The about page is generated from README.md and the examples are a concatenation
of a description markdown file and the examples.
The "julia sources examples" are taken verbatim from the julia source code:
https://github.... | 204 | 39.48 | 115 | 16 | 2,078 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_64ce22524ea79704_0eb4a7ea", "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... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
106,
127
] | [
null,
null
] | [
21,
18
] | [
68,
65
] | |
2024-11-18T22:29:40.383534+00:00 | 1,557,222,627,000 | e29f8a1ce72b417f453722caade32ceaa62c8e61 | 3 | {
"blob_id": "e29f8a1ce72b417f453722caade32ceaa62c8e61",
"branch_name": "refs/heads/master",
"committer_date": 1557222627000,
"content_id": "25d5b5d7540914fe64f0de508681d9858e59edd6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f8c51dd9bdf6a1b0cd93dbc9255731a5efd26a61",
"extension": "py"... | 2.8125 | stackv2 |
import http.server
import json
import socketserver
import sys
import urllib
socketserver.TCPServer.allow_reuse_address = True
PORT = 8000
class GeniusHandler(http.server.BaseHTTPRequestHandler):
api_token = None
def mandar_peticion(self, query):
"""
Send a query to the Genius API/Manda pet... | 145 | 27.39 | 116 | 16 | 984 | python | [{"finding_id": "codeql_py/partial-ssrf_d0af207aea18b77b_09c47ef7", "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)."
] | [
31
] | [
null
] | [
9
] | [
50
] | |
2024-11-18T22:40:29.601115+00:00 | 1,692,453,874,000 | 89410ba6a50fffbdb414f41cef59cee874a75231 | 4 | {
"blob_id": "89410ba6a50fffbdb414f41cef59cee874a75231",
"branch_name": "refs/heads/master",
"committer_date": 1692453874000,
"content_id": "1c017bc3e68d726a5da506e64051ae99598d6c61",
"detected_licenses": [
"MIT"
],
"directory_id": "d05c946e345baa67e7894ee33ca21e24b8d26028",
"extension": "py",
"fi... | 3.78125 | stackv2 | from string import ascii_letters
import os
import random
class Hangman:
def __init__(self):
with open("./words.txt", "r") as file:
words = file.read().split("\n")
self.secret_word = random.choice(words)
self.guessed_word = "*" * len(self.secret_word)
self.incor... | 111 | 30.84 | 104 | 15 | 823 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e15d3cc3a6fc984b_a0726d17", "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."
] | [
98
] | [
null
] | [
19
] | [
59
] | |
2024-11-18T22:40:36.839933+00:00 | 1,570,671,006,000 | 2d1b7d3eceb33339f429b4aa5a7d73f529c4144d | 3 | {
"blob_id": "2d1b7d3eceb33339f429b4aa5a7d73f529c4144d",
"branch_name": "refs/heads/master",
"committer_date": 1570671006000,
"content_id": "e9e56dc152055f46b35232660f24aabbbe5c2ae9",
"detected_licenses": [
"MIT"
],
"directory_id": "8e997cc6a52c985b15bd7e07e3ed6b0cbfe62553",
"extension": "py",
"fi... | 2.59375 | stackv2 | from flask import Flask, flash, request, redirect, render_template
import os
import urllib.request
from werkzeug.utils import secure_filename
import holotalk.load_for_reconstruct as lforr
import holotalk.webcam_capture as webcam
#import sys
## insert at 1, 0 is the script path (or '' in REPL)
#sys.path.insert(1, '/hol... | 64 | 31.36 | 84 | 16 | 521 | python | [{"finding_id": "codeql_py/flask-debug_43c32b92627d4a64_2cd48b63", "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.", ... | 4 | true | [
"CWE-215",
"CWE-601",
"CWE-601",
"CWE-601"
] | [
"py/flask-debug",
"py/url-redirection",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"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.",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided ... | [
64,
35,
39,
47
] | [
null,
null,
null,
null
] | [
2,
20,
20,
20
] | [
21,
31,
31,
31
] | |
2024-11-18T22:41:23.401562+00:00 | 1,616,174,767,000 | e25621904068efeca2c2f7f12e5d5531551fa703 | 4 | {
"blob_id": "e25621904068efeca2c2f7f12e5d5531551fa703",
"branch_name": "refs/heads/master",
"committer_date": 1616174767000,
"content_id": "8ea4da5c29175b87d4bdd4dc54c82a8a09ec0e65",
"detected_licenses": [
"MIT"
],
"directory_id": "3e9afd4cf5fd9a143b1e87acada6f543481a1865",
"extension": "py",
"fi... | 3.53125 | stackv2 | """
(2)
Write a program w.r.t a csv file Phone.csv, which have the following data:-
Name Address AreaCode PhoneNo
(i) Write a function to read Name, address, Phone No and Area code to be entered from the set
of (DEL, MUM, CHE, KOL).
(ii) Write a function to find number of employees living in each areacode
(iii) Wr... | 133 | 20.66 | 95 | 15 | 736 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d6a6ada577cc2c7c_da684847", "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."
] | [
30
] | [
null
] | [
19
] | [
50
] | |
2024-11-18T22:54:15.484362+00:00 | 1,577,971,769,000 | b149cfbd7b5c7a64c4cb7822bf2724a8aafe50ef | 3 | {
"blob_id": "b149cfbd7b5c7a64c4cb7822bf2724a8aafe50ef",
"branch_name": "refs/heads/master",
"committer_date": 1577971769000,
"content_id": "35ad983d93058a145357e8896bb628c3c771675d",
"detected_licenses": [
"MIT"
],
"directory_id": "21a9ed29a474b3a87fa2a012cd9f7fd8eabc6f4f",
"extension": "py",
"fi... | 2.515625 | stackv2 | from django.shortcuts import render
from django.views import View
import json, pickle, base64
from django import http
from django_redis import get_redis_connection
from goods.models import SKU
from meiduo_mall.utils.response_code import RETCODE
# Create your views here.
class CartsSelectAllView(View):
"""购物车全选"... | 281 | 35.14 | 108 | 19 | 2,504 | python | [{"finding_id": "codeql_py/unsafe-deserialization_6cd3992bcff3af72_320b2c44", "tool_name": "codeql", "rule_id": "py/unsafe-deserialization", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Unsafe deserialization depends on a [user-provided value](1).", "remediation": "", "locatio... | 5 | true | [
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502",
"CWE-502"
] | [
"py/unsafe-deserialization",
"py/unsafe-deserialization",
"py/unsafe-deserialization",
"py/unsafe-deserialization",
"py/unsafe-deserialization"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Unsafe deserialization depends on a [user-provided value](1).",
"Unsafe deserialization depends on a [user-provided value](1).",
"Unsafe deserialization depends on a [user-provided value](1).",
"Unsafe deserialization depends on a [user-provided value](1).",
"Unsafe deserialization depends on a [user-provi... | [
48,
109,
151,
223,
272
] | [
null,
null,
null,
null,
null
] | [
42,
42,
42,
42,
42
] | [
77,
57,
77,
77,
77
] | |
2024-11-18T22:54:30.982377+00:00 | 1,593,502,231,000 | b63535a4d0eda6a851d8601141761fa8f010d3f9 | 3 | {
"blob_id": "b63535a4d0eda6a851d8601141761fa8f010d3f9",
"branch_name": "refs/heads/master",
"committer_date": 1593502231000,
"content_id": "9f248a2a6077eb4f2fbb7c8865596a736fdf21ad",
"detected_licenses": [
"MIT"
],
"directory_id": "45e51b7de12a888c38e254c44a464c2223dd684b",
"extension": "py",
"fi... | 3.015625 | stackv2 | import hashlib
from getpass import getpass
class LoginVerification:
def passwordChecker(self):
userInput = getpass()
password = hashlib.md5()
password.update(userInput.encode("utf-8"))
return password.hexdigest()
def passwordStore(self):
userPassword = "12345678"
... | 28 | 21.93 | 50 | 14 | 135 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_2b8ff4c824a401dc_cbffadd6", "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... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"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.",
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally exp... | [
8,
16
] | [
null,
null
] | [
25,
22
] | [
50,
50
] | |
2024-11-18T22:54:33.202457+00:00 | 1,401,571,108,000 | d92c1d246afdfee3afff9ba48807ccfea42420c6 | 2 | {
"blob_id": "d92c1d246afdfee3afff9ba48807ccfea42420c6",
"branch_name": "refs/heads/master",
"committer_date": 1401571108000,
"content_id": "bce1fed549a290ce8bbebfaf07af9d2224a6ddac",
"detected_licenses": [
"MIT"
],
"directory_id": "40e6f795904ef879bd1a1d12038ef88a22669def",
"extension": "py",
"fi... | 2.390625 | stackv2 | ##########################
# The blog!
##########################
from flask import (
Blueprint, render_template, abort, request, flash, make_response, redirect,
url_for
)
from jinja2 import TemplateNotFound
from markdown import markdown
import os
import imp
import time
from helpers import get_posts, get_excerpt, BLO... | 146 | 32.13 | 83 | 15 | 1,241 | python | [{"finding_id": "codeql_py/path-injection_f41cddd5023011ab_80ef51cc", "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).\nThis path depends on a [user-provided value](2).", "remed... | 3 | true | [
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).",
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).",
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).\nThis pa... | [
74,
124,
127
] | [
null,
null,
null
] | [
25,
25,
25
] | [
39,
39,
38
] | |
2024-11-18T20:55:03.925337+00:00 | 1,488,447,139,000 | 5ae07f8445df448cd5c176405d38f85a992759b0 | 2 | {
"blob_id": "5ae07f8445df448cd5c176405d38f85a992759b0",
"branch_name": "refs/heads/master",
"committer_date": 1488447139000,
"content_id": "e032498bc3adce7c1491716805899dc794132177",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "44adaa6a0a243a6123b5229a15c0b48e37ff418b",
"extension": "p... | 2.40625 | stackv2 | # -*- coding:utf-8 -*-
import codecs
import re
import pickle
local_file = r'D:\data\leak_final_20161219\correlation_final_data.txt'
output_file = codecs.open(r'D:\data\leak_final_20161219\correlation_dataset.txt', 'w', 'utf-8')
# [email_prefix, pwd, name, '\01'.join(pinyin), id, gender, username, mobile, src]
correl... | 61 | 29.26 | 100 | 12 | 599 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_02e31b26e0b30028_d531f67f", "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."
] | [
56
] | [
null
] | [
28
] | [
54
] | |
2024-11-18T21:07:39.996073+00:00 | 1,646,645,863,000 | bb256e6d73f43e437469b584bcf1fd068f6601b7 | 2 | {
"blob_id": "bb256e6d73f43e437469b584bcf1fd068f6601b7",
"branch_name": "refs/heads/master",
"committer_date": 1646645863000,
"content_id": "bfa0b94804e36d1b972cdcb1dcd5ca0d5e003eb5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "05bcc0b6b2231f840772236ade72c23c241998a1",
"extension": "py"... | 2.5 | stackv2 | import json
import argparse
import requests
from pprint import pprint
import sys
args = sys.argv
CRN = args[1]
ZONE_ID = args[2]
API_KEY = args[3]
DOMAIN_NAME = args[4]
HOST_NAME = args[5]
ACME_TOKEN = args[6]
print("CRN: %s" % CRN)
print("ZONE_ID: %s" % ZONE_ID)
print("DOMAIN_NAME: %s" % DOMAIN_NAME)
print("HOST_NA... | 75 | 25.31 | 105 | 14 | 605 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0881c84bd8cd47a5_9cece9d8", "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."
] | [
21
] | [
null
] | [
7
] | [
30
] | |
2024-11-18T21:33:01.230539+00:00 | 1,515,964,046,000 | 19bb3ec23dd0c1dcaba9116421391d60d69bf5c1 | 3 | {
"blob_id": "19bb3ec23dd0c1dcaba9116421391d60d69bf5c1",
"branch_name": "refs/heads/master",
"committer_date": 1515964046000,
"content_id": "424828f342ff10106040e48ff2797926afc1288e",
"detected_licenses": [
"MIT-0"
],
"directory_id": "6c58da2c54a3d35273e7984313d181f1da9981fc",
"extension": "py",
"... | 2.59375 | stackv2 | from flask import Flask, request, redirect, render_template, session, flash, url_for
from mysqlconnection import MySQLConnector
from flask_bcrypt import Bcrypt
import re
EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9\.\+_-]+@[a-zA-Z0-9\._-]+\.[a-zA-Z]*$')
PASS_REGEX = re.compile(r'\d.*[A-Z]|[A-Z].*\d')
app = Flask(__name__)
b... | 165 | 38.15 | 172 | 19 | 1,459 | python | [{"finding_id": "codeql_py/flask-debug_a350cd4f52f31da8_255dec9d", "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.", ... | 3 | true | [
"CWE-215",
"CWE-1333",
"CWE-1333"
] | [
"py/flask-debug",
"py/polynomial-redos",
"py/polynomial-redos"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"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 [regular expression](1) that depends on a [user-provided value](2) may run slow on strings starting with '9' and with many repetitions of '9'.\nThis [regular expression](3) that depends on ... | [
165,
74,
105
] | [
null,
null,
null
] | [
null,
31,
28
] | [
20,
39,
36
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.