added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T21:52:31.374001+00:00 | 1,501,881,455,000 | 998c0a21f08e1078510596c6f0bfe5922ee43ef0 | 3 | {
"blob_id": "998c0a21f08e1078510596c6f0bfe5922ee43ef0",
"branch_name": "refs/heads/master",
"committer_date": 1501881455000,
"content_id": "b39239e90307cc71e8630a41cb73bd9816efa911",
"detected_licenses": [
"MIT"
],
"directory_id": "3b50b7a832c6e56ece66a8ffb7f56fc65a5b5744",
"extension": "py",
"fi... | 2.671875 | stackv2 | #!/usr/bin/env python
import click
import json
from flask import Flask, request
# Init with default config
app = Flask(__name__)
HEADERS = {
'Access-Control-Allow-Origin': '*',
'content-type': 'application/json; charset=utf-8'
}
@click.command()
@click.option('--port', default=8888, metavar='<portNum>', sh... | 46 | 21.78 | 77 | 11 | 270 | python | [{"finding_id": "codeql_py/reflective-xss_03a4ee217f153f0c_9490ea16", "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)."
] | [
43
] | [
null
] | [
13
] | [
47
] | |
2024-11-18T20:31:29.143152+00:00 | 1,623,575,430,000 | 25b8852a448d5ede47e964398f9daa36e8c4c7e1 | 3 | {
"blob_id": "25b8852a448d5ede47e964398f9daa36e8c4c7e1",
"branch_name": "refs/heads/main",
"committer_date": 1623575430000,
"content_id": "ff326d9252a4660a4bb3c54ebdb707d73ed20af0",
"detected_licenses": [
"MIT"
],
"directory_id": "563f92d51fecae52a4af58e27f9782221bb9b378",
"extension": "py",
"file... | 3.3125 | stackv2 | """This module defines the ReachyAudioTextToSpeech class."""
import time
import pyttsx3
import numpy as np
import scipy.io.wavfile as sc
from gtts import gTTS
from pydub import AudioSegment
from .reachyAudioPlayerRecorder import ReachyAudioPlayerRecorder
class ReachyAudioTextToSpeech():
"""The ReachyTextToSpeech... | 135 | 31.64 | 77 | 14 | 1,021 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bddb067f120ddedf_7c329420", "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."
] | [
77
] | [
null
] | [
19
] | [
49
] | |
2024-11-18T21:00:01.497001+00:00 | 1,508,752,191,000 | b019b1da7264f80477cd53acb32e94f9f6fd5349 | 2 | {
"blob_id": "b019b1da7264f80477cd53acb32e94f9f6fd5349",
"branch_name": "refs/heads/master",
"committer_date": 1508752191000,
"content_id": "82634cbfc1ddd6add01732439ca4d34d38ec8a45",
"detected_licenses": [
"MIT"
],
"directory_id": "8d8c5366bed55e6bfe1902792d7b6b1ff35ffe61",
"extension": "py",
"fi... | 2.484375 | stackv2 | import os
import pymysql
import logging
from logging.handlers import RotatingFileHandler
from flask import Flask, request, render_template, redirect, url_for, flash, session
app = Flask(__name__)
# @app.route('/')
@app.route('/login/', methods=['GET','POST'])
def login():
error=None
if request.method == 'POST... | 73 | 32.88 | 109 | 16 | 589 | python | [{"finding_id": "codeql_py/sql-injection_f6ca4e4e0eaa76c0_c9927a48", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 2 | true | [
"CWE-089",
"CWE-117"
] | [
"py/sql-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
39,
23
] | [
null,
null
] | [
20,
81
] | [
102,
109
] | |
2024-11-18T21:10:41.763090+00:00 | 1,365,099,254,000 | a43a0bf98c04dc314cc0a6d4d68d5295cc5059e9 | 2 | {
"blob_id": "a43a0bf98c04dc314cc0a6d4d68d5295cc5059e9",
"branch_name": "refs/heads/master",
"committer_date": 1365099254000,
"content_id": "692dbeff42f7fea3809dd5de86b7dcbbcdb2c64b",
"detected_licenses": [
"BSD-3-Clause",
"BSD-2-Clause"
],
"directory_id": "da650c454c9f961c38310de25dc9367d19873ae5... | 2.34375 | stackv2 | from flask import Blueprint, render_template, flash, redirect, url_for, request
from flask.ext.login import current_user, login_required, login_user, logout_user, confirm_login
from chalice.extensions import lm
from chalice.auth.models import User
from sqlalchemy import and_
auth = Blueprint('auth', __name__, template... | 44 | 35.77 | 96 | 18 | 357 | python | [{"finding_id": "codeql_py/url-redirection_c3d7efec210adbd8_7b2147f5", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
26,
37
] | [
null,
null
] | [
33,
25
] | [
87,
79
] | |
2024-11-18T21:10:52.450315+00:00 | 1,555,053,310,000 | 87e54fd76b9ceedd3102e50c855592ac3a4072eb | 3 | {
"blob_id": "87e54fd76b9ceedd3102e50c855592ac3a4072eb",
"branch_name": "refs/heads/master",
"committer_date": 1555053310000,
"content_id": "b86a5ddae5df21c18003a5217801bef18cbd6040",
"detected_licenses": [
"MIT"
],
"directory_id": "c3b38cdfd5bafeadecd0909229518da82bc17df3",
"extension": "py",
"fi... | 2.65625 | stackv2 | # import csv
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
i... | 64 | 33.61 | 156 | 12 | 519 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_28c5d59594d9994a_5ecfa660", "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."
] | [
60
] | [
null
] | [
11
] | [
49
] | |
2024-11-18T21:10:54.348450+00:00 | 1,615,464,731,000 | 1c913b8009e02750797a09e284120dd6e3de7a86 | 3 | {
"blob_id": "1c913b8009e02750797a09e284120dd6e3de7a86",
"branch_name": "refs/heads/main",
"committer_date": 1615464731000,
"content_id": "a77270a6c8f171fb3db0686f9646b66ca4dbb04e",
"detected_licenses": [
"MIT"
],
"directory_id": "9592677377cf61ea0b4e60028e08998b2c429293",
"extension": "py",
"file... | 2.828125 | stackv2 | import os
import tkinter as tk
from tkinter import ttk
path = os.getenv("APPDATA") + "\\CoreTech\\options.opt"
user = ""
passwd = ""
#Window definition
root = tk.Tk()
root.title("Configurazione")
root.geometry('300x140+50-50')
root.resizable(tk.FALSE,tk.FALSE)
root.attributes("-topmost", 1)
root.iconbitmap("coretec... | 54 | 27.69 | 82 | 12 | 457 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_dab5ae62efaf7eb5_8ac06de0", "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."
] | [
21
] | [
null
] | [
29
] | [
49
] | |
2024-11-18T21:23:40.776120+00:00 | 1,489,261,609,000 | b29b6d7be8ace7aa69e30d091e074422efb5d11f | 3 | {
"blob_id": "b29b6d7be8ace7aa69e30d091e074422efb5d11f",
"branch_name": "refs/heads/master",
"committer_date": 1489261609000,
"content_id": "e853aef3fa7f1bf693d3b899f47955e81c1000d8",
"detected_licenses": [
"MIT"
],
"directory_id": "7572ea54ffbc56784670e405f22c96298f4e5b2e",
"extension": "py",
"fi... | 2.546875 | stackv2 | import os
import tarfile
from six.moves import cPickle as pickle
from six.moves.urllib.request import urlretrieve
import h5py
import genSVHNdict
def prepData():
url = 'http://ufldl.stanford.edu/housenumbers/'
def get_SVHN(filename, expected_bytes, force=False):
if force or not os.path.exists(filename):
print '... | 70 | 31.23 | 78 | 15 | 582 | python | [{"finding_id": "codeql_py/tarslip_e096ed89df273b66_f842789a", "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)."
] | [
34
] | [
null
] | [
4
] | [
7
] | |
2024-11-18T21:23:54.984279+00:00 | 1,562,218,117,000 | 53a570d973b5a41ce0d14a4943af420237d9e87c | 3 | {
"blob_id": "53a570d973b5a41ce0d14a4943af420237d9e87c",
"branch_name": "refs/heads/master",
"committer_date": 1562218117000,
"content_id": "8c08548125d11cf5890d5f81b1d4a14cad99334a",
"detected_licenses": [
"MIT"
],
"directory_id": "c5c756c97d6dcebc60569edea7983e719a30842a",
"extension": "py",
"fi... | 3.40625 | stackv2 | from flask import Flask
app = Flask(__name__)
top_html = """
<!doctype html>
<html lang="en"> <head> <title> Flask App </title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Add Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn... | 71 | 28.63 | 104 | 11 | 588 | python | [{"finding_id": "codeql_py/flask-debug_d4b11718d7b94c32_3075fe72", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-079",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
71,
52,
62
] | [
null,
null,
null
] | [
5,
12,
12
] | [
40,
46,
46
] | |
2024-11-18T21:37:44.505401+00:00 | 1,630,583,720,000 | 9399c9068d9d578e5aea178ae2d4d50ede4da749 | 3 | {
"blob_id": "9399c9068d9d578e5aea178ae2d4d50ede4da749",
"branch_name": "refs/heads/main",
"committer_date": 1630583720000,
"content_id": "102f41587f53f993c6f3d188e992a4214550ef69",
"detected_licenses": [
"MIT"
],
"directory_id": "6eb4004534a00ab93c968058dd89b9a2f8f4f6e9",
"extension": "py",
"file... | 2.5625 | stackv2 | from datetime import datetime
import os
from typing import Dict, Tuple, Union, Any
from flask import Flask, request
def create_app(run_as_test: bool=False) -> Flask:
app = Flask(__name__)
if run_as_test is False:
app.config["SQLALCHEMY_DATABASE_URI"] = os.environ["DATABASE_URI"]
else:
app... | 77 | 27.79 | 74 | 16 | 519 | python | [{"finding_id": "codeql_py/reflective-xss_7341fcce54cfe043_de5f9ebd", "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)."
] | [
52
] | [
null
] | [
20
] | [
56
] | |
2024-11-18T21:59:02.899255+00:00 | 1,459,958,780,000 | 7c79812c09c46b9e3d2e35ec1b838ad637d35046 | 3 | {
"blob_id": "7c79812c09c46b9e3d2e35ec1b838ad637d35046",
"branch_name": "refs/heads/master",
"committer_date": 1459958780000,
"content_id": "22eb987ca1cd90dbcb85bd94b248c39a63b56813",
"detected_licenses": [
"MIT"
],
"directory_id": "b8ee71cb208b740ce3584d1c70b77b42bbb3fb02",
"extension": "py",
"fi... | 2.53125 | stackv2 | '''
The MIT License (MIT)
Copyright (c) 2016 Erika Jonell (xevrem)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modif... | 188 | 29.55 | 124 | 17 | 1,238 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_286c6734a46e6c86_6905ba03", "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."
] | [
38
] | [
null
] | [
7
] | [
56
] | |
2024-11-18T21:59:07.316489+00:00 | 1,603,824,328,000 | 5fbfa6f3be6739973a5667b7554986cc93a4d1d1 | 2 | {
"blob_id": "5fbfa6f3be6739973a5667b7554986cc93a4d1d1",
"branch_name": "refs/heads/main",
"committer_date": 1603824328000,
"content_id": "49e1cf2f068dbffb6b4130ad1dedcdc265083137",
"detected_licenses": [
"MIT"
],
"directory_id": "3f15e9a8bd49dd0a4880f272c1febe918a29e3b2",
"extension": "py",
"file... | 2.4375 | stackv2 | import re
from pygls.types import Diagnostic, Position, Range
def get_translation_diagnostics(ls, params):
document = ls.workspace.get_document(params.textDocument.uri)
pattern = re.compile(
r"_\(([\"']{,3})(?P<message>((?!\1).)*)\1(\s*,\s*context\s*=\s*([\"'])(?P<py_context>((?!\5).)*)\5)*(\s*,\s*(.)*?\s*(,\s*... | 80 | 27.9 | 167 | 20 | 614 | python | [{"finding_id": "codeql_py/redos_66b36f7dc1fcebb0_f84045b2", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ' ,'.", "remediat... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ' ,'."
] | [
10
] | [
null
] | [
116
] | [
119
] | |
2024-11-18T21:59:15.184981+00:00 | 1,624,345,117,000 | d0c636950f3f129d4e0086b1676002f7be78bf8d | 4 | {
"blob_id": "d0c636950f3f129d4e0086b1676002f7be78bf8d",
"branch_name": "refs/heads/main",
"committer_date": 1624345117000,
"content_id": "8a2d4afc80b29f4458beab89b79737078851493c",
"detected_licenses": [
"MIT"
],
"directory_id": "782273bb84608fd6ca05aaa6fbead52bd0092ae2",
"extension": "py",
"file... | 3.5625 | stackv2 | from flask import Flask, request, render_template
from utils.functions import read_json #importa las librerias e importa de utils la funcion read_json
import os
# Mandatory
app = Flask(__name__) # __name__ --> __main__
# ---------- Flask functions ----------
@app.route("/") # @ --> esto representa el decorador de... | 58 | 42.76 | 167 | 12 | 623 | python | [{"finding_id": "codeql_py/reflective-xss_307e2fefc1ce994c_ddd4e10f", "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)."
] | [
27
] | [
null
] | [
16
] | [
28
] | |
2024-11-18T21:59:15.706734+00:00 | 1,690,461,619,000 | 650365040638e3e4100e084f23bb347742974337 | 3 | {
"blob_id": "650365040638e3e4100e084f23bb347742974337",
"branch_name": "refs/heads/master",
"committer_date": 1690461619000,
"content_id": "6a95841c221492ae0042a280bfb6c578f001f806",
"detected_licenses": [
"MIT"
],
"directory_id": "14990fe6493928adb17f401895a25a66391f2cef",
"extension": "py",
"fi... | 3.0625 | stackv2 | import customtkinter
from PIL import Image
import os
customtkinter.set_appearance_mode("dark")
class App(customtkinter.CTk):
width = 900
height = 600
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.title("CustomTkinter example_background_image.py")
se... | 61 | 47.75 | 120 | 15 | 761 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_770107e5433b6231_51596983", "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."
] | [
49
] | [
null
] | [
84
] | [
109
] | |
2024-11-18T22:11:24.031228+00:00 | 1,552,200,931,000 | d5d6d5a013e1f621a1ba11ddd3ac9aed420eda99 | 2 | {
"blob_id": "d5d6d5a013e1f621a1ba11ddd3ac9aed420eda99",
"branch_name": "refs/heads/master",
"committer_date": 1552200931000,
"content_id": "3ace27cea3fee81d58884936abe21df4b6d25149",
"detected_licenses": [
"MIT"
],
"directory_id": "029bbc411e281eb0ec85ffc456646a4783c67138",
"extension": "py",
"fi... | 2.3125 | stackv2 | import flask
import os
from flask import request, jsonify, send_from_directory
from flask_limiter import Limiter
from flask_limiter.util import get_remote_address
import flask_monitoringdashboard as dashboard
from visualizer import crawl
from visualizer.page import Page
from visualizer.helpers import ERROR_MESSAGES
f... | 184 | 28.59 | 86 | 17 | 1,257 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_5331d536f6ce1100_98c317cd", "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."
] | [
44
] | [
null
] | [
18
] | [
23
] | |
2024-11-18T22:11:26.837069+00:00 | 1,521,389,028,000 | f5d2ac6ce85135b0abf51754f52e34d7cda9254a | 2 | {
"blob_id": "f5d2ac6ce85135b0abf51754f52e34d7cda9254a",
"branch_name": "refs/heads/master",
"committer_date": 1521389028000,
"content_id": "9daa012a6154a7d62adec73717dffaf51b38d421",
"detected_licenses": [
"MIT"
],
"directory_id": "a12cf2823f4ad4ab0baf90cc5ffa8193f84bae13",
"extension": "py",
"fi... | 2.484375 | stackv2 | from flask import Flask, request, render_template, abort
import os, requests
app = Flask(__name__)
class user:
def __init__(self, username, password):
self.username = username
self.__password = password
self.files = []
def getPass(self):
return self.__password
users = {}
user... | 72 | 35.78 | 106 | 20 | 614 | python | [{"finding_id": "codeql_py/full-ssrf_fd72277f4e59c029_9cd0ab7f", "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-022",
"CWE-022"
] | [
"py/full-ssrf",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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)."
] | [
60,
52,
61
] | [
null,
null,
null
] | [
16,
17,
18
] | [
54,
21,
44
] | |
2024-11-18T22:11:26.892857+00:00 | 1,560,629,582,000 | eeaa6e58e7acf67a381e43e87be950c3f24f495a | 3 | {
"blob_id": "eeaa6e58e7acf67a381e43e87be950c3f24f495a",
"branch_name": "refs/heads/master",
"committer_date": 1560629582000,
"content_id": "d4a4e31ed699c2b86527811faefd5113925d4414",
"detected_licenses": [
"MIT"
],
"directory_id": "1338c11d306cfd09e9962beed9758ed45f138755",
"extension": "py",
"fi... | 2.984375 | stackv2 | """
MIT License
Copyright (c) 2019 AlexTemnyakov
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... | 98 | 36.83 | 81 | 21 | 811 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_b321d1ee9bd2e8dc_23e2d045", "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.\... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensiti... | [
48,
73,
78,
90,
96
] | [
null,
null,
null,
null,
null
] | [
24,
32,
32,
27,
27
] | [
65,
73,
73,
35,
35
] | |
2024-11-18T22:11:37.233804+00:00 | 1,593,309,188,000 | c6686dcbfc9671916c292c96fcc77d12ec54e852 | 3 | {
"blob_id": "c6686dcbfc9671916c292c96fcc77d12ec54e852",
"branch_name": "refs/heads/master",
"committer_date": 1593309188000,
"content_id": "00b53f43b5c058425eeabab90b99d5d1bd3f4f6b",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "843d0ced920b5be706cb8aae8cbb6a1e55bb8506",
"exten... | 2.84375 | stackv2 | """Generates HTML grid for gallery examples"""
import os
import glob
import jinja2
from utils import to_presentation_name, to_snake_case_layer_name
here = os.path.dirname(os.path.abspath(__file__))
EXAMPLE_GLOB = "../examples/*_layer.py"
layer_names = sorted([to_snake_case_layer_name(layer_name) for layer_name in gl... | 65 | 20.78 | 105 | 13 | 398 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_725aa47ba79cd55d_497e21e8", "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
] | [
55
] | [
17
] | [
2
] | |
2024-11-18T22:11:44.009633+00:00 | 1,617,144,232,000 | 27b00d079e202311114adb30e7fb0977825d8c52 | 3 | {
"blob_id": "27b00d079e202311114adb30e7fb0977825d8c52",
"branch_name": "refs/heads/main",
"committer_date": 1617144232000,
"content_id": "57c06affea0c60309ae64b5afd275a53f8f8719f",
"detected_licenses": [
"MIT"
],
"directory_id": "d7ef9e083835b519d8f052ead867bc5ab32a8701",
"extension": "py",
"file... | 2.5625 | stackv2 | #!/usr/bin/python3
import os
import argparse
import time
import paramiko
from scp import SCPClient
import sys
# import subprocess
default_base_dir = str(os.getcwd())
def is_file_modified(th_time = 3, file = ""):
modTimesinceEpoc = os.path.getmtime(file)
modificationTime = time.strftime('%Y-%m-%d:%H:%M:%S', ... | 70 | 43.16 | 140 | 16 | 781 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a3f2cfd0da6f8869_6c79bb17", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation",
"py/paramiko-missing-host-key-validation"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe.",
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
29,
31
] | [
null,
null
] | [
5,
5
] | [
65,
65
] | |
2024-11-18T22:11:51.843207+00:00 | 1,540,471,775,000 | 21fe81f19946a86f4f8119c3b0ffacf031a97e76 | 2 | {
"blob_id": "21fe81f19946a86f4f8119c3b0ffacf031a97e76",
"branch_name": "refs/heads/master",
"committer_date": 1540471775000,
"content_id": "f23f94e49cb5f0f9f2a6a4b896f6466b7beefe4e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3dc66821d57df0d90330e076dfe2b8572ec9740c",
"extension": "py"... | 2.5 | stackv2 | from flask import Blueprint, flash, redirect, url_for, render_template, request, current_app
from app.forms import RegisterForm, LoginForm, UploadForm
from app.email import send_mail
from app.models import User
from app.extensions import db, photos
from flask_login import login_user, logout_user, login_required, curren... | 115 | 28.5 | 98 | 17 | 845 | python | [{"finding_id": "codeql_py/url-redirection_2daabf37c3d9e017_86b0ba65", "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)."
] | [
59
] | [
null
] | [
29
] | [
78
] | |
2024-11-18T22:24:01.736841+00:00 | 1,529,880,522,000 | 30d1a3c1db32d0a0ff1955203ee7b317629ab229 | 3 | {
"blob_id": "30d1a3c1db32d0a0ff1955203ee7b317629ab229",
"branch_name": "refs/heads/master",
"committer_date": 1529880522000,
"content_id": "0a699fee4fd45790dad6c305ff70e3b643f28995",
"detected_licenses": [
"MIT"
],
"directory_id": "c7d6c70132d626f7c572ecc3d74fc117cacc88bf",
"extension": "py",
"fi... | 2.90625 | stackv2 | """This module contains the Eventorial class and its utility functions.
Attributes:
URL_REGEX (Pattern): Regex used to check if a string is a url
SANITISE_REGEX_STEPS (Tuple[Pattern]): Regex applied to a string in order to obtain a sanitised version of said string.
"""
import asyncio
import logging
import os
... | 264 | 32.61 | 147 | 19 | 1,972 | python | [{"finding_id": "codeql_py/overly-large-range_9c71719b2592b22f_39406af2", "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\\\\[\\\\\\\\]^_\\]."
] | [
25
] | [
null
] | [
56
] | [
59
] | |
2024-11-18T22:24:03.773456+00:00 | 1,540,165,186,000 | 7f934634232210728041bfb866a743f5ce56b3f2 | 4 | {
"blob_id": "7f934634232210728041bfb866a743f5ce56b3f2",
"branch_name": "refs/heads/master",
"committer_date": 1540165186000,
"content_id": "ab819f4b8b7ab9e214b7f87fcc4063f022938a59",
"detected_licenses": [
"MIT"
],
"directory_id": "8a005b815a0aa3898e831593721faebad6c9e4a7",
"extension": "py",
"fi... | 3.625 | stackv2 | ''' Task11.py '''
from random import randint
from task9 import pad_bytes_size
from task10 import MyCBC
from Crypto.Cipher import AES
def random_AES_key():
return bytes([randint(0, 255) for _ in range(16)])
def encryption_oracle(plaintext):
new_key = random_AES_key()
new_iv = bytes([randint(0, 255) for... | 52 | 25.96 | 76 | 16 | 425 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_0cab964e0c32a347_245dfbe4", "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."
] | [
31
] | [
null
] | [
23
] | [
63
] | |
2024-11-18T22:36:21.337820+00:00 | 1,598,607,795,000 | 979dd34de6c17ad4f57b4bc4fc0f772e62c09109 | 2 | {
"blob_id": "979dd34de6c17ad4f57b4bc4fc0f772e62c09109",
"branch_name": "refs/heads/master",
"committer_date": 1598607795000,
"content_id": "a739e87e04ea421aecddd312d8be473c233d6661",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "649a88feca61ccd85c93b2dda6e171d411638151",
"extension": "py"... | 2.484375 | stackv2 | from flask import Flask, render_template, request
import json, random
app = Flask(__name__)
w = json.load(open('worldl.json'))
@app.route('/')
def root():
return render_template('index.html', w = w, al = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'],
con... | 84 | 28.94 | 157 | 22 | 734 | python | [{"finding_id": "codeql_py/flask-debug_da608c8b97565ad6_6e41564c", "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-079",
"CWE-079",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a ... | [
80,
30,
52,
77
] | [
null,
null,
null,
null
] | [
2,
9,
9,
9
] | [
48,
60,
41,
60
] | |
2024-11-18T22:36:39.700898+00:00 | 1,525,957,274,000 | 02c1b01907baf14cff20d4789dc4c056b30f9f07 | 3 | {
"blob_id": "02c1b01907baf14cff20d4789dc4c056b30f9f07",
"branch_name": "refs/heads/master",
"committer_date": 1525957274000,
"content_id": "5e42d486ace4a0954d0566bf08db5ea1e5d1ba0f",
"detected_licenses": [
"MIT"
],
"directory_id": "fdfb0a270cd89145c20ebe5a56cf675201c6afe3",
"extension": "py",
"fi... | 2.71875 | stackv2 | # coding=utf-8
# @File : encryption.py
# @Author: PuJi
# @Date : 2018/4/17 0017
import rsa, os, sys
utilspath = os.path.split(__file__)[0]
# utilspath = os.getcwd()
pubkeypath = os.path.join(utilspath, 'public.pem')
privkeypath = os.path.join(utilspath, 'private.pem')
# pubkeypath = baseconfig.pubkeypath
# privkeyp... | 73 | 29.08 | 59 | 15 | 566 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f0499249ae59c9e1_ca6e1584", "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-326"
] | [
"py/clear-text-logging-sensitive-data",
"py/weak-crypto-key"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable."
] | [
73,
32
] | [
null,
null
] | [
11,
39
] | [
19,
56
] | |
2024-11-18T22:36:40.530988+00:00 | 1,473,954,648,000 | 35886cc7c48af203e5126218e9ecc971a8d241e9 | 3 | {
"blob_id": "35886cc7c48af203e5126218e9ecc971a8d241e9",
"branch_name": "refs/heads/master",
"committer_date": 1473954648000,
"content_id": "a9062d7da24b700e13bff1108f9df348cbc9d4fb",
"detected_licenses": [
"MIT"
],
"directory_id": "6c52ea63f8a34a1fc8156539534b39d54217852a",
"extension": "py",
"fi... | 2.75 | stackv2 | #!/bin/python2
from getpass import getpass
from flask_bcrypt import Bcrypt
from app import app
from init_app import init_app
import sqlalchemy
from flask_sqlalchemy import SQLAlchemy
from sqlalchemy_utils import database_exists, create_database
def get_database_info(driver):
print "Database address (empty ... | 127 | 24.39 | 100 | 14 | 728 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_661c692eb12a89e4_6c3313ac", "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."
] | [
86
] | [
null
] | [
14
] | [
64
] | |
2024-11-18T22:36:53.519405+00:00 | 1,640,844,067,000 | f89e18c11ed633dc907a9ebd4f7a526bfffbc076 | 2 | {
"blob_id": "f89e18c11ed633dc907a9ebd4f7a526bfffbc076",
"branch_name": "refs/heads/master",
"committer_date": 1640844067000,
"content_id": "5589e8de3b23a73f9adbb70e5e3647e847528b2b",
"detected_licenses": [
"MIT"
],
"directory_id": "80b32608b3066c4c8204cd137a06c7e5bb3999d2",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
from marvinbot.plugins import Plugin
from marvinbot.utils import trim_markdown
from marvinbot.handlers import CommandHandler, CommonFilters, MessageHandler
from jinja2 import Template
from greeting_plugin.models import ChatGreeting
import logging
log = logging.getLogger(__name__)
class Greeti... | 147 | 35.21 | 153 | 16 | 1,079 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_60d690bc7864dc62_3b223daa", "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."
] | [
81,
95
] | [
null,
null
] | [
24,
20
] | [
63,
43
] | |
2024-11-18T20:23:15.483372+00:00 | 1,501,772,763,000 | ae3df878ab34da6d037756a9b56bcbbfbabb674b | 2 | {
"blob_id": "ae3df878ab34da6d037756a9b56bcbbfbabb674b",
"branch_name": "refs/heads/master",
"committer_date": 1501772763000,
"content_id": "3a3fcc2b85d8da53bb5f97ce9edca53a9fd4b871",
"detected_licenses": [
"MIT"
],
"directory_id": "e0400d6f6df6ad1a94fc484225c43978c8eb9fb9",
"extension": "py",
"fi... | 2.46875 | stackv2 | import sublime
import sublime_plugin
import re
import os.path
import pprint
from urllib.parse import quote
from bs4 import BeautifulSoup
# for dbug
pp = pprint.PrettyPrinter(indent=4)
pattern_reference_link = re.compile(r'\[.+?\]$') # [Heading][my-id]
pattern_link = re.compile(r'\[(.+?)\]\(.+?\)') # [link](http://ww... | 355 | 34.24 | 97 | 24 | 2,836 | python | [{"finding_id": "codeql_py/bad-tag-filter_d3fdb577b54f082a_fa5ba83f", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression only parses --> and not --!> as a HTML comment end tag.", "remediation": "", "location":... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression only parses --> and not --!> as a HTML comment end tag."
] | [
18
] | [
null
] | [
36
] | [
39
] | |
2024-11-18T21:22:40.834427+00:00 | 1,554,219,175,000 | b604d49eceb30586ce0d2ba65a84c938c21e9a1d | 3 | {
"blob_id": "b604d49eceb30586ce0d2ba65a84c938c21e9a1d",
"branch_name": "refs/heads/master",
"committer_date": 1554219175000,
"content_id": "396c66e70be2130ba7f6db732fc55ed0a9b14068",
"detected_licenses": [
"MIT"
],
"directory_id": "bff8bdb3f295b9478d9bfd9355f99a56b199166a",
"extension": "py",
"fi... | 2.84375 | stackv2 | import requests
import json
def printLine():
print('=' * 80)
def getPublicIP():
print('请将显示的公网IP地址,填至需要删除应用的服务器出口ip中')
print('请稍后,正在请求服务器...')
url = 'http://www.trackip.net/ip'
try:
r = requests.get(url, timeout=30)
print(r.text)
except:
print('未能获取到公网IP地址')
def pri... | 69 | 27.01 | 86 | 15 | 626 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ca787330f4e15144_22f9f1c7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secre... | [
37,
40,
58
] | [
null,
null,
null
] | [
37,
15,
15
] | [
40,
47,
37
] | |
2024-11-18T21:22:52.354927+00:00 | 1,636,231,046,000 | 2c0f8060c27f9708a2235d509c066a348ec4ba66 | 3 | {
"blob_id": "2c0f8060c27f9708a2235d509c066a348ec4ba66",
"branch_name": "refs/heads/main",
"committer_date": 1636231046000,
"content_id": "5f878bc9ee928156705a219ed503d86265bfa3f6",
"detected_licenses": [
"MIT"
],
"directory_id": "1c73829f2c5f0823a9ad70a7a5f43aec584066b6",
"extension": "py",
"file... | 2.609375 | stackv2 | import socket
from urllib.parse import quote_plus
from pprint import pprint
import ssl
request_text = """\
GET /?format=json&addressdetails=1&q={}\r\n\
HTTP/1.1\r\n\
HOST: nominatim.openstreetmap.org\r\n\
User-Agent: search4.py\r\n\
Connection: close\r\n\
\r\n\
"""
def geocode(address):
unencrypted_sock = socket.s... | 29 | 24.38 | 66 | 10 | 198 | python | [{"finding_id": "codeql_py/insecure-default-protocol_96d4cd1e5a2b32cb_41229635", "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."
] | [
17
] | [
null
] | [
12
] | [
45
] | |
2024-11-18T21:23:06.788958+00:00 | 1,580,258,037,000 | 399638db2accfd36080e56c921f5b3df9a25f9a9 | 4 | {
"blob_id": "399638db2accfd36080e56c921f5b3df9a25f9a9",
"branch_name": "refs/heads/master",
"committer_date": 1580258037000,
"content_id": "1ba3c5db3e855f714f6d010345783de1891fa76e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "413859d5b338e94e781e55bf300b28fa399b8171",
"extension": "py"... | 3.546875 | stackv2 | def create_record(name, telephone, address):
""""Create Record"""
record = {
'name': name,
'phone': telephone,
'address': address
}
return record
userOne = create_record("Vasya", "+7484234234", "Moscow")
userTwo = create_record("Petya", "+7484543534234", "SaintP")
print(userOn... | 24 | 22.29 | 82 | 14 | 174 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_14d23e6386a640a8_2427d057", "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."
] | [
14,
15
] | [
null,
null
] | [
7,
7
] | [
14,
14
] | |
2024-11-18T21:51:08.802633+00:00 | 1,491,183,623,000 | 5c16798d8e801280d83a7a72c917403cf31ed122 | 4 | {
"blob_id": "5c16798d8e801280d83a7a72c917403cf31ed122",
"branch_name": "refs/heads/master",
"committer_date": 1491183623000,
"content_id": "50fc500844a21e9046ba3a2069163e61007ba01c",
"detected_licenses": [
"MIT"
],
"directory_id": "d177f0b79efbd77f64f2ae2453e20571dc08977a",
"extension": "py",
"fi... | 4 | stackv2 | # Kaggle Python Tutorial on Machine Learning
# Section 1 - Getting Data
# Import the Pandas library
import pandas as pd
# Load the train and test datasets to create two DataFrames
train_url = "http://s3.amazonaws.com/assets.datacamp.com/course/Kaggle/train.csv"
train = pd.read_csv(train_url)
test_url = "http://s3.am... | 168 | 31.82 | 106 | 11 | 1,444 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1300c9e8ff4388f1_e2ab9a4a", "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."
] | [
82
] | [
null
] | [
7
] | [
19
] | |
2024-11-18T22:02:40.193180+00:00 | 1,595,582,863,000 | dc9cb4a85637f6031ea008a08d9427e538b91e36 | 3 | {
"blob_id": "dc9cb4a85637f6031ea008a08d9427e538b91e36",
"branch_name": "refs/heads/master",
"committer_date": 1595582863000,
"content_id": "7eeee12998ecf7a18ecf99cb200d4a8c08f0a283",
"detected_licenses": [
"MIT"
],
"directory_id": "2e078f51bfa17a4d2d9a0f212e6f40fd8a0cfdfd",
"extension": "py",
"fi... | 2.75 | stackv2 | from client_site import customer
from backend import logging as log
from exception import NoAccountException as ex
from random import randint as rint
from bank_site import bank_corps
class Bankaccount:
"""Bankaccount Verwaltung"""
count_bank_accounts = 0
def __init__(self, customer_details, bank_name, ba... | 137 | 44.15 | 113 | 20 | 1,435 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c1336391e76fc4ee_036b35d7", "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."
] | [
31
] | [
null
] | [
15
] | [
50
] | |
2024-11-18T22:16:45.218512+00:00 | 1,601,839,433,000 | 1b3b1b06790e0cc2a139fa8ee14e18b9c7e75e61 | 3 | {
"blob_id": "1b3b1b06790e0cc2a139fa8ee14e18b9c7e75e61",
"branch_name": "refs/heads/master",
"committer_date": 1601839433000,
"content_id": "028f798b18ff15fff8d60c4497f551c619ddd28c",
"detected_licenses": [
"MIT"
],
"directory_id": "13fc8a7125622864724eebb52a2faa32c4698788",
"extension": "py",
"fi... | 2.78125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Sat Dec 22 12:12:53 2018
@author: logesh
"""
#import statements
import pandas as pd
import numpy as np
import re
import nltk
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
import unicodedata
from pattern.en import suggest
import contractions
pattern = r... | 77 | 25.27 | 98 | 13 | 509 | python | [{"finding_id": "codeql_py/overly-large-range_801c4afdccf22cb2_9a7cb1cf", "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\\]."
] | [
28
] | [
null
] | [
25
] | [
28
] | |
2024-11-18T22:27:39.013948+00:00 | 1,465,892,541,000 | 42c3c8d9d33ea2b547266f0b89851b5106aff4d7 | 3 | {
"blob_id": "42c3c8d9d33ea2b547266f0b89851b5106aff4d7",
"branch_name": "refs/heads/master",
"committer_date": 1465892541000,
"content_id": "1d98add7207df1120d556157ac81857326575ad2",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "729378206b90b9798dc8eaacea63ee4c783aa2c9",
"extension": "p... | 2.59375 | stackv2 | import sys
import os
from datetime import datetime
import yaml
import jinja2
def ComputeIntercoPfx(svlan):
""" Generates a 100.64/10 prefix based on the svlan-id
Output if svlan=1001 : 100.67.233
"""
byte1 = 100
byte2 = 64 + int(svlan/256)
byte3 = svlan%256
return str(byte1)+"."+str(byte2)+"."+str(by... | 34 | 28.62 | 76 | 11 | 306 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_a4a0fcb600c75a5d_a23938e0", "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
] | [
17
] | [
58
] | |
2024-11-18T22:27:42.327181+00:00 | 1,602,529,757,000 | 9879ffcbb27b204f41c85ce5d6537d801b765d81 | 4 | {
"blob_id": "9879ffcbb27b204f41c85ce5d6537d801b765d81",
"branch_name": "refs/heads/master",
"committer_date": 1602529757000,
"content_id": "f4d45274871f8919b00a72078a875b15cddeff75",
"detected_licenses": [
"MIT"
],
"directory_id": "9866db39160001acbf12c1b2b3f26a203a2cf901",
"extension": "py",
"fi... | 4.0625 | stackv2 | # Task 1
# Write a function that receives a piece of text and computes the frequency of
# the tokens appearing in the text (consider that a token is a string of contiguous
# characters between two spaces).
# Tokens and their frequencies are to be stored in a dictionary. The function
# prints tokens and their frequencie... | 233 | 33.47 | 110 | 15 | 2,096 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f71b3e5b013b2e27_b3a5edc9", "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."
] | [
78,
93
] | [
null,
null
] | [
11,
11
] | [
30,
30
] | |
2024-11-18T22:44:19.411889+00:00 | 1,634,757,055,000 | 58060a8925abfc653bd09251c481634ab533bbec | 3 | {
"blob_id": "58060a8925abfc653bd09251c481634ab533bbec",
"branch_name": "refs/heads/main",
"committer_date": 1634757055000,
"content_id": "9c47152933d3e07b3d4b8e7998caf21a50e7ec33",
"detected_licenses": [
"MIT"
],
"directory_id": "75d60687b4cc9fd096cf4eea5ea21ea9199f5ad2",
"extension": "py",
"file... | 2.65625 | stackv2 | import os
import requests
import json
import pandas as pd
from flask import Flask, request, Response
# constants
TOKEN = ''
## Info about the Bot
#https://api.telegram.org/bot/getMe
#
## get updates
#https://api.telegram.org/bot/getUpdates
## Webhook
#https://api.telegram.org/bot/setWebhook?url=https://.localhost.r... | 136 | 24.67 | 93 | 22 | 915 | python | [{"finding_id": "codeql_py/partial-ssrf_e0c4580c89feda8a_c38c7999", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
31
] | [
null
] | [
9
] | [
51
] | |
2024-11-18T22:44:22.388913+00:00 | 1,692,885,211,000 | 02f3d872e13997c46f05b9b9fdd11a5fab3f35c4 | 3 | {
"blob_id": "02f3d872e13997c46f05b9b9fdd11a5fab3f35c4",
"branch_name": "refs/heads/master",
"committer_date": 1692885211000,
"content_id": "e897aee4442360efa73c6478ffb1cc4829ae872d",
"detected_licenses": [
"MIT"
],
"directory_id": "b43e0384ec4bfacec2571a2bb41ce563267db449",
"extension": "py",
"fi... | 2.515625 | stackv2 | import requests
from jesse.services.env import ENV_VALUES
from jesse.services import logger
import jesse.helpers as jh
from timeloop import Timeloop
from datetime import timedelta
MSG_QUEUE = []
def start_notifier_loop():
"""
a constant running loop that runs in a separate thread and
checks for new messa... | 174 | 35.41 | 136 | 19 | 1,490 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_3a4349598342228d_b00546af", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://hooks.slack.com](1) may be at an arbitrary pos... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://hooks.slack.com](1) may be at an arbitrary position in the sanitized URL."
] | [
155
] | [
null
] | [
8
] | [
53
] | |
2024-11-18T21:00:38.360402+00:00 | 1,606,411,374,000 | 26b707cfd213ce93fbdd0645701ee5d0fbd18810 | 3 | {
"blob_id": "26b707cfd213ce93fbdd0645701ee5d0fbd18810",
"branch_name": "refs/heads/main",
"committer_date": 1606411374000,
"content_id": "3c78f2c4cfbfc8347a88af59556bc56bf69e5dcb",
"detected_licenses": [
"MIT"
],
"directory_id": "54308b0719e20c1e481cec340d2b34f8c19ef650",
"extension": "py",
"file... | 3.453125 | stackv2 | """
__author__ = 'quant-om'
This the implementation of Student class
"""
class Student:
def __init__(self, st_id, st_name):
self.st_id = st_id
self.st_name = st_name
self.gender = None
self.st_class = None
self.marks = {}
self.school = None
def set_gender(se... | 101 | 21.92 | 52 | 13 | 601 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0c6c01373ad5b1ab_f40578f5", "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."
] | [
93
] | [
null
] | [
7
] | [
30
] | |
2024-11-18T21:00:38.930482+00:00 | 1,675,827,940,000 | 612d5944af34317d38c221f0cc9e11725b355f74 | 3 | {
"blob_id": "612d5944af34317d38c221f0cc9e11725b355f74",
"branch_name": "refs/heads/master",
"committer_date": 1675827940000,
"content_id": "1dff18263d31053ba20b2ec9cf1db014c0299cb6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e30af91612ff8c1ea878daa40085005152c80174",
"extension": "py"... | 2.78125 | stackv2 | import json
word2cnt = dict()
with open('data.json') as fin:
for line in fin:
data = json.loads(line)
text = data['text'].split()
for word in text:
if word not in word2cnt:
word2cnt[word] = 0
word2cnt[word] += 1
train = 240000
with open('data.json') as fin, open('train.txt', 'w') as fou1, open('test.... | 32 | 25 | 97 | 22 | 287 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_da9c942718af2419_d77999b4", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text.",
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
30,
32
] | [
null,
null
] | [
15,
15
] | [
16,
16
] | |
2024-11-18T21:01:00.649022+00:00 | 1,565,027,322,000 | 4db3fdeb4ae1b7e25bb327b35271cf9c1f227c4e | 3 | {
"blob_id": "4db3fdeb4ae1b7e25bb327b35271cf9c1f227c4e",
"branch_name": "refs/heads/master",
"committer_date": 1565027322000,
"content_id": "4e2f28a5c25b8ef08abcfb819ccaa14bf0637a5a",
"detected_licenses": [
"MIT"
],
"directory_id": "c5e4ade1d602ea83dbad1512c6040ca772b86ac3",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
import shutil
import markdown
import frontmatter
import datetime
import json
from jinja2 import Template
from pathlib import Path
class Generator:
def __init__(self, content = "", dest_path = "output.html", config = {}, is_markdown = False):
if not dest_path:
raise ValueError('dest_path must have... | 239 | 26.09 | 151 | 23 | 1,580 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_81acc7c2493e58bb_569d2eb0", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
30,
43
] | [
null,
null
] | [
16,
16
] | [
40,
37
] | |
2024-11-18T21:01:07.642631+00:00 | 1,599,717,217,000 | f505d1d91ed53913cab712f32586d5751f4c6e3f | 3 | {
"blob_id": "f505d1d91ed53913cab712f32586d5751f4c6e3f",
"branch_name": "refs/heads/master",
"committer_date": 1599717217000,
"content_id": "c0e885d58fdecfaa0e5d2bde88866918866067f7",
"detected_licenses": [
"MIT"
],
"directory_id": "ef93d6c600868d348831470eaa4e44e216e28c48",
"extension": "py",
"fi... | 2.828125 | stackv2 | #--coding-- utf-8
import os
from tkinter import *
import tkinter as tk
from tkinter import filedialog
from tkinter import messagebox
import paramiko
HOST="0.0.0.0"
PORT=22
USERNAME='xxx'
PWD='123456'
remote_foler="/home/xxx/"
def get_source(self):
"""Clears the current entry box, then replaces it with
the se... | 150 | 34.15 | 121 | 15 | 1,346 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_e93f4218c6ebca28_07bdf935", "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."
] | [
69
] | [
null
] | [
9
] | [
73
] | |
2024-11-18T21:01:08.546491+00:00 | 1,400,230,324,000 | 370a469f55ec5823e2844759c04525475bbc1205 | 3 | {
"blob_id": "370a469f55ec5823e2844759c04525475bbc1205",
"branch_name": "refs/heads/master",
"committer_date": 1400230324000,
"content_id": "10098ad7033530adab1f3b83ed3ea8d0e7ea2bd1",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "9b2c1a65b72a60affe8b5f0cb48f0f2970905617",
"extension": "p... | 2.921875 | stackv2 | # -*- coding: utf-8 -*-
"""
sheets
~~~~~~
A CSV Framework
:copyright: (c) 2013 by fsp.
:license: BSD.
"""
import os
import csv
import datetime
from collections import OrderedDict
class Sheet(object):
"""
The main class.
"""
def __init__(self, row_cls, filepath, csvkwargs=None):
... | 233 | 24.06 | 90 | 14 | 1,374 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9e4983d03fc22170_4221efa2", "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."
] | [
231
] | [
null
] | [
34
] | [
44
] | |
2024-11-18T21:01:08.862420+00:00 | 1,609,785,523,000 | f137207bea36e8878afc5c0304d9d451ce6ca012 | 3 | {
"blob_id": "f137207bea36e8878afc5c0304d9d451ce6ca012",
"branch_name": "refs/heads/main",
"committer_date": 1609785523000,
"content_id": "60e2d09a60478aad39236f777d900aa97a0b4fd7",
"detected_licenses": [
"MIT"
],
"directory_id": "b74186799843b64e5054d6248e1ebeee1695f3e8",
"extension": "py",
"file... | 2.625 | stackv2 | '''
Function run as a sub process
@author: yizhou
@date: 2020/11/27 12:55
@last-update: 2020/11/27 12:55
'''
import os
import struct
import bluepy.btle as btle
import time
# The sub-process to be raised after a new device is connected
def sub_proc(mac_addr, debug=False):
print("Initializing subprocess (%s) wi... | 38 | 31.29 | 88 | 17 | 372 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ae77d296e2e808ca_caf76cc6", "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."
] | [
15,
21
] | [
null,
null
] | [
11,
15
] | [
88,
51
] | |
2024-11-18T21:01:20.359427+00:00 | 1,512,920,482,000 | ec4175793a2ab609d3571561631c51b2c79cfe56 | 2 | {
"blob_id": "ec4175793a2ab609d3571561631c51b2c79cfe56",
"branch_name": "refs/heads/master",
"committer_date": 1512920482000,
"content_id": "136b42102042686f08029ff4ad3a99352b86b339",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "400d234a475c7e6c61ef87b8cfda2c34cb363ae1",
"extension": "py"... | 2.4375 | stackv2 | """
Copyright 2013, 2014 Ricardo Tubio-Pardavila
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law ... | 242 | 32.47 | 79 | 18 | 2,007 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_575926d065b6b116_0bcfb60b", "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."
] | [
110
] | [
112
] | [
13
] | [
32
] | |
2024-11-18T21:01:23.849319+00:00 | 1,544,540,020,000 | 824a8bdb4d557c3ddf0264f92c214a2a6833b31a | 2 | {
"blob_id": "824a8bdb4d557c3ddf0264f92c214a2a6833b31a",
"branch_name": "refs/heads/master",
"committer_date": 1544540020000,
"content_id": "06c700da63cd46fe3d74266c73d4f3cf58d0c304",
"detected_licenses": [
"MIT"
],
"directory_id": "76ff736eaccda010071f3221dbb4f215210e42dc",
"extension": "py",
"fi... | 2.375 | stackv2 | # python imports
from collections import deque
# network imports
from network.HttpRequest import HttpRequest
from network.HttpResponse import HttpResponse
# utils imports
from utils.constants import SUBDOMAINS, HTTP_PORT
from utils.link_utils import clean_url, get_domain, add_subdomain, extract_host_rel
from utils.na... | 173 | 38.87 | 107 | 19 | 1,478 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_817e554b9d0371fb_d05546aa", "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)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text."
] | [
123
] | [
null
] | [
23
] | [
76
] | |
2024-11-18T21:25:32.180611+00:00 | 1,621,609,597,000 | 0e269474ffc4851efe8dcd2388370512ba1013d1 | 3 | {
"blob_id": "0e269474ffc4851efe8dcd2388370512ba1013d1",
"branch_name": "refs/heads/master",
"committer_date": 1621609597000,
"content_id": "b46036a9a04f097d486020d7c694b6a82842a080",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "78bc71b33109dadf666add460a11521903b80beb",
"extension": "py"... | 2.921875 | stackv2 | from .._display import session_line
def extract(filepath, verbose=True):
"""
Extract a compressed file.
Parameters
----------
filepath : str
File path.
verbose : bool, optional
``True`` for displaying progress. Defaults to ``True``.
"""
formats_order = _best_order(file... | 76 | 21.63 | 86 | 16 | 391 | python | [{"finding_id": "codeql_py/tarslip_e3bc02ee868b5af9_ce081d49", "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)."
] | [
33
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T21:25:34.219684+00:00 | 1,648,714,936,000 | f2ece420c8e314179c3236c428f7a1dea0f118cc | 3 | {
"blob_id": "f2ece420c8e314179c3236c428f7a1dea0f118cc",
"branch_name": "refs/heads/master",
"committer_date": 1648714936000,
"content_id": "5c7c8fd27e8ef3a3bbaf351da52fc32cbfa18a73",
"detected_licenses": [
"Unlicense"
],
"directory_id": "397de467115775da05ae98426bca4583711df0c6",
"extension": "py",... | 3.15625 | stackv2 | # echoclient.py
#
# An example of a client that connects to an SSL server
# and verifies its certificate
from socket import socket, AF_INET, SOCK_STREAM
import ssl
s = socket(AF_INET, SOCK_STREAM)
# Wrap with an SSL layer and require the server to present its certificate
ssl_s = ssl.wrap_socket(s,
... | 25 | 22.8 | 74 | 8 | 145 | python | [{"finding_id": "codeql_py/insecure-default-protocol_8a38c3b5c1a15266_2356cf46", "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."
] | [
12
] | [
15
] | [
9
] | [
26
] | |
2024-11-18T21:25:36.550660+00:00 | 1,507,929,477,000 | e8f69b5536276e8dbe713640c6291a061651e6de | 4 | {
"blob_id": "e8f69b5536276e8dbe713640c6291a061651e6de",
"branch_name": "refs/heads/master",
"committer_date": 1507929477000,
"content_id": "42c6735302ea39afe103a7426330474ae91c2b1f",
"detected_licenses": [
"MIT"
],
"directory_id": "daa6ec1a85ce6c72c5dd90ccc4da14ec9e4a4835",
"extension": "py",
"fi... | 4.0625 | stackv2 | def DINKcalculator():
#name_a = input("What is the first spouse's name? ")
#name_b = input("What is the second spouse's name? ")
print(name_a + " and " + name_b + " are evaluating job offers. ")
#rent = input("How much are your monthly housing costs? ")
#health = input("How much are your monthly hea... | 81 | 33.62 | 137 | 14 | 782 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5fd2f8f0543bd514_1aee2b58", "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."
] | [
33,
37
] | [
null,
null
] | [
15,
11
] | [
23,
89
] | |
2024-11-18T21:25:38.567480+00:00 | 1,556,122,131,000 | e5f115e1fd21974c543db2df045df68a9ba429ec | 2 | {
"blob_id": "e5f115e1fd21974c543db2df045df68a9ba429ec",
"branch_name": "refs/heads/master",
"committer_date": 1556122131000,
"content_id": "07e06b3e89b9e762b5a7c145849a7a0824865663",
"detected_licenses": [
"MIT"
],
"directory_id": "a664c3c61717f72affe9a0125d79074023b1e418",
"extension": "py",
"fi... | 2.4375 | stackv2 | import os, sys
import subprocess
import requests, shutil
import json
USER_BASE='/content'
def status():
print("\nDoing fine\n")
img_path = os.path.join( os.path.dirname(os.path.abspath(__file__)), 'img', 'RedDragon_logo_260x39.png')
# /content/colab_helper/img/RedDragon_logo_260x39.png
#print(img_path)
... | 169 | 30.17 | 106 | 16 | 1,447 | python | [{"finding_id": "codeql_py/tarslip_474de1e11e8dc919_0dcd171d", "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)."
] | [
95
] | [
null
] | [
7
] | [
43
] | |
2024-11-18T22:00:18.706860+00:00 | 1,485,247,740,000 | 830555eaf1fb528ef3712d943f657ab9591cf622 | 2 | {
"blob_id": "830555eaf1fb528ef3712d943f657ab9591cf622",
"branch_name": "refs/heads/master",
"committer_date": 1485247740000,
"content_id": "91ab300735ec4aa3df538ffb60ce87b96e8931ac",
"detected_licenses": [
"MIT"
],
"directory_id": "935b5e5a4780429263570cb2d7adc1651b2259e4",
"extension": "py",
"fi... | 2.421875 | stackv2 | # -*- coding: utf-8 -*-
# Created by restran on 2016/9/28
from __future__ import unicode_literals, absolute_import
import logging
import os
import sys
import redis
# 把项目的目录加入的环境变量中,这样才可以导入 common.base
sys.path.insert(1, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from common.base import TaskExecutor... | 51 | 20.61 | 79 | 12 | 301 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cbc5c060f8ada2d0_e79a62b9", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
29,
35,
47
] | [
null,
null,
null
] | [
21,
21,
21
] | [
53,
53,
44
] | |
2024-11-18T22:00:44.428061+00:00 | 1,649,142,649,000 | 7b35b41510c4874ad5c9b3549be07cfab5a2ec9c | 2 | {
"blob_id": "7b35b41510c4874ad5c9b3549be07cfab5a2ec9c",
"branch_name": "refs/heads/master",
"committer_date": 1649142649000,
"content_id": "24be97cd1f3a5394fe9c48e16bf77e8d61db361b",
"detected_licenses": [
"MIT"
],
"directory_id": "86bb8b635e06d7fab22a7c4a3423c70e0a95cc5d",
"extension": "py",
"fi... | 2.34375 | stackv2 | import base64
import click
import getpass
import hashlib
from enum import Enum
from urllib.parse import quote
import pyqrcode
from bpylist import archiver
from bpylist.archive_types import uid
from Crypto.Cipher import AES
from rncryptor import RNCryptor
from rncryptor import bord
class Type(Enum):
Unknown =... | 324 | 27.82 | 106 | 17 | 2,273 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_de371240bf8efb66_8afdad93", "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... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
240,
301
] | [
null,
null
] | [
26,
26
] | [
65,
65
] | |
2024-11-18T22:00:47.204833+00:00 | 1,614,017,974,000 | 6bdbe1fed18ff4bd6f5fabd23c68402422496a9f | 3 | {
"blob_id": "6bdbe1fed18ff4bd6f5fabd23c68402422496a9f",
"branch_name": "refs/heads/main",
"committer_date": 1614017974000,
"content_id": "2c8dae2d4fd2fe3b0edd7f5ff6cde5bb9855f733",
"detected_licenses": [
"MIT"
],
"directory_id": "ca2a3f36c1adbd0166b129c90d45057d1a84573c",
"extension": "py",
"file... | 2.578125 | stackv2 | #Author: Andre Ortega, brainwork.com.br
#https://github.com/andreirapuru/netmiko_send_commands
import getpass
import netmiko
import csv
from netmiko import ConnectHandler
#Enable debug (optional)
#logging.basicConfig(filename='netmiko_logs.txt', level=logging.DEBUG)
#logger = logging.getLogger("netmiko")
print('\n''... | 69 | 27.54 | 70 | 12 | 530 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_0568fdbb85082928_50bcb5d9", "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.\... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression logs [sensi... | [
55,
65,
46,
60,
67
] | [
null,
null,
null,
null,
null
] | [
13,
13,
34,
34,
35
] | [
34,
34,
55,
55,
56
] | |
2024-11-18T22:00:50.616279+00:00 | 1,571,914,993,000 | 081af5ad7b7ea7ebc84383a4427b4b6ed0cf886e | 3 | {
"blob_id": "081af5ad7b7ea7ebc84383a4427b4b6ed0cf886e",
"branch_name": "refs/heads/master",
"committer_date": 1571914993000,
"content_id": "c0e2df295249d9307785ff09ba6f68058cbd0a27",
"detected_licenses": [
"MIT-0"
],
"directory_id": "cd92a1cb5ae21fd53d232dd0be576b5e3321e5fa",
"extension": "py",
"... | 2.515625 | stackv2 | from __future__ import print_function
import json
import urllib
import boto3
print('Loading function')
sm = boto3.client('sagemaker-runtime')
def lambda_handler(event, context):
#print("Received event: " + json.dumps(event, indent=2))
# Get the object from the event and show its content type
try:
... | 34 | 28.47 | 114 | 14 | 244 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7924eccd0ee87014_7eeeafee", "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."
] | [
28
] | [
null
] | [
15
] | [
114
] | |
2024-11-18T22:00:52.526702+00:00 | 1,635,901,919,000 | 6ce4b83a139bb5a3c07f88383bb3bc3286b5e64b | 2 | {
"blob_id": "6ce4b83a139bb5a3c07f88383bb3bc3286b5e64b",
"branch_name": "refs/heads/master",
"committer_date": 1635901919000,
"content_id": "39de328ca2f8e1805b720a98433d959369620ceb",
"detected_licenses": [
"MIT"
],
"directory_id": "d45f4c69ef67fa2398ecccba8fe70123f3e0a798",
"extension": "py",
"fi... | 2.453125 | stackv2 | # see https://qiita.com/katafuchix/items/7fa1323265b6a448cdbc
import json
import os
import logging
import traceback
from requests_oauthlib import OAuth1Session
from secret import get_secret
from twitter import tweet_image, tweet_text
import urllib.request
import time
level = os.environ.get('LOG_LEVEL', 'DEBUG')
def... | 92 | 22.82 | 62 | 14 | 539 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fde5c730e2ae3ad2_792e557e", "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."
] | [
63
] | [
null
] | [
21
] | [
27
] | |
2024-11-18T22:01:01.827800+00:00 | 1,633,618,330,000 | 10cb6c1fbba966675f3b6dcbd778e65eae206efc | 2 | {
"blob_id": "10cb6c1fbba966675f3b6dcbd778e65eae206efc",
"branch_name": "refs/heads/master",
"committer_date": 1633618330000,
"content_id": "ad3ea8a6072fdbb73795e403fce3d38a5539f5be",
"detected_licenses": [
"MIT"
],
"directory_id": "b69c8f11a95f823478d90e5a57e36a7a7a3967e3",
"extension": "py",
"fi... | 2.46875 | stackv2 | import os
import uuid
# import xml.etree.ElementTree as ET
from lxml import etree
from urllib.parse import parse_qs
from jinja2 import Template
from typing import TypeVar
from typing import Union
from typing import Optional
from xml.etree.ElementTree import ParseError
VirtualDOM_type = TypeVar("VirtualDOM")
Compo... | 163 | 31.25 | 95 | 16 | 1,082 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_df39a8f2d748fb76_74751a5e", "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."
] | [
118
] | [
null
] | [
24
] | [
55
] | |
2024-11-18T22:01:07.225029+00:00 | 1,623,103,347,000 | 40323767e69f9a6f85061182a083a4811a05aafd | 2 | {
"blob_id": "40323767e69f9a6f85061182a083a4811a05aafd",
"branch_name": "refs/heads/main",
"committer_date": 1623103347000,
"content_id": "e2e53b31439df065688e478529e0bb1ad1dca34a",
"detected_licenses": [
"MIT"
],
"directory_id": "a73511ae54624f67a5c6ebeb68acfb15e001c49d",
"extension": "py",
"file... | 2.359375 | stackv2 | import requests
import time
import pandas as pd
# golbal variables
matchesInfo = []
try:
api_key = 'api_key=RGAPI-17fc5594-8fac-430c-bb62-729b4420bae8'
url = 'https://br1.api.riotgames.com/lol/'
challengerSummoners = f'{url}league/v4/entries/RANKED_SOLO_5x5/PLATINUM/IV?{api_key}'
response = requests.get... | 76 | 50.21 | 137 | 25 | 755 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c63b4da3b1cfe72b_85cf5ea9", "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."
] | [
20
] | [
null
] | [
23
] | [
99
] | |
2024-11-18T22:01:09.295226+00:00 | 1,647,509,998,000 | 5c03256d0f87603867d7680460646f2681f82243 | 3 | {
"blob_id": "5c03256d0f87603867d7680460646f2681f82243",
"branch_name": "refs/heads/master",
"committer_date": 1647509998000,
"content_id": "c1d5560b81deeb21ca917c32928c9f3599e53112",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "754772a0854759f6e23c3df05902c8b5954cf1da",
"extension": "p... | 2.53125 | stackv2 | import json
from typing import Container
import strax
import fsspec
import pandas as pd
import straxen
import inspect
from urllib.parse import urlparse, parse_qs
from ast import literal_eval
from strax.config import OMITTED
import os
import tempfile
import tarfile
export, __all__ = strax.exporter()
_CACHES = {}
@ex... | 331 | 29.86 | 86 | 19 | 2,278 | python | [{"finding_id": "codeql_py/tarslip_db3f6adf55591920_c9a3de0e", "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)."
] | [
330
] | [
null
] | [
9
] | [
12
] | |
2024-11-18T22:15:00.463058+00:00 | 1,421,714,167,000 | 62ad33cacd9012c3fb9e72e52e10ededab654f25 | 3 | {
"blob_id": "62ad33cacd9012c3fb9e72e52e10ededab654f25",
"branch_name": "refs/heads/master",
"committer_date": 1421714167000,
"content_id": "cec9971fa218a7676ab563a1c73b8e3e2a18047a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "84944798a5516b922b73c294d9af66f0de620efc",
"extension": "py"... | 2.609375 | stackv2 | import contextlib
from cStringIO import StringIO
import json
from jinja2 import nodes, Environment
from jinja2.nodes import Call, Getattr
def compile_string(template_str, environment=None):
"""
Compiles a Jinja template string into an Underscore template.
Useful for quick testing on the command line.
... | 564 | 29.6 | 99 | 18 | 3,725 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e0855a44e5be3561_9481bd40", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
16
] | [
null
] | [
23
] | [
67
] | |
2024-11-18T22:15:04.647413+00:00 | 1,601,726,782,000 | 0d5c5dbbfef48a5cd9100855347d260ee4a2c1a2 | 3 | {
"blob_id": "0d5c5dbbfef48a5cd9100855347d260ee4a2c1a2",
"branch_name": "refs/heads/master",
"committer_date": 1601726782000,
"content_id": "de6f4c3fa687074771d069bbc2a8840f6f8bb28a",
"detected_licenses": [
"MIT"
],
"directory_id": "b7d4dbcfdf66db95e177c86aa7469b81b6f07902",
"extension": "py",
"fi... | 3.125 | stackv2 | import os
from typing import Tuple
from Crypto.Cipher import AES
import rsa
from rsa import PrivateKey, PublicKey
class CryptingTools:
@staticmethod
def generate_public_private_key() -> Tuple[PublicKey, PrivateKey]:
return rsa.newkeys(512)
@staticmethod
def crypt_data(data: str, public_key:... | 41 | 31.37 | 76 | 14 | 319 | python | [{"finding_id": "codeql_py/weak-crypto-key_4980e74d1f00b135_046c3e46", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [512](1) bits, which is below 2048 and considered breakable.", "remediation": "", ... | 1 | true | [
"CWE-326"
] | [
"py/weak-crypto-key"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Creation of an RSA key uses [512](1) bits, which is below 2048 and considered breakable."
] | [
13
] | [
null
] | [
16
] | [
32
] | |
2024-11-18T22:25:58.106424+00:00 | 1,634,153,219,000 | d7d74cc01b775ccbc011a414533bca7fdef435ce | 2 | {
"blob_id": "d7d74cc01b775ccbc011a414533bca7fdef435ce",
"branch_name": "refs/heads/main",
"committer_date": 1634153219000,
"content_id": "036aa3abc56c006d360c76e0c4cc8ebbfa963525",
"detected_licenses": [
"MIT"
],
"directory_id": "6dee7a045d0d748d3d9827dc17afdcb9597edade",
"extension": "py",
"file... | 2.34375 | stackv2 | from flask import Flask, render_template, redirect, url_for, request, make_response, session
from models import *
types = None
app = Flask(__name__)
app.secret_key = 'akashsreedevvishnu'
# two decorators, same function
@app.route('/')
@app.route('/home')
def index():
return render_template('index.html')
@app... | 145 | 28.74 | 124 | 20 | 996 | python | [{"finding_id": "codeql_py/flask-debug_a48eadf1b0fa59de_4440e81d", "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-601"
] | [
"py/flask-debug",
"py/url-redirection"
] | [
"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.",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
145,
83
] | [
null,
null
] | [
5,
29
] | [
24,
40
] | |
2024-11-18T22:26:11.679861+00:00 | 1,558,187,973,000 | 0d48dab1e96d4502f4d282e0cb0de9da945de9c7 | 3 | {
"blob_id": "0d48dab1e96d4502f4d282e0cb0de9da945de9c7",
"branch_name": "refs/heads/master",
"committer_date": 1558187973000,
"content_id": "c192c478bf3756ea12e97caa54618ede1cc8beb4",
"detected_licenses": [
"MIT"
],
"directory_id": "8964fea23c1f4621260d290b9901b04a3214a4c7",
"extension": "py",
"fi... | 3.109375 | stackv2 | import csv
import re
import string
def remove_chars(text):
# remove links
pattern = re.compile(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+')
text = pattern.sub('', text)
# remove tags
text = re.sub(r'\w*@\w*', '', text)
# remove punctuations
text = text.... | 41 | 34.05 | 107 | 20 | 375 | python | [{"finding_id": "codeql_py/overly-large-range_256e352bdb1a6260_931b4e95", "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\\\\[\\\\\\\\]^_\\]."
] | [
7
] | [
null
] | [
58
] | [
61
] | |
2024-11-18T22:26:12.729994+00:00 | 1,501,770,534,000 | 5fc13ae45dd8a33852a42ed1ffc78eae3ec45ad5 | 3 | {
"blob_id": "5fc13ae45dd8a33852a42ed1ffc78eae3ec45ad5",
"branch_name": "refs/heads/master",
"committer_date": 1501770534000,
"content_id": "54e45679345fcdae7bf65127b0ee3d3dcbd54d3e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7fefde83f43e35ddcddceb552e2d63d0df4c2bf5",
"extension": "p... | 2.78125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ******************************************************************************
# Argon Design Ltd. Project P9000 Argon
# (c) Copyright 2017 Argon Design Ltd. All rights reserved.
#
# Module : maybot
# Author : Steve Barlow
# $Id: maybot.py 18445 2017-06-22 08:40:03Z sjb $... | 94 | 34.5 | 103 | 13 | 819 | python | [{"finding_id": "codeql_py/log-injection_fd83d8cc7f6c050a_76288bb7", "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)."
] | [
55
] | [
null
] | [
21
] | [
50
] | |
2024-11-18T20:39:51.554400+00:00 | 1,439,557,456,000 | b630fd6604073536c7027da4b873a43805611b3b | 3 | {
"blob_id": "b630fd6604073536c7027da4b873a43805611b3b",
"branch_name": "refs/heads/master",
"committer_date": 1439557456000,
"content_id": "1b92909af49ab6d87c879e6f5919797fb0af78f9",
"detected_licenses": [
"MIT"
],
"directory_id": "3f8ba3d9b73c0040ded4123798b54956f3a10d3b",
"extension": "py",
"fi... | 2.859375 | stackv2 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
from flask import Flask, request, jsonify
from pymongo import MongoClient
from dateutil import parser
from datetime import datetime
from hashlib import md5
app = Flask(__name__)
client = MongoClient()
db = client['storage']
users = db['users']
@app.route('/add', metho... | 77 | 41.71 | 125 | 20 | 760 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_d35b02ffc0c6f068_d3c1f718", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",... | 8 | true | [
"CWE-327",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/weak-sensitive-data-hashing",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",
"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).... | [
27,
22,
29,
37,
49,
56,
63,
72
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
28,
22,
34,
38,
26,
22,
26,
26
] | [
43,
62,
77,
78,
72,
75,
78,
78
] | |
2024-11-18T20:40:00.196655+00:00 | 1,586,696,969,000 | 667ed342973843f5d1e2cc88b5fa033a8933db6a | 2 | {
"blob_id": "667ed342973843f5d1e2cc88b5fa033a8933db6a",
"branch_name": "refs/heads/master",
"committer_date": 1586696969000,
"content_id": "e9002deaa40072aeec6f720b809df625366236ba",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8cced97a617f980cca7b5e1342ac15e2ffbf8d33",
"extension": "py"... | 2.375 | stackv2 | from ..CommonInterface import CommonInterfaceNslcm
# from .helpers import Helpers
import json
import requests
# import tarfile
class Nslcm(CommonInterfaceNslcm):
"""
Lifecycle Management Interface
"""
def __init__(self, host, port=32001, repositories_port=4002):
self._host = host
self._... | 411 | 37.12 | 127 | 14 | 3,424 | python | [{"finding_id": "codeql_py/request-without-cert-validation_45c6f05faf11942e_526906b9", "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]... | 7 | true | [
"CWE-295",
"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",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"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... | [
61,
97,
134,
189,
224,
291,
334
] | [
62,
98,
135,
190,
225,
292,
335
] | [
17,
17,
17,
17,
17,
17,
17
] | [
49,
49,
49,
49,
49,
60,
60
] | |
2024-11-18T20:52:20.764906+00:00 | 1,609,893,728,000 | e3e1e24664299159cab80abe454c6d09df4ef3de | 3 | {
"blob_id": "e3e1e24664299159cab80abe454c6d09df4ef3de",
"branch_name": "refs/heads/main",
"committer_date": 1609893728000,
"content_id": "db3ca56c48935777c658158ebe31e8a1baf238dc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "761e7562b3c39f3f114503f3e31308686185d2e5",
"extension": "py",
... | 2.890625 | stackv2 | # @Time : 2020/7/15
# @Author : 江海彬
# @File : spider.py
import re
import time
import twint
import pymysql
# 爬虫主体
def spider(keyword, tweets):
# 启动配置
c = twint.Config()
c.Search = keyword
c.Limit = Limit
c.Count = True
# 过滤含连接的tweet
# c.Links = "exclude"
# 只爬取热门tweet
# c.Popular... | 160 | 19.58 | 102 | 14 | 1,154 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_288f43263a3f0cf9_d3a55288", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'twitter.com', so it might match mor... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'twitter.com', so it might match more hosts than expected."
] | [
113
] | [
null
] | [
80
] | [
101
] | |
2024-11-18T20:52:21.866995+00:00 | 1,632,620,318,000 | 94b14fd286fe38d1ccdd640a5662d28d925f351c | 3 | {
"blob_id": "94b14fd286fe38d1ccdd640a5662d28d925f351c",
"branch_name": "refs/heads/main",
"committer_date": 1632620318000,
"content_id": "b2403f635672875d2408dfac17e2a21f477debed",
"detected_licenses": [
"MIT"
],
"directory_id": "e273f070543f69edc07b4864370f88df3c9f9509",
"extension": "py",
"file... | 3.3125 | stackv2 | import json
import requests
import urllib
import warnings
from cleantext import clean
def get_api_key(filename='api_key.txt'):
with open(filename) as f:
return f.readline()
def clean_up_text(input_text, discard_small_words_thresh=3):
input_text = " ".join(input_text.split())
input_text = " ".joi... | 54 | 30.02 | 102 | 12 | 384 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_de40577f91d8e022_5a18a271", "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."
] | [
53
] | [
null
] | [
11
] | [
17
] | |
2024-11-18T21:08:10.665074+00:00 | 1,518,485,967,000 | 8a0d8dab0bed184f079c4ae664a1f6ec73f5b3e7 | 3 | {
"blob_id": "8a0d8dab0bed184f079c4ae664a1f6ec73f5b3e7",
"branch_name": "refs/heads/master",
"committer_date": 1518485967000,
"content_id": "a5da1b65b5ba37d110253e8001aefdfd611d271e",
"detected_licenses": [
"MIT"
],
"directory_id": "80b5eef752fd4c69ccf68d83c7267cce2d854709",
"extension": "py",
"fi... | 2.53125 | stackv2 | # -*-coding:utf-8-*-
from app import app
import MySQLdb
from flask import request, jsonify
from flask import make_response
from database_config import *
@app.route('/')
@app.route('/index')
def index():
return "Hello , Flask!"
# 狗日的跨域
def cors_response(res):
response = make_response(jsonify(res))
response... | 137 | 32.18 | 109 | 20 | 1,080 | python | [{"finding_id": "codeql_py/insecure-cookie_b2a935d28c0f10c8_847890fd", "tool_name": "codeql", "rule_id": "py/insecure-cookie", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Cookie is added to response without the 'secure' flag being set.", "remediation": "", "location": {"file_path"... | 6 | true | [
"CWE-614",
"CWE-614",
"CWE-020",
"CWE-1004",
"CWE-1004",
"CWE-327"
] | [
"py/insecure-cookie",
"py/insecure-cookie",
"py/cookie-injection",
"py/client-exposed-cookie",
"py/client-exposed-cookie",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is added to response without the 'secure' flag being set.",
"Cookie is added to response without the 'secure' flag being set.",
"Cookie is constructed from a [user-supplied input](1).",
"Sensitive server cookie is set without HttpOnly flag.",
"Sensitive server cookie is set without HttpOnly flag.",
... | [
119,
136,
119,
119,
136,
43
] | [
null,
null,
null,
null,
null,
null
] | [
17,
5,
49,
17,
5,
35
] | [
58,
40,
57,
58,
40,
50
] | |
2024-11-18T21:08:32.882789+00:00 | 1,555,692,722,000 | 6abf6bc8092e0cc8647a4f0f6166b913548b718e | 3 | {
"blob_id": "6abf6bc8092e0cc8647a4f0f6166b913548b718e",
"branch_name": "refs/heads/master",
"committer_date": 1555692722000,
"content_id": "ad8c0d69fd5a4b768fe6d63afee54eb08ba4ee34",
"detected_licenses": [
"MIT"
],
"directory_id": "1cbf0dcee2624a3d7dfc2adf9824ece0c6f8c242",
"extension": "py",
"fi... | 2.546875 | stackv2 | import psycopg2 as pg
import collections
import flask
import json
import os
DB_HOST = os.environ.get("DB_HOST")
DB_PORT = int(os.environ.get("DB_PORT"))
DB_NAME = os.environ.get("DB_NAME")
DB_USER = os.environ.get("DB_USER")
DB_PASS = os.environ.get("DB_PASS")
app = flask.Flask(__name__)
fields = ["date", "commentar... | 46 | 26.39 | 106 | 19 | 294 | python | [{"finding_id": "codeql_py/sql-injection_f4a54b8f044508de_0ceafe3c", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 1 | true | [
"CWE-089"
] | [
"py/sql-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1)."
] | [
37
] | [
null
] | [
29
] | [
34
] | |
2024-11-18T21:49:01.848204+00:00 | 1,473,146,056,000 | 0124e7547c00198399e2052c822f614356d4f1a3 | 3 | {
"blob_id": "0124e7547c00198399e2052c822f614356d4f1a3",
"branch_name": "refs/heads/master",
"committer_date": 1473146056000,
"content_id": "b8f67e3d5e09717b3d97d7b83eaebf7055439d1a",
"detected_licenses": [
"MIT"
],
"directory_id": "ba06fca5d700ec3f4e1e5a779d05496f59f00e3a",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/python
#coding=utf-8
###########################################################
#
#2016年抓周活动自动化脚本
#
###########################################################
from __future__ import unicode_literals
import cookielib
import datetime
import hashlib
import json
import os
import sys
import urllib
import urlli... | 167 | 28.32 | 96 | 18 | 1,124 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_d09e4a2f6c32c41a_a037eb05", "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 (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expen... | [
82
] | [
null
] | [
42
] | [
50
] | |
2024-11-18T21:49:02.998002+00:00 | 1,525,368,156,000 | 8b3fc9ab0bf3a26e7eb53e926f96f583563c3180 | 2 | {
"blob_id": "8b3fc9ab0bf3a26e7eb53e926f96f583563c3180",
"branch_name": "refs/heads/master",
"committer_date": 1525368156000,
"content_id": "7ada2caace6917ab5044de8081d4838d07780ada",
"detected_licenses": [
"MIT"
],
"directory_id": "52faaec0350748aeaa3050c1ee74484b76581c6e",
"extension": "py",
"fi... | 2.3125 | stackv2 | from flask import jsonify, request, Flask
from flask_restful import Resource, reqparse
import os
import json
import requests
import sha3
import base58
import base64
import colors
import nacl.secret
import nacl.utils
from nacl.encoding import Base64Encoder
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
class OAuth... | 52 | 35.75 | 114 | 16 | 487 | python | [{"finding_id": "codeql_py/request-without-cert-validation_57a910193a83d433_8632496b", "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)."
] | [
39
] | [
null
] | [
22
] | [
114
] | |
2024-11-18T22:42:16.308292+00:00 | 1,536,751,545,000 | cd040c53daf9008110d36b0612e56e621942019c | 4 | {
"blob_id": "cd040c53daf9008110d36b0612e56e621942019c",
"branch_name": "refs/heads/master",
"committer_date": 1536751545000,
"content_id": "6bb81effad506baab8842d052eeb30664cea6913",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "780b58b32d06d99d453de5f2ded04cd89e0a6784",
"extension": "py"... | 3.765625 | stackv2 | # -*- coding: utf-8 -*-
import random
MAX_ERRORS = 8
word_list = ['raw', 'oil', 'car', 'plain', 'library', 'ball', 'olimpic', 'victory', \
'game', 'loosing']
secret_word = random.sample(word_list, 1)[0]
print(secret_word)
def print_list_as_string(arg):
print(''.join(users_word))
users_word = ['*... | 41 | 23.22 | 85 | 13 | 243 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bba328cfdf299932_a2fce891", "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."
] | [
10
] | [
null
] | [
7
] | [
18
] | |
2024-11-18T20:31:26.953926+00:00 | 1,541,277,062,000 | 2d8cca3bd0368f1470527231f8ec6c73d687b940 | 2 | {
"blob_id": "2d8cca3bd0368f1470527231f8ec6c73d687b940",
"branch_name": "refs/heads/master",
"committer_date": 1541277062000,
"content_id": "0e48679f90e9fa16661cf551e910abc269b94774",
"detected_licenses": [
"MIT"
],
"directory_id": "8b4c28b5353498b25232f386d94cbbdb252ca4d1",
"extension": "py",
"fi... | 2.46875 | stackv2 | #! /usr/bin/env python3
import time
import os
import argparse
import ssl
import re
from datetime import datetime, timedelta
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse, unquote_plus
LOG_FILE = ".post.log"
class Server(BaseHTTPRequestHandler):
# Update or create ... | 128 | 30.15 | 76 | 18 | 900 | python | [{"finding_id": "codeql_py/insecure-default-protocol_2afac3cbca25f24d_1e4f2c89", "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."
] | [
93
] | [
96
] | [
29
] | [
62
] | |
2024-11-18T20:31:27.395398+00:00 | 1,605,598,863,000 | 97d240c32351519ed2d4fe92f992b83360135aa0 | 3 | {
"blob_id": "97d240c32351519ed2d4fe92f992b83360135aa0",
"branch_name": "refs/heads/master",
"committer_date": 1605598863000,
"content_id": "2f816948b05461b41dac48fd7deb551d3e1cc775",
"detected_licenses": [
"MIT"
],
"directory_id": "97e5c563184f42e861da3f2c9de2939e282c6152",
"extension": "py",
"fi... | 2.84375 | stackv2 | import math
import typing as t
import random
from Crypto.PublicKey import RSA
from Crypto.Hash import SHAKE256
from Crypto.Cipher import PKCS1_v1_5, AES
from Crypto.Hash import SHA256
from Crypto.Random import get_random_bytes
# TODO: add references
def lcm(a: int, b: int) -> int:
return a*b // math.gcd(a, b)
de... | 226 | 31.86 | 123 | 18 | 2,718 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_4cbe6bc47c3e2a21_afc58ac2", "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 (SHAKE256) that is ... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHAKE256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHAKE256) that is insecure for password hashing, since it is not a computational... | [
84
] | [
null
] | [
15
] | [
25
] | |
2024-11-18T20:53:30.906861+00:00 | 1,543,586,652,000 | 77d40493cb82dfe4f70f2afefc01d89fb67cadf8 | 3 | {
"blob_id": "77d40493cb82dfe4f70f2afefc01d89fb67cadf8",
"branch_name": "refs/heads/master",
"committer_date": 1543586652000,
"content_id": "e3473325fb6673d8ed4da4a4b020505870a847b3",
"detected_licenses": [
"MIT"
],
"directory_id": "09040ae47b2a4ea335861bc71b62b7e339eb3b64",
"extension": "py",
"fi... | 2.84375 | stackv2 | import face_recognition
from flask import Flask, jsonify, request, redirect, json
import string
import random
import mysql.connector as mysql
# You can change this to any folder on your system
ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'}
app = Flask(__name__)
class User:
def __init__(self, params=None):
... | 109 | 30.53 | 84 | 15 | 863 | python | [{"finding_id": "codeql_py/url-redirection_e3019caa4ae3390c_cb7febe0", "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_... | 3 | true | [
"CWE-601",
"CWE-601",
"CWE-022"
] | [
"py/url-redirection",
"py/url-redirection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
51,
56,
27
] | [
null,
null,
null
] | [
29,
29,
14
] | [
40,
40,
40
] | |
2024-11-18T21:10:24.679212+00:00 | 1,633,455,344,000 | 444598c552c0e2c63a056aa566def7a87062e83d | 2 | {
"blob_id": "444598c552c0e2c63a056aa566def7a87062e83d",
"branch_name": "refs/heads/main",
"committer_date": 1633455344000,
"content_id": "3f31d9db5ee3c3f19903945ae69e78574e9c0aaa",
"detected_licenses": [
"MIT"
],
"directory_id": "b6a727d25876d96e08b28caba08baa3c5b15e005",
"extension": "py",
"file... | 2.5 | stackv2 | # Static file.
import importlib
import logging
import os
import flask
app = flask.Flask(__name__)
@app.route("/<function>", methods=["POST"])
def call(function):
request = flask.request.get_json()
element = request["x"]
args = request.get("args", {})
try:
module = importlib.import_module(f"... | 24 | 21.75 | 65 | 16 | 131 | python | [{"finding_id": "codeql_py/stack-trace-exposure_2d7ffc0fb4a2c8be_4049abd2", "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
] | [
16
] | [
53
] | |
2024-11-18T21:47:42.248882+00:00 | 1,503,714,353,000 | 99a541958199000534ee9bd52e768cd02d337bb1 | 3 | {
"blob_id": "99a541958199000534ee9bd52e768cd02d337bb1",
"branch_name": "refs/heads/master",
"committer_date": 1503714353000,
"content_id": "b113aeb6569707090cb1140391c8409b4cea20f9",
"detected_licenses": [
"MIT"
],
"directory_id": "4e65e328036a63487f8ae0d95db2e2fbfdf63d12",
"extension": "py",
"fi... | 3.390625 | stackv2 | #!/usr/bin/python3
dictionary_file = open("/usr/share/dict/words")
dictionary = dictionary_file.read().splitlines()
secret = 'ELPPAEIPSIDOOG'
secret = secret.lower()
rev = secret[::-1]
def string_slice(s):
length = len(s)
for size in range(1, length + 1):
for start in range(0, (length - size) + 1):... | 26 | 19.96 | 51 | 13 | 138 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_64b096e15263b6b7_6125bda7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text."
] | [
26
] | [
null
] | [
7
] | [
16
] | |
2024-11-18T22:29:19.838190+00:00 | 1,602,780,724,000 | 27f394ef591993105de1cd4ca896190e2e27c297 | 3 | {
"blob_id": "27f394ef591993105de1cd4ca896190e2e27c297",
"branch_name": "refs/heads/main",
"committer_date": 1602780724000,
"content_id": "24c31bd916335c8e50f0c8ab930baf26d7cc6a34",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "c558d1da1aedf377e6cb6cf66c5136cfb7c32167",
"extension": "py",
"... | 2.734375 | stackv2 | #!/usr/bin/python
'''
TokenMinder is a class intended to clean up SCM token files created by test scripts.
TokenMinder uses the sftest.cfg config file for configuration
Use is simple:
tm = TokenMinder(ConfigObj)
tm.do()
where ConfigObj is a ConfigParser that has read in the sftest.cfg file.
The approach of tokenm... | 152 | 31.66 | 84 | 15 | 1,145 | python | [{"finding_id": "codeql_py/overly-permissive-file_f87362b8ee8f2cfb_e1d2d1e0", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to group writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to group writable."
] | [
104
] | [
null
] | [
13
] | [
50
] | |
2024-11-18T22:29:21.047613+00:00 | 1,515,781,330,000 | 9e2ed3d6dbeef0b6d7b6ca97576fa2bdbc6e7c69 | 4 | {
"blob_id": "9e2ed3d6dbeef0b6d7b6ca97576fa2bdbc6e7c69",
"branch_name": "refs/heads/master",
"committer_date": 1515781330000,
"content_id": "cd130ed126eebfa212e2c93826ff8169f14c079d",
"detected_licenses": [
"MIT"
],
"directory_id": "3cf5f5d6b5756b1a1a91dc3025a0b81052eb62c1",
"extension": "py",
"fi... | 4.09375 | stackv2 | '''
Advent of Code 2017
Day 4: High-Entropy Passphrases
'''
import unittest
# Inputs and tests
PART1_TESTS = [('aa bb cc dd ee', True),
('aa bb cc dd aa', False),
('aa bb cc dd aaa', True)]
PART1_LINES = open('day04-input.txt').readlines()
PART2_TESTS = [('abcde fghij', True),
... | 173 | 25.6 | 93 | 15 | 1,100 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_23fdbb31c234b910_56d26a87", "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.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
163,
173
] | [
null,
null
] | [
11,
11
] | [
73,
73
] | |
2024-11-18T22:29:23.368618+00:00 | 1,600,339,337,000 | dc8556f3f9c181e928c17de96964ae6a316a2c53 | 2 | {
"blob_id": "dc8556f3f9c181e928c17de96964ae6a316a2c53",
"branch_name": "refs/heads/master",
"committer_date": 1600339337000,
"content_id": "27b3f3b3d1f3dda2217d7aa2320ddb8dbfa87ded",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fbaf7a36adcabc61bf3ac7b5b65246b31acea294",
"extension": "py"... | 2.5 | stackv2 | import os
import click
from jinja2 import Environment, FileSystemLoader
from markupsafe import escape
from qurator.dinglehopper import *
def gen_diff_report(gt_things, ocr_things, css_prefix, joiner, none, align):
gtx = ''
ocrx = ''
def format_thing(t, css_classes=None):
if t is None:
... | 121 | 35.08 | 124 | 18 | 1,093 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e01a5323041a77fc_62e40d2d", "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."
] | [
81
] | [
null
] | [
11
] | [
119
] | |
2024-11-18T22:29:32.751230+00:00 | 1,568,873,305,000 | b7b95bec1fafa62765e7284f5160e60059a61610 | 2 | {
"blob_id": "b7b95bec1fafa62765e7284f5160e60059a61610",
"branch_name": "refs/heads/master",
"committer_date": 1568873305000,
"content_id": "1522efe7a440637da9e9cdffd2b0b656fcb44d31",
"detected_licenses": [
"MIT"
],
"directory_id": "efa4120f3814c284ae3313418473f55afc86b40e",
"extension": "py",
"fi... | 2.34375 | stackv2 | """
Code for account management
"""
from . import achievements as achv
from . import posts, chat
from .settings import settings
from flask import request, render_template, redirect, make_response
from hashlib import md5
from datetime import datetime, timedelta
import json
import random
import string
import sqlite3
# ... | 192 | 30.71 | 133 | 18 | 1,365 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_0806720e5c06342a_00951167", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
59,
97
] | [
null,
null
] | [
21,
21
] | [
45,
45
] | |
2024-11-18T22:29:41.347939+00:00 | 1,593,169,130,000 | 6ac8c182cab70b7e8ca7abd4b0e54c9f5057cacc | 3 | {
"blob_id": "6ac8c182cab70b7e8ca7abd4b0e54c9f5057cacc",
"branch_name": "refs/heads/master",
"committer_date": 1593169130000,
"content_id": "a8c21ac51d7b890d4b4f042a6884b552a37eb97f",
"detected_licenses": [
"MIT"
],
"directory_id": "29c5e26fe1f2e515239e7b92ecd9dd1e39d85ca7",
"extension": "py",
"fi... | 2.625 | stackv2 | import json
import requests;
from flask import Blueprint, jsonify, request
from geopy import distance
from application import database
from model import Store
store_controller = Blueprint('store_controller', __name__)
@store_controller.route('', methods=['GET'])
def index():
try:
stores = Store.query.or... | 150 | 33.05 | 145 | 19 | 1,382 | python | [{"finding_id": "codeql_py/stack-trace-exposure_d3960771f003f871_594349c1", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
19,
38,
50
] | [
null,
null,
null
] | [
24,
21,
24
] | [
62,
59,
62
] | |
2024-11-18T22:40:28.082592+00:00 | 1,683,589,394,000 | ef02badf290ff3992a9027753e4986b082d529b4 | 3 | {
"blob_id": "ef02badf290ff3992a9027753e4986b082d529b4",
"branch_name": "refs/heads/main",
"committer_date": 1683589394000,
"content_id": "2eab926395389d3e5baec8f0de80c1c37e7a7cf2",
"detected_licenses": [
"MIT"
],
"directory_id": "59b374ac54ced5e006bd33773de4526112a88a27",
"extension": "py",
"file... | 2.640625 | stackv2 | # Secrets view
import time
import random
from sqlalchemy import or_, func
from tabulate import tabulate
from passwordgenerator import pwgenerator
from ..models.base import get_session
from ..models.Secret import SecretModel
from ..modules.misc import confirm, clear_screen
from ..modules.carry import global_scope
fro... | 515 | 23.85 | 137 | 20 | 2,908 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_01415133d8adff47_fea13778", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
503,
505
] | [
504,
null
] | [
15,
15
] | [
51,
56
] | |
2024-11-18T22:41:17.170756+00:00 | 1,408,446,382,000 | 1eb656b9f80634703329613683cc85ff66890297 | 3 | {
"blob_id": "1eb656b9f80634703329613683cc85ff66890297",
"branch_name": "refs/heads/master",
"committer_date": 1408446382000,
"content_id": "0478a8bba70450897f9b3679f6edc936faf73c97",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "af71b4fd9387d5f5f8696a865d7a2323e2dfb738",
"extension": "p... | 2.71875 | stackv2 | """
Parse spotify URLs
"""
from __future__ import unicode_literals, print_function, division
import re
from bs4 import BeautifulSoup
def __get_bs(bot, url):
content = bot.get_url(url).content
if content:
return BeautifulSoup(content)
else:
return None
def handle_privmsg(bot, user, chann... | 43 | 28.56 | 112 | 14 | 356 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_0e288993599dc29f_e6989a68", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'spotify.com', so it might match mor... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'spotify.com', so it might match more hosts than expected."
] | [
21
] | [
null
] | [
22
] | [
49
] | |
2024-11-18T22:54:24.182259+00:00 | 1,526,914,826,000 | df63765298c924dabf3ce88f96f892fb219c9cdf | 2 | {
"blob_id": "df63765298c924dabf3ce88f96f892fb219c9cdf",
"branch_name": "refs/heads/master",
"committer_date": 1526914826000,
"content_id": "b8b4b87f1e202d899ec7d40942b1994055e26c8b",
"detected_licenses": [
"MIT"
],
"directory_id": "de7bbe756ec068bce635cd64d6542583407a52ad",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import logging
import uuid
import redis
from optparse import OptionParser
from http.server import HTTPServer, BaseHTTPRequestHandler
from constants import OK, BAD_REQUEST, INTERNAL_ERROR, NOT_FOUND, ERRORS, INVALID_REQUEST
from api import method_handler
from sto... | 85 | 35.94 | 119 | 19 | 685 | python | [{"finding_id": "codeql_py/log-injection_3d879857c7c52bad_1c3fb892", "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... | 5 | true | [
"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"
] | [
"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)."
] | [
28,
33,
35,
42,
66
] | [
null,
null,
null,
null,
null
] | [
23,
27,
26,
27,
23
] | [
44,
65,
47,
92,
30
] | |
2024-11-18T21:07:42.874806+00:00 | 1,584,456,464,000 | cee8f3c2d6ab20a15b6b0ca7689de7d8c02479e1 | 2 | {
"blob_id": "cee8f3c2d6ab20a15b6b0ca7689de7d8c02479e1",
"branch_name": "refs/heads/master",
"committer_date": 1584456464000,
"content_id": "c2739b4ead94a210fb76b4412f0dd489212d2a36",
"detected_licenses": [
"MIT"
],
"directory_id": "bd040771b304b502a4618991ea4e4256f20833b4",
"extension": "py",
"fi... | 2.359375 | stackv2 | # -*- coding: utf-8 -*-
import json
import requests
from requests.adapters import HTTPAdapter
s = requests.Session()
s.mount('http://stackoverflow.com', HTTPAdapter(max_retries=5))
def endpoint(part):
return 'https://{base}/{part}?_format=json'.format(
base='radars.securite-routiere.gouv.fr/radars',
... | 41 | 21.63 | 148 | 13 | 262 | python | [{"finding_id": "codeql_py/request-without-cert-validation_5f25f83596b6c689_b01464bc", "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)."
] | [
19
] | [
25
] | [
9
] | [
6
] | |
2024-11-18T21:33:15.024840+00:00 | 1,573,646,492,000 | 0ebfc4954cf7730805f8ad24c422ff6bf73d4c23 | 2 | {
"blob_id": "0ebfc4954cf7730805f8ad24c422ff6bf73d4c23",
"branch_name": "refs/heads/master",
"committer_date": 1573646492000,
"content_id": "8a03fac7744eb84047de65d9a4904b9e0fa8c4e6",
"detected_licenses": [
"MIT"
],
"directory_id": "8b1893ade14838f4f3cc510dba5bc7eac18fb942",
"extension": "py",
"fi... | 2.46875 | stackv2 | import argparse
import logging
import socket
import json
import paramiko
from paramiko import AuthenticationException
from paramiko.ssh_exception import NoValidConnectionsError
class Provision:
def __init__(self, current_private_key, key_json, host_json, digitalocean=False, vultr=False):
self.ssh_client ... | 129 | 43.22 | 118 | 22 | 1,161 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_414c15c0990935ef_c701d331", "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."
] | [
14
] | [
null
] | [
9
] | [
78
] | |
2024-11-18T21:55:48.625389+00:00 | 1,434,743,786,000 | 1367fa3b0913f3221dd6305e9e77bba6fed6fb2e | 2 | {
"blob_id": "1367fa3b0913f3221dd6305e9e77bba6fed6fb2e",
"branch_name": "refs/heads/master",
"committer_date": 1434743786000,
"content_id": "e623f5a645cdce2f67ad4cf102f14827fd576afb",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "042f80929e7e0066ebf5fb7c57d47d3d6940a949",
"extension": "p... | 2.46875 | stackv2 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2014 Troels Brødsgaard
# License: 2-clause BSD, see LICENSE for details
"""
sphinxview - serves your Sphinx project and reloads pages on source changes
Usage:
sphinxview [options] <sourcedir>
sphinxview -h | --help
sphinxview -v | --version
<so... | 228 | 32.62 | 78 | 15 | 1,717 | python | [{"finding_id": "codeql_py/path-injection_99ad323d76ee8852_817e2f78", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).", "remed... | 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)."
] | [
161
] | [
null
] | [
30
] | [
41
] | |
2024-11-18T23:05:57.808003+00:00 | 1,688,898,287,000 | 9ed7b87861325a3ce549d9fdda97f20f5baa0c86 | 2 | {
"blob_id": "9ed7b87861325a3ce549d9fdda97f20f5baa0c86",
"branch_name": "refs/heads/master",
"committer_date": 1688898287000,
"content_id": "04c66937151a8d16cb755b83804b1d5ef827fbb2",
"detected_licenses": [
"MIT"
],
"directory_id": "7c308313eda555e8c19f0fb67865e400be9cab1e",
"extension": "py",
"fi... | 2.390625 | stackv2 | # -*- coding: utf-8 -*-
"""Provider for Nature
Author: G.J.J. van den Burg
License: See LICENSE file
Copyright: 2020, G.J.J. van den Burg
"""
import re
from ..exceptions import URLResolutionError
from ._base import Provider
from ._info import Informer
class NatureInformer(Informer):
meta_date_key = "citatio... | 47 | 24.11 | 75 | 14 | 308 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_5ae8e03d711ffa15_d9374b0b", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This string, which is used as a regular expression [here](1), has an unescaped '.' befor... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-hostname-regexp",
"py/incomplete-hostname-regexp"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This string, which is used as a regular expression [here](1), has an unescaped '.' before 'nature.com/articles/s', so it might match more hosts than expected.",
"This string, which is used as a regular expression [here](1), has an unescaped '.' before 'nature.com/articles/s', so it might match more hosts than ex... | [
28,
29
] | [
null,
null
] | [
15,
15
] | [
61,
66
] | |
2024-11-18T20:56:50.005898+00:00 | 1,678,884,503,000 | 2d51f3bd90f9b03d1face6f56e01554553bb5abb | 3 | {
"blob_id": "2d51f3bd90f9b03d1face6f56e01554553bb5abb",
"branch_name": "refs/heads/main",
"committer_date": 1678884503000,
"content_id": "3e0e162cc8748542c4c52cefa33f309fce5b672d",
"detected_licenses": [
"MIT"
],
"directory_id": "08c8bf9ea15094eee96df1a42d1d222362b5dc7a",
"extension": "py",
"file... | 2.875 | stackv2 | # emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Parse the "ASCCONV" meta data format found in a variety of Siemens MR files.
Many Siemens files have a private data element that includes text, sandwiched
between ``### ASCCONV`` ``BEGIN`` and ``E... | 278 | 32.46 | 109 | 17 | 2,285 | python | [{"finding_id": "codeql_py/redos_f19c4991ae5d0506_7095ed34", "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 '### ASCCONV BEGIN!=' and containi... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '### ASCCONV BEGIN!=' and containing many repetitions of '!!!='."
] | [
48
] | [
null
] | [
53
] | [
60
] | |
2024-11-18T20:56:58.355311+00:00 | 1,606,913,662,000 | 052840c25dc668578df8c6100ff8e286413d2050 | 4 | {
"blob_id": "052840c25dc668578df8c6100ff8e286413d2050",
"branch_name": "refs/heads/master",
"committer_date": 1606913662000,
"content_id": "64172a75c6a4eb61a27f8d8b8fd5c17eae052c63",
"detected_licenses": [
"MIT"
],
"directory_id": "6b8777ff42a0a98d8d0261415b70f4db8902ab51",
"extension": "py",
"fi... | 4.5 | stackv2 | # 类与对象
# 数字类型的类
strs = '字符串'
ints = 1
floats = 2.3
print(type(strs))
print(type(ints))
print(type(floats))
""" 小测验
狗、秋田犬、忠犬八公、list、[1,2]
类(狗类)、类(狗类一种,秋田种)、实例(狗的一种)、类(列表类)、实例(列表实例)
"""
listObject = [1,3,'列表实例里的第三个元素']
listObject.append('我是列表实例利用类上的append方法添加进来的元素')
print(listObject)
class MyBoyfriend:
sex = 'm... | 156 | 17.3 | 86 | 11 | 1,119 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e4d5303b5ac24bd8_3b953228", "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."
] | [
54,
33
] | [
null,
null
] | [
16,
7
] | [
19,
20
] | |
2024-11-18T22:43:27.155924+00:00 | 1,533,198,838,000 | d25cf0d81426278b6cf1af6a95ff1ded09ab59c3 | 2 | {
"blob_id": "d25cf0d81426278b6cf1af6a95ff1ded09ab59c3",
"branch_name": "refs/heads/master",
"committer_date": 1533199343000,
"content_id": "71578ecab4275906582dff4ede1f11c4a4663376",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "40fcbaf21d4077824154b6ec8e874a3d99719efe",
"extension": "py"... | 2.421875 | stackv2 | import argparse
from optparse import OptionParser
from jinja2 import Template
import json
parser = argparse.ArgumentParser()
parser.add_argument("--table_name", default="table.html")
parser.add_argument("--json_name", default="table.json")
parser.add_argument("--template_name", default="obstaravania.tmpl")
options = p... | 16 | 36.88 | 108 | 13 | 137 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9e5296820cdb9780_8d7a22e8", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
13
] | [
null
] | [
12
] | [
109
] | |
2024-11-18T22:43:30.378689+00:00 | 1,676,018,934,000 | 7df7f3f012b5b636b4d13a77f4c29ec6993b6cef | 3 | {
"blob_id": "7df7f3f012b5b636b4d13a77f4c29ec6993b6cef",
"branch_name": "refs/heads/master",
"committer_date": 1676018934000,
"content_id": "24035a4d516689642dbce65a24f27d082c9ddaea",
"detected_licenses": [
"MIT"
],
"directory_id": "998d7ea8e1cbfec11cc6c1574971e54bc903c41d",
"extension": "py",
"fi... | 2.9375 | stackv2 | """
Module for creating Song objects by interacting with Spotify API
or by parsing a query.
To use this module you must first initialize the SpotifyClient.
"""
import json
import concurrent.futures
from typing import List, Optional
from spotdl.types import Playlist, Album, Artist, Saved
from spotdl.types.song impor... | 240 | 29.72 | 87 | 18 | 1,736 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_7e1bf24edfb41f82_92c35d67", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [open.spotify.com](1) may be at an arbitrary position i... | 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 [open.spotify.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [open.spotify.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [open.spotify.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [open.spotify.com](1) may be... | [
160,
178,
180,
182,
184
] | [
null,
null,
null,
null,
null
] | [
17,
14,
14,
14,
14
] | [
46,
43,
43,
43,
43
] | |
2024-11-18T23:10:38.988620+00:00 | 1,519,938,497,000 | dd067623cc0f77271b2af42a11ac704cc8634753 | 3 | {
"blob_id": "dd067623cc0f77271b2af42a11ac704cc8634753",
"branch_name": "refs/heads/master",
"committer_date": 1519938497000,
"content_id": "feccb3f0dfe638763714a37313863a5544cda674",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8f8189a119a03b6d73805a7bdb6852a0c698be8c",
"extension": "p... | 3.25 | stackv2 |
# PDF in a Flask.
# pdf_flask.py
# Description: Program to generate PDF from text, over the web,
# using xtopdf, ReportLab and the Flask web framework.
# It can be used to create short, simple PDF e-books.
# Author: Vasudev Ram - http://dancingbison.com
# Copyright 2013 Vasudev Ram
# Tested with Python 2.7.
# Versi... | 75 | 32.81 | 86 | 17 | 566 | python | [{"finding_id": "codeql_py/flask-debug_0c686fbb9cac185b_02d64271", "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)."
] | [
73,
67
] | [
null,
null
] | [
5,
20
] | [
24,
75
] | |
2024-11-18T23:25:05.149572+00:00 | 1,535,380,977,000 | 1c397670b8608bd44f34f03319f1f69abc605868 | 3 | {
"blob_id": "1c397670b8608bd44f34f03319f1f69abc605868",
"branch_name": "refs/heads/master",
"committer_date": 1535380977000,
"content_id": "2812f1d9600bc0078c5035a159d26b3cb1ae5843",
"detected_licenses": [
"MIT"
],
"directory_id": "a4d2bb752d303008aa98847a44d90985f3f543df",
"extension": "py",
"fi... | 3.3125 | stackv2 | #!/usr/bin/env python3.6
import pyperclip
from credential import User, Credential
def create_user(f_name,l_name,password):
'''
function that create a new user
'''
new_user = User(f_name,l_name,password)
return new_user
def save_user(user):
'''
saving a new user acount
'''
User.save... | 144 | 36.31 | 153 | 26 | 962 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_38cdf7c98b788eab_7f4505a8", "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.\nThis expression logs [sensitive data (password)](4) as clear text.",
"This expression logs [sensitive data (p... | [
114,
122
] | [
null,
null
] | [
31,
39
] | [
105,
151
] | |
2024-11-18T22:30:04.382407+00:00 | 1,424,368,748,000 | 28b3e4a1c8339cd730f8fb1341d11c9d2edf4ef1 | 2 | {
"blob_id": "28b3e4a1c8339cd730f8fb1341d11c9d2edf4ef1",
"branch_name": "refs/heads/master",
"committer_date": 1424368748000,
"content_id": "90b9a9303087e40a2d312bf766f54a381e414fbf",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "66b0da6aefdd849718ce5c85802a506cf273f18a",
"extension": "py"... | 2.484375 | stackv2 | import sys
sys.path.append("../common")
import csv
import io
from sqlalchemy import create_engine
from sqlalchemy.engine import reflection
from flask import Flask
from flask import request
from flask_cors import CORS
import ConfigParser
config = ConfigParser.ConfigParser()
config.read('config.ini')
if len(config.... | 82 | 26.26 | 125 | 14 | 501 | python | [{"finding_id": "codeql_py/sql-injection_e6ef6b498f3b967f_021e72d1", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2)."... | 1 | true | [
"CWE-089"
] | [
"py/sql-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2)."
] | [
31
] | [
null
] | [
32
] | [
55
] | |
2024-11-18T23:10:14.247296+00:00 | 1,569,460,177,000 | 91d8c265db6e0e42aa5b649b26aa8452b6cc93ed | 2 | {
"blob_id": "91d8c265db6e0e42aa5b649b26aa8452b6cc93ed",
"branch_name": "refs/heads/master",
"committer_date": 1569460177000,
"content_id": "a19c3fa7eaa587ea3e117d22141c32187085b038",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ace55e78e99342e897770c5a396b9043e29b3782",
"extension": "p... | 2.359375 | stackv2 | #!/usr/bin/env python
import sys
from boto3 import Session
if __name__ == "__main__":
if len(sys.argv) > 1:
subject = sys.argv[1]
session = Session()
credentials = session.get_credentials()
# Credentials are refreshable, so accessing your access key / secret key
# separatel... | 27 | 39.56 | 84 | 17 | 236 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_08e29a089c5350d0_e288d427", "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.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text."
] | [
26
] | [
null
] | [
25
] | [
33
] | |
2024-11-18T23:21:46.969801+00:00 | 1,611,196,060,000 | bab694e7b9756ea4cebd652b0995c616cce65c8b | 3 | {
"blob_id": "bab694e7b9756ea4cebd652b0995c616cce65c8b",
"branch_name": "refs/heads/master",
"committer_date": 1611196060000,
"content_id": "9a0799f0ae5502f90c42be16cfa6821ff4d7f2b1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "948ff047f589022c0e9fe020b0a3cd9006532eb1",
"extension": "py"... | 2.671875 | stackv2 | # Copyright 2018 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Standalone Python script to extract an archive. Intended to be used by
the 'archive' recipe module internally. Should not be used elsewhere.
""... | 183 | 31.98 | 80 | 18 | 1,492 | python | [{"finding_id": "codeql_py/tarslip_1f7289c75801efce_b3ad0ad6", "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)."
] | [
73
] | [
null
] | [
5
] | [
7
] | |
2024-11-18T21:33:32.236060+00:00 | 1,429,326,445,000 | a61cd9908c253ef3987d6f6565cd65072cd56e28 | 3 | {
"blob_id": "a61cd9908c253ef3987d6f6565cd65072cd56e28",
"branch_name": "refs/heads/master",
"committer_date": 1429326445000,
"content_id": "3f72dcffb9345860b404f9f115106ff99aa6ff54",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "806f0da3d7524252f85543a565d45db78797e0c6",
"extension": "p... | 2.515625 | stackv2 | import grp
import os
import urlparse
import sys
import shutil
from .base import BuildEnvironment, logger, NAMESPACE
def add_software(dir, name, repositories, identity):
""" Once schroot has been configured, a regular user can initialise the directory."""
build_env = BuildEnvironment(dir)
# Check that use... | 57 | 48.61 | 124 | 18 | 639 | python | [{"finding_id": "codeql_py/overly-permissive-file_18959e40d06b291f_245b3455", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to group writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to group writable."
] | [
45
] | [
null
] | [
13
] | [
72
] | |
2024-11-18T23:15:52.727716+00:00 | 1,599,913,026,000 | bc778061e8a9cb1157c41ca8a69692e8d62ee4e2 | 3 | {
"blob_id": "bc778061e8a9cb1157c41ca8a69692e8d62ee4e2",
"branch_name": "refs/heads/master",
"committer_date": 1599913026000,
"content_id": "3f6447fc37fe633c39d1025a37822a13aa3c3027",
"detected_licenses": [
"MIT"
],
"directory_id": "920673bdc1c198e908cf9a21900bf7be5a1d9ebc",
"extension": "py",
"fi... | 2.671875 | stackv2 | from tinymongo import tinymongo as tm
import os
import logging
logging.basicConfig(level=logging.INFO)
db_name = './demo_db'
print('db directory: ', db_name)
# remove the residual database to keep multiple iterations of this demo from continually adding to the same db
try:
print('removing db files: {}'.format(o... | 74 | 33.49 | 110 | 14 | 579 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ed1713100c40973b_3ea91a9b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
48,
62,
68
] | [
null,
null,
null
] | [
11,
11,
11
] | [
73,
73,
73
] | |
2024-11-18T23:15:57.164570+00:00 | 1,597,839,727,000 | 7f8e5c0887d27f765db150c30c867c9b07c59e22 | 3 | {
"blob_id": "7f8e5c0887d27f765db150c30c867c9b07c59e22",
"branch_name": "refs/heads/master",
"committer_date": 1597839727000,
"content_id": "22c69695c5e15a67f30842001694ba5028581dfb",
"detected_licenses": [
"MIT"
],
"directory_id": "e079a9f0e360ed3d06056faeb23e094237085ab9",
"extension": "py",
"fi... | 2.578125 | stackv2 | """Allows user to access accout functions"""
from rest_framework.permissions import IsAuthenticatedOrReadOnly, \
IsAuthenticated, AllowAny
from rest_framework.response import Response
from rest_framework.viewsets import ModelViewSet
from rest_framework.generics import GenericAPIView, \
RetrieveUpdateDestroyAPIV... | 220 | 33.56 | 79 | 18 | 1,465 | python | [{"finding_id": "codeql_py/stack-trace-exposure_74db57d2688ec345_f9ceaf8b", "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."
] | [
220
] | [
null
] | [
41
] | [
42
] | |
2024-11-18T22:30:14.310297+00:00 | 1,494,445,237,000 | 227722341dcb94915c82794e73306c01e5caf53a | 2 | {
"blob_id": "227722341dcb94915c82794e73306c01e5caf53a",
"branch_name": "refs/heads/master",
"committer_date": 1494445237000,
"content_id": "19147052a587342d4e403739946990778ae5bda9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "40951f226b23c1aa8ad6b783418bafd5a86d3604",
"extension": "py"... | 2.390625 | stackv2 | #!/usr/bin/env python
import os
import time
import base64
import struct
daemon_keyring_templates = {
'mon': '[mon.]\n'
' key = {}\n'
' caps mon = "allow *"\n',
'bootstrap-mds': '[client.bootstrap-mds]\n'
' key = {}\n'
... | 104 | 29.88 | 100 | 15 | 746 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9c9575a62c2ac596_d6ca6c26", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secre... | [
61,
76,
85
] | [
null,
null,
null
] | [
15,
11,
15
] | [
23,
19,
23
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.