added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T20:18:17.784357+00:00 | 1,609,288,739,000 | fe9910aa89d01726143faa00b1defe669ed7aab2 | 2 | {
"blob_id": "fe9910aa89d01726143faa00b1defe669ed7aab2",
"branch_name": "refs/heads/master",
"committer_date": 1609288739000,
"content_id": "d6b2bbb70b181f02beaf910c38c33f4689131309",
"detected_licenses": [
"MIT"
],
"directory_id": "b7fd04933699381a1920a92bbfd366c7c37e8870",
"extension": "py",
"fi... | 2.34375 | stackv2 | import asyncio
import re
import discord
import logging
from discord.ext import commands
from config.discord import *
from config.langcheck import *
from connectors.connector_common import *
from storage.discord import DiscordTrainingDataManager
from common.discord import DiscordHelper
from spacy.tokens import Doc
fro... | 224 | 43.68 | 177 | 20 | 2,047 | python | [{"finding_id": "codeql_py/overly-large-range_17476fbdcc1fb383_b7a396a2", "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\\\\[\\\\\\\\]^_\\]."
] | [
29
] | [
null
] | [
60
] | [
63
] | |
2024-11-18T20:31:42.750402+00:00 | 1,498,624,185,000 | 8882f5f773f772a6a9e23798e5dca54c64a3df1a | 2 | {
"blob_id": "8882f5f773f772a6a9e23798e5dca54c64a3df1a",
"branch_name": "refs/heads/master",
"committer_date": 1498624185000,
"content_id": "cb76039b9f14ab7936bd9ab34667ed66bd5cc8fa",
"detected_licenses": [
"MIT"
],
"directory_id": "e310788542529289ce7f3e90f39dd17a8eff6cea",
"extension": "py",
"fi... | 2.328125 | stackv2 | #! /usr/bin/env python
from os import environ
from io import BytesIO, StringIO
from tempfile import tempdir
import mimerender
from flask import Flask, make_response, request, Response
from jinja2 import Environment
from xhtml2pdf import pisa
api = Flask(__name__)
mimerender.register_mime('pdf', ('application/pdf',))... | 44 | 24.5 | 75 | 13 | 286 | python | [{"finding_id": "codeql_py/template-injection_9d20e3cef5569b79_a5b0000e", "tool_name": "codeql", "rule_id": "py/template-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This template construction depends on a [user-provided value](1).", "remediation": "", "location": ... | 3 | true | [
"CWE-074",
"CWE-215",
"CWE-079"
] | [
"py/template-injection",
"py/flask-debug",
"py/jinja2/autoescape-false"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This template construction depends on a [user-provided value](1).",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
39,
44,
39
] | [
null,
null,
null
] | [
38,
5,
12
] | [
46,
25,
25
] | |
2024-11-18T20:43:19.310873+00:00 | 1,572,510,057,000 | 040e87010a79ca24d635d094dfd0d22eba9fe6bf | 3 | {
"blob_id": "040e87010a79ca24d635d094dfd0d22eba9fe6bf",
"branch_name": "refs/heads/master",
"committer_date": 1572510057000,
"content_id": "e3167cf9b77fa92bbbe9f69c315aaa25e1fe525e",
"detected_licenses": [
"MIT"
],
"directory_id": "8993ef68e76e7a24ae4adbbfb7ff325f7ae79503",
"extension": "py",
"fi... | 2.609375 | stackv2 | import requests
import json
def login(User_account,User_password):
url1 = "http://www.revth.com:12300/auth/login"
# url2 = "http://www.revth.com:12300/auth/validate"
headers1 = {
"Content-Type": 'application/json',
}
form_data = {
"username": User_account,
"password": User_... | 125 | 23.61 | 98 | 11 | 828 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f8e7be6d8ab56e54_757e7041", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
15,
36,
56,
78
] | [
null,
null,
null,
null
] | [
16,
16,
16,
16
] | [
99,
97,
69,
97
] | |
2024-11-18T20:43:27.807243+00:00 | 1,333,656,916,000 | 5931478dcd7e4f7cfd18736eec0931bc8b8cf28b | 2 | {
"blob_id": "5931478dcd7e4f7cfd18736eec0931bc8b8cf28b",
"branch_name": "refs/heads/master",
"committer_date": 1333656916000,
"content_id": "0060ef9641c3602c32096b38823079b29607ce20",
"detected_licenses": [
"MIT"
],
"directory_id": "a018fdd7364e653d031b4ea040d8184641073304",
"extension": "py",
"fi... | 2.328125 | stackv2 | import os
import md5
import logging
import traceback
import tornado.ioloop
import tornado.web
import tornado.options
from tornado.curl_httpclient import CurlAsyncHTTPClient
from tornado import gen
import brukva
settings = dict(
template_path=os.path.join(os.path.dirname(__file__), "templates"),
... | 69 | 33.67 | 113 | 20 | 537 | python | [{"finding_id": "codeql_py/log-injection_2d38ac38e3885e1a_2e82f480", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
35,
47
] | [
null,
null
] | [
22,
31
] | [
46,
83
] | |
2024-11-18T20:43:56.159844+00:00 | 1,625,225,803,000 | ba1d7ff29566dafdc3354530ee0ac6ade6b2c718 | 2 | {
"blob_id": "ba1d7ff29566dafdc3354530ee0ac6ade6b2c718",
"branch_name": "refs/heads/master",
"committer_date": 1625225803000,
"content_id": "a825017a1a8c4602de5b20c47047acfbfccd6ece",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8a51f25fab9a08aa3e828310ed7fced0c97e6bdd",
"extension": "py"... | 2.453125 | stackv2 | #!/usr/bin/env python
# disable SSL verification
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
import json
import requests
import argparse
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
from requests.packages.urllib3.exceptions import InsecureRequest... | 109 | 33.8 | 83 | 20 | 969 | python | [{"finding_id": "codeql_py/request-without-cert-validation_44335dc850bc6a3e_a0506c47", "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]... | 6 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
32,
36,
42,
48,
54,
60
] | [
null,
null,
null,
null,
null,
null
] | [
11,
11,
11,
11,
11,
11
] | [
61,
70,
61,
61,
61,
61
] | |
2024-11-18T20:43:58.224083+00:00 | 1,552,049,455,000 | 984ed77119f80a87bded845e9bde16f93b65b344 | 2 | {
"blob_id": "984ed77119f80a87bded845e9bde16f93b65b344",
"branch_name": "refs/heads/master",
"committer_date": 1552049455000,
"content_id": "ee6615e41edac2927948307586c492b6cfe8e2cd",
"detected_licenses": [
"MIT"
],
"directory_id": "0603554b945a1c37e8a9449749cb70184334b529",
"extension": "py",
"fi... | 2.46875 | stackv2 | from flask import Flask,request
from example import persamaankata
import json, time
app = Flask(__name__)
pk = persamaankata()
@app.route('/')
def hello_world():
return 'its work!'
@app.route('/search')
def search():
try:
start = time.time()
text = request.args.get('kata', default = 'belajar', type = s... | 26 | 23.88 | 71 | 14 | 185 | python | [{"finding_id": "codeql_py/stack-trace-exposure_8049dde777d2e831_57269472", "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."
] | [
23
] | [
null
] | [
11
] | [
26
] | |
2024-11-18T20:44:09.303980+00:00 | 1,693,274,073,000 | 9a62df765fe3f88769cd07dea361f0d2eef7c56d | 2 | {
"blob_id": "9a62df765fe3f88769cd07dea361f0d2eef7c56d",
"branch_name": "refs/heads/master",
"committer_date": 1693274073000,
"content_id": "f280ebd61c401c557623f565cfc4b490208c8c6e",
"detected_licenses": [
"MIT"
],
"directory_id": "3b6bc1eb4ef32c1f683730119ceb1c27a732f955",
"extension": "py",
"fi... | 2.421875 | stackv2 | import socket
import datetime
import ssl
from textwrap import dedent
from collections import namedtuple
from ramjet.engines import ioloop, thread_executor
from ramjet.utils import send_alert
from .base import logger as monitor_logger
_SiteConf = namedtuple("_SiteConf", ["domain", "check_ssl"])
ALERT_RECEIVERS = ["p... | 94 | 23.64 | 79 | 11 | 553 | python | [{"finding_id": "codeql_py/insecure-protocol_5da691734f0f7730_034edf83", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.create_default_context](1)."
] | [
75
] | [
null
] | [
12
] | [
19
] | |
2024-11-18T20:44:10.269506+00:00 | 1,344,203,292,000 | 3132f3e8e53799b4020c87de7a3fd3b9070a53ef | 3 | {
"blob_id": "3132f3e8e53799b4020c87de7a3fd3b9070a53ef",
"branch_name": "refs/heads/master",
"committer_date": 1344203292000,
"content_id": "b1705a8901316c602f792ad81707e6f47c791d83",
"detected_licenses": [
"MIT"
],
"directory_id": "dacad4eda33ffbf3b238f3b0f5be8315c26da8a3",
"extension": "py",
"fi... | 2.84375 | stackv2 | # Dan Girshovich
# TODO: convert to javascript if time
import sys
import json
import re
lookup = None
with open('scripts/tranzlator.json', 'r') as f:
lookup = json.loads(f.read())
def lolify_word(matchobj):
english_word = matchobj.group(0)
if english_word.lower() in lookup:
lolspeak_word = lookup... | 30 | 26.43 | 72 | 14 | 221 | python | [{"finding_id": "codeql_py/overly-large-range_e460b40f086baee0_25cd76d5", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
23
] | [
null
] | [
24
] | [
27
] | |
2024-11-18T20:57:34.369634+00:00 | 1,689,178,839,000 | e668541f8581cecbdac56d8217f392be952c15d6 | 3 | {
"blob_id": "e668541f8581cecbdac56d8217f392be952c15d6",
"branch_name": "refs/heads/master",
"committer_date": 1689178839000,
"content_id": "fb05e8fc7967757d56c7301db5fba1cf43266655",
"detected_licenses": [
"MIT"
],
"directory_id": "4219ac05c8abaf124a5cac87c53167dcd81cd6b2",
"extension": "py",
"fi... | 2.65625 | stackv2 | import json
import logging
from typing import List
import os
import warnings
import configparser
import snowflake.connector
from sqlalchemy import create_engine
class InvalidMethodException(Exception):
pass
class SnowConn:
_alchemy_engine = None
_connection = None
_raw_connection = None
def __... | 390 | 36.29 | 153 | 17 | 3,005 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ac53aa72888a7b3f_8619e001", "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.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text."
] | [
197
] | [
198
] | [
17
] | [
60
] | |
2024-11-18T20:57:41.166401+00:00 | 1,662,468,155,000 | 0777a59490d3166afd98a12f6e2c09a24df47f3e | 2 | {
"blob_id": "0777a59490d3166afd98a12f6e2c09a24df47f3e",
"branch_name": "refs/heads/master",
"committer_date": 1662468155000,
"content_id": "9cfa10a0e571caddcec0eceb7570a2fdbcf7a0fa",
"detected_licenses": [
"MIT"
],
"directory_id": "9b77c1888392750ca312015381531663ebf791e7",
"extension": "py",
"fi... | 2.375 | stackv2 | from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
import logging
logger = logging.getLogger(__name__)
import eventlet
import socketio
sio = socketio.Server()
app = socketio.WSGIApp(sio)
argparser = ArgumentParser(
description='Start the socket.io-humber-broker server.',
formatter_class=Arg... | 61 | 18.98 | 70 | 11 | 317 | python | [{"finding_id": "codeql_py/log-injection_60dc69088c5a9306_6328aba2", "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)."
] | [
32
] | [
null
] | [
17
] | [
58
] | |
2024-11-18T20:58:05.386427+00:00 | 1,683,010,623,000 | 3b0ed7ae2061d7f838145fe2efd7b9a699863615 | 2 | {
"blob_id": "3b0ed7ae2061d7f838145fe2efd7b9a699863615",
"branch_name": "refs/heads/master",
"committer_date": 1683010623000,
"content_id": "ef0762752bc606508f7f3d978abea0a6b726312b",
"detected_licenses": [
"MIT"
],
"directory_id": "509729599dfc36f08a7e092b01010125f19f3782",
"extension": "py",
"fi... | 2.390625 | stackv2 | from jinja2.loaders import FileSystemLoader
import jinja2
from latex.jinja2 import make_env
from latex import build_pdf
import yaml
import os
import glob
import markdown
def read_dir(directory):
"""
Read all yaml files in a directory
"""
dictionaries = []
for f in glob.glob("{}/*yml".format(directo... | 176 | 38.49 | 87 | 16 | 1,473 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_0092d8ccb2aba08d_973deee5", "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."
] | [
110
] | [
null
] | [
20
] | [
61
] | |
2024-11-18T20:58:10.193122+00:00 | 1,636,825,371,000 | 1a84b52330c6292cc3f7227b1c061449ca666c72 | 2 | {
"blob_id": "1a84b52330c6292cc3f7227b1c061449ca666c72",
"branch_name": "refs/heads/master",
"committer_date": 1636825371000,
"content_id": "4674d4bb9397ba2eb08b2837a6194f2b31f2812e",
"detected_licenses": [
"MIT"
],
"directory_id": "0958cdf5aa308638e59f89d0fbe4e4af33d4fb8b",
"extension": "py",
"fi... | 2.5 | stackv2 | import os
import jinja2
from flask import Blueprint, request, render_template
template_env = jinja2.Environment(loader=jinja2.FileSystemLoader(os.getcwd()))
algorithms_handler_bp = Blueprint('algorithms_handler', __name__)
def route_algorithms():
"""
**route_algorithms**
:return:
"""
# Load s... | 80 | 24.05 | 78 | 11 | 498 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f9df7b711b969b57_700a5a8b", "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."
] | [
4
] | [
null
] | [
16
] | [
79
] | |
2024-11-18T20:58:20.026012+00:00 | 1,530,807,459,000 | ce9d8cb3d4c79430ff9da2e9fbe409168b8aab00 | 3 | {
"blob_id": "ce9d8cb3d4c79430ff9da2e9fbe409168b8aab00",
"branch_name": "refs/heads/master",
"committer_date": 1530807459000,
"content_id": "059840344ba84652d4f424f053e22c3d003c34a4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b18cae64f471163431f33938a49e7871186cc400",
"extension": "py"... | 2.625 | stackv2 | # -*- coding: utf-8 -*-
# Copyright 2017, A10 Networks
# Author: Mike Thompson: @mike @t @a10@networks!com
#
import os, sys, re, requests
import time
HOST = os.environ['HM_SRV_IPADDR']
PORT = int(os.environ['HM_SRV_PORT'])
#HTTP Config
METHOD = "GET"
URI = "/"
PAYLOAD = None
RESPONSE_CODE = 200
DATA = None
#SSL Conf... | 93 | 27.48 | 94 | 13 | 726 | python | [{"finding_id": "codeql_py/request-without-cert-validation_7900dbe9b16342c1_39e8f74c", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2)."
] | [
50,
52
] | [
null,
null
] | [
16,
16
] | [
52,
64
] | |
2024-11-18T21:10:11.858832+00:00 | 1,611,171,701,000 | 2af49d1003ad187fb85ff851a8f623b0b72bf99b | 3 | {
"blob_id": "2af49d1003ad187fb85ff851a8f623b0b72bf99b",
"branch_name": "refs/heads/master",
"committer_date": 1611171701000,
"content_id": "334b97ecdf7b70de5e296566d912601f3e1f6ea6",
"detected_licenses": [
"MIT"
],
"directory_id": "d1b09c2a290ab799dcf9f9b7c0f2f5f71e309048",
"extension": "py",
"fi... | 2.78125 | stackv2 | from Crypto.Cipher import AES
import binascii
import json
# Padding for the input string --not
# related to encryption itself.
BLOCK_SIZE = 16 # Bytes
def pad(s):
return (
s +
(BLOCK_SIZE - len(s) % BLOCK_SIZE) *
chr(BLOCK_SIZE - len(s) % BLOCK_SIZE)
)
def unpad(s):
return s[:... | 76 | 23.82 | 67 | 16 | 433 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_804987c5e7fb2a77_a17eff65", "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."
] | [
37,
41
] | [
null,
null
] | [
22,
16
] | [
61,
55
] | |
2024-11-18T21:10:17.407627+00:00 | 1,645,631,279,000 | f8806d2d7139f5b0f12f4c7849af2cf2fa274a2a | 2 | {
"blob_id": "f8806d2d7139f5b0f12f4c7849af2cf2fa274a2a",
"branch_name": "refs/heads/master",
"committer_date": 1645631279000,
"content_id": "7dff2e90c3aa9d03bd8e00c8143c352535ab79be",
"detected_licenses": [
"MIT"
],
"directory_id": "224f5ba02e91f1202ea9ee355c0ffcc11f3cefcf",
"extension": "py",
"fi... | 2.390625 | stackv2 | from flask import Flask, request, json, abort, render_template
from redis import StrictRedis
app = Flask(__name__, static_url_path='')
redis = StrictRedis(host='localhost', port=6379, db=0)
@app.route('/', methods=['GET'])
def index():
return render_template('index.html')
@app.route('/views/<log>', methods=['G... | 114 | 24.54 | 120 | 19 | 714 | python | [{"finding_id": "codeql_py/stack-trace-exposure_e2362f6a7dd5237a_cfa52121", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-215",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"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)."
] | [
70,
114,
31
] | [
null,
null,
null
] | [
16,
5,
12
] | [
22,
24,
15
] | |
2024-11-18T21:10:24.690056+00:00 | 1,403,603,571,000 | bc657a3d9f9508a042e13a1e8b8ac8310a2c784e | 3 | {
"blob_id": "bc657a3d9f9508a042e13a1e8b8ac8310a2c784e",
"branch_name": "refs/heads/master",
"committer_date": 1403603571000,
"content_id": "ecf138b3a1b0a0354c3df50d2d6f6cd6d0cde96e",
"detected_licenses": [],
"directory_id": "98fcdf615f5c49b16da5f3d18618866ea6e0342d",
"extension": "py",
"filename": "loc... | 2.84375 | stackv2 | from contextlib import contextmanager
from errno import EACCES, EAGAIN
from fcntl import lockf, LOCK_NB
import os
import socket
def openlock(filename, operation, wait=True):
"""
Returns a file-like object that gets a fnctl() lock.
`operation` should be one of LOCK_SH or LOCK_EX for shared or
exclusiv... | 51 | 29.45 | 79 | 18 | 383 | python | [{"finding_id": "codeql_py/overly-permissive-file_f444a0a2d14bb9eb_d2b417e5", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world writable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world writable."
] | [
18
] | [
null
] | [
19
] | [
66
] | |
2024-11-18T21:10:26.957237+00:00 | 1,503,848,883,000 | f1e3ece544ea8bf7d2c3c007bf71473d67b3271d | 2 | {
"blob_id": "f1e3ece544ea8bf7d2c3c007bf71473d67b3271d",
"branch_name": "refs/heads/master",
"committer_date": 1503848883000,
"content_id": "d890c6bb69cc1ddca4ebdbcea9e6fff67f25a6e9",
"detected_licenses": [
"MIT"
],
"directory_id": "6ce4a055d93dbc100bab2b14dcb5850e515262a5",
"extension": "py",
"fi... | 2.421875 | stackv2 | import importlib
import settings
import boto3
import json
import requests
import logging
from flask import Flask, request
from flask_cors import CORS
from collections import OrderedDict
application = Flask(__name__)
app = application
CORS(app)
def main():
logging.basicConfig(filename="waylon-fuse.log",
... | 162 | 30.22 | 92 | 18 | 1,141 | python | [{"finding_id": "codeql_py/flask-debug_478e7d2622d465d1_3beae78e", "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-117",
"CWE-117",
"CWE-117"
] | [
"py/flask-debug",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This 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)."
] | [
26,
38,
43,
154
] | [
null,
null,
null,
null
] | [
5,
19,
23,
23
] | [
64,
88,
68,
84
] | |
2024-11-18T21:10:33.996595+00:00 | 1,685,645,869,000 | 60f75a3cc93c9267c2402f83f4b749702c5d4b5a | 3 | {
"blob_id": "60f75a3cc93c9267c2402f83f4b749702c5d4b5a",
"branch_name": "refs/heads/master",
"committer_date": 1685645869000,
"content_id": "c491aab6537ad79a82240db0cca4f97487d9440c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3588ccbb77995a91291cc979ea5df44496339678",
"extension": "p... | 2.5625 | stackv2 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2017-2023, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# --------------------------... | 74 | 33.05 | 78 | 17 | 537 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3b3caa12b5a372c7_2f344cc4", "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."
] | [
60
] | [
61
] | [
11
] | [
70
] | |
2024-11-18T21:10:48.218531+00:00 | 1,596,584,671,000 | 82cfc7438b908ff19e39821e36af71549606d0c3 | 3 | {
"blob_id": "82cfc7438b908ff19e39821e36af71549606d0c3",
"branch_name": "refs/heads/master",
"committer_date": 1596584671000,
"content_id": "46db3db5cc8140052aa95d4c8ce4134e7b8a483d",
"detected_licenses": [
"Unlicense"
],
"directory_id": "336baecad208e0d37dac77edd35d28885ed3733a",
"extension": "py",... | 2.78125 | stackv2 | import re
import sys
import requests as r
import json
import os
from argparse import ArgumentParser
import sys
__version__ = "1.0"
def download(url: str, filename: str, bar: bool = False) -> str:
"""Download a file from the internet.
Args:
url (str): URL of file
filename (str): Desired name ... | 193 | 32.12 | 155 | 20 | 1,497 | python | [{"finding_id": "codeql_py/bad-tag-filter_32b5ff08a9a7d9f9_3af8d409", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match upper case <SCRIPT> tags.", "remediation": "", "location": {"file_path": ... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match upper case <SCRIPT> tags."
] | [
64
] | [
null
] | [
32
] | [
56
] | |
2024-11-18T21:11:01.040704+00:00 | 1,624,529,550,000 | f02cca2b9d94a538712b79d187f5316f59699f63 | 3 | {
"blob_id": "f02cca2b9d94a538712b79d187f5316f59699f63",
"branch_name": "refs/heads/main",
"committer_date": 1624529550000,
"content_id": "c4ebe3d411690cac144eb76616f68e019c942469",
"detected_licenses": [
"MIT"
],
"directory_id": "efec5b534b46f7d6bdd2a5098738523a6a003e18",
"extension": "py",
"file... | 2.609375 | stackv2 | import math
from datetime import datetime
import statistics as stat
from scipy.signal import find_peaks
from scipy.stats import pearsonr
from flask import Flask, request
from flask_cors import CORS, cross_origin
from joblib import load
app = Flask(__name__)
cors = CORS(app, resources={r"*": {"origins": "*"}})
app.co... | 150 | 20.43 | 81 | 14 | 867 | python | [{"finding_id": "codeql_py/flask-debug_62a51bb1f46e95e4_29d502d4", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
150,
104
] | [
null,
null
] | [
5,
15
] | [
51,
50
] | |
2024-11-18T21:11:15.573769+00:00 | 1,542,462,115,000 | 52934da55b94cf460e5c6c6b2e6d4e1ce9c05d5b | 3 | {
"blob_id": "52934da55b94cf460e5c6c6b2e6d4e1ce9c05d5b",
"branch_name": "refs/heads/master",
"committer_date": 1542462115000,
"content_id": "14cc0363029bf7a7cf7304c37ce4a1adf5ff0e63",
"detected_licenses": [
"MIT"
],
"directory_id": "8f008baf1100842882a5724cc8fbbad66c414c7b",
"extension": "py",
"fi... | 2.734375 | stackv2 | """OAuth2Manager class definition.
Copyright 2017 by Doug Mahugh. All Rights Reserved.
Licensed under the MIT License."""
import json
import os
import pprint
import time
import urllib.parse
import uuid
from bottle import redirect, request
import requests
class OAuth2Manager(object): #--------------------------------... | 406 | 42.26 | 86 | 22 | 3,513 | python | [{"finding_id": "codeql_py/request-without-cert-validation_40066c04a7f6ab20_c785cda5", "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) by [this value](2)."
] | [
323
] | [
325
] | [
16
] | [
59
] | |
2024-11-18T19:03:18.529249+00:00 | 1,558,900,465,000 | 9afa6cd5b1b863318a409408101396cf036f8f84 | 3 | {
"blob_id": "9afa6cd5b1b863318a409408101396cf036f8f84",
"branch_name": "refs/heads/master",
"committer_date": 1558900465000,
"content_id": "ddb722af527f461da7704dea1735d6572bbd2b15",
"detected_licenses": [
"MIT"
],
"directory_id": "466adfb82b8c574340736876e320063113fe809d",
"extension": "py",
"fi... | 2.515625 | stackv2 | #! /usr/bin/env python3
"""
Pulls artifacts from external repo using branches defined in branchConfig.yaml
file.
Run the script with -h flag to learn about script's running options.
"""
__author__ = "Michal Cwiertnia"
__copyright__ = "Copyright (C) 2018 ACK CYFRONET AGH"
__license__ = "This software is released under ... | 82 | 33.39 | 78 | 17 | 531 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_6f5f72f4abaff56d_3070e192", "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."
] | [
53
] | [
null
] | [
5
] | [
53
] | |
2024-11-18T19:03:41.377928+00:00 | 1,568,044,766,000 | cac5e2f0a597dec055652d455dcc90add07e7a1f | 3 | {
"blob_id": "cac5e2f0a597dec055652d455dcc90add07e7a1f",
"branch_name": "refs/heads/master",
"committer_date": 1568050814000,
"content_id": "03891400a994909c7c07ef23cb28e63f538cc3e9",
"detected_licenses": [
"MIT"
],
"directory_id": "31d7e86a9283970b7154cb4e49dae176eea906a9",
"extension": "py",
"fi... | 2.515625 | stackv2 | import datetime
import json
import os
import xmltodict
from yahoo_oauth import OAuth2
from application import redis_store
def build_standings_list(week=1, load_oauth_from_redis=True, write_oauth_to_redis=True):
if load_oauth_from_redis:
oauth = redis_store.get('oauth')
if not oauth:
... | 74 | 30.38 | 118 | 18 | 572 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c3e2bb2a22fdfd46_89bb9af9", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text."
] | [
18
] | [
null
] | [
22
] | [
43
] | |
2024-11-18T19:28:36.044820+00:00 | 1,574,277,268,000 | 5524b6839d3322af93f2ee7edfd630ca72e355d0 | 2 | {
"blob_id": "5524b6839d3322af93f2ee7edfd630ca72e355d0",
"branch_name": "refs/heads/master",
"committer_date": 1574277268000,
"content_id": "6452ee5c16d34b112ea7c82d7f0a6a73c9d85174",
"detected_licenses": [
"MIT"
],
"directory_id": "4ba9b217cb43d7c2e4844cd70f42e5d7fe9f4d0e",
"extension": "py",
"fi... | 2.453125 | stackv2 | from decouple import config
from flask import Flask, render_template, request, redirect
from praw import Reddit
from urllib.parse import quote_plus
"""
Usually the url is formatted like this:
baseurl/prediction - it has GET capability
baseurl/user - it has GET/POST capability
baseurl/article - it has GET/POST/PUT cap... | 86 | 22.14 | 126 | 14 | 486 | python | [{"finding_id": "codeql_py/url-redirection_3b6f7899e606afab_d07a6ab6", "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).\nUntrusted URL redirection depends on a ... | 1 | true | [
"CWE-601"
] | [
"py/url-redirection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).\nUntrusted URL redirection depends on a [user-provided value](2).\nUntrusted URL redirection depends on a [user-provided value](3)."
] | [
33
] | [
null
] | [
25
] | [
126
] | |
2024-11-18T19:28:42.697143+00:00 | 1,528,433,366,000 | c1dab068c4bcb636d6f73967b1cc74a74771e6c0 | 3 | {
"blob_id": "c1dab068c4bcb636d6f73967b1cc74a74771e6c0",
"branch_name": "refs/heads/master",
"committer_date": 1528433366000,
"content_id": "2dcd5fb2b680d03339ab6c011d1351ff3969ef40",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ccf2021b3ac5171c463b9b40fda9fb1eabfd9e87",
"extension": "py"... | 2.515625 | stackv2 | import os
import re
import fasteners
lock_file = os.path.join(os.sep, 'etc', 'pyswitchlib', '.pyswitchlib_config_file.lock')
class ConfigFileUtil(object):
"""
This is an auto-generated class for the PySwitchLib device asset.
Asset provides connection information for PySwitchLib APIs.
"""
def __in... | 66 | 29.91 | 95 | 23 | 431 | python | [{"finding_id": "codeql_py/overly-permissive-file_434a9687a373cfc1_b148c010", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world writable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world writable."
] | [
21
] | [
null
] | [
32
] | [
83
] | |
2024-11-18T19:28:56.955539+00:00 | 1,611,079,260,000 | 346e66ed10c85a6bfac974c4228311de2ab30890 | 2 | {
"blob_id": "346e66ed10c85a6bfac974c4228311de2ab30890",
"branch_name": "refs/heads/master",
"committer_date": 1611079260000,
"content_id": "d90b171807e2b572ae0e214c120ca32563c048f0",
"detected_licenses": [
"MIT"
],
"directory_id": "f194d4bf9dadaeeb551a2ef308996f1e980809a7",
"extension": "py",
"fi... | 2.328125 | stackv2 | import argparse, re, requests, concurrent.futures, sys, time, mmh3, codecs
from terminaltables import AsciiTable as table
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
def create_table(rows):
t = table(rows,"")
t.inner_colum... | 174 | 36.36 | 150 | 20 | 1,888 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9c235d07e80cc3c9_35085969", "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)."
] | [
13,
16,
57
] | [
null,
null,
null
] | [
9,
8,
11
] | [
67,
81,
83
] | |
2024-11-18T19:28:57.342574+00:00 | 1,688,987,977,000 | a888c0c429f78fabdb16dac389077ad7e644ba46 | 3 | {
"blob_id": "a888c0c429f78fabdb16dac389077ad7e644ba46",
"branch_name": "refs/heads/master",
"committer_date": 1688987977000,
"content_id": "5331ad2e0380bc57fa38d091cbe200c77721d9b4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c5a88b6a7ed973062370aa7e975c62fd97257e29",
"extension": "py"... | 2.84375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from finnish_toolkit import helper,firebase_key
from finnish_toolkit import finnish_keywords as keywords
from os import listdir,remove
from pprint import pprint
import string
import nltk
import re
import datetime
import pyrebase
wordcount = {}
#Load keywords and stopwords... | 207 | 27.87 | 136 | 17 | 1,503 | python | [{"finding_id": "codeql_py/overly-large-range_3e4e1710492bfaca_935d6752", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\w in the same character class.", "remediation": "", "loc... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\w in the same character class."
] | [
163
] | [
null
] | [
25
] | [
28
] | |
2024-11-18T19:28:59.314527+00:00 | 1,560,846,380,000 | 300a3e7334fb26dda41112373773fe479311f13b | 3 | {
"blob_id": "300a3e7334fb26dda41112373773fe479311f13b",
"branch_name": "refs/heads/master",
"committer_date": 1560846380000,
"content_id": "27b93a7f66e734a8fc50b0d8c0a1dc94e0d10428",
"detected_licenses": [
"MIT"
],
"directory_id": "629a27b449a2dcedbd4c03f83646b6088ebbe1dd",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python
import os
from http.server import *
from http.client import *
import ssl
from socketserver import ThreadingMixIn
import threading
import time
import re
import urllib
import json
import gzip
import datetime
import fakeapi
import sys
import getopt
SERVER_HOST="localhost"
CHANNEL_ID="12345678"
urlp... | 288 | 31.56 | 120 | 17 | 2,201 | python | [{"finding_id": "codeql_py/path-injection_ac9381022061a052_46594a8f", "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)."
] | [
144,
145
] | [
null,
null
] | [
27,
33
] | [
36,
42
] | |
2024-11-18T19:39:33.537393+00:00 | 1,557,312,164,000 | 30ea1386984f1c922eb6e83d7e0f435edf15cf74 | 3 | {
"blob_id": "30ea1386984f1c922eb6e83d7e0f435edf15cf74",
"branch_name": "refs/heads/master",
"committer_date": 1557312164000,
"content_id": "a61a4e928a41ebea3001c5c67d74408d13057c04",
"detected_licenses": [
"MIT"
],
"directory_id": "f053e0db7e7e456a45c10e2942b9b63db751c153",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask
from engine import Fishnet
from flask import send_file
from flask import request
import chess
import json
app = Flask(__name__)
engine = Fishnet('fishnet-data/')
board = chess.Board()
@app.route('/reset')
def reset_board():
board.reset()
print('RESET')
return 'for the emperor'
@app.route(... | 52 | 18.98 | 54 | 11 | 260 | python | [{"finding_id": "codeql_py/path-injection_23ee384adbecb8ef_21f9b133", "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)."
] | [
32,
36,
40
] | [
null,
null,
null
] | [
19,
19,
19
] | [
31,
54,
32
] | |
2024-11-18T19:39:36.985137+00:00 | 1,691,154,790,000 | 115c3401c4344076a71e4aac67996d685b1882b4 | 3 | {
"blob_id": "115c3401c4344076a71e4aac67996d685b1882b4",
"branch_name": "refs/heads/master",
"committer_date": 1691154790000,
"content_id": "809a322dc8d275ce63c4af4fd9a930c46042a2e1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4491549f0b1bbf5397ae0b56192605a7abcb61b0",
"extension": "py"... | 2.53125 | stackv2 | from flask import Flask, request, render_template
import re
app = Flask(__name__, static_url_path = '/static', static_folder = 'static')
app.config['DEBUG'] = True
@app.route("/")
def start():
return render_template("index.html")
@app.route("/verify_email", methods = ['POST'])
def regex():
email = request.fo... | 28 | 26.29 | 124 | 13 | 222 | python | [{"finding_id": "codeql_py/redos_1de3b50cb6e1e86a_23ba62ed", "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 '0' and containing many repetition... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/polynomial-redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '0' and containing many repetitions of '0'.",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings starting with '0' and with many repetitions of '0'."
] | [
14,
14
] | [
null,
null
] | [
39,
114
] | [
46,
124
] | |
2024-11-18T19:39:52.479866+00:00 | 1,684,483,773,000 | 1165ce7a617e90fc9e868ac20005c6ff8723054e | 3 | {
"blob_id": "1165ce7a617e90fc9e868ac20005c6ff8723054e",
"branch_name": "refs/heads/main",
"committer_date": 1684483773000,
"content_id": "0e7bbf04ceb41e48d0a58809090b1197f78d15a8",
"detected_licenses": [
"MIT"
],
"directory_id": "84b38733488aff544c462f62a9fe5f0236b19d2f",
"extension": "py",
"file... | 2.578125 | stackv2 | from pathlib import Path
from typing import Optional
from jinja2 import Template
from pydantic import validator
from spekulatio import Model
from .input_dir import InputDir
from .attribute_file import AttributeFile
from .transformation import Transformation
class Node(Model):
# path information
input_path: ... | 141 | 29.01 | 105 | 16 | 933 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1833cb396f2f3874_6b6aafb8", "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."
] | [
83,
86
] | [
null,
null
] | [
24,
24
] | [
68,
74
] | |
2024-11-18T20:18:00.621100+00:00 | 1,563,463,825,000 | 546e70e41ef29251a861eced7608539fae6cce91 | 3 | {
"blob_id": "546e70e41ef29251a861eced7608539fae6cce91",
"branch_name": "refs/heads/master",
"committer_date": 1563463825000,
"content_id": "871628e733b5d95fd5b39212ad4aebb6ade00c02",
"detected_licenses": [
"MIT"
],
"directory_id": "e2d0b85e32f568ec8db415e5d0fe6b4a023de123",
"extension": "py",
"fi... | 2.578125 | stackv2 | from flask import Flask,render_template,request,jsonify
import random
import string
app = Flask(__name__)
@app.route('/')
def root():
return app.send_static_file("index.html")
@app.route('/upload')
def upload():
f=request.files['file']
chars=string.ascii_letters
size=10
filename=''.join(random.ch... | 32 | 20.75 | 63 | 12 | 175 | python | [{"finding_id": "codeql_py/flask-debug_1d88636e26aac9db_280e602f", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
32,
19
] | [
null,
null
] | [
4,
12
] | [
25,
38
] | |
2024-11-18T20:18:29.848892+00:00 | 1,584,681,179,000 | 2c2f9cac99dd8553f7a0098c883f0d3a5e055696 | 2 | {
"blob_id": "2c2f9cac99dd8553f7a0098c883f0d3a5e055696",
"branch_name": "refs/heads/master",
"committer_date": 1584681179000,
"content_id": "4b31257fd3b93908d3c8c84a0720cf234944e4a4",
"detected_licenses": [
"MIT"
],
"directory_id": "a734209770d8a7e62ddb4b06385568dedc64c44b",
"extension": "py",
"fi... | 2.4375 | stackv2 | import sys, os, datetime, json, mimetypes
if sys.version_info.major < 3:
from urlparse import urlparse, parse_qs
import SocketServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
else:
from urllib.parse import urlparse, parse_qs
from http.server import SimpleHTTPRequestHandler,socketserve... | 121 | 34.36 | 111 | 20 | 947 | python | [{"finding_id": "codeql_py/path-injection_089e1f82c4efeee8_f3926d6c", "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).\nThis pa... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).\nThis path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2)."
] | [
96
] | [
null
] | [
30
] | [
55
] | |
2024-11-18T20:18:45.629266+00:00 | 1,550,409,654,000 | 47db9205c9c3a9a18885d025a646cd10097a5836 | 3 | {
"blob_id": "47db9205c9c3a9a18885d025a646cd10097a5836",
"branch_name": "refs/heads/master",
"committer_date": 1550409654000,
"content_id": "bc5be39b0f59c100cc119f8bf8fa58e165d587ae",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f0f0a1d217c1c314d8340a4163b9edfe2b969b63",
"extension": "py"... | 2.765625 | stackv2 | #!/usr/bin/env python
"""
1. Use Jinja2 to generate the following configuration:
--------
router ospf 40
network 10.220.88.0 0.0.0.255 area 0
--------
The process ID, network, wildcard mask, and area should all be variables in the Jinja2 template.
Use a template directly embedded in your Python script.
"""
from ... | 41 | 20.63 | 96 | 9 | 258 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_283848ed8ed975ec_bd8c87dc", "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."
] | [
36
] | [
null
] | [
16
] | [
44
] | |
2024-11-18T20:18:49.353196+00:00 | 1,539,703,103,000 | cb1b9b2fc608e8c7c025b9f61bc5736975a0b004 | 3 | {
"blob_id": "cb1b9b2fc608e8c7c025b9f61bc5736975a0b004",
"branch_name": "refs/heads/master",
"committer_date": 1539703103000,
"content_id": "a56b690b8d68fe7faae3474e3bbab6bf21b0d59c",
"detected_licenses": [
"MIT"
],
"directory_id": "87f0674ecbfc1d79468f00f294336f020de9be43",
"extension": "py",
"fi... | 2.578125 | stackv2 | import sqlite3
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
@app.route('/value', methods=['GET', 'POST'])
def value():
if request.method == 'GET':
conn = sqlite3.connect('flask.sqlite')
curs = conn.c... | 26 | 23.23 | 54 | 12 | 155 | python | [{"finding_id": "codeql_py/reflective-xss_99b247f9f9827022_c17be080", "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)."
] | [
21
] | [
null
] | [
12
] | [
15
] | |
2024-11-18T20:18:49.632491+00:00 | 1,335,561,473,000 | 1f750c18ad541c57a5fe8c95080cfbdb91119498 | 2 | {
"blob_id": "1f750c18ad541c57a5fe8c95080cfbdb91119498",
"branch_name": "refs/heads/master",
"committer_date": 1335561473000,
"content_id": "59d59fd1274a6f4a8d1c84991b219cb54bab9d54",
"detected_licenses": [
"MIT"
],
"directory_id": "cf475571627d13d98f38f317e18fa8d6c038d44e",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os
from flask import Flask, flash, request, session, render_template, g, jsonify
from flask.ext.markdown import Markdown
app = Flask(__name__)
Markdown(app, safe_mode=True)
app.config.from_object('config')
app.secret_key = app.config['SECRET_KEY']
def create_token(length=32):
# Take random bytes from os.u... | 79 | 22.53 | 78 | 15 | 447 | python | [{"finding_id": "codeql_py/log-injection_e70bce0e13cceac0_4010d145", "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)."
] | [
21
] | [
null
] | [
53
] | [
74
] | |
2024-11-18T20:18:57.623979+00:00 | 1,527,215,852,000 | 3714ae2357249d431e52907251821e721f6ec538 | 3 | {
"blob_id": "3714ae2357249d431e52907251821e721f6ec538",
"branch_name": "refs/heads/master",
"committer_date": 1527215852000,
"content_id": "8e29ab2e9bd91fd0c5cbd1e88da5150d9244775c",
"detected_licenses": [
"MIT"
],
"directory_id": "6ee1c7c19fc34042934d09b04d56db248922d8a5",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
from flask import Flask, session, render_template, request, flash, redirect, url_for, jsonify
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SECRET_KEY'] = 'hard to guess secure key'
# setup SQLAlchemy
basedir = os.path.abspath(os.path.dirname(__file__))
app.config['SQLALCHEMY_DAT... | 197 | 29.54 | 93 | 17 | 1,385 | python | [{"finding_id": "codeql_py/reflective-xss_d136db513d38dfdf_8f4678ab", "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)."
] | [
192
] | [
null
] | [
12
] | [
65
] | |
2024-11-18T20:29:59.415938+00:00 | 1,627,393,835,000 | d81a052782f06cf3e549377e955dec8d9f2b466b | 3 | {
"blob_id": "d81a052782f06cf3e549377e955dec8d9f2b466b",
"branch_name": "refs/heads/main",
"committer_date": 1627393835000,
"content_id": "31018eeba7d4416a1c632b02388792bccaca9184",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8cb73c8ee568b8b67b2db8a5f35a2c2ba119bd34",
"extension": "py",
... | 2.578125 | stackv2 | import os
import numpy as np
import pandas as pd
def filter_by_website(url):
if url.startswith("https://find-and-update.company-information"):
return False
if url.startswith("https://www.yell.com"):
return False
if url.startswith("https://www.facebook.com") or "facebook" in url:
re... | 73 | 32.44 | 95 | 11 | 565 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_68c1105319767cc5_ed2c68bb", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://www.yell.com](1) may be at an arbitrary positi... | 5 | true | [
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [https://www.yell.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [https://www.facebook.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [https://www.linkedin.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [https:/... | [
8,
10,
12,
16,
20
] | [
null,
null,
null,
null,
null
] | [
8,
8,
8,
8,
8
] | [
46,
50,
50,
64,
42
] | |
2024-11-18T20:30:03.083699+00:00 | 1,397,369,109,000 | d2cf402a28090888aa553e67be1ad0916475d8b8 | 3 | {
"blob_id": "d2cf402a28090888aa553e67be1ad0916475d8b8",
"branch_name": "refs/heads/master",
"committer_date": 1397369763000,
"content_id": "95669081e8ff751744e4c2f06ec08561492e5661",
"detected_licenses": [
"MIT"
],
"directory_id": "ac36274e1a90fe2f5a245d90ee07a3bc00f5cbb0",
"extension": "py",
"fi... | 2.6875 | stackv2 | import logging
import os
import markdown
from jinja2 import Environment, FileSystemLoader
from black.n.white.directory_structure import InputDirectoryStructure, OutputDirectoryStructure
__author__ = 'gautam'
class BlackNWhite:
POST_TEMPLATE_FILE = "post.html"
def __init__(self, base_directory):
logg... | 59 | 37.75 | 101 | 15 | 475 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_759f9bea723cb31e_19a8c86b", "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."
] | [
18
] | [
null
] | [
27
] | [
83
] | |
2024-11-18T20:51:32.208363+00:00 | 1,551,245,345,000 | f06d6a09eb429a1f0fc864ff540c093cf4dae081 | 3 | {
"blob_id": "f06d6a09eb429a1f0fc864ff540c093cf4dae081",
"branch_name": "refs/heads/master",
"committer_date": 1551245345000,
"content_id": "3d873c0676d56a2607680a86d142216d621d95aa",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "693e817268b6c64cdc6675e84c71f66d91756601",
"extension": "py"... | 2.609375 | stackv2 | """
Project : bugaboo
Filename : package.py
Author : zhancongc
Description : 支持views路由函数的库函数
"""
import json
import requests
import hashlib
import datetime
import configparser
def wxlogin(code):
"""
:param code: code generate by weixin mini program, just like: 011D6BBL00pBY92XORAL0M7gBL0D6BBS
... | 55 | 26.62 | 98 | 14 | 439 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_96db66cdc5c7c2c0_686c5f94", "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 (SHA1) that is insecu... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure."
] | [
48
] | [
null
] | [
15
] | [
42
] | |
2024-11-18T19:07:25.754448+00:00 | 1,628,838,872,000 | 52f9185534ce3a643b8d619d2cd9f3edea6f30d4 | 3 | {
"blob_id": "52f9185534ce3a643b8d619d2cd9f3edea6f30d4",
"branch_name": "refs/heads/master",
"committer_date": 1628838872000,
"content_id": "ae937ee53aef7b2b43415cd785e0fec8e5b21d24",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f0a19130a0f573f506f44369c481b4d0ef2742a2",
"extension": "py"... | 2.65625 | stackv2 | #!/usr/bin/env python3
################################################################################
#
# Title: 31_create_s3bucket.py
# Author: Adrian Bronder
# Date: 2020-03-17
# Description: Get grid information
#
# Resources:
#
# URLs:
#
######################################################################... | 105 | 28.72 | 127 | 16 | 766 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0e0701e36ae8ef2b_58b85ced", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
27,
64,
81,
92
] | [
29,
67,
84,
95
] | [
9,
13,
15,
22
] | [
19,
19,
19,
18
] | |
2024-11-18T19:07:54.974727+00:00 | 1,428,292,336,000 | 1300db7cb33e9988e33d2020adf1ef147e93fa6c | 3 | {
"blob_id": "1300db7cb33e9988e33d2020adf1ef147e93fa6c",
"branch_name": "refs/heads/master",
"committer_date": 1428292336000,
"content_id": "e2b9f8401e271165f4e736cd9525b244d3423d0c",
"detected_licenses": [
"MIT"
],
"directory_id": "27ac99e67eca59606d43aef8cb3d1c792b1b1f5d",
"extension": "py",
"fi... | 2.5625 | stackv2 | # encoding: UTF-8
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
from os import curdir, sep
import json
from extract import Extract
from methods import Methods
from report import Report
extract = Extract('extrato.csv')
__rows = extract.get_rows()
basic_info = extract.get_basic_info()
methods = Methods... | 74 | 29.78 | 78 | 22 | 520 | python | [{"finding_id": "codeql_py/path-injection_a48c13b2a2497b2e_ef22e351", "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)."
] | [
57
] | [
null
] | [
18
] | [
42
] | |
2024-11-18T19:18:17.936056+00:00 | 1,419,134,319,000 | a1058ff92fcd09c88375ccbc4daa5a45385a12ad | 2 | {
"blob_id": "a1058ff92fcd09c88375ccbc4daa5a45385a12ad",
"branch_name": "refs/heads/master",
"committer_date": 1419134319000,
"content_id": "1e5dde11f29e1460a32936ddd75f2cdc1de7e86d",
"detected_licenses": [
"MIT"
],
"directory_id": "cc809563b94ca1176a5603383f221446ac143ad1",
"extension": "py",
"fi... | 2.34375 | stackv2 | from flask import Flask, render_template, request, redirect, url_for, session, flash
import controllers
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html', username = "")
@app.route('/', methods =['POST'])
def login():
username = request.form['username']
@app.route('/<usern... | 32 | 18.72 | 84 | 10 | 139 | python | [{"finding_id": "codeql_py/flask-debug_77d6b6a30d98bf57_7bb6e104", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
31,
28
] | [
null,
null
] | [
5,
9
] | [
24,
29
] | |
2024-11-18T19:18:24.225130+00:00 | 1,559,000,317,000 | 44fba70722c15bc5892f9fc3106767f4f50f6ab9 | 3 | {
"blob_id": "44fba70722c15bc5892f9fc3106767f4f50f6ab9",
"branch_name": "refs/heads/master",
"committer_date": 1559000317000,
"content_id": "8e6231000caa02c3f5e53277dc873dd8d62d16ce",
"detected_licenses": [
"MIT"
],
"directory_id": "c18c9801078abdd12a4610ece771bbbd62bba705",
"extension": "py",
"fi... | 2.703125 | stackv2 | """
Sample Parrot Bot
This bot responds to any message by repeated what was said to it.
"""
__name__ = 'localConfig'
__package__ = 'ringcentral_bot_framework'
import copy
import json
import math
from functools import reduce
from requests_toolbelt.multipart import decoder
def reducer(x, y):
'''@user reducer'''
s... | 126 | 22.13 | 99 | 17 | 851 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_105d689e96d95b43_675e266b", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [bot.glip.net](1) may be at an arbitrary position in th... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [bot.glip.net](1) may be at an arbitrary position in the sanitized URL."
] | [
49
] | [
null
] | [
34
] | [
65
] | |
2024-11-18T19:18:50.136152+00:00 | 1,637,744,883,000 | 77e5a3987b25edf363ab1299f202944fc0d177eb | 3 | {
"blob_id": "77e5a3987b25edf363ab1299f202944fc0d177eb",
"branch_name": "refs/heads/main",
"committer_date": 1637744883000,
"content_id": "981b970a421e6dccdc3a77edaf9e81aa478d76bd",
"detected_licenses": [
"MIT"
],
"directory_id": "576034412de57174828823120475a2748c0f0fb9",
"extension": "py",
"file... | 3.28125 | stackv2 | def foo3(b):
from Crypto.Cipher import AES
key = b'!!!Tover_yyds!!!'
cipher = AES.new(key, AES.MODE_ECB)
return cipher.decrypt(b).hex()
def foo2(l):
for i in range(len(l)):
j = i
i = 3 + 2*i
l[j] ^= i + 66
return bytes(l)
def foo1(s):
l = []
for x in s:
... | 42 | 21.21 | 83 | 11 | 332 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_2b29858699df2d02_6296dbb7", "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": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
5
] | [
null
] | [
12
] | [
29
] | |
2024-11-18T19:18:50.976652+00:00 | 1,588,537,465,000 | 76d87efcf6629f082ca80d0518512850f24afdb5 | 4 | {
"blob_id": "76d87efcf6629f082ca80d0518512850f24afdb5",
"branch_name": "refs/heads/master",
"committer_date": 1588537465000,
"content_id": "9a24bd78912bdb3307e485b25126ae5dd222226b",
"detected_licenses": [
"MIT"
],
"directory_id": "67b7eb3648cae52b2f18758cdb0a2bcfe4affd13",
"extension": "py",
"fi... | 4.09375 | stackv2 | pokemon = {'name': 'Pikachu', 'level': 7, 'male': True}
def levelup(pokemon):
pokemon['level'] += 1
print('Pokemon', pokemon['name'], 'leveled up to', pokemon['level'])
levelup(pokemon)
# curveball
floor = {
'name': 'Office',
'level': 2,
'clean': True
}
levelup(floor)
# class syntax
print('Using classe... | 143 | 21.88 | 95 | 13 | 954 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4c369d8ddccc286a_5e4f6e89", "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."
] | [
61
] | [
null
] | [
53
] | [
64
] | |
2024-11-18T19:18:54.712850+00:00 | 1,677,101,638,000 | 19649d7e94e783c29ef427221da280a32b95d0eb | 2 | {
"blob_id": "19649d7e94e783c29ef427221da280a32b95d0eb",
"branch_name": "refs/heads/master",
"committer_date": 1677101638000,
"content_id": "f5eb01681d4a040c9389785281968753e32ff2f9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5236e922c9b50ccf15152380c274b933a76803a2",
"extension": "py"... | 2.453125 | stackv2 | # ________________________________________________________________________
#
# Copyright (C) 2014 Andrew Fullford
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 292 | 43.35 | 120 | 19 | 2,752 | python | [{"finding_id": "codeql_py/insecure-protocol_7c5185ae10bf0fdb_40b9cff5", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/insecure-protocol",
"py/insecure-default-protocol"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.SSLContext](1).",
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
72,
75
] | [
null,
null
] | [
23,
23
] | [
26,
63
] | |
2024-11-18T19:18:56.001955+00:00 | 1,693,556,020,000 | 9d244da8705f3f22d2cfce36dca91e893c271e35 | 2 | {
"blob_id": "9d244da8705f3f22d2cfce36dca91e893c271e35",
"branch_name": "refs/heads/master",
"committer_date": 1693556020000,
"content_id": "9a14254436299dd982db728d1163277e29a391ca",
"detected_licenses": [
"MIT"
],
"directory_id": "f202dcb70b962160b19ddd95676afdfb67984c05",
"extension": "py",
"fi... | 2.375 | stackv2 | import rel, smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from ..util import config, log, strip_html
TMP = """From: %s
To: %s
Subject: %s
%s"""
class Mailer(object):
def __init__(self, addr, mailername):
self.addr = addr
self.name = mailername
self._yag = None
s... | 134 | 29.49 | 89 | 19 | 1,221 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_56183c281fdae573_27f5cadb", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [gmail.com](1) may be at an arbitrary position in the s... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [gmail.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [gmail.com](1) may be at an arbitrary position in the sanitized URL."
] | [
23,
28
] | [
null,
null
] | [
26,
9
] | [
45,
28
] | |
2024-11-18T19:19:02.688136+00:00 | 1,667,069,016,000 | b4354f2e858a9173c93930768bd80588d2c7851e | 3 | {
"blob_id": "b4354f2e858a9173c93930768bd80588d2c7851e",
"branch_name": "refs/heads/main",
"committer_date": 1667069016000,
"content_id": "c8408c3f45fe0f2e901a42efd66c4d965bc33c09",
"detected_licenses": [
"MIT"
],
"directory_id": "af42378dc58be5478d6ea9f4c6a08ce1531f5b83",
"extension": "py",
"file... | 2.796875 | stackv2 | """
Views
"""
from django.shortcuts import render, HttpResponse
from rest_framework import viewsets
from django.contrib.auth.hashers import make_password, check_password
from .serializers import BookSerializer
from .models import Book, Login
# Create your views here.
class BookView(viewsets.ModelViewSet):
""" Vie... | 31 | 31.32 | 105 | 12 | 199 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fc9b386e1dfc385d_15a148f8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
24,
26
] | [
null,
null
] | [
15,
15
] | [
32,
28
] | |
2024-11-18T19:29:33.837447+00:00 | 1,532,196,280,000 | b1bc025458e04a077c0f0573cbf59dae3dbe369b | 3 | {
"blob_id": "b1bc025458e04a077c0f0573cbf59dae3dbe369b",
"branch_name": "refs/heads/master",
"committer_date": 1532196280000,
"content_id": "279127e13d566c9b96a47e789bc38f891f2a6834",
"detected_licenses": [
"MIT"
],
"directory_id": "d99dd3a29f454b315a65804ab694725196fc3604",
"extension": "py",
"fi... | 3.25 | stackv2 | import os
import sys
import tarfile
try:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
def file_name_from_url(url, directory=None):
file_name = url.split('/')[-1]
if directory:
file_name = os.path.join(directory, file_name)
return file_name
def d... | 36 | 27.61 | 67 | 11 | 218 | python | [{"finding_id": "codeql_py/tarslip_2a5a89b105814400_04b913d1", "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)."
] | [
31
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T19:29:46.743355+00:00 | 1,490,856,744,000 | ee8ddd32178d35596d64943fff764315ded80c58 | 2 | {
"blob_id": "ee8ddd32178d35596d64943fff764315ded80c58",
"branch_name": "refs/heads/master",
"committer_date": 1490856744000,
"content_id": "ad2c7b4ac510bd171b326974b2b74a55daa7c427",
"detected_licenses": [
"MIT"
],
"directory_id": "da20704c1079e2e8936b6ba8ab88ed9df12fad78",
"extension": "py",
"fi... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
import datetime
from hashlib import sha256
from time import gmtime, strftime
import sqlalchemy
from flask import render_template, redirect, url_for
from flask_app import app, db_connection, dbTables
from forms import RegisterForm
@app.route('/', methods=('GET', 'POST'))
def index():
retur... | 67 | 37.15 | 76 | 19 | 558 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a28a10f956b8e0b1_2ed578e2", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
47
] | [
48
] | [
36
] | [
47
] | |
2024-11-18T19:44:15.699993+00:00 | 1,542,809,528,000 | 89ed776941a5770e21fbb3ae2e939812756ba1d1 | 3 | {
"blob_id": "89ed776941a5770e21fbb3ae2e939812756ba1d1",
"branch_name": "refs/heads/master",
"committer_date": 1542809528000,
"content_id": "8f10ba77cc1166522c6bc7d0b4467348d34635f8",
"detected_licenses": [
"MIT"
],
"directory_id": "edc1afd5bde0f192fe5b61dcdb271f88812ce437",
"extension": "py",
"fi... | 2.625 | stackv2 | import logging
from flask_cors import CORS
from datetime import datetime as dt
from flask import Flask, request, jsonify, make_response
import database as db
app = Flask(__name__)
CORS(app)
db = db.DataBase('database/database.db')
@app.route('/')
def root():
return 'Go to /search_turns'
@app.route('/search_t... | 343 | 30.38 | 148 | 16 | 2,678 | python | [{"finding_id": "codeql_py/stack-trace-exposure_c982bf5697016862_128a3c40", "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.", "... | 33 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-312",
"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",
"CWE-117",
"CWE... | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/clear-text-logging-sensitive-data",
"py/reflective-xss",
"py/reflective-xss"... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"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",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MED... | [
"[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... | [
81,
107,
119,
132,
158,
179,
192,
215,
102,
132,
143,
158,
168,
179,
22,
54,
71,
76,
80,
89,
102,
125,
138,
164,
178,
200,
210,
214,
233,
252,
275,
301,
329
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
30,
30,
30,
30,
30,
30,
30,
30,
25,
30,
34,
30,
34,
30,
45,
25,
30,
25,
26,
25,
25,
25,
25,
25,
26,
25,
25,
26,
47,
42,
21,
49,
21
] | [
65,
61,
66,
77,
77,
77,
68,
67,
97,
77,
80,
77,
80,
77,
51,
29,
33,
67,
75,
29,
97,
60,
60,
63,
73,
29,
71,
79,
59,
61,
25,
56,
25
] | |
2024-11-18T19:44:39.172516+00:00 | 1,558,418,621,000 | 70650ada97928de4eccfaab928fce675786a9f00 | 3 | {
"blob_id": "70650ada97928de4eccfaab928fce675786a9f00",
"branch_name": "refs/heads/master",
"committer_date": 1558418621000,
"content_id": "da79208b00f4e0771ea220dbd248e37c4e8e2fbc",
"detected_licenses": [
"MIT"
],
"directory_id": "01693ff9d47e8c5c0c00bf541b72656bf96d9c4a",
"extension": "py",
"fi... | 2.578125 | stackv2 | import base64
import pickle
from django.shortcuts import render
from django_redis import get_redis_connection
from rest_framework.response import Response
from rest_framework import status
from rest_framework.views import APIView
from cart.serializers import CartSerializer, CartSKUSerializer
from cart.serializers imp... | 430 | 29.9 | 93 | 19 | 3,591 | python | [{"finding_id": "codeql_py/unsafe-deserialization_339a98bf500e7cc8_c15f18ec", "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).\nUnsafe deserialization depen... | 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).\nUnsafe deserialization depends on a [user-provided value](1).",
"Unsafe deserialization depends on a [user-provided value](1).\nUnsafe deserialization depends on a [user-provided value](1).",
"Unsafe deserialization depends on a [user-provided valu... | [
89,
173,
257,
335,
411
] | [
null,
null,
null,
null,
null
] | [
38,
38,
38,
42,
42
] | [
67,
67,
67,
71,
71
] | |
2024-11-18T19:44:39.718679+00:00 | 1,557,519,315,000 | c58c87af8a912e9ccd9b11b22273f6370cf6301f | 4 | {
"blob_id": "c58c87af8a912e9ccd9b11b22273f6370cf6301f",
"branch_name": "refs/heads/master",
"committer_date": 1557519315000,
"content_id": "148de908726040c3049fc1fefe729faf41e13c19",
"detected_licenses": [
"Unlicense"
],
"directory_id": "42b12ba659a6edd39325efd9f08ea01df1a01c77",
"extension": "py",... | 3.53125 | stackv2 | import matplotlib.pyplot as plt
from utils.text_analyzer import TextStats
from utils.dictionary import Dictionary
def solve_manually(stats: TextStats, dictionary: Dictionary) -> tuple:
"""
Console tool with pyplot graphs. Can be used to guess passwords of simple substitution ciphers. The tool was built
to... | 178 | 39.67 | 120 | 21 | 1,662 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f9748eaf167d244a_35834fa1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
52,
93
] | [
null,
null
] | [
31,
31
] | [
39,
39
] | |
2024-11-18T19:58:00.370473+00:00 | 1,604,806,994,000 | 5eedfe7f6f6cc2c2011c567fe920c919123e6acb | 2 | {
"blob_id": "5eedfe7f6f6cc2c2011c567fe920c919123e6acb",
"branch_name": "refs/heads/master",
"committer_date": 1604806994000,
"content_id": "8a172998d0a75544640c0a97208cea47138b05c7",
"detected_licenses": [
"MIT"
],
"directory_id": "b3765516e53bb7aee5c548b949e360d33fb82352",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/bin/env python3
import itertools
import json
import re
from dataclasses import dataclass
from time import perf_counter
from typing import Any, List, Optional
import bleach
import httpx
import markdown
import minicli
from jinja2 import Environment, FileSystemLoader
from progressist import ProgressBar
from select... | 382 | 32.75 | 88 | 17 | 2,940 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_a3f52debd25ab720_14a256bb", "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."
] | [
18
] | [
null
] | [
15
] | [
56
] | |
2024-11-18T19:58:08.635800+00:00 | 1,675,429,968,000 | 75b6bbccec8260f6c428adf00d2e619ac833f435 | 3 | {
"blob_id": "75b6bbccec8260f6c428adf00d2e619ac833f435",
"branch_name": "refs/heads/master",
"committer_date": 1675429968000,
"content_id": "df7236663643eb0318dd47600d89bda8e6c3c3b5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "137d14933f47decc2ad59a16298d2e371f4ac8c1",
"extension": "py"... | 2.8125 | stackv2 | from dataclasses import dataclass, field
from typing import List
from copy import copy
from jinja2 import Environment, FileSystemLoader
from mistletoe.html_renderer import HTMLRenderer
from mistletoe.block_token import Document
from pygments import highlight
from pygments.formatters import HtmlFormatter
from format_... | 94 | 37.12 | 94 | 18 | 806 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_0326cae1c01f2712_1dbd7de0", "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."
] | [
92
] | [
null
] | [
21
] | [
63
] | |
2024-11-18T19:58:18.699792+00:00 | 1,556,187,390,000 | cdd6d683f73570a05aad3dad25dab04358251ad3 | 4 | {
"blob_id": "cdd6d683f73570a05aad3dad25dab04358251ad3",
"branch_name": "refs/heads/master",
"committer_date": 1556187390000,
"content_id": "d24e3a356578d129d9f9e55f4bee8fae3b3acdea",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "66bacb0f67d6fa46159f33597b93d5a6eda48bd0",
"extension": "py"... | 3.6875 | stackv2 | """
고객 정보 관리 시스템 RFP
주요 내용 지금 까지 배운 내용을 토대로 고객의 정보를 관리하는 프로그램을 만듭니다.
고객의 정보를 관리하는 프로그램에서 사용하는 고객 정보를 저장하는 자료구조는 자신 있는 것을 이용합니다.
요구사항 -
데이타 고객의 정보는 이름, 성별, 이메일, 출생년도가 있습니다.
고객의 정보를 입력받아 본인이 선택한 자료구조에 저장해야 합니다.
이름은 문자열로 저장하며, 성별은 남자는 M, 여자는 F로 저장합니다.
이메일은 문자열로 저장하며, 태어난 연도는 정수로 저장합니다.
요구사항 -
기능 고객 관리 프로그램은 고객의 정보를 저장,... | 151 | 29.96 | 114 | 19 | 1,451 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0131d83d5796254c_411d8aad", "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."
] | [
81
] | [
null
] | [
22
] | [
69
] | |
2024-11-18T20:10:10.717590+00:00 | 1,654,297,221,000 | a65a368f6ec24b3168a386ad7c3a0fde1a4bf80c | 2 | {
"blob_id": "a65a368f6ec24b3168a386ad7c3a0fde1a4bf80c",
"branch_name": "refs/heads/master",
"committer_date": 1654297221000,
"content_id": "ce623d2102d51497742c68b6a433488b248d7258",
"detected_licenses": [
"Unlicense"
],
"directory_id": "914f8b0c7e7a67720b152b45385a1825346dd387",
"extension": "py",... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
import io
from flask import Flask, render_template, g , request, url_for, session, redirect, abort, logging
import config,conn
###初始化程序
global app
app = Flask(__name__)
###初始化数据链接
global appconn
appconn=conn.Conn(app)
###测试模块
@app.route('/test', methods=("GET", "POST"))
def Test():
app.l... | 94 | 27.09 | 122 | 17 | 687 | python | [{"finding_id": "codeql_py/reflective-xss_fed4d3ddd90d4bd2_4497d82b", "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)."
] | [
69
] | [
null
] | [
16
] | [
22
] | |
2024-11-18T20:10:12.038557+00:00 | 1,452,330,515,000 | 598bc0a691bad006ed023f5aeae1507e11c4b41b | 2 | {
"blob_id": "598bc0a691bad006ed023f5aeae1507e11c4b41b",
"branch_name": "refs/heads/master",
"committer_date": 1452330515000,
"content_id": "74f4ef196a2d3b4a07fdcc60493e4dab30a14c01",
"detected_licenses": [
"MIT"
],
"directory_id": "01c5f72051c1a8c8aef1e417bd29bc816cbd8d01",
"extension": "py",
"fi... | 2.359375 | stackv2 | import json
import os
import requests
import webbrowser
from get_twitter_api_params import get_rate_limit_rules, save_api_dict
from lxml import html
from twython import Twython
class TweetCatcher():
def __init__(self):
self.app_creds = Twython(APP_KEY, APP_SECRET).get_authentication_tokens()
self... | 74 | 38.54 | 110 | 18 | 606 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ba465dc5980f806a_9ff7ff24", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (secret)](3) as clear text."
] | [
55
] | [
null
] | [
30
] | [
90
] | |
2024-11-18T20:10:22.707728+00:00 | 1,587,771,443,000 | 6121cbddbf7a357306e9c86063f11e5b742dabd8 | 3 | {
"blob_id": "6121cbddbf7a357306e9c86063f11e5b742dabd8",
"branch_name": "refs/heads/master",
"committer_date": 1587771443000,
"content_id": "3826365c9c040180635be16dacdd4a8fe37c313a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "37e88c82b29bb92819ee7f82d6d24d778f78ab99",
"extension": "py"... | 2.75 | stackv2 | #!/usr/bin/python3
from .config_utils import get_base_config
from fuzzywuzzy import fuzz
from .log_utils import get_module_logger
from tldextract import extract, TLDExtract
from urllib.parse import urlparse
import Levenshtein
import os
import re
import statistics
import string
import sys
CDIR = os.path.dirname(os.... | 275 | 23.44 | 94 | 19 | 1,676 | python | [{"finding_id": "codeql_py/overly-large-range_678b1def5854be67_ae4b9ef4", "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\\\\[\\\\\\\\]^_\\]."
] | [
136
] | [
null
] | [
45
] | [
48
] | |
2024-11-18T20:10:32.634706+00:00 | 1,609,669,968,000 | 3522b7248168588427f4953ce5ceb5f32510cc53 | 3 | {
"blob_id": "3522b7248168588427f4953ce5ceb5f32510cc53",
"branch_name": "refs/heads/main",
"committer_date": 1609669968000,
"content_id": "0857ab23b41693b8fb458929fd707c568b0412ef",
"detected_licenses": [
"MIT"
],
"directory_id": "de4aa1b711d5fb0fdd3be88b21925d495555509a",
"extension": "py",
"file... | 3.125 | stackv2 | import sys
import cv2
import numpy as np
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
from Crypto.Random import get_random_bytes
# This program encrypts a jpg With AES-256. The encrypted image contains more data than the original image (e.g. because of
# padding, IV etc.). Therefore the en... | 95 | 38.2 | 144 | 10 | 885 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_390eb23cfa8eeec4_51415641", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode CBC](1) is broken or weak, and should not be used.\n[The block mode ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode CBC](1) is broken or weak, and should not be used.\n[The block mode ECB](2) is broken or weak, and should not be used.\n[The block mode CBC](3) is broken or weak, and should not be used.\n[The block mode ECB](4) is broken or weak, and should not be used.",
"[The block mode CBC](1) is broken or we... | [
48,
84
] | [
null,
null
] | [
14,
29
] | [
50,
54
] | |
2024-11-18T20:23:09.327744+00:00 | 1,538,678,414,000 | f1bdaeb34329e1751c2e48c509b691fc98c6007a | 3 | {
"blob_id": "f1bdaeb34329e1751c2e48c509b691fc98c6007a",
"branch_name": "refs/heads/master",
"committer_date": 1540973011000,
"content_id": "8f74d9199129128a8c4fa4b4a590d9fa5b02ef76",
"detected_licenses": [
"MIT"
],
"directory_id": "26a9ee45d535a760aed0a4d8ec119dc0658f3c21",
"extension": "py",
"fi... | 2.90625 | stackv2 | #!/usr/bin/env python
"""
Pandoc filter to convert all regular text to uppercase.
Code, link URLs, etc. are not affected.
"""
import re
from pandocfilters import Image
from pandocfilters import LineBreak
from pandocfilters import RawInline
from pandocfilters import toJSONFilter
def rstFilter(key, value, format, m... | 65 | 31.37 | 78 | 16 | 537 | python | [{"finding_id": "codeql_py/redos_693ddeca48b238bb_501d120e", "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 '@fig:' and containing many repeti... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '@fig:' and containing many repetitions of 'a'."
] | [
29
] | [
null
] | [
39
] | [
42
] | |
2024-11-18T20:23:23.394472+00:00 | 1,615,555,933,000 | f96d757a68c5bed6fc29349c4b4b2edc57f5c03e | 2 | {
"blob_id": "f96d757a68c5bed6fc29349c4b4b2edc57f5c03e",
"branch_name": "refs/heads/master",
"committer_date": 1615555933000,
"content_id": "e72505c3c1a7f605395b64bef687817405fe0d75",
"detected_licenses": [
"BSD-2-Clause-Views"
],
"directory_id": "e883478ede2b951945a414fd97e69e3664316020",
"extensio... | 2.5 | stackv2 | # -*- encoding: utf-8 -*-
"""
This module provides utility functions.
"""
import os
from collections import OrderedDict
from typing import Optional
def load_template(template_dir: str, filename: str, message_dict: dict, lang: str) -> str:
"""
This function loads a template file by provided language.
"""
... | 123 | 29.21 | 112 | 17 | 876 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_45670082ec7b517d_b407583c", "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."
] | [
22
] | [
null
] | [
24
] | [
74
] | |
2024-11-18T20:23:29.256568+00:00 | 1,683,792,934,000 | 4037a7cbfd13fa4a04c487901fa4ac4a17990277 | 2 | {
"blob_id": "4037a7cbfd13fa4a04c487901fa4ac4a17990277",
"branch_name": "refs/heads/master",
"committer_date": 1683792934000,
"content_id": "dba652c4e51d482f8eb9ff98d6adb2cb2cb6bfdd",
"detected_licenses": [
"MIT"
],
"directory_id": "b4a8f605c21e1bfcdd17bf878455468b4c414e9b",
"extension": "py",
"fi... | 2.5 | stackv2 | import json, hashlib, base64, hmac
from Crypto.Cipher import DES3
from redsys import lib
class Commerce:
def __init__(self, secret_key, fuc, terminal, url):
self.secret_key = secret_key
self.fuc = fuc
self.terminal = terminal
self.url = url
def generate_unique_key(self, order... | 69 | 43.48 | 118 | 15 | 743 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_8556cb37aeb17d12_1ea62e37", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The cryptographic algorithm DES3](1) is broken or weak, and should not be used."
] | [
25
] | [
null
] | [
16
] | [
37
] | |
2024-11-18T20:49:14.867514+00:00 | 1,559,640,039,000 | 81aadb00d217cecbd42c1562c9db56a421920972 | 2 | {
"blob_id": "81aadb00d217cecbd42c1562c9db56a421920972",
"branch_name": "refs/heads/master",
"committer_date": 1559640039000,
"content_id": "6c3df3565a456c5659792f66edfda93327c53e1c",
"detected_licenses": [
"MIT"
],
"directory_id": "0afb3e5ef574656d41be305c25f9b988dbffb69f",
"extension": "py",
"fi... | 2.453125 | stackv2 | from flask import Flask, request
import ssl
app = Flask(__name__)
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.load_cert_chain('./key/server.crt', './key/server.key')
@app.route('/', methods=['POST'])
def upload():
print(request.headers)
upfile = request.files['data']
upfile.save("test.log")
... | 25 | 22.32 | 71 | 9 | 158 | python | [{"finding_id": "codeql_py/flask-debug_3784fa3daf652c2a_a176b063", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
25,
15
] | [
null,
null
] | [
5,
12
] | [
72,
24
] | |
2024-11-18T20:49:27.792398+00:00 | 1,348,604,738,000 | 58d7fe36b71dfa4044cb3422c4c9348d2bbe6940 | 3 | {
"blob_id": "58d7fe36b71dfa4044cb3422c4c9348d2bbe6940",
"branch_name": "refs/heads/master",
"committer_date": 1348604738000,
"content_id": "66b41948795648d4539497a2e11364722d56be85",
"detected_licenses": [
"MIT"
],
"directory_id": "b9ab9c3fb17bbd6cc3198d2b37a2a303cdc1f003",
"extension": "py",
"fi... | 2.640625 | stackv2 | """:mod:`trellogrove` --- Trello IRC Notibot
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import json
import logging
import os.path
import urllib
import urlparse
from google.appengine.api.urlfetch import fetch
from google.appengine.ext.db import Model, StringProperty, put
from google.appengine.ext.deferred import... | 275 | 30.44 | 78 | 16 | 1,959 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4c34b3dc0bd2debb_7e095a6c", "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."
] | [
173
] | [
177
] | [
13
] | [
2
] | |
2024-11-18T20:49:37.407137+00:00 | 1,593,057,516,000 | ec805e642bfb697fbac058e7856a297154d2304f | 3 | {
"blob_id": "ec805e642bfb697fbac058e7856a297154d2304f",
"branch_name": "refs/heads/master",
"committer_date": 1593057516000,
"content_id": "064825dd551644f073842dda7404381c6b6e819d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a1f442b3a0b800599b92c9090848c00afb5384e4",
"extension": "py"... | 2.65625 | stackv2 | """Contains data helper functions."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import codecs
import os
import tarfile
import time
try:
from queue import Queue
except ImportError:
from Queue import Queue
from threading import Thread... | 218 | 32.6 | 79 | 15 | 1,684 | python | [{"finding_id": "codeql_py/tarslip_6d83fd5768cab53f_2648c78c", "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)."
] | [
87
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T20:50:16.762947+00:00 | 1,610,722,131,000 | 41ae009111b6f79e341e616ee02f2ba80373bdba | 3 | {
"blob_id": "41ae009111b6f79e341e616ee02f2ba80373bdba",
"branch_name": "refs/heads/master",
"committer_date": 1610722131000,
"content_id": "dd4808ff54e412758bb590f150c7db5fd0780d89",
"detected_licenses": [
"MIT"
],
"directory_id": "4bbe68dae101976088962a13bd8f547b6731ba99",
"extension": "py",
"fi... | 2.609375 | stackv2 |
from chargebee.main import Environment
import re
import sys
import socket
try:
import simplejson as json
except ImportError:
import json
py_major_v = sys.version_info[0]
py_minor_v = sys.version_info[1]
if py_major_v < 3:
from urllib import urlencode
from urlparse import urlparse
from urllib2 i... | 129 | 30.2 | 91 | 17 | 911 | python | [{"finding_id": "codeql_py/insecure-default-protocol_c8705619fa0b08ee_3b56449f", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
66
] | [
null
] | [
21
] | [
92
] | |
2024-11-18T20:50:19.047413+00:00 | 1,603,004,808,000 | 39d3981691c5e3e78e02eddeaab64c92e7d3b93a | 4 | {
"blob_id": "39d3981691c5e3e78e02eddeaab64c92e7d3b93a",
"branch_name": "refs/heads/master",
"committer_date": 1603004808000,
"content_id": "10bd5cc7e9fca27198637d2351249a056abe68e7",
"detected_licenses": [
"MIT"
],
"directory_id": "eb36346f9c1b3fc151305d807070bb693b0c86d0",
"extension": "py",
"fi... | 3.5 | stackv2 | # -*- coding = utf-8 -*-
# @Time : 2020/8/7 0:15
# @Author : Cristime
# @File : main.py
# @Software: NeoVim(Vim Like)
Char_Case = int(5)
# 主程序
def Main():
Interface()
mode = int(input('Please select a mode: '))
while (mode != 1 and mode != 2):
print("\nBad input! Please enter again!")
mod... | 82 | 22.91 | 82 | 20 | 524 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bf2a6a4195997300_63a48b7c", "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... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p... | [
27,
43
] | [
null,
null
] | [
23,
23
] | [
32,
32
] | |
2024-11-18T20:50:37.544776+00:00 | 1,600,011,342,000 | 7e0b9b7c673668c34ac64deb34b8deb7bc13a5bc | 2 | {
"blob_id": "7e0b9b7c673668c34ac64deb34b8deb7bc13a5bc",
"branch_name": "refs/heads/master",
"committer_date": 1600011342000,
"content_id": "5e20f8010736a9a2f8ecfea73320e611a65b40e7",
"detected_licenses": [
"MIT"
],
"directory_id": "fe9ad99e641a4a9492355f58fbec09a77c1db9d8",
"extension": "py",
"fi... | 2.375 | stackv2 | import base64, io, os, random, string
from google.cloud import storage, exceptions
from flask import Flask, render_template, request, make_response, redirect, url_for, send_from_directory, send_file
import fpdf
# If `entrypoint` is not defined in app.yaml, App Engine will look for an app
# called `app` in `main.py`.
a... | 204 | 40.96 | 128 | 18 | 2,317 | python | [{"finding_id": "codeql_py/flask-debug_0b02559d9c9109d9_da60ae64", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
204,
174
] | [
null,
null
] | [
5,
20
] | [
53,
96
] | |
2024-11-18T20:50:39.284823+00:00 | 1,669,838,237,000 | aee13356c3974c279482a276d5975040e64f5693 | 2 | {
"blob_id": "aee13356c3974c279482a276d5975040e64f5693",
"branch_name": "refs/heads/master",
"committer_date": 1669838237000,
"content_id": "29617d2d24f69e37863975a3476816aca5498505",
"detected_licenses": [
"MIT"
],
"directory_id": "fcd03ffde1e3a053f25299d990e8a182ac17f645",
"extension": "py",
"fi... | 2.3125 | stackv2 | import os
import json
import falcon
import jinja2
import mimetypes
class TemplateRenderer(object):
def __init__(self, templates_path):
self.tpl_path = templates_path
def render(self, tpl_name, *args, **kwargs):
template = self._load_template(tpl_name)
return template.render(*args, **... | 117 | 28.65 | 125 | 17 | 778 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_0a73bc7bdd23e15c_26982006", "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."
] | [
25
] | [
29
] | [
16
] | [
10
] | |
2024-11-18T21:13:51.643464+00:00 | 1,635,185,628,000 | d9584482c93796c22370cbcacb6260cf8c6d4c93 | 3 | {
"blob_id": "d9584482c93796c22370cbcacb6260cf8c6d4c93",
"branch_name": "refs/heads/main",
"committer_date": 1635185952000,
"content_id": "011a30173a600d08a0915ebed22537c7da5055a0",
"detected_licenses": [
"Unlicense"
],
"directory_id": "a207b9cb8258e0c76dae7c070d6ddd55d5548106",
"extension": "py",
... | 2.640625 | stackv2 | from PasswordCardGenerator import PasswordCard
from _thread import start_new_thread
from random import randint
from time import sleep
from flask import *
# ^ ik ik bad practice but i dont want a 300 mile long line
import logging
import os
host = "0.0.0.0"
port = 5000
clearing_time = 60 * 60
app = Flask(__name__)
# ... | 149 | 27.62 | 114 | 17 | 998 | python | [{"finding_id": "codeql_py/code-injection_c3fd99beb624d6c6_21af8535", "tool_name": "codeql", "rule_id": "py/code-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This code execution depends on a [user-provided value](1).\nThis code execution depends on a [user-provided... | 2 | true | [
"CWE-094",
"CWE-215"
] | [
"py/code-injection",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This code execution depends on a [user-provided value](1).\nThis code execution depends on a [user-provided value](2).\nThis code execution depends on a [user-provided value](3).\nThis code execution depends on a [user-provided value](4).\nThis code execution depends on a [user-provided value](1).\nThis code execu... | [
97,
145
] | [
null,
149
] | [
31,
5
] | [
35,
6
] | |
2024-11-18T21:14:01.204922+00:00 | 1,594,068,008,000 | ede315fe56a00148d0a3279c00fc87be33a19685 | 3 | {
"blob_id": "ede315fe56a00148d0a3279c00fc87be33a19685",
"branch_name": "refs/heads/master",
"committer_date": 1594068008000,
"content_id": "1dbfd618112bb15ed7a4eeb14aca25e0a47c9a50",
"detected_licenses": [
"MIT"
],
"directory_id": "74bb2a387e26fe4bf6d8b071b19f178b83648cec",
"extension": "py",
"fi... | 2.671875 | stackv2 | from django.core.management.base import BaseCommand
from django.utils.crypto import get_random_string
from argparse import RawTextHelpFormatter
from django.conf import settings
import pathlib
import re
from datetime import datetime
import shutil
class Command(BaseCommand):
help = """
usage: ./manage.py se... | 90 | 39.93 | 117 | 18 | 823 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_63ba6b4a31ed304a_db257f30", "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 (secret)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text."
] | [
64
] | [
null
] | [
34
] | [
44
] | |
2024-11-18T21:14:11.988089+00:00 | 1,528,695,098,000 | e400dd53e2b6d040dd8d5b11e606f031574d002e | 3 | {
"blob_id": "e400dd53e2b6d040dd8d5b11e606f031574d002e",
"branch_name": "refs/heads/master",
"committer_date": 1528695098000,
"content_id": "6419bda6d450972b96713e1958aa26efb99c74eb",
"detected_licenses": [
"MIT"
],
"directory_id": "5ad221c636c5e6734402aff85c6fa720aa9b8727",
"extension": "py",
"fi... | 2.546875 | stackv2 | import os
from jinja2 import Environment, FileSystemLoader
class HandlerException(Exception):
pass
class BaseHandler:
template_file = None
out_file = None
def __init__(self, config):
self.config = config
assert self.template_file, 'No template configured'
assert self.out_f... | 43 | 28.4 | 76 | 14 | 251 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ce5c5f884641bce5_7fc5efea", "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."
] | [
31
] | [
32
] | [
21
] | [
50
] | |
2024-11-18T21:14:23.262432+00:00 | 1,558,172,567,000 | baf5498eced0c939064e7043970219c53d93eaf7 | 2 | {
"blob_id": "baf5498eced0c939064e7043970219c53d93eaf7",
"branch_name": "refs/heads/master",
"committer_date": 1558172567000,
"content_id": "fb1b116b43615211a1dea26c6fd478a7e86355b9",
"detected_licenses": [
"MIT"
],
"directory_id": "189f1a0befad521acb7846fe598f60ce515c99c0",
"extension": "py",
"fi... | 2.421875 | stackv2 | from json import loads
from time import sleep
from typing import List
from http import HTTPStatus
import urllib3
from requests import get
from .models.Branch import Branch
from .models.Instrument import Instrument
from .models.InstrumentUpdate import InstrumentUpdate
from .models.Market import Market
from .models.Sec... | 216 | 29.39 | 139 | 16 | 1,439 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e83596b6d906d0d1_146014cf", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
139,
209
] | [
140,
null
] | [
19,
19
] | [
51,
73
] | |
2024-11-18T20:10:47.740960+00:00 | 1,586,091,379,000 | 5e3145c50e6eeba981e4fb4c5e856b2876f77fea | 3 | {
"blob_id": "5e3145c50e6eeba981e4fb4c5e856b2876f77fea",
"branch_name": "refs/heads/master",
"committer_date": 1586091382000,
"content_id": "3ec529eaaca72693b2a8c2208b28a7a378861f31",
"detected_licenses": [
"MIT"
],
"directory_id": "70601b548b4e42eaffef35b900083ce918302d56",
"extension": "py",
"fi... | 2.75 | stackv2 | import requests
from bs4 import BeautifulSoup
from jinja2 import Template, Environment
from pathlib import Path
from dataclasses import dataclass
from typing import List
import re
# {Apple name: Dash name} in required output order
MODIFIERS = {"Command": "CMD", "Control": "CTRL", "Option": "ALT", "Shift": "SHIFT"}
# ... | 121 | 26.25 | 98 | 17 | 834 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_7399e29a60543592_fbdf36ee", "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."
] | [
99
] | [
null
] | [
11
] | [
24
] | |
2024-11-18T20:10:54.768487+00:00 | 1,438,608,729,000 | 23a6f42825a87f57d8c2139fde7536d14319678f | 3 | {
"blob_id": "23a6f42825a87f57d8c2139fde7536d14319678f",
"branch_name": "refs/heads/master",
"committer_date": 1438608729000,
"content_id": "e07d3f5aabe490ff359082a32b314e5df1a5ac4c",
"detected_licenses": [
"Unlicense"
],
"directory_id": "ad20e9a7856e2215712edd7df30d0e207e9748a6",
"extension": "py",... | 2.734375 | stackv2 | from flask import Flask, render_template, send_file, redirect
from PyPDF2 import PdfFileWriter, PdfFileReader
from os import makedirs
from os.path import isfile
from glob import glob
app = Flask(__name__)
def build_path(which, mod=None, page=None):
return 'pdfs/{}{}{}'.format(which,
... | 71 | 32.77 | 133 | 23 | 584 | python | [{"finding_id": "codeql_py/url-redirection_916f5ce531fa1a2b_c221049d", "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_... | 12 | true | [
"CWE-601",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/url-redirection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection 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).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-... | [
50,
17,
20,
26,
27,
28,
35,
44,
51,
52,
54,
59
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
25,
19,
15,
19,
14,
15,
22,
26,
19,
18,
19,
23
] | [
49,
29,
25,
29,
24,
25,
54,
43,
28,
32,
27,
32
] | |
2024-11-18T20:10:59.195281+00:00 | 1,634,632,953,000 | 5214bb549583e47ee8d6e92088285c54b62e1a98 | 2 | {
"blob_id": "5214bb549583e47ee8d6e92088285c54b62e1a98",
"branch_name": "refs/heads/master",
"committer_date": 1634632953000,
"content_id": "37c175974be8b815cec7fa4b3aac76fc993435b9",
"detected_licenses": [
"MIT"
],
"directory_id": "714b3afd9089063c88c23c003807af825576c9e6",
"extension": "py",
"fi... | 2.4375 | stackv2 | # coding=utf-8
from __future__ import print_function
import io
import os.path
import jinja2
from piecash import open_book
if __name__ == "__main__":
this_folder = os.path.dirname(os.path.realpath(__file__))
with open_book(
os.path.join(this_folder, "..", "gnucash_books", "CGT2015.gnucash"),
... | 141 | 33.16 | 95 | 14 | 1,417 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f02f8fc6073b09c4_92d1a3f4", "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."
] | [
20
] | [
null
] | [
15
] | [
71
] | |
2024-11-18T20:48:23.743043+00:00 | 1,470,797,408,000 | 9aab83053cd0fcf34b028151d2e3f90299c2b77b | 3 | {
"blob_id": "9aab83053cd0fcf34b028151d2e3f90299c2b77b",
"branch_name": "refs/heads/master",
"committer_date": 1470797408000,
"content_id": "ec82f14743deb1fe559445c2377a5101dffe7782",
"detected_licenses": [
"MIT"
],
"directory_id": "cb6c0b0930e0632eb09972b9b4b979011008132f",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
import time
import subprocess
import ConfigParser
from shutil import copyfile
class multiBot:
def __init__(self):
self.config = ConfigParser.ConfigParser()
self.config.read("MultiBotConfig.ini")
self.debugMode = None
self.minimized = None
self.loopCounter ... | 291 | 49.38 | 149 | 26 | 2,873 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_76a6a08f185416e0_a4cc792b", "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.\nThis expression stores [sensitive data (private)](3) as clear text.\nThis expression stores [sensitive data (private)](4) as clear text.",
"This expression stores [sensitive d... | [
199,
241
] | [
null,
null
] | [
32,
36
] | [
39,
43
] | |
2024-11-18T21:11:36.001519+00:00 | 1,633,740,085,000 | a779199849ebfd35342cbd17c087ddc197d4a598 | 3 | {
"blob_id": "a779199849ebfd35342cbd17c087ddc197d4a598",
"branch_name": "refs/heads/master",
"committer_date": 1633740085000,
"content_id": "fe890facd116973cb7892ecddb14a9352620f4d2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "26317335b4c318c996e0ea117fc9238b6b22473f",
"extension": "py"... | 2.609375 | stackv2 | import json
import csv
import requests
import re
import pandas as pd
from fuzzywuzzy import process
from bs4 import BeautifulSoup
ROOT_URL = 'https://www.clinicaltrialsregister.eu/ctr-search/search?query=covid-19&country=gb'
PAGES_URL = 'https://www.clinicaltrialsregister.eu/ctr-search/rest/download/summary?query=covi... | 159 | 31.11 | 136 | 17 | 1,326 | python | [{"finding_id": "codeql_py/request-without-cert-validation_468697a5b8f5bdc5_03b27f85", "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)."
] | [
17,
22,
37
] | [
19,
null,
null
] | [
10,
19,
27
] | [
20,
55,
76
] | |
2024-11-18T21:11:36.930602+00:00 | 1,686,084,730,000 | f6e21fca416e0cd005fd9e2d4d7bc116c2acafdd | 3 | {
"blob_id": "f6e21fca416e0cd005fd9e2d4d7bc116c2acafdd",
"branch_name": "refs/heads/main",
"committer_date": 1686084730000,
"content_id": "e3e03554250956fc86ba8e7a2dbf010e3bcbf370",
"detected_licenses": [
"MIT"
],
"directory_id": "482e253f792c60c6e730d71abc9d723e812327fb",
"extension": "py",
"file... | 2.875 | stackv2 | #!/usr/bin/env python
#
# Satellite backed nightstand clock
# Inspiration: https://en.wikipedia.org/wiki/Sputnik_1
# wishlist, based on position , do a tide/moon indicator on the 14 segment matrix
import time
import board
import busio
import serial
import adafruit_gps
from adafruit_ht16k33 import segments
# USB Gps ... | 95 | 34.58 | 81 | 12 | 992 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bb4cb9c8b917a95b_69dbd912", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
65,
66
] | [
null,
null
] | [
8,
8
] | [
56,
58
] | |
2024-11-18T21:26:03.421446+00:00 | 1,663,175,075,000 | c62e7c44d0c2c8b7af4b13110dbabc617298b7c2 | 3 | {
"blob_id": "c62e7c44d0c2c8b7af4b13110dbabc617298b7c2",
"branch_name": "refs/heads/main",
"committer_date": 1663175075000,
"content_id": "026d705f6a946f4d90ad25c2cc59852631dcc23b",
"detected_licenses": [
"MIT"
],
"directory_id": "baf3996414315ffb60470c40c7ad797bf4e6897f",
"extension": "py",
"file... | 2.515625 | stackv2 | import os
import requests
from flask import Flask, json, request, jsonify
from dotenv import load_dotenv
from flask_cors import CORS
from mongo_client import mongo_client
gallery = mongo_client.gallery
images_collection = gallery.images
load_dotenv(dotenv_path="./.env.local")
UNSPLASH_URL = "https://api.unsplash.com... | 67 | 28.39 | 84 | 14 | 471 | python | [{"finding_id": "codeql_py/reflective-xss_147bf77ebce458e1_ce7a3e6f", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
63
] | [
null
] | [
16
] | [
40
] | |
2024-11-18T21:26:10.690958+00:00 | 1,691,160,447,000 | 88b44f0789be69a0c59e1815883dae2393381f51 | 3 | {
"blob_id": "88b44f0789be69a0c59e1815883dae2393381f51",
"branch_name": "refs/heads/main",
"committer_date": 1691160447000,
"content_id": "419a6dc985289911e345d7737a76493b0106f9ba",
"detected_licenses": [
"MIT"
],
"directory_id": "51e4ae3bc7e715c52be1021e734f9dd8ce62eace",
"extension": "py",
"file... | 2.890625 | stackv2 | # SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (c) 2009 www.stani.be
import inspect
import re
# regular expression constants
DEF_DOC = r'%s\s*(\(.*?\))'
DEF_SOURCE = r'def\s+%s\s*(\(.*?\)):'
RE_EMPTY_LINE = re.compile(r'^\s*\n')
RE_FLAG = re.MULTILINE | re.DOTALL
RE_NEWLINE = re.compile('\n+')
RE_SPACE = r... | 172 | 26.01 | 77 | 19 | 1,195 | python | [{"finding_id": "codeql_py/redos_cf42b14bc8002bad_de70ebe7", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with 'a\\[' and containing many repetit... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with 'a\\[' and containing many repetitions of 'a\\]\\['."
] | [
22
] | [
null
] | [
21
] | [
25
] | |
2024-11-18T21:26:16.152187+00:00 | 1,618,801,877,000 | 8614a8125b92ced2cb8bab96490b8bcf9e6f36a3 | 2 | {
"blob_id": "8614a8125b92ced2cb8bab96490b8bcf9e6f36a3",
"branch_name": "refs/heads/main",
"committer_date": 1618801877000,
"content_id": "2253b1c2eeaa119883443b0dad6ccb3ec12c7228",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6fdae86f716bbf07535f7efc9a091ea348ea5de5",
"extension": "py",
... | 2.46875 | stackv2 | """
- Blockchain for Federated Learning -
Mining script
"""
import hashlib
import json
import time
from flask import Flask,jsonify,request
from uuid import uuid4
import requests
import random
import pickle
from blockchain import *
from threading import Thread, Event
from federatedlearner import *
import n... | 261 | 33.4 | 116 | 24 | 2,124 | python | [{"finding_id": "codeql_py/full-ssrf_45ec6e9d36af2430_ab84e26d", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 8 | true | [
"CWE-918",
"CWE-918",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/full-ssrf",
"py/full-ssrf",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1).",
"The full URL of this request 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).",
"This path depends on a [user-provided value](1).",
"This pa... | [
162,
190,
158,
159,
168,
186,
187,
196
] | [
163,
191,
null,
null,
null,
null,
null,
null
] | [
16,
16,
25,
19,
27,
25,
19,
27
] | [
37,
37,
81,
75,
83,
81,
75,
83
] | |
2024-11-18T21:52:25.804129+00:00 | 1,524,233,297,000 | 9c1fe1bcc93452faa63954ea68fcab640c51bd91 | 3 | {
"blob_id": "9c1fe1bcc93452faa63954ea68fcab640c51bd91",
"branch_name": "refs/heads/master",
"committer_date": 1524233297000,
"content_id": "b3b266c7ebedef52c5278787720abadabd8cf3ee",
"detected_licenses": [
"MIT"
],
"directory_id": "6249c224daf23739921e76854793b76e4ce110ab",
"extension": "py",
"fi... | 2.609375 | stackv2 | """
A Flask webserver for handling requests to the robot
"""
from __future__ import print_function
import os
import kinematics as k
from flask import Flask, render_template, request, jsonify
import json
import numpy as np
from collections import OrderedDict
import socket
class Server(object):
"""
A "singleto... | 305 | 27.96 | 119 | 16 | 2,197 | python | [{"finding_id": "codeql_py/reflective-xss_dc2b1edaf88fd488_62d0f819", "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... | 11 | true | [
"CWE-079",
"CWE-079",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"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).",
"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).",
"Thi... | [
82,
95,
194,
195,
206,
206,
211,
213,
213,
224,
233
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
12,
12,
30,
25,
23,
43,
27,
23,
43,
26,
15
] | [
28,
28,
37,
32,
41,
61,
34,
41,
61,
34,
23
] | |
2024-11-18T21:52:29.333146+00:00 | 1,592,369,471,000 | 4f487ea00a732e333a539b38570d9196ef14d9b2 | 3 | {
"blob_id": "4f487ea00a732e333a539b38570d9196ef14d9b2",
"branch_name": "refs/heads/master",
"committer_date": 1592369471000,
"content_id": "a4666f16effaca58405c7caab0d83a50d700daae",
"detected_licenses": [
"MIT"
],
"directory_id": "1448cfb7b30088fb642adf6690c33f2ae3e9c7a4",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 4 21:43:54 2020
@author: macbook
"""
from flask import Flask, request
from datetime import datetime
import urllib.request
from sqlalchemy import create_engine
from sqlalchemy_utils import database_exists, create_database
import psycopg2
import pan... | 116 | 27.35 | 88 | 17 | 854 | python | [{"finding_id": "codeql_py/flask-debug_3f53a895684aede4_5b7d2a74", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
116,
105
] | [
null,
113
] | [
null,
12
] | [
38,
33
] | |
2024-11-18T20:31:32.081079+00:00 | 1,476,390,657,000 | ae145f262100f77fb7d8d6eee011f738b5088ed2 | 3 | {
"blob_id": "ae145f262100f77fb7d8d6eee011f738b5088ed2",
"branch_name": "refs/heads/master",
"committer_date": 1476390657000,
"content_id": "66e8bcd59536633f0bd14237cf7eb0bb2502fd86",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4eb171f249c26898681e5e5c0ac07f21b878a07d",
"extension": "py"... | 2.546875 | stackv2 | from flask import Flask
from flask import render_template
from flask import request
from algorithm import *
import yaml
app = Flask(__name__)
import logging
logging.basicConfig(filename='example.log',level=logging.DEBUG)
@app.route('/')
def hello_world():
return 'Hello, World!'
@app.route('/compute', methods=... | 54 | 24.06 | 63 | 12 | 330 | python | [{"finding_id": "codeql_py/log-injection_c5e4614f71db1e91_d1f41718", "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... | [
24,
28,
32,
37,
42,
47
] | [
null,
null,
null,
null,
null,
null
] | [
26,
26,
26,
26,
26,
26
] | [
32,
32,
32,
36,
36,
36
] | |
2024-11-18T20:59:45.320544+00:00 | 1,553,502,386,000 | 67aaa8626762e01aca9828ab1f0c017e8142dfc8 | 3 | {
"blob_id": "67aaa8626762e01aca9828ab1f0c017e8142dfc8",
"branch_name": "refs/heads/master",
"committer_date": 1553502386000,
"content_id": "d206a0c6d33f76a513de1b420aa3e70764a2cc77",
"detected_licenses": [
"MIT"
],
"directory_id": "1ca2d20c028b884f4d565a20fb6d516cb266a35b",
"extension": "py",
"fi... | 2.578125 | stackv2 | # -*- coding: utf-8 -*-
"""
@author: alchenerd (alchenerd@gmail.com)
"""
import hashlib
import sqlite3
from PyQt5 import QtWidgets
from typing import Dict
# These modules are mine
if __name__ == '__main__':
from _login_skeleton import Ui_Dialog as LoginDialog
import sys
sys.path.append('../')
from myco... | 78 | 32.01 | 75 | 14 | 583 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_37d645ca2a74b891_afa3faa7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
67
] | [
null
] | [
23
] | [
43
] | |
2024-11-18T20:59:46.985379+00:00 | 1,470,415,398,000 | 18b4b650a28111ed7bdc36a3b2b69c29c031f226 | 2 | {
"blob_id": "18b4b650a28111ed7bdc36a3b2b69c29c031f226",
"branch_name": "refs/heads/master",
"committer_date": 1470415398000,
"content_id": "4d082414cde9cab053789b076639b5271aecab51",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a2ee50cba4fe11a6960f9980f435d2c97fead0eb",
"extension": "py"... | 2.484375 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
DOCUMENTATION = '''
---
module: ipa_role
short_description: Manager IPA role
description:
- Add, modify and delete a role within IPA server using IPA API
options:
cn:
description: Canonical name
required: true
aliases: ['name']
description:
description: Rol... | 259 | 29.25 | 119 | 17 | 1,757 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c0982ee9b8c7959c_2142f805", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
111,
128
] | [
null,
null
] | [
17,
17
] | [
81,
120
] | |
2024-11-18T21:10:30.364528+00:00 | 1,572,691,362,000 | 33993eeeb0b5b0f5a51434b43faab2c048f5b467 | 3 | {
"blob_id": "33993eeeb0b5b0f5a51434b43faab2c048f5b467",
"branch_name": "refs/heads/master",
"committer_date": 1572691362000,
"content_id": "93da9afd840525af97156b2b0d72d83b43dfac41",
"detected_licenses": [
"MIT"
],
"directory_id": "bb871a4f4bdd4006d61f295e6acccaa2ae7ae8e7",
"extension": "py",
"fi... | 3.015625 | stackv2 | """This module provides some functions to puput command.
These functions are mostly helpers and tools to support its options.
"""
import datetime
from jinja2 import Template
def format_generator(format):
"""This function returns a format function using format."""
def format_func(e):
t = Template(fo... | 59 | 23.81 | 76 | 14 | 308 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2b6645cb5a9bac09_82a59471", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
14
] | [
null
] | [
13
] | [
29
] | |
2024-11-18T21:10:38.307988+00:00 | 1,603,378,288,000 | f924b46f157b8e1795bd1c8546597e0ce2b41280 | 2 | {
"blob_id": "f924b46f157b8e1795bd1c8546597e0ce2b41280",
"branch_name": "refs/heads/main",
"committer_date": 1603378288000,
"content_id": "541e28193fb7d02f21db2d7ac6076bb8c076ceea",
"detected_licenses": [
"MIT"
],
"directory_id": "509ba24c9717229b849f27f5aea39d74fe49f09f",
"extension": "py",
"file... | 2.375 | stackv2 | from flask import Flask, render_template, request, redirect
from flask_socketio import SocketIO
import json
with open('screens.json', 'r') as f:
screens = json.load(f)
app = Flask(__name__)
app.config['SECRET_KEY'] = 'TEMP_KEY'
socketio = SocketIO(app, cors_allowed_origins='*')
# Key: player name, Value: diction... | 68 | 27.09 | 110 | 12 | 436 | python | [{"finding_id": "codeql_py/url-redirection_f2a40661b3e59f7f_51e3d520", "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)."
] | [
57
] | [
null
] | [
25
] | [
36
] | |
2024-11-18T21:10:53.118735+00:00 | 1,632,782,901,000 | 239450bcfc762e61f3699545e589bbfc467578be | 3 | {
"blob_id": "239450bcfc762e61f3699545e589bbfc467578be",
"branch_name": "refs/heads/master",
"committer_date": 1632782901000,
"content_id": "c2cd765a84327aa6811b1076f3f7c87b7bfc953e",
"detected_licenses": [
"MIT"
],
"directory_id": "e46cfcfab8cb5bcb57d0e86caa2a6e7c5159e36e",
"extension": "py",
"fi... | 2.8125 | stackv2 | from typing import Callable
from models.formula import Formula
from models.exercise_parts import ExerciseParts
from itertools import product
from typing import Callable
import random
import jinja2
from os import path
import numpy as np
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWa... | 120 | 31.5 | 98 | 15 | 1,053 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_db1898f047b29b5b_70dc36c8", "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."
] | [
101
] | [
null
] | [
15
] | [
99
] | |
2024-11-18T21:23:40.185738+00:00 | 1,468,149,941,000 | 7355382a7d5aa243732be1ddf352c0f0a7458ea7 | 2 | {
"blob_id": "7355382a7d5aa243732be1ddf352c0f0a7458ea7",
"branch_name": "refs/heads/master",
"committer_date": 1468149941000,
"content_id": "4be24e8b9200f8f6d8d6b0f4b4ecb455d2de5c69",
"detected_licenses": [
"MIT"
],
"directory_id": "92985263225dab3c8183219c48aa79a723f3f09e",
"extension": "py",
"fi... | 2.328125 | stackv2 | #!/usr/bin/python
# makeMariaDBconfig.py
# version 1.0
# Kai Yu
# github.com/readline
# 150515
##############################################
template = '''#!/bin/bash
__mysql_config() {
# Hack to get MySQL up and running... I need to look into it more.
echo "Running the mysql_config function."
mysql_install_db
chown... | 81 | 33.31 | 152 | 13 | 718 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_2955a7435aa0b267_fbc7a2d4", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.\nThis expression stores [sensitive data (password)](4) as clear text."
] | [
71
] | [
null
] | [
20
] | [
28
] | |
2024-11-18T21:23:49.650301+00:00 | 1,552,573,333,000 | fe79b382575d0bb9542ae811b628e32fe94a0595 | 3 | {
"blob_id": "fe79b382575d0bb9542ae811b628e32fe94a0595",
"branch_name": "refs/heads/master",
"committer_date": 1552573333000,
"content_id": "6c85793c6431ca80e7215e07960937627bfa8665",
"detected_licenses": [
"MIT"
],
"directory_id": "a9450ebdc79425cae023da5866b3d1d9b98d6fb2",
"extension": "py",
"fi... | 2.53125 | stackv2 | import os
import requests
from requests_oauthlib import OAuth1Session
from vrchat_api import VRChatAPI
from vrchat_api.enum import Status
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
apiKey = 'JlE5Jldo5Jibnk5O5hTx6XVqsJu4WJ26'
offline_location = os.environ['offline_location']
private_locat... | 114 | 31.96 | 88 | 16 | 813 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b03659f18ea8c450_d944bead", "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."
] | [
85
] | [
null
] | [
17
] | [
60
] | |
2024-11-18T21:23:49.884261+00:00 | 1,612,212,879,000 | f132919bb513c801f2770750dc687253cbd85242 | 2 | {
"blob_id": "f132919bb513c801f2770750dc687253cbd85242",
"branch_name": "refs/heads/main",
"committer_date": 1612212879000,
"content_id": "3069d151a7dfa0bb46758d9d53daf0df8c93f216",
"detected_licenses": [
"MIT"
],
"directory_id": "ed3f1444007ba0d75bef552c91df14521b9d14f0",
"extension": "py",
"file... | 2.421875 | stackv2 | #Get Youtube html
import urllib.request
from urllib.request import Request, urlopen
import lxml.html as LH
#Find all youtube IDs
import re
import requests
#Download and convert YT video
import youtube_dl
import time
#Get last song downloaded / delete last song/video
import shutil
import glob
import os
import sys
#Tele... | 280 | 34.33 | 151 | 20 | 2,285 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_83af4b111e8656e9_c7322ff7", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://music.youtube.com](1) may be at an arbitrary p... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://music.youtube.com](1) may be at an arbitrary position in the sanitized URL."
] | [
104
] | [
null
] | [
12
] | [
64
] | |
2024-11-18T21:23:51.890124+00:00 | 1,625,125,891,000 | 0b8506631b4583436f078073c7f6499fafc1e433 | 2 | {
"blob_id": "0b8506631b4583436f078073c7f6499fafc1e433",
"branch_name": "refs/heads/main",
"committer_date": 1625148934000,
"content_id": "de9a268618245e6be7feea161e7c915a233ff6e8",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "30ab9750e6ca334941934d1727c85ad59e6b9c8a",
"extension": "py",
... | 2.390625 | stackv2 | import os
import requests
import tarfile
from zentral.utils.local_dir import get_and_create_local_dir
GITHUB_BEATS_RELEASES_URL = "https://api.github.com/repos/elastic/beats/releases"
FILEBEAT_RELEASE_NAME_TMPL = "filebeat-{version}-{platform}-x86_64"
FILEBEAT_DOWNLOAD_URL_TMPL = "https://artifacts.elastic.co/downloa... | 39 | 37.05 | 106 | 17 | 358 | python | [{"finding_id": "codeql_py/tarslip_0157fb146a8bd0c3_fb6603a9", "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)."
] | [
37
] | [
null
] | [
9
] | [
11
] | |
2024-11-18T21:37:18.290288+00:00 | 1,518,181,152,000 | e2b38b7876b3d3faf57b6fd75a60661b516c7e67 | 4 | {
"blob_id": "e2b38b7876b3d3faf57b6fd75a60661b516c7e67",
"branch_name": "refs/heads/master",
"committer_date": 1518181152000,
"content_id": "3d4e9fb9d41073282ed89118c4d5d859487ad325",
"detected_licenses": [
"MIT"
],
"directory_id": "2e55184deb2f57a1af5f4c70e8934af4831647e6",
"extension": "py",
"fi... | 3.703125 | stackv2 | # 9-6
class Restaurant:
def __init__(self, name, cuisine_type):
self.restaurant_name = name
self.cuisine_type = cuisine_type
self.number_served = 0
def describe_restaurant(self):
print('\nRestaurant name: ' + self.restaurant_name.title())
print('Cuisine type: ' + self.c... | 158 | 26.25 | 78 | 17 | 1,044 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fb16a8c2a519e1a2_f96a465f", "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."
] | [
55
] | [
null
] | [
15
] | [
52
] | |
2024-11-18T21:37:30.412754+00:00 | 1,630,024,623,000 | 28bbc9d06d43e8c8c80b23ab3a81dbdd0373aa3e | 3 | {
"blob_id": "28bbc9d06d43e8c8c80b23ab3a81dbdd0373aa3e",
"branch_name": "refs/heads/main",
"committer_date": 1630024623000,
"content_id": "136800edef914f7fbc13e32498c9bb943e1fb983",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "7f672345a0322aff2cd5ce74468b7f6dfedd3674",
"extension": "py"... | 3.03125 | stackv2 | # Copyright 2020-2021 The MathWorks, Inc.
"""This file contains validators for various runtime artefacts.
A validator is defined as a function which verifies the input and
returns it unchanged if validation passes.
Returning inputs allows validators to be used inline with the input.
Example:
Original code: if( inpu... | 68 | 36.46 | 127 | 14 | 571 | python | [{"finding_id": "codeql_py/redos_5526abd47848ffc6_880e4ada", "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 '0@' and containing many repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '0@' and containing many repetitions of '_'."
] | [
46
] | [
null
] | [
24
] | [
38
] | |
2024-11-18T21:37:44.783316+00:00 | 1,619,734,477,000 | c9072747f230e53240fa4689b9d8b30c693a67ae | 2 | {
"blob_id": "c9072747f230e53240fa4689b9d8b30c693a67ae",
"branch_name": "refs/heads/master",
"committer_date": 1619734477000,
"content_id": "e1193ab06442af347281be4408f343c446033c93",
"detected_licenses": [
"MIT"
],
"directory_id": "6c3befa7b2dbbe51da6d370bcfc70f42afe848a0",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python
# iOSRestrictionBruteForce Version 3.0.0
from __future__ import print_function
import argparse
import os
import platform
import plistlib
import time
import requests
try:
input = raw_input # type: ignore
except NameError:
pass
BASE_URL = "https://nmlwx9nlt2.execute-api.us-east-1.amazon... | 239 | 26.44 | 88 | 16 | 1,563 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_94d40720eaa63f49_ca87bcc6", "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."
] | [
173
] | [
null
] | [
15
] | [
67
] | |
2024-11-18T21:37:45.680736+00:00 | 1,572,930,426,000 | b48273c24e1c06cb184d3f6bf9563754f70c9b5f | 2 | {
"blob_id": "b48273c24e1c06cb184d3f6bf9563754f70c9b5f",
"branch_name": "refs/heads/master",
"committer_date": 1572930426000,
"content_id": "d5cb7cb45edf1a90b51258da74fc6a1d2b6758fa",
"detected_licenses": [
"MIT"
],
"directory_id": "b1418525eef322a4bae2af8656a2d778dbe15235",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import Flask, jsonify, request
from w3lib.html import get_base_url
import extruct
import requests
app = Flask(__name__)
def extract_osm_tags(data):
tags = {}
schema_org_type = data.get('@type')
if schema_org_type == 'Restaurant':
tags['amenity'] = 'restaurant'
serves_cuisine... | 106 | 25.05 | 75 | 14 | 694 | python | [{"finding_id": "codeql_py/full-ssrf_ddd2f76c23aaa92c_4cbfa48c", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 3 | true | [
"CWE-918",
"CWE-117",
"CWE-117"
] | [
"py/full-ssrf",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The full URL of this request 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)."
] | [
80,
78,
83
] | [
null,
null,
null
] | [
9,
51,
59
] | [
26,
54,
62
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.