added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T21:59:17.191849+00:00 | 1,585,876,092,000 | 9e668cc630a610f3eccd722dc8de62ffc1f40315 | 2 | {
"blob_id": "9e668cc630a610f3eccd722dc8de62ffc1f40315",
"branch_name": "refs/heads/master",
"committer_date": 1585876092000,
"content_id": "f1e330e2824dcff0ec4c1e63f4350c7ab97d77df",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "5c83c974b36505af76e97ecd7115e1437044c9f3",
"extension": "py",
... | 2.484375 | stackv2 | import urllib.request
from bs4 import BeautifulSoup
import csv
from time import sleep
import glob
import pandas as pd
from time import sleep
from hashlib import md5
import argparse
import sys
import os
import requests
import json
def make_md5(s, encoding='utf-8'):
return md5(s.encode(encoding)).hexdigest()
outpu... | 93 | 24.85 | 98 | 22 | 512 | python | [{"finding_id": "codeql_py/request-without-cert-validation_77b1d33db52b44cb_ce818b83", "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)."
] | [
77
] | [
null
] | [
29
] | [
82
] | |
2024-11-18T22:11:25.046593+00:00 | 1,679,877,825,000 | 5e373e6b55c7694caf3c8cb73c008eb31f23de18 | 3 | {
"blob_id": "5e373e6b55c7694caf3c8cb73c008eb31f23de18",
"branch_name": "refs/heads/main",
"committer_date": 1679877825000,
"content_id": "1d66a51720cd6c6e049a75a90b43b999f83e33e8",
"detected_licenses": [
"MIT"
],
"directory_id": "b5ddc086ea378008b914be22b105b17979360809",
"extension": "py",
"file... | 2.734375 | stackv2 | # -*- coding: UTF-8 -*-
from curses import flash
from flask import Flask, render_template, request, redirect, session, url_for
app = Flask(__name__)
app.secret_key = 'alura'
class Jogo:
def __init__(self, nome, categoria, console):
self.nome = nome
self.categoria = categoria
self.console = console
clas... | 76 | 27.32 | 77 | 16 | 589 | python | [{"finding_id": "codeql_py/flask-debug_f5706d400792f750_51ddbc64", "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)."
] | [
76,
64
] | [
null,
null
] | [
null,
23
] | [
20,
37
] | |
2024-11-18T22:11:31.385889+00:00 | 1,587,554,385,000 | a2b2ced2845c0cdbc77f059e1ee6b2afd84fd1b2 | 3 | {
"blob_id": "a2b2ced2845c0cdbc77f059e1ee6b2afd84fd1b2",
"branch_name": "refs/heads/master",
"committer_date": 1587554385000,
"content_id": "3fd398d0dbf2902e0d4edd71c6028ec5a067729c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c280db1c055e26e75bd4693f67d933b962ea3cfe",
"extension": "py"... | 2.5625 | stackv2 | import logging
import requests
import urllib3
from enum import Enum
from kube_hunter.conf import config
from kube_hunter.core.types import Discovery
from kube_hunter.core.events import handler
from kube_hunter.core.events.types import OpenPortEvent, Event, Service
urllib3.disable_warnings(urllib3.exceptions.InsecureR... | 78 | 34.69 | 102 | 16 | 647 | python | [{"finding_id": "codeql_py/request-without-cert-validation_7c5f7a3ac822be2a_c03ba14d", "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)."
] | [
70
] | [
null
] | [
20
] | [
88
] | |
2024-11-18T22:24:04.680818+00:00 | 1,522,509,030,000 | 0ebd4bd9a05e780ac5ee92b2031a215a1422d17a | 2 | {
"blob_id": "0ebd4bd9a05e780ac5ee92b2031a215a1422d17a",
"branch_name": "refs/heads/master",
"committer_date": 1522509030000,
"content_id": "c6c77436447fc5044ae53c135b38ab444fbc734a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "34314200dc0c311a62b3890042af5c31d1267abb",
"extension": "py"... | 2.375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf8 -*-
import codecs
import os
import pickle
import random
import time
from . import find_git_repos
from . import git_util
def init_ignore(ignore_filename='.git_update_all_ignore'):
ignore_set = {'.cache', '.git', '$RECYCLE.BIN',}
if os.path.exists(ignore_filename):
... | 291 | 32.93 | 116 | 19 | 2,169 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_048df5e76a5436c8_77ea59ce", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [bitbucket.org](1) may be at an arbitrary position in t... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [bitbucket.org](1) may be at an arbitrary position in the sanitized URL.",
"The string [naver.com](1) may be at an arbitrary position in the sanitized URL."
] | [
86,
96
] | [
null,
null
] | [
16,
16
] | [
38,
34
] | |
2024-11-18T22:24:07.583095+00:00 | 1,592,443,886,000 | ae92e9d688bc4eb9d0a5289da1ae5d350a5b76ed | 2 | {
"blob_id": "ae92e9d688bc4eb9d0a5289da1ae5d350a5b76ed",
"branch_name": "refs/heads/master",
"committer_date": 1592443886000,
"content_id": "cdce865838a6e1672782d914905f12ea6f230e0b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a098c0c91f496f74612568baaffa56fcb180b946",
"extension": "py"... | 2.375 | stackv2 | #
# Pyserini: Python interface to the Anserini IR toolkit built on Lucene
#
# 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... | 235 | 48.95 | 117 | 19 | 2,797 | python | [{"finding_id": "codeql_py/tarslip_0a27dfee09f95394_50c63109", "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)."
] | [
84
] | [
null
] | [
9
] | [
16
] | |
2024-11-18T22:24:12.026994+00:00 | 1,632,233,034,000 | 37526d0fa8c0180472bfb979a8a6934a66bec68b | 3 | {
"blob_id": "37526d0fa8c0180472bfb979a8a6934a66bec68b",
"branch_name": "refs/heads/master",
"committer_date": 1632233034000,
"content_id": "2d3c76afcbf8d59bbd4196af7ade10b13bc9bb6b",
"detected_licenses": [
"MIT"
],
"directory_id": "ba3e17938a5d5802907ffc6f2abdc1ac4db3c311",
"extension": "py",
"fi... | 2.5625 | stackv2 | """
Endpoints for the user profiles
"""
# Import from libraries
from flask_apispec.views import MethodResource
from flask_apispec import marshal_with, use_kwargs, doc
from flask import current_app
import logging as log
# Import from internal modules
from .meta_resource import MetaResource
from ..models import UserMod... | 163 | 35.12 | 112 | 18 | 1,304 | python | [{"finding_id": "codeql_py/log-injection_a6512fa4645f0733_48f19983", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
104,
132
] | [
null,
null
] | [
18,
18
] | [
86,
85
] | |
2024-11-18T22:24:14.517387+00:00 | 1,662,435,710,000 | fce2d12400fe4eba2cfc91dc0889b4c8070dd11d | 2 | {
"blob_id": "fce2d12400fe4eba2cfc91dc0889b4c8070dd11d",
"branch_name": "refs/heads/master",
"committer_date": 1662435710000,
"content_id": "46e9f47422985b94fd4f54ce33e8297ffde5e0ce",
"detected_licenses": [
"MIT"
],
"directory_id": "b937f36cbe26be128659abcc5f80dde7b705be83",
"extension": "py",
"fi... | 2.4375 | stackv2 | from flask import request, jsonify, make_response
from flask.views import MethodView
from ..database_setup import (
Basic_Information, Income_Sheet, Balance_Sheet,
Cash_Flow, Daily_Information, Stock_Commodity
)
import logging
from logging.handlers import TimedRotatingFileHandler
import requests
import json
imp... | 406 | 32.74 | 79 | 22 | 3,040 | python | [{"finding_id": "codeql_py/stack-trace-exposure_6cde98790f8911be_85a1e68e", "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.", "... | 12 | true | [
"CWE-209",
"CWE-209",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [u... | [
119,
196,
261,
298,
308,
369,
379,
236,
295,
305,
366,
376
] | [
null,
null,
262,
299,
310,
370,
381,
null,
296,
306,
367,
377
] | [
17,
17,
33,
17,
17,
17,
17,
21,
17,
17,
17,
17
] | [
36,
36,
68,
69,
34,
73,
34,
67,
33,
33,
33,
33
] | |
2024-11-18T22:24:16.965161+00:00 | 1,561,149,125,000 | 5b98b44d654d792dbcce9b09745b83595196e573 | 2 | {
"blob_id": "5b98b44d654d792dbcce9b09745b83595196e573",
"branch_name": "refs/heads/master",
"committer_date": 1561149125000,
"content_id": "dde8aa0777038c00cb538d03017a0fffe0e0619e",
"detected_licenses": [
"MIT"
],
"directory_id": "77eb864023ddec5357e3d829c7a3489903a64bd4",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding:utf-8 -*-
import json
import random
import sqlite3
from flask import Flask, request, render_template
app = Flask(__name__)
app.debug = True
class ElemInterface:
'''
Row object interface for filter.
'''
def __init__(self, name ):
self._name = name
self._filter = None
... | 236 | 28.92 | 133 | 18 | 1,627 | python | [{"finding_id": "codeql_py/flask-debug_1d49e8ce5dbdd782_c5c55740", "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-089",
"CWE-089"
] | [
"py/flask-debug",
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1)."
] | [
235,
191,
204
] | [
null,
null,
null
] | [
5,
21,
21
] | [
51,
28,
36
] | |
2024-11-18T22:36:04.271522+00:00 | 1,572,471,976,000 | b7ee7ba675899597a80cf5978ad6ef422feec121 | 3 | {
"blob_id": "b7ee7ba675899597a80cf5978ad6ef422feec121",
"branch_name": "refs/heads/master",
"committer_date": 1572471976000,
"content_id": "30a579fd574ca727a753b358bd5b8a9f152b1477",
"detected_licenses": [
"MIT"
],
"directory_id": "e89c983742840a79a09f9cc69428e327acac6999",
"extension": "py",
"fi... | 2.734375 | stackv2 | from flask import Flask, jsonify, request
app = Flask(__name__)
def addUserDB(username, password):
with open('users.txt','a') as f:
f.write(username)
f.write('\n')
f.write(password)
f.write('\n')
def verifyUserDB(username, password):
with open('users.txt','r') as f:
li... | 65 | 27.98 | 76 | 15 | 452 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_150d910e1dc172d3_fbcad419", "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.\... | 2 | true | [
"CWE-312",
"CWE-215"
] | [
"py/clear-text-storage-sensitive-data",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
9,
65
] | [
null,
null
] | [
17,
5
] | [
25,
24
] | |
2024-11-18T22:36:17.738933+00:00 | 1,477,517,905,000 | 142c6c460bacb8de0dfb02d67bc1eda09c8dae62 | 2 | {
"blob_id": "142c6c460bacb8de0dfb02d67bc1eda09c8dae62",
"branch_name": "refs/heads/master",
"committer_date": 1477517905000,
"content_id": "1afb097ec19d0f4070ee77140b249e07a19e2d33",
"detected_licenses": [
"MIT"
],
"directory_id": "cd74d6eac8ecce27d3cb29d41b288764d1583744",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
from watchdog.events import RegexMatchingEventHandler
import unified2.parser, re, json, requests, base64, socket
import os.path, time, sqlite3, sys, spooler, threading
from requests import ConnectionError
class HayFever(RegexMatchingEventHandler):
def __init__(self, *args, **kwargs):
... | 294 | 44.32 | 153 | 20 | 2,816 | python | [{"finding_id": "codeql_py/request-without-cert-validation_fd6c316c3818341f_df424172", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2)."
] | [
218,
221
] | [
219,
null
] | [
25,
25
] | [
72,
108
] | |
2024-11-18T22:36:33.987277+00:00 | 1,629,229,522,000 | 12559206878a20a7ad38eca740b6505502dd5216 | 2 | {
"blob_id": "12559206878a20a7ad38eca740b6505502dd5216",
"branch_name": "refs/heads/main",
"committer_date": 1629229522000,
"content_id": "9e6dd4dc2975349e3725b3fc2e386431d75615f3",
"detected_licenses": [
"MIT"
],
"directory_id": "e6afc451c348c084cc4a6a4596712fcda2b83287",
"extension": "py",
"file... | 2.484375 | stackv2 | # coding=utf-8
from flask import render_template, flash, redirect, session, url_for, request, g, Markup, make_response
from flask.sessions import NullSession
from werkzeug.security import generate_password_hash, check_password_hash
from .models import User,Invoice
from . import db
from . import app
import sys
import ha... | 92 | 35.01 | 126 | 18 | 717 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_605599472830b7b4_935ef045", "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... | 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 (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally e... | [
50,
68
] | [
null,
null
] | [
86,
37
] | [
94,
45
] | |
2024-11-18T22:36:42.889399+00:00 | 1,440,455,159,000 | 0a50381f53069260709b0d9e9cc36d2eb9282ce0 | 3 | {
"blob_id": "0a50381f53069260709b0d9e9cc36d2eb9282ce0",
"branch_name": "refs/heads/master",
"committer_date": 1440455159000,
"content_id": "2c69b11d6d35a3f1f0b7c852d86d6cf8058b8770",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2e2eb0b0d351439990741c8dc25fca69fe9e25a7",
"extension": "py"... | 2.765625 | stackv2 | '''
Created on 4.3.2014
@author: Stefan Smihla
'''
from hashlib import md5, sha256
from StringIO import StringIO
import zipfile
import os
import json
SIMPLE_PHRASE = 'vcelimed'
COMPLEX_PHRASE = 'l3kvarov@strudla'
def _wrongSample(data, direct):
"""
Stores wrong sample to directory.
"""
if not os.pa... | 83 | 26.78 | 114 | 17 | 595 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_944f867d0b675e2d_69fe7b9c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
45
] | [
null
] | [
21
] | [
29
] | |
2024-11-18T22:36:44.986332+00:00 | 1,632,848,201,000 | b1bf63229cc5a0d9b25a903dcb707f14fc0ffb5a | 3 | {
"blob_id": "b1bf63229cc5a0d9b25a903dcb707f14fc0ffb5a",
"branch_name": "refs/heads/main",
"committer_date": 1632848201000,
"content_id": "e3f7fb9bbebf14ee58c391bb7ba258b5c67166a3",
"detected_licenses": [
"Unlicense"
],
"directory_id": "64cdd0e5bb5ff919af7dc1412e06a42901e29fb3",
"extension": "py",
... | 2.53125 | stackv2 | """
module docstring here
"""
import bgtunnel
import os
import sys
from MySQLdb import connect, cursors
from dotenv import load_dotenv
def get_current_dir():
if getattr(sys, 'frozen', False):
return sys._MEIPASS
return os.path.dirname(os.path.abspath(__file__))
class MySqlTunnelError(Exception):
... | 185 | 32.42 | 79 | 14 | 1,312 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2e279e9419e705b2_e60cbbfa", "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."
] | [
64
] | [
null
] | [
23
] | [
30
] | |
2024-11-18T20:23:24.188681+00:00 | 1,623,112,248,000 | 47e22f7a223f19aa25c40d2665fcc8d72653ab07 | 3 | {
"blob_id": "47e22f7a223f19aa25c40d2665fcc8d72653ab07",
"branch_name": "refs/heads/master",
"committer_date": 1623112248000,
"content_id": "039d26f5b0893b66b5a9af6d7de3662450287ccc",
"detected_licenses": [
"MIT"
],
"directory_id": "f92083be85dbd4c700286ababad5545998b48dc4",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask, escape, request, make_response
import os
import requests
from Crypto.Cipher import AES
import urllib
import base64
from datetime import datetime, timedelta
# These variables should be configured as per your own parameters for each application in your API Gateway Maintanence portal.
# They can ... | 128 | 34.7 | 126 | 14 | 1,203 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_44144ab509ac05ed_bc3ae8c7", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
39,
50
] | [
null,
null
] | [
18,
14
] | [
45,
38
] | |
2024-11-18T20:23:34.892153+00:00 | 1,527,610,940,000 | 63519bdc289b09a411bf242eef4bf0706735acde | 4 | {
"blob_id": "63519bdc289b09a411bf242eef4bf0706735acde",
"branch_name": "refs/heads/master",
"committer_date": 1527610940000,
"content_id": "a57935a1aed3c7fa0a12309a67c5ffab33433164",
"detected_licenses": [
"MIT"
],
"directory_id": "9304a1ab96a5baa34953d2463a02747c9cadbb44",
"extension": "py",
"fi... | 3.984375 | stackv2 | #Password generator by Sakshat Shinde
import random
#declaring the password variable
password = ""
#Msgs for the user
print("Choose parameters, atleast 2 for safety, we recommend 3\n")
print("For example if you want to choose 1,3 and 4")
print("Type \'134' \n")
print("1: Pet name, 2: Spouse name, 3: Fav Movie, 4: Yo... | 66 | 27.83 | 97 | 15 | 446 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5ebb587dcbf12cdc_a3e8dff4", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text."
] | [
60
] | [
null
] | [
11
] | [
20
] | |
2024-11-18T20:23:37.395279+00:00 | 1,500,192,221,000 | 3ad35899bb6445117bbaf2efbb9b3f62fbc1f9ac | 4 | {
"blob_id": "3ad35899bb6445117bbaf2efbb9b3f62fbc1f9ac",
"branch_name": "refs/heads/master",
"committer_date": 1500192221000,
"content_id": "c5875749e722a9373356083b0ae504bad6c7f829",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "96a2eb4f109ccf277ad11512f2f06ead9b9a6aab",
"extension": "py"... | 3.625 | stackv2 | # Author:Scott She
name = input("name ")
age = int(input("age "))
job = input("job ")
salary = float(input("salary "))
print(type(name), type(age), type(job), type(salary))
info1 = """
---------------- info of %s ------------------
Name: %s
Age: %d
Job: %s
Salary: %.1f
""" % (name, name, age, job, salary)
print(info... | 45 | 15.84 | 53 | 9 | 221 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8f740403e0c6a6d2_79727ae5", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
16,
28,
40
] | [
null,
null,
null
] | [
7,
7,
7
] | [
12,
12,
12
] | |
2024-11-18T21:22:29.797481+00:00 | 1,546,268,530,000 | adeafdd454655e67cfe8279a1337d1e60b4d043d | 3 | {
"blob_id": "adeafdd454655e67cfe8279a1337d1e60b4d043d",
"branch_name": "refs/heads/master",
"committer_date": 1546268530000,
"content_id": "cb33560264f96d692271afbc1b47e2160a974641",
"detected_licenses": [
"MIT"
],
"directory_id": "a24255925dd041bdbd64bbf0d1d6f0a140f01cc7",
"extension": "py",
"fi... | 2.71875 | stackv2 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
'''
Utility functions
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import time
import socket
from contextlib import contextmanager
from subprocess im... | 216 | 26.9 | 98 | 15 | 1,522 | python | [{"finding_id": "codeql_py/overly-permissive-file_027b3a63da7c74b4_c55ca7a3", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
156
] | [
null
] | [
13
] | [
45
] | |
2024-11-18T21:23:20.443190+00:00 | 1,582,152,899,000 | cd899fd59bd3c159d3ade0fa6536cc72eae397bc | 3 | {
"blob_id": "cd899fd59bd3c159d3ade0fa6536cc72eae397bc",
"branch_name": "refs/heads/master",
"committer_date": 1582152899000,
"content_id": "2f3e862f4f0055a38fde764c3615b3e1862a996f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8cb1e6945fb08e2e77cf3d4ddaaaeef68708cab2",
"extension": "py"... | 2.640625 | stackv2 | from .config import mkdir_p
import os
import urllib.request, urllib.error, urllib.parse
import errno
import tarfile
from contextlib import contextmanager
import tempfile
def temp_directory():
path = os.path.expanduser('~/.scanner/resources')
mkdir_p(path)
return path
def download_temp_file(url, local_pa... | 70 | 25.01 | 91 | 15 | 420 | python | [{"finding_id": "codeql_py/tarslip_82ca7dce656a31e4_d96a3ae2", "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)."
] | [
29
] | [
null
] | [
17
] | [
22
] | |
2024-11-18T21:51:14.932226+00:00 | 1,567,183,014,000 | bf7eca4dd2e366e4f59a0a470611c03bcf8264cd | 3 | {
"blob_id": "bf7eca4dd2e366e4f59a0a470611c03bcf8264cd",
"branch_name": "refs/heads/master",
"committer_date": 1567183014000,
"content_id": "66bbdebb40aff27b0a91407ab89a33cafc489409",
"detected_licenses": [
"MIT"
],
"directory_id": "228150d8a40b349b5d3c49a471393eeead114bf1",
"extension": "py",
"fi... | 2.625 | stackv2 | import os
import time
import urllib.request
import threading
from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import ThreadingMixIn
HOST_NAME = '0.0.0.0'
PORT_NUMBER = int(os.getenv("SERVER_PORT",8080))
FPS = int(os.getenv("SERVER_FPS",25))
BOUNDARY = "--boundarydonotcross"
loop_mutex = th... | 67 | 34.31 | 96 | 18 | 482 | python | [{"finding_id": "codeql_py/partial-ssrf_e67b0c4cf360e00f_c411d833", "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
] | [
31
] | [
58
] | |
2024-11-18T21:51:15.082404+00:00 | 1,577,090,529,000 | 061e27e6205c63c1463297bfa378a7dc5715692f | 3 | {
"blob_id": "061e27e6205c63c1463297bfa378a7dc5715692f",
"branch_name": "refs/heads/master",
"committer_date": 1577090529000,
"content_id": "83868a79f36d2c41098ddf8f4f27fc223cde7290",
"detected_licenses": [
"MIT"
],
"directory_id": "aa9a00aec4968f1d8b12dd48fc8f0a69bfc56e34",
"extension": "py",
"fi... | 2.71875 | stackv2 | from flask import Flask, jsonify, request, render_template
from flask_csv import send_csv
from werkzeug.utils import secure_filename
import pandas as pd
import numpy as np
import datetime
import pandas_datareader as pdr
from cvxpy import Parameter, Variable, quad_form, Problem, Minimize, Maximize
def getReturns(stoc... | 147 | 32.73 | 121 | 17 | 1,155 | python | [{"finding_id": "codeql_py/flask-debug_4ee8eef22382a192_9d4481d0", "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)."
] | [
147,
137
] | [
null,
null
] | [
5,
20
] | [
24,
25
] | |
2024-11-18T21:51:21.602252+00:00 | 1,597,434,924,000 | 9b3de7af3b0088bcf4dcdb1f792690d7fbdae5c8 | 3 | {
"blob_id": "9b3de7af3b0088bcf4dcdb1f792690d7fbdae5c8",
"branch_name": "refs/heads/master",
"committer_date": 1597434924000,
"content_id": "ef91fcb2f47c0c9dd83de69c3ff4fa1467102ee1",
"detected_licenses": [
"MIT"
],
"directory_id": "3eda9965d562d23ccef626d8177c20312beef079",
"extension": "py",
"fi... | 2.515625 | stackv2 | # 4 June 2020
# Edits: using SafeLoader for YAML and commented out errno code.
# 22 June 2020
# trying to run the simulation in v1 compat mode.
import argparse
import re
import yaml
import sys
import os
import importlib
from talloc import taskAllocater
from spimulation.evalloc import evalAllocater
from spimulation.te... | 187 | 31.42 | 112 | 18 | 1,377 | python | [{"finding_id": "codeql_py/overly-large-range_f6613b05a08ed3fd_056000ae", "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\\\\[\\\\\\\\]^_\\]."
] | [
35
] | [
null
] | [
55
] | [
58
] | |
2024-11-18T21:51:22.975804+00:00 | 1,680,514,677,000 | 940d5cc2ea7933f9e4293b28fd4255cc9d753811 | 3 | {
"blob_id": "940d5cc2ea7933f9e4293b28fd4255cc9d753811",
"branch_name": "refs/heads/master",
"committer_date": 1680514677000,
"content_id": "c35decf0bd21507ad9a9219067baa538c451f40c",
"detected_licenses": [
"MIT"
],
"directory_id": "0c9080f172d77032305cdeef26d32b332d8e7952",
"extension": "py",
"fi... | 2.578125 | stackv2 | from builtins import str
from builtins import object
import mimetypes, pycurl
class PyCurlCallBack(object):
def response_callback(self, response):
pass
def post_multipart(url, fields, files, insecure = False, headers = {}):
c = pycurl.Curl()
c.setopt(c.POST, 1)
c.setopt(c.URL, str(url))
... | 43 | 24.19 | 74 | 13 | 286 | python | [{"finding_id": "codeql_py/request-without-cert-validation_3349f1c7c18afc4c_d31aa812", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2)."
] | [
16
] | [
null
] | [
9
] | [
38
] | |
2024-11-18T21:51:26.074385+00:00 | 1,518,188,583,000 | 71846ea7bbd33d44b343a6080df22fd81246ee7b | 3 | {
"blob_id": "71846ea7bbd33d44b343a6080df22fd81246ee7b",
"branch_name": "refs/heads/master",
"committer_date": 1518188583000,
"content_id": "d979c4327fbf518a0fa1b1e7944a11a4ef9e2f41",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "dbe83eec5cb852b14652ce578711cc4b3b4c5cee",
"extension": "py"... | 2.53125 | stackv2 | #!/usr/bin/env python
""" jinja2-nxos-config
Accepts arguments from YAML config file
and generates a Jinja2 configuration
"""
#TODO: Consider use of the leading underscore
#from ucstools import storage
from jinja2 import Environment, FileSystemLoader
import yaml
ENV = Environment(loader=FileSystemLoader('./s... | 26 | 27.35 | 68 | 10 | 165 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b0481b9f78cabe5e_5f2c83ee", "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
] | [
7
] | [
58
] | |
2024-11-18T21:51:54.374270+00:00 | 1,635,112,219,000 | d69f5d51c475bf1716b96e7465a006531e9dfef3 | 2 | {
"blob_id": "d69f5d51c475bf1716b96e7465a006531e9dfef3",
"branch_name": "refs/heads/main",
"committer_date": 1635112219000,
"content_id": "b6ef31f444bba004029cb5ef0807870e3351ddb7",
"detected_licenses": [
"MIT"
],
"directory_id": "b7931de37ef295b89872539214bdd88489e567ea",
"extension": "py",
"file... | 2.375 | stackv2 | # -*- coding: utf-8 -*-
import json
import base64
from flask import Flask, render_template, request, jsonify
from utilities import *
DATA_PATH = "data_examples"
# Application entrance
app = Flask(__name__)
@app.route('/')
def index():
name = listdir_(os.path.join(DATA_PATH))[-1] # num = 1
return edit(name... | 177 | 34.15 | 99 | 18 | 1,466 | python | [{"finding_id": "codeql_py/flask-debug_bb64d12862df8a77_56155d75", "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-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"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.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
176,
130,
142,
155
] | [
null,
null,
null,
null
] | [
5,
19,
19,
19
] | [
53,
28,
28,
28
] | |
2024-11-18T21:51:56.971847+00:00 | 1,450,116,239,000 | d6c9dbe435ebdf0310f0060521850cb25ac0ae49 | 2 | {
"blob_id": "d6c9dbe435ebdf0310f0060521850cb25ac0ae49",
"branch_name": "refs/heads/master",
"committer_date": 1450116239000,
"content_id": "0d356560ce520143268690f6df8fa6e5ef4a070c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f484b4eee6f0fadd000b10a9abf833b11346a56f",
"extension": "p... | 2.40625 | stackv2 | import email.generator
import io
import os
import re
import socket
import ssl
import six
from six.moves import http_client
if six.PY3:
from urllib.parse import urlencode
from urllib.request import BaseHandler, HTTPHandler, HTTPSHandler
else:
from urllib import urlencode
from urllib2 import BaseHandler... | 211 | 34.03 | 123 | 21 | 1,653 | python | [{"finding_id": "codeql_py/insecure-default-protocol_238dd0a36fae93e9_f87a9bac", "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."
] | [
103
] | [
106
] | [
21
] | [
10
] | |
2024-11-18T21:51:58.276361+00:00 | 1,617,232,744,000 | c440d9f22a32cdfe51ba648a62f5172cc3e95815 | 3 | {
"blob_id": "c440d9f22a32cdfe51ba648a62f5172cc3e95815",
"branch_name": "refs/heads/main",
"committer_date": 1617232744000,
"content_id": "0d4a923efdbaa0099e3d803b02685d9896cb8ec5",
"detected_licenses": [
"MIT"
],
"directory_id": "49c6b9f3a4daf98d6f753ed6674ea9f7e742f391",
"extension": "py",
"file... | 2.59375 | stackv2 | import argparse
import json
import logging
import sys
from datetime import datetime
import paho.mqtt.client as mqtt
import psycopg2
# Author: Gary A. Stafford
# Date: 10/11/2020
# Usage: python3 mosquitto_to_timescaledb.py \
# --msqt_topic "sensor/output --msqt_host "192.168.1.12" --msqt_port 1883 \
# ... | 109 | 37.11 | 110 | 19 | 960 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_726d9af48879000a_2323593f", "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."
] | [
31
] | [
null
] | [
18
] | [
68
] | |
2024-11-18T22:16:40.870724+00:00 | 1,600,763,716,000 | 60ef90addf08c733d75aaa69a9806a146457fb1b | 3 | {
"blob_id": "60ef90addf08c733d75aaa69a9806a146457fb1b",
"branch_name": "refs/heads/master",
"committer_date": 1600763716000,
"content_id": "f1848f4992d8bd4c06e86ae930f3e1752a12ae83",
"detected_licenses": [
"MIT"
],
"directory_id": "2c4f3d0b3884b6808ebd156db2e9f241ebbcdde9",
"extension": "py",
"fi... | 2.71875 | stackv2 | import shutil
import tarfile
import pickle
import os
import zipfile
import urllib.request
from pathlib import Path
from pykg2vec.utils.logger import Logger
def extract_tar(tar_path, extract_path='.'):
"""This function extracts the tar file.
Most of the knowledge graph datasets are downloaded in a compres... | 446 | 35.75 | 113 | 18 | 3,691 | python | [{"finding_id": "codeql_py/tarslip_cc8e3010466bcfa8_9c2cf08e", "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)."
] | [
26
] | [
null
] | [
21
] | [
25
] | |
2024-11-18T22:16:44.656011+00:00 | 1,685,408,859,000 | ffb165b3f40eff680fe28ccf4c78d5ef28bca96c | 2 | {
"blob_id": "ffb165b3f40eff680fe28ccf4c78d5ef28bca96c",
"branch_name": "refs/heads/master",
"committer_date": 1685408859000,
"content_id": "2bbcef8176ed794b16005fe31f81efbbc1a00178",
"detected_licenses": [
"MIT"
],
"directory_id": "501e0774c35d8fa087e59e72f834cca3da463893",
"extension": "py",
"fi... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
import socket
import errno
import ssl
import time
from beaver.transports.base_transport import BaseTransport
from beaver.transports.exception import TransportException
class TcpTransport(BaseTransport):
def __init__(self, beaver_config, logger=None):
super(TcpTransport, self).__i... | 85 | 35.36 | 97 | 18 | 634 | python | [{"finding_id": "codeql_py/insecure-protocol_ed525148300bae3d_8f340f27", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).", "remediation": "", "l... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1)."
] | [
45
] | [
49
] | [
34
] | [
80
] | |
2024-11-18T22:28:16.914015+00:00 | 1,573,082,201,000 | cd73c00dcfcb0ce6e0b9e80e8d551c3a31111762 | 2 | {
"blob_id": "cd73c00dcfcb0ce6e0b9e80e8d551c3a31111762",
"branch_name": "refs/heads/master",
"committer_date": 1573082201000,
"content_id": "b67c5fca9ff523471fdf2b5ad246928e41f0fb74",
"detected_licenses": [
"MIT"
],
"directory_id": "479649a8562dfb4ec9dc9d4b6ef2932a4f7bcc07",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/python3
################################################################################
# Program : crawler.py
# Author : Artem Skitenko, Harry Staley and David Velez
# Date : 05/12/2019
# Description: Web Crawling through CivTech Site
###########################################################... | 175 | 45.83 | 128 | 18 | 1,736 | python | [{"finding_id": "codeql_py/stack-trace-exposure_a0844d6804871986_9d6d5890", "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.", "... | 2 | true | [
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH"
] | [
"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."
] | [
82,
93
] | [
null,
null
] | [
30,
30
] | [
50,
50
] | |
2024-11-18T22:43:59.559538+00:00 | 1,548,799,730,000 | e5ec5706e04f313e01d8f67e795949b8fe4cc753 | 2 | {
"blob_id": "e5ec5706e04f313e01d8f67e795949b8fe4cc753",
"branch_name": "refs/heads/master",
"committer_date": 1548799737000,
"content_id": "cd5c91dc4eb68911e201742699d09812f5577606",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "51a484c4885439799561dc5f6ab59e91d33d98fd",
"extension": "p... | 2.328125 | stackv2 | #! /usr/bin/env python3
import config
config.import_libs()
import unittest
import socket
from xmlui import Connector, Request, Response, Login
class TestIsUp(unittest.TestCase):
def setUp(self):
self.c = Connector(config.xmlui_host, config.xmlui_port, config.xmlui_ssl)
"""
Ping the xmlui server port.
"""
def... | 46 | 22 | 76 | 13 | 253 | python | [{"finding_id": "codeql_py/insecure-default-protocol_06530d5c0dfad683_b335f9f5", "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."
] | [
22
] | [
null
] | [
8
] | [
26
] | |
2024-11-18T22:44:01.055111+00:00 | 1,621,707,619,000 | eab9f3e3e7000283e09d86795541ed2b652db37a | 2 | {
"blob_id": "eab9f3e3e7000283e09d86795541ed2b652db37a",
"branch_name": "refs/heads/master",
"committer_date": 1621707619000,
"content_id": "e660dca929c0ec17b9cf13412fc16e1a84ef94ee",
"detected_licenses": [
"MIT"
],
"directory_id": "05000bcb9ed39be05bce1480ca11bfe2dcb3c513",
"extension": "py",
"fi... | 2.5 | stackv2 | import dateutil.parser
import logging
import requests
class Trakt(object):
API_URL = "https://api-v2launch.trakt.tv"
API_USERS_HISTORY = "/users/{0}/history/{1}"
API_USERS_RATINGS = "/users/{0}/ratings/{1}"
API_SEASONS_SUMMARY = "/shows/{0}/seasons"
def __init__(self, key):
self.key = ... | 95 | 33.21 | 87 | 19 | 699 | python | [{"finding_id": "codeql_py/request-without-cert-validation_4bd314d1fd9eeb77_0c55f879", "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)."
] | [
29
] | [
31
] | [
20
] | [
10
] | |
2024-11-18T22:44:06.073506+00:00 | 1,553,546,287,000 | b744ded29cff611e3aad91d519615b2acd342e5b | 2 | {
"blob_id": "b744ded29cff611e3aad91d519615b2acd342e5b",
"branch_name": "refs/heads/master",
"committer_date": 1553546287000,
"content_id": "1c76852ef4763d322e76ed3d61b3041db0013c2f",
"detected_licenses": [
"MIT"
],
"directory_id": "a3f31ee62fd738cb928da501c428b5e2c4f744e3",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python
"""
Creates an HTTP server with basic auth and websocket communication.
"""
import argparse
import base64
import hashlib
import os
import time
import threading
import webbrowser
try:
import cStringIO as io
except ImportError:
import io
import tornado.web
import tornado.websocket
from tor... | 103 | 27.03 | 77 | 15 | 655 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e54428830201b414_b0bba867", "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 (SHA512) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
44
] | [
null
] | [
27
] | [
35
] | |
2024-11-18T20:59:41.347422+00:00 | 1,607,900,454,000 | 9c07f55f5692b7f5af5ed89a92ca304d57e25934 | 3 | {
"blob_id": "9c07f55f5692b7f5af5ed89a92ca304d57e25934",
"branch_name": "refs/heads/master",
"committer_date": 1607900454000,
"content_id": "941d1b25af888f176bc4073d9f4f308cc8841ef0",
"detected_licenses": [
"MIT"
],
"directory_id": "b9db687f6330e6d015aabdc0ca0a1e3ee81cd3e4",
"extension": "py",
"fi... | 2.59375 | stackv2 | import flask
import tempfile
import numpy as np
import requests as http
from flask_cors import CORS, cross_origin
from PIL import Image
from flask import request
from color import dataColor
from models import Model, Conv2D
from screen_page import screen_web_page
from clutter import get_interaction_clutter
from respo... | 163 | 24.81 | 95 | 12 | 976 | python | [{"finding_id": "codeql_py/full-ssrf_bd8e7a71692ed117_d381ac5b", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u... | 1 | true | [
"CWE-918"
] | [
"py/full-ssrf"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The full URL of this request depends on a [user-provided value](1)."
] | [
32
] | [
null
] | [
9
] | [
23
] | |
2024-11-18T21:00:02.637430+00:00 | 1,540,247,422,000 | bb6c8d1b85b8253d21edf2d664d707e3e8bfc833 | 3 | {
"blob_id": "bb6c8d1b85b8253d21edf2d664d707e3e8bfc833",
"branch_name": "refs/heads/master",
"committer_date": 1540247422000,
"content_id": "6f3b7a2218fe703a421999461f6a8818496c573d",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8a44e513b69ef7c3ceceb8becf82e8ccc37ae3fb",
"extension": "p... | 2.859375 | stackv2 | import requests as r
import re
from bs4 import BeautifulSoup
from urllib.parse import urlparse
import checksum
import csv_tool
class Site_Scanner(object):
def __init__(self,url,whitelist):
self.url = url
self.main_html = r.get(self.url)
self.url_parsed = urlparse(self.url)
self.white... | 101 | 33.92 | 114 | 16 | 839 | python | [{"finding_id": "codeql_py/redos_f9627793d27a68e0_7e14e7e3", "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 '/**' and containing many repetiti... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '/**' and containing many repetitions of '\\n*'.",
"This part of the regular expression may cause exponential backtracking on strings starting with '/*' and containing many repetitions of '\\n'."
] | [
45,
45
] | [
null,
null
] | [
60,
43
] | [
74,
77
] | |
2024-11-18T21:00:45.036959+00:00 | 1,586,190,874,000 | 0cab8bfeea86b2aca40ddf459ce05f5c670d0d33 | 2 | {
"blob_id": "0cab8bfeea86b2aca40ddf459ce05f5c670d0d33",
"branch_name": "refs/heads/master",
"committer_date": 1586190874000,
"content_id": "61ddebb7e8f46d72730da0d8c9ce92455b26fcaa",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "990564c9baf631531c84df53469f82d44affb173",
"extension": "py"... | 2.375 | stackv2 | import socket
import ssl
import enum
try:
import hyperframe.frame
except:
exit('install "hyperframe" from pip')
try:
import hpack
except:
exit('install "hpack" from pip')
MAGIC = b'PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n'
class ErrorCode(enum.Enum):
NO_ERROR = 0
PROTOCOL_ERROR = 1
INTERNAL_ERROR... | 130 | 26.29 | 90 | 18 | 892 | python | [{"finding_id": "codeql_py/insecure-protocol_909e64b2d297892c_f9755621", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.create_default_context](1)."
] | [
47
] | [
null
] | [
12
] | [
19
] | |
2024-11-18T21:01:16.175754+00:00 | 1,544,789,470,000 | 31019de5ab0c303404059f003c34000f0f93012e | 3 | {
"blob_id": "31019de5ab0c303404059f003c34000f0f93012e",
"branch_name": "refs/heads/master",
"committer_date": 1544789470000,
"content_id": "82d29a008c247fc0e0fcd1d2adde79cea613e392",
"detected_licenses": [
"MIT"
],
"directory_id": "3ffce2d303ef1330b14f1a1173b096ad7caab988",
"extension": "py",
"fi... | 2.671875 | stackv2 | #!/usr/bin/env python
import requests, urllib
import base64
import os, time, getpass
import hashlib
import nacl.secret
import nacl.utils
import argparse
BASE_URL = 'http://localhost:5000'
#BASE_URL = 'https://xxxx.herokuapp.com/'
from utils import query_yes_no
def upload(filename, password):
data = args.file.... | 95 | 29.49 | 155 | 15 | 694 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e7eb42400ce319cb_8836c8d6", "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... | [
21,
57
] | [
null,
null
] | [
31,
35
] | [
39,
43
] | |
2024-11-18T21:01:18.912262+00:00 | 1,581,852,735,000 | 76526a60c77a738aa18c67caa8e95d2f944a2280 | 2 | {
"blob_id": "76526a60c77a738aa18c67caa8e95d2f944a2280",
"branch_name": "refs/heads/master",
"committer_date": 1581852735000,
"content_id": "b959379b85f5dcbdf5fd5b432f786767fc442fa8",
"detected_licenses": [
"MIT"
],
"directory_id": "925206d5acdf1d1eb5b53c077509b8e6518a3a1e",
"extension": "py",
"fi... | 2.421875 | stackv2 | # Main.py with threading!
# Python program to illustrate the concept
# of threading
# importing the threading module
import threading
import smbus #import SMBus module of I2C
import RTIMU
from time import sleep #import
import adafruit_gps
import time
import struct
import board
import busio
import... | 379 | 34.34 | 177 | 19 | 3,744 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9bb5251baacbe92b_45b979b1", "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."
] | [
167,
168
] | [
null,
null
] | [
19,
19
] | [
62,
64
] | |
2024-11-18T21:01:23.242451+00:00 | 1,614,106,328,000 | b76db64c939a3be8a318837a36e96facd208813f | 3 | {
"blob_id": "b76db64c939a3be8a318837a36e96facd208813f",
"branch_name": "refs/heads/master",
"committer_date": 1614106328000,
"content_id": "0b5874c1d44d4d845f52dd82cb9bfa93bf126fe9",
"detected_licenses": [
"MIT"
],
"directory_id": "9143c23f7cd77be0276f2d742c0f4d0c7b4e8b27",
"extension": "py",
"fi... | 2.65625 | stackv2 | import base64
import os
from flask import Flask, request, render_template
from werkzeug.utils import secure_filename
from yolo import YOLO
from PIL import Image
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices(device_type='GPU')
for gpu in gpus:
tf.config.experimental.set_memory_growth(... | 58 | 25.76 | 92 | 14 | 405 | python | [{"finding_id": "codeql_py/path-injection_ac101982bc5f3cf7_24241487", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
46
] | [
null
] | [
16
] | [
26
] | |
2024-11-18T21:51:34.898960+00:00 | 1,436,907,454,000 | 71418b1a123d9f6c78334a2fcdb208f74cff0db6 | 3 | {
"blob_id": "71418b1a123d9f6c78334a2fcdb208f74cff0db6",
"branch_name": "refs/heads/master",
"committer_date": 1436907454000,
"content_id": "95a864907ed35400452f7fb41305c7088e629e39",
"detected_licenses": [
"BSD-2-Clause",
"BSD-3-Clause"
],
"directory_id": "a97586091b2c7aa54feaef39d4f87468f0ccf91c... | 3.296875 | stackv2 | #!/usr/bin/env python3
# Copyright 2014 Carl Winbäck. See the COPYING file at the top-level directory
# of this distribution.
from Crypto.Cipher import AES
from operator import itemgetter
from itertools import combinations
character_frequency = {
'e': 27,
't': 26,
'a': 25,
'o': 24,
'i': 23,
'... | 298 | 22.07 | 78 | 15 | 1,761 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_72fd259ea9eea0c9_14f107e4", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
231,
248
] | [
null,
null
] | [
36,
21
] | [
61,
42
] | |
2024-11-18T22:00:22.269445+00:00 | 1,497,808,061,000 | 0ee1d88710f28e0c1ce0c873195fadaf67774d2f | 3 | {
"blob_id": "0ee1d88710f28e0c1ce0c873195fadaf67774d2f",
"branch_name": "refs/heads/master",
"committer_date": 1497808061000,
"content_id": "1f7f0d0e83cf11810ea9b837c2e50b43bec21b6e",
"detected_licenses": [
"MIT"
],
"directory_id": "ad4d1d3dd38409d8c69fd20e63b8fe4f33300b79",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/env python
import hashlib
import requests
from .credentials import LastfmCredentials
class LastfmClient:
""" A simple client for the Last.fm API."""
def __init__(self, key, secret):
"""Creates a Last.fm client.
Args:
key (str): Web API key.
secret (str): W... | 95 | 29.54 | 77 | 14 | 637 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_441df46c60a27fb0_3b3efa4b", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (MD5) that is insecure."
] | [
37
] | [
null
] | [
20
] | [
42
] | |
2024-11-18T22:00:44.795256+00:00 | 1,380,313,013,000 | 19896bc63984b73ef22239963a26c6bb969da247 | 2 | {
"blob_id": "19896bc63984b73ef22239963a26c6bb969da247",
"branch_name": "refs/heads/master",
"committer_date": 1380313013000,
"content_id": "087cbedb130425d8bd7edd10ea57f4c7e8249a20",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3aaaa5f36b0f8d00353a6588452f2629858d10df",
"extension": "py"... | 2.46875 | stackv2 | from flask import Flask, jsonify, redirect
import requests
import time
import settings as s
import json
app = Flask(__name__)
@app.route('/')
def hello():
try:
root_folder_files = get_folder_files()
except Exception as ex:
return 'There was a problem using the Box Content API: {}'.format(ex... | 113 | 26.04 | 90 | 13 | 697 | python | [{"finding_id": "codeql_py/partial-ssrf_ddaf4ec69740b31c_c04c7681", "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)."
] | [
103
] | [
null
] | [
20
] | [
74
] | |
2024-11-18T22:01:02.648166+00:00 | 1,592,583,554,000 | b6f1bf37a0e2551d033b7a7fb7bf4f8423f3983f | 3 | {
"blob_id": "b6f1bf37a0e2551d033b7a7fb7bf4f8423f3983f",
"branch_name": "refs/heads/master",
"committer_date": 1592583554000,
"content_id": "ad9ed497b6b7f50f75816cdf3d9fbc09617dbd57",
"detected_licenses": [
"MIT"
],
"directory_id": "3e5438ff2957def8d7f3933e4ca163d1616cdbfc",
"extension": "py",
"fi... | 3.265625 | stackv2 | from operator import itemgetter
profiles_list = list()
profiles_dict = dict()
with open('m04_lab_profiles','r') as profiles_file:
for profile_line in profiles_file:
profile = dict()
profile_info = profile_line.strip().split(',')
profile['name'] = profile_info[0]
profile['locati... | 71 | 42.3 | 122 | 12 | 567 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a87642decbdeeefd_1e095db3", "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.", "... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
31,
41,
52,
70
] | [
32,
42,
53,
71
] | [
11,
11,
11,
11
] | [
90,
90,
90,
90
] | |
2024-11-18T22:15:04.965720+00:00 | 1,363,713,999,000 | 228e7a770166af3f7594aa22ed5353dabc3c923f | 2 | {
"blob_id": "228e7a770166af3f7594aa22ed5353dabc3c923f",
"branch_name": "refs/heads/master",
"committer_date": 1363713999000,
"content_id": "c67e13d07a7486ba7bf2824e1354b3a5a0bd51e8",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "cef5d07e3faf72816dda0e41aa6e2bb966d44819",
"extension": "p... | 2.453125 | stackv2 | from flask import abort, request, render_template, jsonify
import psycopg2
import sys
import os
import re
import json
from utils.jsonp import jsonp
import random
def api_landing():
return redirect(url_for('bigtree'))
def build_tree(cursor,root, depth):
if depth == 1:
sql = "select * from toc1 where pa... | 96 | 37.53 | 119 | 17 | 915 | python | [{"finding_id": "codeql_py/sql-injection_2f3f090145f52672_a2c36e7e", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 2 | true | [
"CWE-089",
"CWE-089"
] | [
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1)."
] | [
16,
33
] | [
null,
null
] | [
24,
24
] | [
27,
27
] | |
2024-11-18T22:26:01.133908+00:00 | 1,516,435,368,000 | a2df55a357782167c8ec87764854852183c91b22 | 3 | {
"blob_id": "a2df55a357782167c8ec87764854852183c91b22",
"branch_name": "refs/heads/master",
"committer_date": 1516435368000,
"content_id": "441565f89b0be8a2a51d325dda82105c243cb833",
"detected_licenses": [
"MIT"
],
"directory_id": "8421a478e4d3d488b36875cfd555717a53b47006",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!/usr/bin/env python3
#ServiceNow
import logging
import os
import sys
from configparser import ConfigParser
import requests
from gentelella.core import global_config
logger = logging.getLogger('root')
FORMAT = "[%(filename)s:%(lineno)s-%(funcName)s] %(message)s"
logging.basicConfig(format=FORMAT)
logger.setLevel(... | 116 | 31.14 | 129 | 19 | 780 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3122de774a02803f_6b05fcfe", "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."
] | [
81,
84,
100
] | [
null,
null,
null
] | [
25,
25,
19
] | [
28,
28,
23
] | |
2024-11-18T22:26:01.305808+00:00 | 1,658,955,050,000 | e8f38febd0ab2aeb840e58404dc611a6a8b5b728 | 2 | {
"blob_id": "e8f38febd0ab2aeb840e58404dc611a6a8b5b728",
"branch_name": "refs/heads/master",
"committer_date": 1658955050000,
"content_id": "bfcdc88c7f1804c5bbefb69b4fe7dc427ba3028a",
"detected_licenses": [
"MIT"
],
"directory_id": "a33b1a6c61f80539343be9ac6aec5412f30cdc12",
"extension": "py",
"fi... | 2.34375 | stackv2 | import jinja2
import os
import datetime
from collections import namedtuple
Page = namedtuple('Page', ['name', 'title', 'background_image'])
TEMPLATE_DIR = 'src/templates'
PAGES = [
Page(name='index', title='Home', background_image='parallaxHome.jpg'),
#Page(name='dei', title='DEI', background_image='paralla... | 34 | 36.03 | 95 | 16 | 305 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4b7cd891d6f44266_1dd56322", "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."
] | [
23
] | [
25
] | [
11
] | [
6
] | |
2024-11-18T22:26:14.057289+00:00 | 1,522,016,559,000 | 62a08ef47d4ec011afdac7dd5894882c00e492cf | 3 | {
"blob_id": "62a08ef47d4ec011afdac7dd5894882c00e492cf",
"branch_name": "refs/heads/master",
"committer_date": 1522016559000,
"content_id": "27a5272eec0b809e512812747deb2f1ef94b6689",
"detected_licenses": [
"MIT"
],
"directory_id": "8bb8416d94acca7ef825f2b47aab883e3177798c",
"extension": "py",
"fi... | 2.84375 | stackv2 | import os
import requests
# required to work with Facebook Graph API
# get it from https://developers.facebook.com/docs/apps/register
# or ask @hroncok to run the script
APP_ID = os.environ['APP_ID']
APP_SECRET = os.environ['APP_SECRET']
# IDs of Facebook groups
GROUPS = [
'201628346516017', # facebook.com/group... | 60 | 28.88 | 78 | 13 | 494 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5b978ad53229b3b1_34ed30d4", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](... | [
29,
59
] | [
null,
null
] | [
15,
11
] | [
43,
45
] | |
2024-11-18T20:39:49.424906+00:00 | 1,585,237,481,000 | c056c0ae66da897da8514ea89a71a289332e9abe | 2 | {
"blob_id": "c056c0ae66da897da8514ea89a71a289332e9abe",
"branch_name": "refs/heads/master",
"committer_date": 1585237481000,
"content_id": "15b842fd93f175007a0b8b23e670dc08b964ac40",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "729e104ff6831343caf7e1afd8014232b35b8c26",
"extension": "py"... | 2.375 | stackv2 | #!/usr/bin/env python
#
# Copyright (C) 2017 The Android Open Source Project
#
# 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 req... | 217 | 31.93 | 79 | 15 | 1,681 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fa4f628aa266ca7d_4c390140", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.",
"This expression logs [sensitive data ... | [
201,
212,
213
] | [
null,
null,
null
] | [
59,
35,
35
] | [
69,
39,
43
] | |
2024-11-18T20:40:00.158113+00:00 | 1,676,139,610,000 | e20fca1441afc673c847d37a52c179ada232fb8a | 3 | {
"blob_id": "e20fca1441afc673c847d37a52c179ada232fb8a",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "3082c3f4cc28e99fc8a81bd389a82d482085d80b",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 3.09375 | stackv2 | #
# Script to retrieve magnetic declination data from www.ngdc.noaa.gov
# Retrieves specified latitude and longitude ranges (CONUS by default)
# and stores them in a cfg style text file
#
# Usage: Run script with no arguments, it will output declination.cfg
# in the current directory
#
# Tested with Python 3.3.... | 80 | 35.56 | 122 | 15 | 732 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f1e439bc351b53f1_3cdef3a0", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text.\nThis expression stores [sensitive data (private)](3) as clear text.\nThis expression stores [sensitive data (private)](4) as clear text."
] | [
50
] | [
null
] | [
14
] | [
121
] | |
2024-11-18T20:40:01.965582+00:00 | 1,605,202,697,000 | 99c668afcc942674372b0bc3541e13ef4b0ed832 | 2 | {
"blob_id": "99c668afcc942674372b0bc3541e13ef4b0ed832",
"branch_name": "refs/heads/master",
"committer_date": 1605202697000,
"content_id": "a10f135030f5ba4b467fab2f41fa39a0aad2305d",
"detected_licenses": [
"MIT"
],
"directory_id": "087de2f5053519c6ddc1d4828d08127af765bec1",
"extension": "py",
"fi... | 2.453125 | stackv2 | import discord
from discord import Colour
from discord.ext import commands
from discord.utils import escape_markdown
from urllib.parse import quote as url_quote
import logging
import typing
import tempfile
PROFILE_SERVICES = {
'MyAnimeList': ("https://myanimelist.net/", (lambda u: f"https://myanimelist.net/prof... | 268 | 32.57 | 132 | 21 | 1,815 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_cb46ba436fc2eeff_de7bffec", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com/](1) may be at an arbitrary position in the... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [github.com/](1) may be at an arbitrary position in the sanitized URL."
] | [
193
] | [
null
] | [
14
] | [
43
] | |
2024-11-18T20:40:07.642544+00:00 | 1,588,051,394,000 | 81485b744db55342b6dae29410fef40bd4c9c04d | 3 | {
"blob_id": "81485b744db55342b6dae29410fef40bd4c9c04d",
"branch_name": "refs/heads/master",
"committer_date": 1588051394000,
"content_id": "ca00784c030cbf17a831e833dbb15cc4229bad57",
"detected_licenses": [
"MIT"
],
"directory_id": "4ae3b27a1d782ae43bc786c841cafb3ace212d55",
"extension": "py",
"fi... | 2.6875 | stackv2 | """
loadConfigs.py
Description:
Sample script to show BPS RESTv2 common use case
What this script does:
- Login to BPS box
- Import a test and search into the database after it
- Load the test and check the name
- Import a network config and search for it into the database
- Load the network config ... | 167 | 33.96 | 140 | 13 | 1,479 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9c922b1147614d56_fab9a9e3", "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."
] | [
98
] | [
null
] | [
7
] | [
92
] | |
2024-11-18T21:08:15.464511+00:00 | 1,600,009,073,000 | 50e5c452327e4ff7592d3fba4f644658634f96fe | 2 | {
"blob_id": "50e5c452327e4ff7592d3fba4f644658634f96fe",
"branch_name": "refs/heads/master",
"committer_date": 1600009073000,
"content_id": "22d4b71e14bf8b57422a27a040756f4d984b6efd",
"detected_licenses": [
"MIT"
],
"directory_id": "62656fdd8a6d995fe0f63eeef313adfb02e40bd6",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python3
import argparse
from jinja2 import Environment, FileSystemLoader
import os
import sys
import yaml
def main(args):
d = {}
d["NodeId"] = int(args.node_num)
d["Uplink"] = args.uplink if args.uplink else "Gi0/0/0/0"
d["NodePeers"] = [int(n) for n in args.node_nei_str.split(',')]
pwd = o... | 27 | 35.74 | 98 | 13 | 250 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2b16ed0a43039f77_48858718", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
17
] | [
null
] | [
9
] | [
50
] | |
2024-11-18T21:08:26.357865+00:00 | 1,561,397,014,000 | bb3815721425db8cee48d5d53ce9d847bcbd8925 | 2 | {
"blob_id": "bb3815721425db8cee48d5d53ce9d847bcbd8925",
"branch_name": "refs/heads/master",
"committer_date": 1561397014000,
"content_id": "4c379a50575c8ae34744bf9fbb5878c9232fe84b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "47aa04acefdf457b1fd79fad81453c624f2c19fe",
"extension": "py"... | 2.3125 | stackv2 | # -*- coding: utf-8 -*-
"""
Simple application to get data from images.
by Matt Hall, Agile Geoscience, 2016
"""
from io import BytesIO
import requests
import uuid
import os
from flask import Flask
from flask import request, jsonify, render_template
from flask import redirect, url_for
from werkzeug.utils import secur... | 218 | 28.95 | 95 | 18 | 1,561 | python | [{"finding_id": "codeql_py/url-redirection_3930bd6ae4bec25e_f718a41b", "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)."
] | [
186,
192
] | [
null,
null
] | [
29,
29
] | [
40,
40
] | |
2024-11-18T21:08:26.513266+00:00 | 1,692,648,632,000 | 6b7d714f0e01f68a0167606206c02305adb0a2e3 | 2 | {
"blob_id": "6b7d714f0e01f68a0167606206c02305adb0a2e3",
"branch_name": "refs/heads/master",
"committer_date": 1692648632000,
"content_id": "d57227a78450557ba680a9ed7c7b1e931b220588",
"detected_licenses": [
"MIT"
],
"directory_id": "66af80d2b780a49fc0daa476d0a1f804429d6df3",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os
import numpy as np
import scipy.io
import torch.utils.data as data
from PIL import Image
from .utility import check_integrity, download_url
IMG_EXTENSIONS = [".jpg", ".jpeg", ".png", ".ppm", ".bmp", ".pgm", ".tif"]
def pil_loader(path):
# open path as file to avoid ResourceWarning (https://github.com... | 290 | 32.03 | 149 | 18 | 2,311 | python | [{"finding_id": "codeql_py/tarslip_31bfef7ce37b8732_8bf1d8eb", "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)."
] | [
208
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T21:08:32.981228+00:00 | 1,613,256,794,000 | cd3f200418870ca5abeaa079ecba161f998f94c8 | 2 | {
"blob_id": "cd3f200418870ca5abeaa079ecba161f998f94c8",
"branch_name": "refs/heads/master",
"committer_date": 1613256794000,
"content_id": "b2301fc16dd3511957c74e5c47e13d1f95c6adbf",
"detected_licenses": [
"MIT"
],
"directory_id": "04fdc627f5879abc06fdb347de74134106478f8b",
"extension": "py",
"fi... | 2.46875 | stackv2 | from flask import Blueprint
from flask import request
import serial, sys, random
sys.path.append(sys.path[0] + '/Helpers')
from Robot_Helper import robot
turn_controller = Blueprint('turn_controller', __name__)
@turn_controller.route("/power")
def Power():
global robot
state = request.args.get('state')
... | 53 | 17.98 | 56 | 10 | 246 | python | [{"finding_id": "codeql_py/reflective-xss_263ec9120af0f9c7_423bd067", "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)."
] | [
19
] | [
null
] | [
12
] | [
17
] | |
2024-11-18T21:31:24.729229+00:00 | 1,542,498,534,000 | 83c40f05da5849924248357e735cb84501b46ce2 | 3 | {
"blob_id": "83c40f05da5849924248357e735cb84501b46ce2",
"branch_name": "refs/heads/master",
"committer_date": 1542498534000,
"content_id": "0114149b53437905f86ab3c9355d903ba151c6ad",
"detected_licenses": [
"MIT"
],
"directory_id": "214219a866fa550b8e0c4e0574f1d7de20b6a32e",
"extension": "py",
"fi... | 2.9375 | stackv2 | # ***************************************************************************************
# ***************************************************************************************
#
# Name : cmzc.py
# Author : Paul Robson (paul@robsons.org.uk)
# Date : 17th November 2018
# Purpose : Python simple Colour MZ Comp... | 166 | 29.89 | 89 | 18 | 1,331 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5229111122296cef_75bb20ce", "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."
] | [
61
] | [
null
] | [
17
] | [
27
] | |
2024-11-18T21:31:27.380698+00:00 | 1,636,194,556,000 | 760e39626d2e7c506822f7384820765c20c4be34 | 3 | {
"blob_id": "760e39626d2e7c506822f7384820765c20c4be34",
"branch_name": "refs/heads/main",
"committer_date": 1636194556000,
"content_id": "44cb352efea002ae59ca2ff1b69694c697bf2602",
"detected_licenses": [
"Unlicense"
],
"directory_id": "45b4ea214c86f02eb168bf9828357eff0dd283d2",
"extension": "py",
... | 3.21875 | stackv2 | from Crypto.Cipher import DES
from Crypto.Cipher import DES3
from Crypto.Random import get_random_bytes
from Crypto.Util.Padding import pad
from Crypto.Util.Padding import unpad
import base64
def base64Encoding(input):
dataBase64 = base64.b64encode(input)
dataBase64P = dataBase64.decode("UTF-8")
return dataBase6... | 99 | 41.74 | 91 | 13 | 1,214 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_c494cd5026b2d732_afb4e5c6", "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.\n[The cryptograph... | 4 | true | [
"CWE-327",
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES](2) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES](2) is broken or weak, and should not be used.",
"[The cryp... | [
21,
28,
35,
42
] | [
null,
null,
null,
null
] | [
16,
19,
16,
19
] | [
64,
45,
64,
45
] | |
2024-11-18T21:31:33.047345+00:00 | 1,517,070,386,000 | 818cca90264b487ffb73149d73e80e05a0c44b48 | 3 | {
"blob_id": "818cca90264b487ffb73149d73e80e05a0c44b48",
"branch_name": "refs/heads/master",
"committer_date": 1517070386000,
"content_id": "a63573eb95fe1e348466d280427e38e2b03a49a5",
"detected_licenses": [
"MIT"
],
"directory_id": "2a0e43f5425b8bda60a801f6305c68a76912323a",
"extension": "py",
"fi... | 2.9375 | stackv2 | from Crypto import Random
from Crypto.Cipher import AES
from Crypto.Cipher import DES3
from datetime import datetime
import base64
AES_BLOCK_SIZE=16
DES_BLOCK_SIZE=8
aes_pad = lambda s: s + (AES_BLOCK_SIZE - len(s) % AES_BLOCK_SIZE) * chr(AES_BLOCK_SIZE - len(s) % AES_BLOCK_SIZE)
aes_unpad = lambda s : s[0:-ord(s[-... | 71 | 28.97 | 114 | 13 | 602 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_30d242b46a1f0bbf_cd4e17f9", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm DES3](1) is broken or weak, and should not be used."
] | [
35,
41
] | [
null,
null
] | [
34,
22
] | [
55,
62
] | |
2024-11-18T21:31:51.352872+00:00 | 1,539,947,804,000 | b00f7b1c9c350e9caed216923cf19a0bb55f7138 | 2 | {
"blob_id": "b00f7b1c9c350e9caed216923cf19a0bb55f7138",
"branch_name": "refs/heads/master",
"committer_date": 1539947804000,
"content_id": "d6ee85dcfbde7372767c4eddf78e8432c890cc4a",
"detected_licenses": [
"MIT"
],
"directory_id": "ab64cc9cd812b514cc52c0d3278a64abbd6fa5c1",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!usr/bin/env python
#-*- coding: utf-8 -*-
from flask import Flask
from flask import request
import bs4
import json
import requests
import m_conf as conf
import e_conf as c
import logging
from fbchat import Client
from fbchat.models import *
app = Flask(__name__)
logging.basicConfig()
logger = logging.getLogger('fou... | 101 | 36.02 | 146 | 19 | 916 | python | [{"finding_id": "codeql_py/log-injection_a4235f57fb968761_c5981406", "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)."
] | [
88
] | [
null
] | [
22
] | [
64
] | |
2024-11-18T21:31:55.829596+00:00 | 1,493,437,862,000 | 72ff9e2477372e999402c374d68ced302a1c7c84 | 3 | {
"blob_id": "72ff9e2477372e999402c374d68ced302a1c7c84",
"branch_name": "refs/heads/master",
"committer_date": 1493437862000,
"content_id": "a9f270b10b0775fab8161fa782aa5c0a87d39ab4",
"detected_licenses": [
"MIT"
],
"directory_id": "ae57a145beb463509c526c44003396b2ba03702a",
"extension": "py",
"fi... | 3.21875 | stackv2 | ########################################################################
#
# 인터넷으로부터 데이터파일을 다운로드받고 추출하는 함수
#
# Implemented in Python 3.5
#
########################################################################
#
# This file is part of the TensorFlow Tutorials available at:
#
# https://github.com/Hvass-Labs/TensorFlow... | 98 | 26.77 | 86 | 16 | 697 | python | [{"finding_id": "codeql_py/tarslip_1b0e2ecab7abd6fe_8ce02d92", "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)."
] | [
91
] | [
null
] | [
13
] | [
54
] | |
2024-11-18T21:32:18.016311+00:00 | 1,692,290,682,000 | 428a8eacf7dcba81ff1ca1577b1ad745cf98075f | 3 | {
"blob_id": "428a8eacf7dcba81ff1ca1577b1ad745cf98075f",
"branch_name": "refs/heads/master",
"committer_date": 1692290682000,
"content_id": "88ea76ed2e87f20076f5315a0ee264eabf2dc5e6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "db12b990924703cd74748d8585cd9c11fafa6746",
"extension": "py"... | 2.78125 | stackv2 | import argparse
import sys
import time
import requests
def has_scan_errors(digest, pid, api_key):
"""
Waits for image scan to complete and checks the results. Prints errors found.
:param digest: A digest of the docker image to check errors of
:param pid: Project identified (PID) from Red Hat Connect... | 89 | 40.63 | 142 | 13 | 810 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_def4f288c93545eb_2e6bd824", "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.", ... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensi... | [
32,
34,
63,
64,
67
] | [
null,
null,
null,
null,
null
] | [
11,
15,
15,
15,
15
] | [
56,
57,
23,
31,
88
] | |
2024-11-18T21:32:24.811685+00:00 | 1,405,826,062,000 | b85693322a63ec3a072f78d257b8d330605b9225 | 3 | {
"blob_id": "b85693322a63ec3a072f78d257b8d330605b9225",
"branch_name": "refs/heads/master",
"committer_date": 1405826062000,
"content_id": "ee58acd832ac9537af108ea46f549d2394adde03",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "19e9a59172a180d26f6d05d4fc00137e5a30c050",
"extension": "p... | 2.515625 | stackv2 | # -*- coding: utf-8 -*-
"""
base.views
~~~~~~~~~~
The most common views for the whole project.
:copyright: (c) 2012 by Roman Semirook.
:license: BSD, see LICENSE for more details.
"""
from flask.templating import render_template
from flask.views import MethodView
from flask import flash, redirec... | 70 | 24.54 | 79 | 15 | 378 | python | [{"finding_id": "codeql_py/url-redirection_42a80766271b1b72_c8b06444", "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)."
] | [
53
] | [
null
] | [
25
] | [
79
] | |
2024-11-18T21:32:26.548036+00:00 | 1,571,855,979,000 | 768c16ba871e8dfe4a0051bf20c8fa5f2cc4dea4 | 3 | {
"blob_id": "768c16ba871e8dfe4a0051bf20c8fa5f2cc4dea4",
"branch_name": "refs/heads/master",
"committer_date": 1571855979000,
"content_id": "628d0d5cb9b6828571ac9c25a4f8f64b52f0a5f9",
"detected_licenses": [
"MIT"
],
"directory_id": "5f08ce928e42633989b9fd9125a415657ba3a103",
"extension": "py",
"fi... | 2.625 | stackv2 | import os
#import magic
import urllib.request
#from app import app
from flask import Flask, flash, request, redirect, render_template
from werkzeug.utils import secure_filename
import keras
from keras.models import load_model
import numpy as np
from matplotlib import pyplot as plt
UPLOAD_FOLDER = './Uploads'
app = Fl... | 71 | 27.65 | 84 | 16 | 507 | python | [{"finding_id": "codeql_py/url-redirection_0e4aea1f08c199fc_bf361af1", "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-601"
] | [
"py/url-redirection",
"py/url-redirection",
"py/url-redirection"
] | [
"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).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
34,
38,
47
] | [
null,
null,
null
] | [
20,
20,
20
] | [
31,
31,
31
] | |
2024-11-18T21:32:49.416914+00:00 | 1,561,526,205,000 | 86281a6aa327900ea9af5dbc2fc2ff8a59e54596 | 2 | {
"blob_id": "86281a6aa327900ea9af5dbc2fc2ff8a59e54596",
"branch_name": "refs/heads/master",
"committer_date": 1561526205000,
"content_id": "9fe9f4f44db64cae04845b5cb01842c79399f701",
"detected_licenses": [
"MIT"
],
"directory_id": "8589d6c7358bc7496739167e6871395ea2c7af30",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!flask/bin/python
import logging
from logging import Logger
from flask import Flask, abort, jsonify, make_response, request, render_template
app = Flask(__name__)
logging.getLogger().setLevel(logging.INFO)
courses = []
announcements = []
@app.route('/seedgo/api/courses', methods=['GET'])
def get_courses():
ret... | 55 | 27.87 | 80 | 13 | 386 | python | [{"finding_id": "codeql_py/log-injection_1823d5682e0ee7ba_1b7244ca", "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)."
] | [
24
] | [
null
] | [
18
] | [
30
] | |
2024-11-18T21:32:59.998773+00:00 | 1,491,489,320,000 | 646769e88b507058f2ade47acf03dfcbc6c0a4cf | 3 | {
"blob_id": "646769e88b507058f2ade47acf03dfcbc6c0a4cf",
"branch_name": "refs/heads/master",
"committer_date": 1491489320000,
"content_id": "453b97cd95bb08be8fc740afc42f58df242b9733",
"detected_licenses": [
"MIT"
],
"directory_id": "ed5c284f3a66b19b909e54bc9b8ec818e78183f2",
"extension": "py",
"fi... | 3.28125 | stackv2 | from flask import Flask, render_template, jsonify
app = Flask(__name__)
@app.route("/")
def index():
return "Index Page"
# render the template html page and allow 2 different pages to be displayed: /hello/ will render Hello World; /hello/Jeremiah will render Hello Jeremiah
@app.route("/hello/")
@app.route("/hell... | 47 | 27.66 | 152 | 10 | 310 | python | [{"finding_id": "codeql_py/flask-debug_121fff67c31c5659_bba26dee", "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)."
] | [
47,
18,
23
] | [
null,
null,
null
] | [
5,
12,
12
] | [
24,
38,
37
] | |
2024-11-18T22:26:05.903051+00:00 | 1,660,586,063,000 | 99e5f60ce675ec0d9ad47d3275b3e744097d65e6 | 3 | {
"blob_id": "99e5f60ce675ec0d9ad47d3275b3e744097d65e6",
"branch_name": "refs/heads/master",
"committer_date": 1660586063000,
"content_id": "af95039e8fb5dae9f0b7f3e06f4564f594ca365a",
"detected_licenses": [
"MIT"
],
"directory_id": "7690fba98d3487fc9f855cd94e18d5281b04f56c",
"extension": "py",
"fi... | 2.8125 | stackv2 | '''
Query Kowalski searching for transients
given a set of constraints.
'''
import json
import requests
import pdb
import numpy as np
from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.time import Time
from astropy.io import ascii
from penquins import Kowalski
def str2bool(v):
... | 375 | 38.29 | 176 | 20 | 3,451 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c5b895fee96f6ace_6891428e", "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."
] | [
55
] | [
null
] | [
15
] | [
88
] | |
2024-11-18T20:31:39.945357+00:00 | 1,525,920,395,000 | f248be30c8c12b8391f910c9e4061318eff654a6 | 3 | {
"blob_id": "f248be30c8c12b8391f910c9e4061318eff654a6",
"branch_name": "refs/heads/master",
"committer_date": 1525920395000,
"content_id": "f0373f3e00f6f632ca738f936bb037f5bc4f983b",
"detected_licenses": [
"MIT"
],
"directory_id": "4f05be28092aa49853ac78b7b09a70232655f896",
"extension": "py",
"fi... | 2.640625 | stackv2 | import pymongo
from pymongo import MongoClient
from profile_operations.user_registration import registration
try:
MONGODB_URI = "mongodb://mysquaremeal:mysquaremeal@ds157653.mlab.com:57653/mysquaremeal_user_profile_database"
mlab_client = MongoClient(MONGODB_URI, connectTimeoutMS=30000)
db = mlab_client.my... | 33 | 45.64 | 123 | 19 | 275 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_726dd906447c6b24_35927bd6", "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."
] | [
16
] | [
null
] | [
15
] | [
72
] | |
2024-11-18T20:53:39.154311+00:00 | 1,466,680,212,000 | 5e05fe9457be70c5b1ed5dcedb3e7f8d7a863e9f | 3 | {
"blob_id": "5e05fe9457be70c5b1ed5dcedb3e7f8d7a863e9f",
"branch_name": "refs/heads/master",
"committer_date": 1466680212000,
"content_id": "1b0048c03192248a7ca77c9f65fd9848ea2087ad",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0f91557f2bed740e3337a084ab4715251ff239b3",
"extension": "py"... | 2.578125 | stackv2 |
import json
import importlib
from bottle import route, request, run
@route('/json_input', method='POST')
def json_input():
j = request.json
print("j: ", j)
result = j['output'] = { 'the number': 46 }
result = serve(j)
return result
@route('/help')
def help():
return '''
<p>
... | 67 | 19.19 | 79 | 12 | 360 | python | [{"finding_id": "codeql_py/reflective-xss_faa7d948d086ee6e_689ee135", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
16,
52
] | [
null,
null
] | [
12,
12
] | [
18,
26
] | |
2024-11-18T21:10:03.130485+00:00 | 1,628,075,923,000 | 5e0df5c8f74a71d6914c4b6399c47531eddea34c | 3 | {
"blob_id": "5e0df5c8f74a71d6914c4b6399c47531eddea34c",
"branch_name": "refs/heads/main",
"committer_date": 1628075923000,
"content_id": "2ddb283a9cd7d8aa855b2c636ea38fe64dd19b47",
"detected_licenses": [
"MIT"
],
"directory_id": "0db410b97489d2ede4b612a840b8f3cf529a8e16",
"extension": "py",
"file... | 2.8125 | stackv2 | from flask import render_template,request
import requests
from program import app
@app.route('/')
@app.route('/covid',methods=['GET','POST'])
def covid():
covid_list = []
country = ''
if request.method=='POST' and 'nation'in request.form:
country = request.form.get('nation')
covid_list = ge... | 24 | 30.79 | 78 | 12 | 176 | python | [{"finding_id": "codeql_py/partial-ssrf_188ff48ebce765bb_8400e237", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
17
] | [
null
] | [
9
] | [
69
] | |
2024-11-18T21:11:12.443932+00:00 | 1,618,743,020,000 | 03c836cd713ce2cb897d4eaae8883ce56d4ece81 | 2 | {
"blob_id": "03c836cd713ce2cb897d4eaae8883ce56d4ece81",
"branch_name": "refs/heads/main",
"committer_date": 1618743020000,
"content_id": "0d57de3179911b587398a25799825c64422e8c54",
"detected_licenses": [
"MIT"
],
"directory_id": "6287fdbd6e7bef3999a4c2b4d910e0ffa7c2897f",
"extension": "py",
"file... | 2.484375 | stackv2 | import socket
import os
import json
import GPUtil
from time import sleep
HEADER = 16
PORT = 5050
FORMAT = 'utf-8'
DISCONNECT_MESSAGE = "dc"
SERVER = '10.0.0.34'
ADDR = (SERVER, PORT)
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
client.connect(ADDR)
class Sock:
def __init__(self):
self... | 131 | 23.67 | 96 | 22 | 728 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b93a14e30d1ef0ae_3051afc0", "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."
] | [
72,
126
] | [
null,
null
] | [
31,
7
] | [
40,
12
] | |
2024-11-18T22:28:59.083084+00:00 | 1,406,845,241,000 | 5f17bedb370b8ef5f9bbaa51fdba78f469dacb81 | 3 | {
"blob_id": "5f17bedb370b8ef5f9bbaa51fdba78f469dacb81",
"branch_name": "refs/heads/master",
"committer_date": 1406845241000,
"content_id": "29e99389b126e02b9da9682ac8589a9f34139a4f",
"detected_licenses": [
"MIT"
],
"directory_id": "24e40c81c88bc3d42ef16779147e1d30d4bb3519",
"extension": "py",
"fi... | 2.625 | stackv2 | #!/usr/bin/python
import paramiko
#from ssh import SSHSession
import cmd,sys,getpass,os
from ConfigParser import SafeConfigParser
package_directory = os.path.dirname(os.path.abspath(__file__))
class SSH:
""" Simple shell to run a command on the host """
prompt = 'ssh> '
def __init__(self):
# cmd... | 160 | 28.98 | 97 | 21 | 996 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_d4f3c5857e928f8b_4690f1e3", "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."
] | [
89
] | [
90
] | [
13
] | [
46
] | |
2024-11-18T22:29:19.053418+00:00 | 1,485,628,540,000 | d5eee4efea225ee8de8ded25ab2d73312dff7aaa | 2 | {
"blob_id": "d5eee4efea225ee8de8ded25ab2d73312dff7aaa",
"branch_name": "refs/heads/master",
"committer_date": 1485628540000,
"content_id": "3b780adbae61a722083cdba00a3fd98200221bdf",
"detected_licenses": [
"MIT"
],
"directory_id": "fe2f57fbb62cf7ab9c505e8deb6829e6a864a734",
"extension": "py",
"fi... | 2.359375 | stackv2 | # -*- coding: utf-8 -*-
import asyncio
import logging
import RPi.GPIO as GPIO
from tornado.web import StaticFileHandler, RequestHandler
log = logging.getLogger('handlers')
class CustomStaticFileHandler(StaticFileHandler):
def parse_url_path(self, url_path):
_path = url_path
if url_path.strip() =... | 38 | 29 | 73 | 12 | 252 | python | [{"finding_id": "codeql_py/reflective-xss_ef219a645e846673_5f41dcd7", "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)."
] | [
32
] | [
null
] | [
20
] | [
26
] | |
2024-11-18T22:29:33.105170+00:00 | 1,588,181,102,000 | 25faf3fe9aebe82da80dc7e85ff29ce566c3106d | 3 | {
"blob_id": "25faf3fe9aebe82da80dc7e85ff29ce566c3106d",
"branch_name": "refs/heads/master",
"committer_date": 1588181102000,
"content_id": "dda31bdeb178a2526bdce3475d9083233beb6d90",
"detected_licenses": [
"MIT"
],
"directory_id": "bafe5b4dc96a15026cebed08dee2dba789876ced",
"extension": "py",
"fi... | 2.5625 | stackv2 | import re
from schema import Schema, And, Optional, Or
slug_pattern = re.compile("^[a-zA-Z0-9-]{3,}$")
author_name_pattern = re.compile("^[a-zA-Z ]{4,}$")
author_url_pattern = re.compile("^http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$")
template_config_schema = Schema({
"slug": An... | 18 | 56 | 113 | 14 | 282 | python | [{"finding_id": "codeql_py/overly-large-range_b1da0df8f1c46df7_a37999c5", "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\\\\[\\\\\\\\]^_\\].", ... | 2 | true | [
"CWE-020",
"CWE-1333"
] | [
"py/overly-large-range",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"This part of the regular expression may cause exponential backtracking on strings starting with 'http://' and containing many repetitions of '('."
] | [
7,
7
] | [
null,
null
] | [
65,
46
] | [
68,
111
] | |
2024-11-18T22:29:33.525151+00:00 | 1,585,592,490,000 | eb249bb09f9fdb4a73ed11be4bc5c998f640133a | 3 | {
"blob_id": "eb249bb09f9fdb4a73ed11be4bc5c998f640133a",
"branch_name": "refs/heads/master",
"committer_date": 1585592490000,
"content_id": "3245fb65957cc0a8f02010b1e396c9e5ff893b31",
"detected_licenses": [
"MIT"
],
"directory_id": "73e23d19f79ddb6b9b6404b5f22601c5515c9770",
"extension": "py",
"fi... | 2.59375 | stackv2 | from flask import Flask
from flask import request
from flask import render_template
from flask import make_response
app = Flask(__name__)
app.config['SECRET_KEY'] = "suman@123"
#CREATE COOKIE
@app.route('/')
def index():
cookie = make_response("Creating a Cookie")
cookie.set_cookie('name', 'suman gangopadhyay... | 35 | 25.66 | 89 | 16 | 242 | python | [{"finding_id": "codeql_py/flask-debug_6872206d0bc16a4f_b27ff7db", "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)."
] | [
35,
20
] | [
null,
null
] | [
5,
32
] | [
35,
89
] | |
2024-11-18T22:40:56.201753+00:00 | 1,564,516,350,000 | 388581738031cc0149b20374d6f68a56c849ec7b | 2 | {
"blob_id": "388581738031cc0149b20374d6f68a56c849ec7b",
"branch_name": "refs/heads/master",
"committer_date": 1564516350000,
"content_id": "f7acd0fd33e1cf034d78e41783f413da59b8d6c9",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "61c60b0f1c3f5b9c757d73937b25235a347a1602",
"extension": "p... | 2.46875 | stackv2 | #!/usr/bin/python
#-*- coding: utf-8 -*-
#===========================================================
# File Name: paris6k_dataset.py
# Author: Xu Zhang, Columbia University
# Creation Date: 09-26-2017
# Last Modified: Sat Mar 2 20:52:27 2019
#
# Description: Paris 6K dataset
#
# Copyright (C) 2018 Xu Zhang
# ... | 140 | 34.16 | 114 | 18 | 1,129 | python | [{"finding_id": "codeql_py/tarslip_064747fce8b99050_e89a2cc7", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 3 | true | [
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
67,
73,
79
] | [
null,
null,
null
] | [
13,
13,
13
] | [
16,
16,
16
] | |
2024-11-18T22:41:21.267855+00:00 | 1,619,502,332,000 | 2fbb310785a1f13950925517508651b0a719fa4c | 3 | {
"blob_id": "2fbb310785a1f13950925517508651b0a719fa4c",
"branch_name": "refs/heads/main",
"committer_date": 1619502332000,
"content_id": "03803411cf2b252738fe914bfa4b82dab7b6010b",
"detected_licenses": [
"MIT"
],
"directory_id": "8ff8b042c84b892b86aa2ae93e0c56e2573d2ed8",
"extension": "py",
"file... | 3.375 | stackv2 | '''
Prerequisites:
Make sure you can run a Pywikibot script (like the sample test scripts on Mediawiki)
and that you have logged into your wiki with a bot account.
Overview:
This is a template for a bot designed to run on Powerpedia and
testable on a Meza Mediawiki.
We are going to create a class for the bot, then cre... | 206 | 34.43 | 86 | 13 | 1,628 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e185d0c6341d784d_334e765f", "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)."
] | [
123
] | [
null
] | [
19
] | [
87
] | |
2024-11-18T22:41:23.626299+00:00 | 1,595,566,138,000 | 5188bc345d079d9697fac0ab272a11d3256d158d | 3 | {
"blob_id": "5188bc345d079d9697fac0ab272a11d3256d158d",
"branch_name": "refs/heads/master",
"committer_date": 1595566138000,
"content_id": "d5a6481f94bbbccaaea8968c0ba2dbdcfda0258f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e0fc2341bbbaa17533d584f38c4d2f92741dfd4f",
"extension": "py"... | 2.546875 | stackv2 | # Copyright 2020 Google LLC
# 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
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | 466 | 37.82 | 123 | 21 | 3,477 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bff57e6646afc556_9349dca3", "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... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM",
"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.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
294,
307,
321
] | [
null,
null,
null
] | [
15,
15,
15
] | [
46,
46,
46
] | |
2024-11-18T22:54:23.594658+00:00 | 1,624,467,224,000 | f4cd55b4607f7628ffd6fdfa20e8cad9052f4075 | 3 | {
"blob_id": "f4cd55b4607f7628ffd6fdfa20e8cad9052f4075",
"branch_name": "refs/heads/master",
"committer_date": 1624467224000,
"content_id": "2c39fb20a420bf9869eafe923bbec34bea56a291",
"detected_licenses": [
"MIT"
],
"directory_id": "8f8e80f0accc3a64541daf84807a8c2ab23a9a28",
"extension": "py",
"fi... | 2.671875 | stackv2 | #!/usr/bin/env python
import socket
import ssl
import datetime
import random
import json
from collections import namedtuple
import config
Message = namedtuple(
'Message',
'prefix user channel irc_command irc_args text text_command text_args',
)
def remove_prefix(string, prefix):
if not string.startswit... | 273 | 31.99 | 135 | 17 | 1,933 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8661252e3d768965_da178208", "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-327"
] | [
"py/clear-text-logging-sensitive-data",
"py/insecure-default-protocol"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
77,
81
] | [
null,
null
] | [
19,
20
] | [
33,
52
] | |
2024-11-18T20:55:09.789265+00:00 | 1,609,724,571,000 | 1d7b61459598236d36b0c3c4f989fbfc5518f10f | 3 | {
"blob_id": "1d7b61459598236d36b0c3c4f989fbfc5518f10f",
"branch_name": "refs/heads/master",
"committer_date": 1609724571000,
"content_id": "bbeba0180cb5ce06e8f1c574e29f0f61ff9bf168",
"detected_licenses": [
"MIT"
],
"directory_id": "62cf82f5090d08b180f1f71c25050a2217049f4b",
"extension": "py",
"fi... | 2.625 | stackv2 | from flask import Flask, jsonify
from flask.globals import request
import requests
import json
import os
app = Flask(__name__)
database_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
@app.route("/", methods=['GET'])
def init():
''' Application location service start '''
return "Hello! Ap... | 220 | 30.45 | 83 | 18 | 1,740 | python | [{"finding_id": "codeql_py/flask-debug_4ddcc00b16c87085_2dba144c", "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-918",
"CWE-918"
] | [
"py/flask-debug",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
220,
135,
176
] | [
null,
null,
null
] | [
5,
16,
16
] | [
34,
78,
78
] | |
2024-11-18T21:07:43.658862+00:00 | 1,627,955,493,000 | 4cc4b043fcbeee86a6cfae52a485d0ead8134d21 | 3 | {
"blob_id": "4cc4b043fcbeee86a6cfae52a485d0ead8134d21",
"branch_name": "refs/heads/main",
"committer_date": 1627955493000,
"content_id": "5428625ca7019a9353ac3307735c0aa45d21ba4f",
"detected_licenses": [
"MIT"
],
"directory_id": "479e3923251c6f19a27dc2bc602a72bc9ca8e7ef",
"extension": "py",
"file... | 2.625 | stackv2 | import os
import json
from os import walk
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import urlparse
from utils import TraceFile
from utils.lru_cache import CacheLRU
PORT = 8080
HOST = '127.0.0.1'
class ServerHandler(BaseHTTPRequestHandler):
def _set_headers(self):
sel... | 81 | 30.77 | 77 | 22 | 575 | python | [{"finding_id": "codeql_py/command-line-injection_42aa22ef27d3e9a1_1ea759c2", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 3 | true | [
"CWE-078",
"CWE-022",
"CWE-022"
] | [
"py/command-line-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This command line 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)."
] | [
45,
56,
66
] | [
null,
null,
null
] | [
27,
31,
27
] | [
52,
58,
45
] | |
2024-11-18T21:33:07.742377+00:00 | 1,605,903,767,000 | d26152d8c2fc861081e1eba42ef18075cc66c194 | 2 | {
"blob_id": "d26152d8c2fc861081e1eba42ef18075cc66c194",
"branch_name": "refs/heads/main",
"committer_date": 1605903767000,
"content_id": "198254cc017c382b0b08f3c95fbfb363f907ed37",
"detected_licenses": [
"MIT"
],
"directory_id": "62242e7f2b3cdb036363a6aa64a66a50b3dda27a",
"extension": "py",
"file... | 2.4375 | stackv2 | from abc import ABC
from multiprocessing import Queue
from multiprocessing import Pipe
from pathlib import Path
from threading import Thread
from time import sleep
from agent_base import AgentBase
from subprocess import Popen, PIPE
from re import finditer
from multiprocessing import Process
from utils.constants impor... | 86 | 34.17 | 157 | 28 | 590 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1091cd56da02ac77_375d659e", "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."
] | [
51
] | [
null
] | [
35
] | [
43
] | |
2024-11-18T21:55:48.156081+00:00 | 1,519,281,657,000 | 2e56c5e964837975c0ecb74ddef380006c4786f8 | 2 | {
"blob_id": "2e56c5e964837975c0ecb74ddef380006c4786f8",
"branch_name": "refs/heads/master",
"committer_date": 1519281657000,
"content_id": "d21bbc4076733fe17984baf9a2c48bc6cdce5459",
"detected_licenses": [
"MIT"
],
"directory_id": "a763c22e546ea36f8b160d5bb50102df7a8c75b2",
"extension": "py",
"fi... | 2.359375 | stackv2 | # Network module used by net-harvest
#
# Author: kodavx86
# Created: 02.19.2018
import os, socket, subprocess, shlex
import tempfile, xml.etree.ElementTree as ET
import requests, defaults
def ping(address):
# Ping the given address
r = os.system("/bin/ping -c {} -W {} ".format(defaults.PING_RETRY,
... | 79 | 28.43 | 96 | 16 | 574 | python | [{"finding_id": "codeql_py/request-without-cert-validation_68f37d4ea04d08b4_757d599c", "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)."
] | [
44
] | [
null
] | [
17
] | [
82
] | |
2024-11-18T21:55:52.728462+00:00 | 1,558,940,223,000 | 8e364fbf7be82ac3382178cbe7ef60a248b9a5c5 | 2 | {
"blob_id": "8e364fbf7be82ac3382178cbe7ef60a248b9a5c5",
"branch_name": "refs/heads/master",
"committer_date": 1558940223000,
"content_id": "dbbb89dc81f051b4dbd20c06151c0ddc22870d34",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "81b7e6cabb0e82ec945c8dd5f57eea73b83374ca",
"extension": "py"... | 2.3125 | stackv2 | import copy
import logging
import uuid
import random
import time
import hashlib
import base64
from eventdata.parameter_sources.randomevent import RandomEvent
logger = logging.getLogger("track.eventdata")
class ElasticlogsBulkSource:
"""
Generates a bulk indexing request for elasticlogs data.
It expects ... | 220 | 57.35 | 157 | 24 | 2,707 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e965b33085fd1383_b68ee0c4", "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 (SHA1) that is insecure.\... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (SHA1) that is insecure.",
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (MD5) that... | [
152,
160,
191
] | [
null,
null,
null
] | [
42,
41,
60
] | [
74,
73,
76
] | |
2024-11-18T21:55:53.973222+00:00 | 1,691,780,926,000 | d32dc91d4e0254a7cf1044d83f5b2f87c472b8dd | 3 | {
"blob_id": "d32dc91d4e0254a7cf1044d83f5b2f87c472b8dd",
"branch_name": "refs/heads/master",
"committer_date": 1691780926000,
"content_id": "b2b528bf467de46a0842201622d09a8ed6404d2d",
"detected_licenses": [
"MIT"
],
"directory_id": "54ee22fb27c9fc9dde5efa23c58033c38d8abd5e",
"extension": "py",
"fi... | 2.71875 | stackv2 | import json
from functools import partial
from pathlib import Path
import pandas as pd
from auth import Auth
from expungeservice.pdf.markdown_renderer import MarkdownRenderer
from expungeservice.pdf.markdown_to_pdf import MarkdownToPDF
def build_header(aliases, name, birth_date, officer):
title = f"# EXPUNGEMEN... | 70 | 40.44 | 115 | 15 | 760 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ba111ca3b3b05ac8_e266fce4", "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,
56
] | [
null,
null
] | [
15,
15
] | [
56,
48
] | |
2024-11-18T22:39:33.971530+00:00 | 1,598,619,906,000 | fcc0f2b0415dc1331a94322337d90c8ebd8c420b | 3 | {
"blob_id": "fcc0f2b0415dc1331a94322337d90c8ebd8c420b",
"branch_name": "refs/heads/master",
"committer_date": 1598619906000,
"content_id": "2e38a70fd2ce26e4adcf8e1fa8359b31fde7860f",
"detected_licenses": [
"MIT"
],
"directory_id": "6a7766599b74fddc9864e2bcccddafb333792d63",
"extension": "py",
"fi... | 2.875 | stackv2 | from django.core.management.base import BaseCommand, CommandError
import tarfile
import logging
import os.path
import sys
from pathlib import Path
from django.conf import settings
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "Unzip a zipped oTree project"
def add_arguments(self, p... | 90 | 30.44 | 86 | 14 | 653 | python | [{"finding_id": "codeql_py/tarslip_0fca50938a5bc223_5ba2aaa4", "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)."
] | [
90
] | [
null
] | [
9
] | [
12
] | |
2024-11-18T22:54:59.913617+00:00 | 1,589,222,334,000 | e0f51c24f1eb9f9fa1129875ae75ce5172fd9f45 | 3 | {
"blob_id": "e0f51c24f1eb9f9fa1129875ae75ce5172fd9f45",
"branch_name": "refs/heads/master",
"committer_date": 1589222334000,
"content_id": "46ca0f3c9cd791f7fa2aeacefc141ddfe094c2df",
"detected_licenses": [
"MIT"
],
"directory_id": "8a2aba73cf70a29c8c7b6cba98e199a780c69ca8",
"extension": "py",
"fi... | 3.015625 | stackv2 | from geopy.geocoders import Nominatim
import pandas as pd
import numpy as np
class GetLatitudeLongitude:
@classmethod
def _verify_location(cls, address):
geolocator = Nominatim()
return geolocator.geocode(address)
@classmethod
def _get_lat_long(cls, address):
print(cls, addre... | 49 | 34.92 | 92 | 15 | 357 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b4cd69309c3c91c9_88e77565", "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... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (p... | [
25,
30,
35,
40
] | [
null,
null,
null,
null
] | [
20,
20,
20,
20
] | [
57,
57,
57,
57
] | |
2024-11-18T22:17:37.384728+00:00 | 1,624,401,337,000 | 0b406afbe6e96dec194f05ab37f20b0a2ac114d0 | 3 | {
"blob_id": "0b406afbe6e96dec194f05ab37f20b0a2ac114d0",
"branch_name": "refs/heads/main",
"committer_date": 1624401337000,
"content_id": "9f5fc09cc9b7ad55e89c75ade97d3029aae49beb",
"detected_licenses": [
"MIT"
],
"directory_id": "7d0d349160bce9ddcc6918acadb87d4ed165435d",
"extension": "py",
"file... | 3.15625 | stackv2 | """Downloads tabular data for ML models.
This script is mostly copied from:
https://github.com/djgagne/ams-ml-python-course/blob/master/download_data.py
"""
import os
import errno
import tarfile
from urllib.request import urlretrieve
LOCAL_DIRECTORY_NAME = 'data'
ONLINE_TABULAR_FILE_NAME = (
'https://storage.go... | 70 | 27.56 | 78 | 12 | 464 | python | [{"finding_id": "codeql_py/tarslip_ad1e4285bc78980f_5068f966", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
65
] | [
null
] | [
5
] | [
20
] | |
2024-11-18T22:43:28.737438+00:00 | 1,516,537,679,000 | 6b665df5a4d98c02ded6abbd6bfc570f836b157c | 2 | {
"blob_id": "6b665df5a4d98c02ded6abbd6bfc570f836b157c",
"branch_name": "refs/heads/master",
"committer_date": 1516537679000,
"content_id": "082c3a6adfa4f5cee24a4919f9bccfbd75be8b55",
"detected_licenses": [
"MIT"
],
"directory_id": "2b52ffd170a74396e462c2446bd39db672bb2226",
"extension": "py",
"fi... | 2.5 | stackv2 | from neo4j.v1 import GraphDatabase, basic_auth
from test_model_interface import PersonGenerator
import requests
def get_neo4j_connection(host, port, user, auth):
"""
Returns a neo4j driver and a neo4j session with the requested params
:param host:
Neo4J Host IP/URL
:param port:
Neo4J B... | 306 | 40.31 | 166 | 22 | 2,896 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_43728cfab070b2d7_b7929002", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p... | [
200,
215,
219,
268
] | [
null,
null,
null,
null
] | [
31,
31,
23,
23
] | [
36,
37,
75,
73
] | |
2024-11-18T23:10:38.755992+00:00 | 1,596,132,620,000 | 68db727a8789f56a4f5cad82fc9f9772b79fc619 | 4 | {
"blob_id": "68db727a8789f56a4f5cad82fc9f9772b79fc619",
"branch_name": "refs/heads/master",
"committer_date": 1596132620000,
"content_id": "640679f9e28570c4e2357132e1b8b9720bc1f411",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e87524319ee0e610c451f1777a5a90883f508fe3",
"extension": "py"... | 3.828125 | stackv2 | # 位置参数
def power(x):
return x * x
def n_power(x, n):
return x ** n;
def power(x, n):
s = 1
while n > 0:
n -= 1
s *= x
return s
# py不支持重载
# print(power(3))
print(power(3, 3))
print(n_power(3, 3))
# 默认参数
def power(x, n=2):
s = 1
while n > 0:
n -= 1
s *= ... | 227 | 16.71 | 67 | 14 | 1,653 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c2195aa66f401e3c_fd06ba39", "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."
] | [
39
] | [
null
] | [
22
] | [
28
] | |
2024-11-18T22:29:31.468703+00:00 | 1,604,834,978,000 | 33592e1d44a10300b7d8515fdf61a4b33fe614e2 | 3 | {
"blob_id": "33592e1d44a10300b7d8515fdf61a4b33fe614e2",
"branch_name": "refs/heads/master",
"committer_date": 1604834978000,
"content_id": "93c328cf62deb163ae64f199282d7843ad3052cc",
"detected_licenses": [
"MIT"
],
"directory_id": "d3cbb0d4dd3c44fab247cd665880c3ed03c25213",
"extension": "py",
"fi... | 2.703125 | stackv2 | import socket
import ssl
import json
import time
import errno
class Electrum():
def __init__(self, host, port, protocol, timeout=5):
self.host = host
self.port = port
self.protocol = protocol
self.timeout = timeout
self.connection = None
self._connect()
def _con... | 44 | 28.3 | 75 | 18 | 274 | python | [{"finding_id": "codeql_py/insecure-default-protocol_9fe556673eb18ab6_77ab6309", "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."
] | [
20
] | [
null
] | [
31
] | [
63
] | |
2024-11-18T22:29:33.227371+00:00 | 1,626,721,924,000 | 47f8f09add72688018b9a559da1e5fb19d614647 | 4 | {
"blob_id": "47f8f09add72688018b9a559da1e5fb19d614647",
"branch_name": "refs/heads/main",
"committer_date": 1626721924000,
"content_id": "b7256d650715074c0209362a126b8b52daf54bb2",
"detected_licenses": [
"MIT"
],
"directory_id": "561b6922ae633783c52d1c48ec9023a911bbd899",
"extension": "py",
"file... | 3.5625 | stackv2 | import attr
from clime import clime
import datetime
def year_month_day_to_date(year_month_day) -> datetime.date:
"""
'2000-11-22' ->
:param year_month_day:
:return:
"""
return datetime.datetime.strptime(year_month_day, "%Y-%m-%d").date()
@attr.s
class Dude:
birthday: datetime.date = at... | 32 | 19.84 | 88 | 13 | 171 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ca95fd7706c40cd3_143143c4", "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."
] | [
24
] | [
null
] | [
15
] | [
48
] | |
2024-11-18T22:29:47.721153+00:00 | 1,649,706,319,000 | 75b1d0b501d23e7436335cae72f23e9e46cb9f3f | 3 | {
"blob_id": "75b1d0b501d23e7436335cae72f23e9e46cb9f3f",
"branch_name": "refs/heads/master",
"committer_date": 1649706319000,
"content_id": "773c90295ba0392e7ab4069fe3c50c34a1f43f39",
"detected_licenses": [
"MIT"
],
"directory_id": "78db5bc74181173f2d00bea409997a64b4682adf",
"extension": "py",
"fi... | 2.53125 | stackv2 | #!flask/bin/python
"""
Cisco Meraki Location Scanning Receiver
The provided sample code in this repository will reference this file to get the
information needed to connect to your lab backend. You provide this info here
once and the scripts in this repository will access it as needed by the lab.
Copyright (c) 2019 ... | 150 | 29.67 | 79 | 13 | 1,014 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0024a76b2b55752e_73d18ff1", "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... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-079",
"CWE-079"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"Cross-site scripting vulnerability due ... | [
71,
75,
145,
108,
118
] | [
null,
null,
null,
null,
null
] | [
34,
36,
11,
16,
20
] | [
56,
58,
30,
64,
38
] | |
2024-11-18T23:10:20.797955+00:00 | 1,622,110,372,000 | 5a4f8bc1325c57e0403fa06e3550070f7e49468d | 2 | {
"blob_id": "5a4f8bc1325c57e0403fa06e3550070f7e49468d",
"branch_name": "refs/heads/master",
"committer_date": 1622110372000,
"content_id": "d7c4803d38f9d09614a43572137b911634087b39",
"detected_licenses": [
"MIT"
],
"directory_id": "35b17d35c9aa80e70301e0f313925ec99f03fff5",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os
import os.path
import json
from glob import glob
from collections import OrderedDict
import time
import requests
ROOTDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TEMPLATEDIR = os.path.join(ROOTDIR, 'templates')
class BaseProject(object):
'''
Base class storing task actions.
... | 295 | 39.12 | 159 | 21 | 2,552 | python | [{"finding_id": "codeql_py/request-without-cert-validation_744eee5fdf3dcbe9_453e3f63", "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)."
] | [
206
] | [
null
] | [
24
] | [
55
] | |
2024-11-18T21:33:35.723378+00:00 | 1,588,753,459,000 | 5df3470e689128cce574711a7216e1b7418e5bb7 | 2 | {
"blob_id": "5df3470e689128cce574711a7216e1b7418e5bb7",
"branch_name": "refs/heads/master",
"committer_date": 1588753459000,
"content_id": "6349070d83aea583fa3c9213afe9f84ef41ad7f7",
"detected_licenses": [
"MIT"
],
"directory_id": "a8f43588751d75db9044dd558b2072b37de7943e",
"extension": "py",
"fi... | 2.421875 | stackv2 | from flask import Flask
from flask import render_template
from flask import request
from flask import make_response
from flask import redirect
import copy
import ast
app = Flask(__name__)
pizzas_data = {
'1': {
'name': 'Pizza Protono',
'price': '14.99',
'description': 'Dessert cotton candy... | 188 | 36.2 | 152 | 17 | 1,894 | python | [{"finding_id": "codeql_py/cookie-injection_4242b521666eabd7_b5156fb4", "tool_name": "codeql", "rule_id": "py/cookie-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cookie is constructed from a [user-supplied input](1).", "remediation": "", "location": {"file_path": "... | 1 | true | [
"CWE-020"
] | [
"py/cookie-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cookie is constructed from a [user-supplied input](1)."
] | [
187
] | [
null
] | [
33
] | [
41
] | |
2024-11-18T22:30:24.364794+00:00 | 1,586,767,443,000 | 7ca206c6e42f2c59c709d10e722cfb429ed839df | 2 | {
"blob_id": "7ca206c6e42f2c59c709d10e722cfb429ed839df",
"branch_name": "refs/heads/master",
"committer_date": 1586767443000,
"content_id": "3324c2c9d44f09563c9c541f3a2102c809667f22",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "9345c0950b9725186c247b6908f91e18dc56b95d",
"exten... | 2.390625 | stackv2 | # Standard python packages
import json
from datetime import datetime, timedelta
from pathlib import Path
from time import mktime
from typing import Union
import urllib3
# Django packages
from django.conf import settings
from django.core.files.storage import Storage
from django.core.files.uploadedfile import InMemoryUpl... | 257 | 39 | 152 | 18 | 2,182 | python | [{"finding_id": "codeql_py/request-without-cert-validation_ea7c17e1dbde8ad4_f9a52e6f", "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).\nThis request may run without certificate validation because [it is disabled](2)."
] | [
63
] | [
null
] | [
17
] | [
54
] | |
2024-11-18T22:30:25.243944+00:00 | 1,608,636,340,000 | c80eaec9a6ce531900477ed3ad8d340edd4c8561 | 3 | {
"blob_id": "c80eaec9a6ce531900477ed3ad8d340edd4c8561",
"branch_name": "refs/heads/master",
"committer_date": 1608636340000,
"content_id": "b4d348b04355b7f14e6cacbb805fcf14c87a776d",
"detected_licenses": [
"MIT"
],
"directory_id": "3cb467d04e9f830988c83b5ef323c29cf5e82d4b",
"extension": "py",
"fi... | 2.75 | stackv2 | from flask import Flask,request,make_response
import logging
import logging.config
app = Flask(__name__)
logging.config.fileConfig(fname='loggingConfig.conf')
logger = logging.getLogger(__name__)
@app.route('/')
def main():
try:
result = 5/0
logger.info('Info level log')
return {'result':... | 35 | 27.11 | 65 | 12 | 221 | python | [{"finding_id": "codeql_py/log-injection_a1c74297930edb64_73e3f6a9", "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)."
] | [
24
] | [
null
] | [
49
] | [
62
] | |
2024-11-18T22:44:33.540113+00:00 | 1,509,089,162,000 | aa2f434749778777d19a7d75c6f1bfbe502f86fc | 2 | {
"blob_id": "aa2f434749778777d19a7d75c6f1bfbe502f86fc",
"branch_name": "refs/heads/master",
"committer_date": 1509089162000,
"content_id": "074365251f5dfdc4a991974fde67b7d4ad3488a9",
"detected_licenses": [
"MIT"
],
"directory_id": "b94ac24c2bc3ee665ada83c0b8d1859669eb092a",
"extension": "py",
"fi... | 2.4375 | stackv2 | import os
from flask import Flask, request, jsonify
from extract import *
app = Flask('app')
@app.route('/find/', methods=['POST'])
def SignUp():
file = request.files["file.pdf"]
customer_id = request.form["customer_id"]
starting_word = request.form["starting_word"]
directory = os.path.join("Document... | 71 | 18.63 | 93 | 14 | 316 | python | [{"finding_id": "codeql_py/flask-debug_6b03cd2e347938b0_802a523a", "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-022",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"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.",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
47,
14,
15,
40
] | [
null,
null,
null,
null
] | [
5,
27,
21,
19
] | [
52,
36,
30,
27
] | |
2024-11-18T22:44:49.245113+00:00 | 1,532,691,572,000 | b54eb13508a9e86c51ec10422bec3ffe6e809451 | 3 | {
"blob_id": "b54eb13508a9e86c51ec10422bec3ffe6e809451",
"branch_name": "refs/heads/master",
"committer_date": 1532691572000,
"content_id": "21352c82a27d16ee53997c602b79f0447caacf07",
"detected_licenses": [
"BSD-3-Clause-Clear"
],
"directory_id": "f4c6ed44fb2a7977513710e60f58448c6a2ebe8a",
"extensio... | 2.6875 | stackv2 | import os
from os import path
import argparse
from .paths import process, copy_to_dir, write_file
from .slurm import slurm
def read_argument_file(file_path):
file_path = process(file_path)
ret = {}
with open(file_path, 'r') as f:
for line in f:
split = line.strip().split(' ')
... | 75 | 35.85 | 110 | 14 | 672 | python | [{"finding_id": "codeql_py/overly-permissive-file_a874cfa7cb0e240b_cb64deef", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable."
] | [
68
] | [
null
] | [
5
] | [
34
] | |
2024-11-18T23:37:04.401502+00:00 | 1,693,156,051,000 | 214a63ddde8f6f7a212b3b9b6cc57bcea9bc7f4c | 2 | {
"blob_id": "214a63ddde8f6f7a212b3b9b6cc57bcea9bc7f4c",
"branch_name": "refs/heads/master",
"committer_date": 1693156051000,
"content_id": "f90d935b2766a16c74972021fc1090096a235e31",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "e594be4833e818c481ad28aad4b8eae2e0f93d0c",
"extension": "p... | 2.34375 | stackv2 | import fcntl
import os
import shutil
import sys
import time
from pathlib import Path
import CraftOS.OsUtilsBase
from CraftCore import CraftCore
class OsUtils(CraftOS.OsUtilsBase.OsUtilsBase):
InDocker = None
@staticmethod
def rm(path, force=False):
CraftCore.log.debug("deleting file %s" % path)
... | 98 | 28.83 | 99 | 19 | 688 | python | [{"finding_id": "codeql_py/overly-permissive-file_08f2c0d68ed8c760_bd32d517", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world writable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world writable."
] | [
84
] | [
null
] | [
39
] | [
100
] | |
2024-11-18T21:14:16.957632+00:00 | 1,588,355,880,000 | 58c4c2961372bc077535ca60801190c5c6dcd637 | 3 | {
"blob_id": "58c4c2961372bc077535ca60801190c5c6dcd637",
"branch_name": "refs/heads/master",
"committer_date": 1588355880000,
"content_id": "1143c99da0d7f97a94632e2bb058b9665595025b",
"detected_licenses": [
"MIT"
],
"directory_id": "cbb013a0332f49d8ad097b5456d2f293ac235c07",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/python3
from http import server
PORT = 8080
class CookieHandler(server.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
if 'Host' in self.headers and \
self.headers['Host'].startswith("localhost"):
self.send_header('Set-Cookie', 'auth=123... | 26 | 25.77 | 79 | 13 | 173 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_cc5ebfa48edf66f5_9e7987e4", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [fadeevab.com](1) may be at an arbitrary position in th... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [fadeevab.com](1) may be at an arbitrary position in the sanitized URL."
] | [
19
] | [
null
] | [
17
] | [
66
] | |
2024-11-18T21:14:45.947426+00:00 | 1,607,877,313,000 | 9e46c47512c15119f82947ee7f36bb51e9b92048 | 2 | {
"blob_id": "9e46c47512c15119f82947ee7f36bb51e9b92048",
"branch_name": "refs/heads/master",
"committer_date": 1607877313000,
"content_id": "13e5efb129d8ca34ebf557bbd0f74595880f0ba6",
"detected_licenses": [
"MIT"
],
"directory_id": "16df9d9a537145487181ca8b49bbc1a4a76b3311",
"extension": "py",
"fi... | 2.484375 | stackv2 | import os
import sys
import time
import youtube_dl
import chromedriver_binary
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.ui import WebDriverWait
# check environmental variables
# ----------------... | 208 | 28.45 | 106 | 16 | 1,283 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_030f3224c37df54d_422bf36c", "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."
] | [
37
] | [
null
] | [
28
] | [
43
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.