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-18T19:24:00.637406+00:00 | 1,600,286,935,000 | 70e14d674de8e5eda58fd010e25b14adcb60e3ff | 3 | {
"blob_id": "70e14d674de8e5eda58fd010e25b14adcb60e3ff",
"branch_name": "refs/heads/master",
"committer_date": 1600286935000,
"content_id": "9e63febff14ae77d1227b80ad917e5e2c00ff2f9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8f7043aa92d5047f4e5294bcd7b037010783f708",
"extension": "py"... | 2.53125 | stackv2 | import atexit
import logging
import os
import random
import socket
import subprocess
import tarfile
import tempfile
try:
from urllib import urlretrieve
except ImportError:
from urllib.request import urlretrieve
log = logging.getLogger(__name__)
class DynamoLocal(object):
"""
Spins up a local dynamo ... | 86 | 28.67 | 97 | 14 | 558 | python | [{"finding_id": "codeql_py/tarslip_2ebd594f610044ae_69abb3b5", "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)."
] | [
42
] | [
null
] | [
13
] | [
20
] | |
2024-11-18T18:39:31.330764+00:00 | 1,492,657,778,000 | 4978a24d6c130cb0ad19b9bed069ff6a5c80cf68 | 3 | {
"blob_id": "4978a24d6c130cb0ad19b9bed069ff6a5c80cf68",
"branch_name": "refs/heads/master",
"committer_date": 1492657778000,
"content_id": "17acd269ee89d98f7917825b48c71c235bf7291c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7ec45d3c3665159166b6182428d8b1d591a8d435",
"extension": "py"... | 3.0625 | stackv2 | import os
import pandas as pd
from sklearn.neighbors import NearestNeighbors
class TreeRecommendation():
def __init__(self):
print('*'*25)
print('INITIALIZING MODEL')
df_invtry_new = pd.read_csv('assets/data/trees.csv')
# Drop ones without a condition score
df_tree_cond = d... | 81 | 40.26 | 105 | 15 | 741 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6f316160f48f826a_4cc9ab4b", "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."
] | [
49,
49
] | [
null,
null
] | [
35,
52
] | [
43,
61
] | |
2024-11-18T18:39:48.644325+00:00 | 1,627,989,272,000 | 16723b67a88056f470e754f6aa918a0a9e2ce339 | 3 | {
"blob_id": "16723b67a88056f470e754f6aa918a0a9e2ce339",
"branch_name": "refs/heads/main",
"committer_date": 1627989272000,
"content_id": "0f39c02698c0b4f14b3d813d55572395925f7e88",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e75f0ebd0a50b02e5c3661c1515a3b993ece30e1",
"extension": "py"... | 3.3125 | stackv2 | """
Utilities and helpers for retrieving the datasets
"""
# stdlib
import tarfile
import urllib.request
from pathlib import Path
from typing import Optional
from google_drive_downloader import GoogleDriveDownloader as gdd
def download_gdrive_if_needed(path: Path, file_id: str) -> None:
"""
Helper for downloa... | 111 | 27.46 | 93 | 12 | 722 | python | [{"finding_id": "codeql_py/tarslip_b293c2e5831ec10c_afea04f7", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
68,
72
] | [
null,
null
] | [
9,
9
] | [
12,
12
] | |
2024-11-18T18:39:54.034955+00:00 | 1,594,386,922,000 | 94bc061edc7c317291390ef7e1f61dfbd70dd4b3 | 3 | {
"blob_id": "94bc061edc7c317291390ef7e1f61dfbd70dd4b3",
"branch_name": "refs/heads/master",
"committer_date": 1594386922000,
"content_id": "238bfeb95aa32a657289076d7cee1aa7e1e4081f",
"detected_licenses": [
"MIT"
],
"directory_id": "de5633a4c785fda8c55898addbe9dcf102debf25",
"extension": "py",
"fi... | 2.5625 | stackv2 | import sys, hashlib, base64, re, json
import logging
from requests import session
from bs4 import BeautifulSoup
_LOGGER = logging.getLogger(__name__)
class Connector:
host = None
user = None
pass_hash = None
def __init__(self, host, user, password):
self.host = host
self.user = u... | 75 | 36.59 | 150 | 19 | 637 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_41e5e26530953232_9ee958cd", "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."
] | [
17
] | [
null
] | [
41
] | [
58
] | |
2024-11-18T18:39:56.727849+00:00 | 1,491,979,550,000 | f53e1d1f057f62556ee4eef1cf0ed3e3e55fc359 | 3 | {
"blob_id": "f53e1d1f057f62556ee4eef1cf0ed3e3e55fc359",
"branch_name": "refs/heads/master",
"committer_date": 1491979550000,
"content_id": "566f5b62392fd04b84902337c71d8ba1a99d3787",
"detected_licenses": [
"MIT"
],
"directory_id": "63eaf48363d4368cb3541a57ec9b00798fc2fb2c",
"extension": "py",
"fi... | 2.53125 | stackv2 | from __future__ import print_function
from boto3.session import Session
import boto3
import json
import os.path
import botocore
import tempfile
import zipfile
import traceback
from jinja2 import Environment, FileSystemLoader
code_pipeline = boto3.client('codepipeline')
class Template:
def __init__(self, name):
... | 180 | 30.49 | 92 | 14 | 1,225 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_922752046c209cb5_f80a213b", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
20,
61
] | [
null,
null
] | [
15,
25
] | [
64,
38
] | |
2024-11-18T18:40:08.473547+00:00 | 1,606,857,306,000 | 6369cdfaa79666852465ae3f6a880ea7e7f8d6cc | 3 | {
"blob_id": "6369cdfaa79666852465ae3f6a880ea7e7f8d6cc",
"branch_name": "refs/heads/master",
"committer_date": 1606857306000,
"content_id": "0da31fd7fa5b51b7725359e5882775a1bc64ac05",
"detected_licenses": [
"MIT"
],
"directory_id": "fc01747e2f237e13d85bcbefeb083650685453fc",
"extension": "py",
"fi... | 2.71875 | stackv2 | import os
import re
import requests
from io import BytesIO
from typing import Union
import logging
from TelegramBot import TelegramBot
with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), "credentials", "TelegramApiKey.txt"), 'r') as fl:
API_KEY = fl.readline()
DEFAULT_EMOJI = u"😍"
class Sticker... | 167 | 37.1 | 160 | 18 | 1,450 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d2e30084598d0cce_b2cb89c5", "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."
] | [
53,
64,
93
] | [
null,
null,
null
] | [
27,
27,
27
] | [
42,
42,
42
] | |
2024-11-18T20:52:24.631524+00:00 | 1,635,899,797,000 | 9fb6ba04aafb266bc3bc2a78519b59f82b7edfca | 3 | {
"blob_id": "9fb6ba04aafb266bc3bc2a78519b59f82b7edfca",
"branch_name": "refs/heads/main",
"committer_date": 1635899797000,
"content_id": "1e9d20d01686b66055b01cf9947e9137bdc61a08",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9c9954169b0062c2a2a4cf6ca814a13d4651a8b4",
"extension": "py",
... | 3.421875 | stackv2 | """This is the news api. It will take the top headlines from the website and return it to news.txt.
This can be configured with config.json."""
import sys
import logging
import requests
try:
from weather_api import get_config
except ImportError:
logging.fatal("ImportError: unable to get weather_api.")
def bl... | 106 | 36.51 | 99 | 16 | 882 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_1f7d7b021040686a_08c6ae67", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text."
] | [
91
] | [
null
] | [
21
] | [
25
] | |
2024-11-18T20:52:27.024462+00:00 | 1,603,898,878,000 | 55335c9072e78b6570e59bf34b9fc0ca8e92b57d | 3 | {
"blob_id": "55335c9072e78b6570e59bf34b9fc0ca8e92b57d",
"branch_name": "refs/heads/master",
"committer_date": 1603898878000,
"content_id": "11595a5b73c91022620cd00a017982e7ea18c6f9",
"detected_licenses": [
"MIT"
],
"directory_id": "639b36d9c5c990891113b9d47572442dad3a34e8",
"extension": "py",
"fi... | 2.65625 | stackv2 | import paramiko
import os
from dotenv import load_dotenv
load_dotenv()
class SSHConnector():
def create_connection(self) -> paramiko.SSHClient:
sftpURL = os.getenv('sftp_url')
sftpUser = os.getenv('sftp_user')
sftpPass = os.getenv('sftp_pass')
sftpPort = int(os.getenv('sftp_port'... | 25 | 28.16 | 101 | 13 | 179 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_d77a24fba43f2496_bc569c12", "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."
] | [
18
] | [
null
] | [
9
] | [
66
] | |
2024-11-18T19:09:59.482422+00:00 | 1,609,672,799,000 | 2b1f7244819a41bc71552d0157ec801c9fa40522 | 3 | {
"blob_id": "2b1f7244819a41bc71552d0157ec801c9fa40522",
"branch_name": "refs/heads/master",
"committer_date": 1609672799000,
"content_id": "54e2c04d40bf2f7488d5a22e3d3d47d8945848f0",
"detected_licenses": [
"MIT"
],
"directory_id": "1d790fe31695e3e493653c0b4ccf75a9146545eb",
"extension": "py",
"fi... | 3 | stackv2 | from Cryptodome.PublicKey import RSA
from Cryptodome.Cipher import PKCS1_OAEP
from Cryptodome.Signature import PKCS1_v1_5
from Cryptodome.Hash import SHA512, SHA384, SHA256, SHA, MD5
from Cryptodome import Random
from base64 import b64encode, b64decode
import rsa
hash_type = "SHA-256"
def newkeys(keysize):
rando... | 116 | 27.37 | 114 | 11 | 934 | python | [{"finding_id": "codeql_py/weak-crypto-key_db3308699864ff6b_3bc81f5c", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable.", "remediation": "",... | 1 | true | [
"CWE-326"
] | [
"py/weak-crypto-key"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable."
] | [
14
] | [
null
] | [
11
] | [
50
] | |
2024-11-18T20:15:56.888992+00:00 | 1,570,180,573,000 | a63d0dcf53119a8984b0121a5331e56bd177aaf4 | 2 | {
"blob_id": "a63d0dcf53119a8984b0121a5331e56bd177aaf4",
"branch_name": "refs/heads/master",
"committer_date": 1570180573000,
"content_id": "7e325eeb655e505534f1c68a10cfae153b37b697",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1a1f370f7b1a890ba5747101994c5c9d1e9e1285",
"extension": "py"... | 2.40625 | stackv2 | # user enter credential
# check credential
# if true open mainwindow and store pc id
# close license
import sys
import webbrowser
from PyQt5.QtCore import QSharedMemory
from PyQt5 import QtCore, QtGui, QtWidgets, uic
# UI.py 1) import ui
# from ui import
# UI FORMAT
class License_class(QtWidgets.QWidget):
d... | 91 | 31.62 | 109 | 17 | 650 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c8640cf539656842_c8eb8854", "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."
] | [
51
] | [
null
] | [
45
] | [
53
] | |
2024-11-18T19:38:07.873688+00:00 | 1,612,955,327,000 | 77f25fed3822a69cd59ff60c988ca4bc32d9b735 | 3 | {
"blob_id": "77f25fed3822a69cd59ff60c988ca4bc32d9b735",
"branch_name": "refs/heads/master",
"committer_date": 1612955327000,
"content_id": "92f4416523df45ee4eff0dff11e6ba7838532b9d",
"detected_licenses": [
"MIT"
],
"directory_id": "9297dee37a20e01779b9b746468e9b2116d66d0a",
"extension": "py",
"fi... | 2.890625 | stackv2 | """ Reports module """
import os
from io import BytesIO
import base64
import easydev
import matplotlib.pyplot as plt
from jinja2 import Template
from markdown import markdown
from bs4 import BeautifulSoup
def read_template(uri):
""" Loads a jinja2 template """
with open(uri, "r") as file:
return Te... | 166 | 28.5 | 96 | 19 | 1,037 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_dc30cf2a7de2bf94_18a56a8d", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
18
] | [
null
] | [
16
] | [
37
] | |
2024-11-18T19:38:16.929709+00:00 | 1,593,065,031,000 | b8499e5c4760bf648b7ded347e187e12b98991a3 | 3 | {
"blob_id": "b8499e5c4760bf648b7ded347e187e12b98991a3",
"branch_name": "refs/heads/master",
"committer_date": 1593065031000,
"content_id": "0ff0adcf2b3fa6f57e6a6a9be8de248f1f4aad76",
"detected_licenses": [
"MIT"
],
"directory_id": "6d76fa4951c8580439536e01fb739cc05b3e8bb9",
"extension": "py",
"fi... | 2.890625 | stackv2 | # --------------
def read_file(path):
file=open(path,mode='r')
sentence=file.readlines()
return sentence
sample_message = read_file(file_path)
message_1=read_file(file_path_1)
message_2=read_file(file_path_2)
print(message_1)
print(message_2)
def fuse_msg(message_a,message_b):
strings1=[str(integer)... | 93 | 22.73 | 53 | 11 | 577 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7ee6c979d89ba0c0_290dea74", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
84,
89
] | [
null,
null
] | [
13,
7
] | [
23,
17
] | |
2024-11-18T19:38:26.114596+00:00 | 1,589,236,255,000 | 4b0bfc0c22834d94c99c60d04cef8e529ea7946b | 3 | {
"blob_id": "4b0bfc0c22834d94c99c60d04cef8e529ea7946b",
"branch_name": "refs/heads/master",
"committer_date": 1589236255000,
"content_id": "5a93583f8eb1371e842d7c433c538b96bdf3dd53",
"detected_licenses": [
"MIT"
],
"directory_id": "a042b1f3fa1c3a7312cc6ebb72659ed18d13fa64",
"extension": "py",
"fi... | 2.796875 | stackv2 | import json
import requests
from flask import Flask
from flask import render_template
from flask_caching import Cache
app = Flask(__name__)
cache = Cache(app, config={'CACHE_TYPE': 'simple'})
SITE = '03433500' # Harpeth River at Bellevue, TN
@app.route('/')
@app.route('/<string:site_id>')
@cache.cached(timeout=60... | 105 | 31.75 | 101 | 18 | 988 | python | [{"finding_id": "codeql_py/partial-ssrf_515258410f28617a_8b96ce29", "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)."
] | [
41
] | [
null
] | [
18
] | [
40
] | |
2024-11-18T19:38:37.506315+00:00 | 1,501,217,284,000 | 6fd031f84363703f55ed92beac9e80a11e842162 | 3 | {
"blob_id": "6fd031f84363703f55ed92beac9e80a11e842162",
"branch_name": "refs/heads/master",
"committer_date": 1501217284000,
"content_id": "637d933c9517b3011dcae551b37d793b902608af",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b266bbb9bf95fc98c669dfcf1b3a0a768df93480",
"extension": "py"... | 2.765625 | stackv2 | ## code by anysz 2017 ##
import socket
import ssl
####################################################################
class TCPClient(object):
"""
TCP HTTP CLIENT by anysz
"
I made dis cuz httplib is a bit slow in my country.
So i made tcp lib for replacing the httplib. Enjoy.
"
Desc: - Every get, pos... | 138 | 22.57 | 71 | 14 | 936 | python | [{"finding_id": "codeql_py/insecure-protocol_890b61ce24b56d72_e911965d", "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)."
] | [
57
] | [
null
] | [
17
] | [
72
] | |
2024-11-18T19:38:39.617398+00:00 | 1,630,567,426,000 | bcec28f5e17d4faa16dc169672214a058c4f2618 | 3 | {
"blob_id": "bcec28f5e17d4faa16dc169672214a058c4f2618",
"branch_name": "refs/heads/main",
"committer_date": 1630567426000,
"content_id": "968579867c545f4dff1072234e7e40ffeb6df6dd",
"detected_licenses": [
"MIT"
],
"directory_id": "a71266c618fbc9ec554bc916265c04489d580ed1",
"extension": "py",
"file... | 2.71875 | stackv2 | import tkinter as tk
from tkinter import Button, Entry, Frame, Label, StringVar, font
from tkinter import messagebox
from tkinter.constants import BOTH, CENTER, FLAT, NE, NW
from typing import Text
import random
import smtplib
import sqlite3
import loginwindow
YourEmail = "Email"
Yourpassword = "Password"
def submit()... | 122 | 36.34 | 124 | 15 | 1,215 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_218a11578a87d68a_8e4c5695", "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."
] | [
16
] | [
null
] | [
11
] | [
19
] | |
2024-11-18T19:38:46.932838+00:00 | 1,576,693,138,000 | f123d8f508ca3e8b795b0d9d98818f21a0cf7bcd | 2 | {
"blob_id": "f123d8f508ca3e8b795b0d9d98818f21a0cf7bcd",
"branch_name": "refs/heads/master",
"committer_date": 1576693138000,
"content_id": "d2bf24cbe93a50b52e064de81e13c52bc3b97ea5",
"detected_licenses": [
"MIT"
],
"directory_id": "474874100f65dcff77f1e27511d9af4b77ba094d",
"extension": "py",
"fi... | 2.421875 | stackv2 | import os, sys
import time
import subprocess
# Installed by default in colab - but may need pip install elsewhere
import psutil
import requests, shutil
import json
USER_BASE='/content'
def status():
print("\nDoing fine\n")
return
def gdrive_mount(point='gdrive', link='my_drive'):
from google.colab import... | 272 | 33.32 | 151 | 16 | 2,662 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3d4171676352d63c_a20978fe", "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-022"
] | [
"py/clear-text-logging-sensitive-data",
"py/tarslip"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
206,
95
] | [
null,
null
] | [
11,
7
] | [
50,
43
] | |
2024-11-18T20:10:41.395897+00:00 | 1,478,527,035,000 | 8a3befc82f83d24847c294531c5c844c5c4c8184 | 2 | {
"blob_id": "8a3befc82f83d24847c294531c5c844c5c4c8184",
"branch_name": "refs/heads/master",
"committer_date": 1478527035000,
"content_id": "ec1514ec37b23b186dbf302cac46529e90cfbd87",
"detected_licenses": [
"MIT"
],
"directory_id": "37e177264d88cc014404224ecbfe70423d3b2c9c",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python3
from __future__ import print_function
import os, time, datetime, re, sys
import itertools
import praw
#import saxo
#from reddit2 import r2
import pprint
subreddit_r = re.compile('[a-zA-Z0-9]+')
subreddit_r = re.compile('cats?_?(gifs)?')
def drop_empty(db, tname):
c = db.connection.cursor... | 95 | 36.28 | 127 | 19 | 932 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_29903f8a289fc29b_5fd2129c", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [imgur.com](1) may be at an arbitrary position in the s... | 3 | true | [
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [imgur.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [gfycat.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [imgur.com](1) may be at an arbitrary position in the sanitized URL."
] | [
64,
65,
89
] | [
null,
null,
null
] | [
24,
24,
16
] | [
44,
45,
32
] | |
2024-11-18T20:26:02.220396+00:00 | 1,433,549,144,000 | dceee7884a44774f4ad3e9f381daf8208f0e3170 | 2 | {
"blob_id": "dceee7884a44774f4ad3e9f381daf8208f0e3170",
"branch_name": "refs/heads/master",
"committer_date": 1433549144000,
"content_id": "23f841f61e22f025f020faeb0034f588b8a854c3",
"detected_licenses": [
"MIT"
],
"directory_id": "351901f0ca2c4e1464e72a3098bfd45a1db828e0",
"extension": "py",
"fi... | 2.390625 | stackv2 | import json
import talon
from talon import quotations, signature
import logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
# pyramid app
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.response import Response
from pyramid.view impo... | 45 | 28.38 | 73 | 10 | 305 | python | [{"finding_id": "codeql_py/log-injection_47836367f970ca3f_3e40d726", "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)."
] | [
20,
29
] | [
null,
null
] | [
50,
64
] | [
59,
73
] | |
2024-11-18T20:26:36.071832+00:00 | 1,561,897,580,000 | cfb51182c6e561b3c68987a922f53c2a04444577 | 3 | {
"blob_id": "cfb51182c6e561b3c68987a922f53c2a04444577",
"branch_name": "refs/heads/master",
"committer_date": 1561897580000,
"content_id": "85f919f8b6a7419cd9a770907098dcc74c377bf1",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "1865bff2a314474a0f96cf6d7855419de598e304",
"extension": "p... | 2.75 | stackv2 | import requests
from bs4 import BeautifulSoup
from termcolor import colored
def init(domain):
FSD = []
print(colored("[*]-Searching FindSubdomains...", "yellow"))
headers = {"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:52.0) Gecko/20100101 Firefox/52.0"}
url = "https://findsubdomains.com/subd... | 50 | 25.78 | 111 | 18 | 362 | python | [{"finding_id": "codeql_py/request-without-cert-validation_3d68e56e24c8039f_4edf1ba1", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
15
] | [
null
] | [
14
] | [
62
] | |
2024-11-18T20:26:39.020392+00:00 | 1,665,545,412,000 | c78f8d8ec7449ec9401ccdb3b0fe6fb7dd362dd0 | 3 | {
"blob_id": "c78f8d8ec7449ec9401ccdb3b0fe6fb7dd362dd0",
"branch_name": "refs/heads/master",
"committer_date": 1665545412000,
"content_id": "2cd2094e8fa77888e9625759880bc33d5a9070a2",
"detected_licenses": [
"MIT"
],
"directory_id": "aea7492b05b4fc3b144dc00ca59d8c6608c0d0f3",
"extension": "py",
"fi... | 3.328125 | stackv2 | #!/usr/bin/env python3
import sys
from Crypto.Hash import SHA1
from Crypto.Cipher import AES, Blowfish
from Crypto.Util import strxor, Padding
class Navicat11Crypto:
def __init__(self, Key = b'3DC5CA39'):
self._Key = SHA1.new(Key).digest()
self._Cipher = Blowfish.new(self._Key, Blowfish.MODE_ECB)
... | 112 | 37.7 | 97 | 19 | 1,030 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_e6d277756299029e_fb688057", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
12
] | [
null
] | [
20
] | [
77
] | |
2024-11-18T20:26:48.614928+00:00 | 1,603,916,175,000 | 66e4f177df61226365921206a51f8fc0bd7d6cb1 | 3 | {
"blob_id": "66e4f177df61226365921206a51f8fc0bd7d6cb1",
"branch_name": "refs/heads/main",
"committer_date": 1603916175000,
"content_id": "8b834fdeee145428f341fda40df0c92f60871a57",
"detected_licenses": [
"MIT"
],
"directory_id": "3ae17e13d1040b471f6fd6e9c7e374a16965b690",
"extension": "py",
"file... | 3.0625 | stackv2 | import json
import os
from datetime import timedelta
def combine_strings(*strings):
return ''.join(str(string) for string in strings)
def write_json_to_file(json_object, file_name):
if isinstance(json_object, str):
json_object = json.loads(json_object)
out = json.dumps(json_object, indent=4)
... | 25 | 23.68 | 59 | 12 | 145 | python | [{"finding_id": "codeql_py/overly-permissive-file_aaaf05f906f2a85e_e153696a", "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."
] | [
21
] | [
null
] | [
5
] | [
31
] | |
2024-11-18T20:27:07.284508+00:00 | 1,567,632,075,000 | 03d4259aa8591158d8caf54647efe3f4d4da77ae | 3 | {
"blob_id": "03d4259aa8591158d8caf54647efe3f4d4da77ae",
"branch_name": "refs/heads/master",
"committer_date": 1567632075000,
"content_id": "1689bd749a9de8c77589adc9fdc465680df83b23",
"detected_licenses": [
"MIT"
],
"directory_id": "ae0a10169eca2b0d92ecbb6f063ae9719c2a832f",
"extension": "py",
"fi... | 2.703125 | stackv2 | import time
import machine
import json
import simpleHttpServer
class ConfigHttpServer(simpleHttpServer.SimpleHttpServer):
def __init__(self, listener_socket):
super(ConfigHttpServer, self).__init__(self.route_client_request, listener_socket)
self.form_submission_controller = FormSubmissionContr... | 76 | 23.63 | 90 | 13 | 413 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_9c2239c5b642d789_2bfce7c1", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text."
] | [
71
] | [
null
] | [
17
] | [
35
] | |
2024-11-18T20:52:12.028703+00:00 | 1,680,095,961,000 | dd2a4be6ff754de8f5a09af12f7bda35e56840c1 | 2 | {
"blob_id": "dd2a4be6ff754de8f5a09af12f7bda35e56840c1",
"branch_name": "refs/heads/master",
"committer_date": 1680095961000,
"content_id": "cf2cc46e501448a6078991df6cf5d29d2066966f",
"detected_licenses": [
"MIT"
],
"directory_id": "2151dbdda6aeab80742fae27c09bb9f6ef3f9ab2",
"extension": "py",
"fi... | 2.3125 | stackv2 | import re
import os
import logging
import json
import functools
import six
from kibitzr.stash import LazyStash
from .html import deep_recursion, SoupOps
from .xpath import parse_html, serialize_xpath_results
logger = logging.getLogger(__name__)
class JinjaTransform:
def __init__(self, code, conf):
fro... | 147 | 24.05 | 83 | 15 | 813 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_a7d54b80f328b461_a2f6b601", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
20
] | [
null
] | [
23
] | [
36
] | |
2024-11-18T20:52:30.529209+00:00 | 1,653,286,588,000 | 0da32f0db0f1b437932337a051bbfeee49629125 | 2 | {
"blob_id": "0da32f0db0f1b437932337a051bbfeee49629125",
"branch_name": "refs/heads/master",
"committer_date": 1653286588000,
"content_id": "60b62d910929556e477bf2de5484db5bbccf481e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5831ba98b9bf5cc9d2a4704dbc842ef4cc306c3f",
"extension": "py"... | 2.375 | stackv2 | import re
from tensorflow.python.keras import backend as K
from tensorflow.python.keras.layers import Layer
from tensorflow.python.keras.preprocessing.sequence import pad_sequences
from nltk.corpus import stopwords
from gensim.models import KeyedVectors
import gensim
import pdb
import numpy as np
import itertools
de... | 187 | 27.5 | 148 | 17 | 1,620 | python | [{"finding_id": "codeql_py/overly-large-range_801e34441f076bcc_eb34c785", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+,\\-.\\/0-9:;<=\\]."
] | [
48
] | [
null
] | [
36
] | [
39
] | |
2024-11-18T20:52:36.214305+00:00 | 1,441,906,744,000 | 46a162ae2189277e2e069da44bf2daf26415ca31 | 3 | {
"blob_id": "46a162ae2189277e2e069da44bf2daf26415ca31",
"branch_name": "refs/heads/master",
"committer_date": 1441906744000,
"content_id": "1ac65bd4040331b1ec4ed0325c20c7a28e08fece",
"detected_licenses": [
"MIT"
],
"directory_id": "53db077d9d61a63e8170369139b9b79de778bd82",
"extension": "py",
"fi... | 2.953125 | stackv2 | #!/usr/bin/python
#client side
# echo client
from socket import *
from ssl import *
#user is not finnished
finnished =False
#create socket
client_socket=socket(AF_INET, SOCK_STREAM)
tls_client = wrap_socket(client_socket, ssl_version=PROTOCOL_TLSv1, cert_reqs=CERT_NONE)
#connect to the echo server
tls_client.connec... | 54 | 21.67 | 88 | 13 | 311 | python | [{"finding_id": "codeql_py/insecure-protocol_4ee06c64b372baa1_653f5010", "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 wrap_socket](1).", "remediation": "", "locat... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to wrap_socket](1)."
] | [
12
] | [
null
] | [
14
] | [
89
] | |
2024-11-18T20:52:39.365325+00:00 | 1,613,839,135,000 | 59f544e54c9fa982a8dab42a68c4e5357b402c0c | 2 | {
"blob_id": "59f544e54c9fa982a8dab42a68c4e5357b402c0c",
"branch_name": "refs/heads/main",
"committer_date": 1613839135000,
"content_id": "9e5f352b67be4d262483138dc4221558f9071d49",
"detected_licenses": [
"MIT"
],
"directory_id": "2c6699064566cc514daaee525187f4f5322a78b5",
"extension": "py",
"file... | 2.421875 | stackv2 | # routes.py
import logging
from flask import Flask, request, jsonify, abort
from signal_interpreter_server.exceptions import JsonParserError, XmlParserError
from signal_interpreter_server.parser_factory import ParserFactory
logger = logging.getLogger(__name__)
signal_interpreter_app = Flask(__name__)
parser_factor... | 40 | 39.45 | 92 | 13 | 344 | python | [{"finding_id": "codeql_py/log-injection_b3b7723d0f2391cc_255e8d32", "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)."
] | [
32,
37
] | [
null,
null
] | [
70,
70
] | [
92,
92
] | |
2024-11-18T19:02:45.164788+00:00 | 1,621,885,197,000 | 0a5cb44cf91e4e539237491fcaf47816b866b4b9 | 2 | {
"blob_id": "0a5cb44cf91e4e539237491fcaf47816b866b4b9",
"branch_name": "refs/heads/master",
"committer_date": 1621885197000,
"content_id": "a8304db4282e83c6b1148b7eb13650954957b08f",
"detected_licenses": [
"MIT"
],
"directory_id": "5550c92a6c434ba7e675ccdaef53d68876640d05",
"extension": "py",
"fi... | 2.5 | stackv2 | import asyncio
import hashlib
import os
from datetime import datetime
from time import time
from typing import Any, Dict, List
import httpx
import pickledb
# Dirty fix to ignore HTTPS warnings
import urllib3
from pytz import UTC
import storage
import service
urllib3.disable_warnings()
logger = service.log_event(__... | 123 | 35.83 | 137 | 24 | 899 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0497ea5688c1c21c_f4a3ae82", "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)."
] | [
38
] | [
40
] | [
34
] | [
18
] | |
2024-11-18T19:02:54.038733+00:00 | 1,493,748,408,000 | 737975bf66041e980450330ceff07fb22e8fcd76 | 3 | {
"blob_id": "737975bf66041e980450330ceff07fb22e8fcd76",
"branch_name": "refs/heads/master",
"committer_date": 1493748408000,
"content_id": "716004821796a028201a13e9cf0487e6fa2ca98e",
"detected_licenses": [
"MIT"
],
"directory_id": "8146fd4230da87a8e71e132acf058c8abaa3be03",
"extension": "py",
"fi... | 2.640625 | stackv2 | #!/usr/bin/env python
# Class for common Google sheet operations.
import os
import sys
import json
import doctest
import csv
import gspread
import string
from h1 import h1
from oauth2client.client import SignedJwtAssertionCredentials
from collections import defaultdict
try:
from collections import OrderedDict
excep... | 263 | 32.88 | 94 | 22 | 1,983 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_daca8f22c6f517e8_88bafdff", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [newsfuze.com](1) may be at an arbitrary position in th... | 5 | true | [
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [newsfuze.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [dailycamera.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [mercurynews.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [timescall.com](1) may be at an ar... | [
192,
195,
198,
201,
212
] | [
null,
null,
null,
null,
null
] | [
20,
22,
22,
22,
20
] | [
44,
49,
49,
47,
50
] | |
2024-11-18T19:02:59.273293+00:00 | 1,569,031,465,000 | 7aaccaa62fd19d93e7cdd7e4ff27bdc6f1cb7ee1 | 3 | {
"blob_id": "7aaccaa62fd19d93e7cdd7e4ff27bdc6f1cb7ee1",
"branch_name": "refs/heads/master",
"committer_date": 1569031465000,
"content_id": "5d055650cc48ae584ffb6345e2cec0892ea19a40",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "788f14ebb4a9c018ec3135edd6bed401d619f6a3",
"extension": "py"... | 2.875 | stackv2 | #!/usr/bin/env python3
#
# Generate the files necessary to kickstart a host from PXE:
#
# PXEROOT/pxelinux.cfg/{hexaddr} - PXE file for stage 1 boot
# KSROOT/<hostname>-<distro><version>.ks - Kickstart file for stage 2
#
# USAGE: gen_pxe_config.py -t <template> [-c <config>]... [-d KEY=VALUE]...
#
# INPUTS
#
# distro
#... | 233 | 26.85 | 98 | 16 | 1,856 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f5300456e3c7a900_d2d1734b", "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."
] | [
151
] | [
154
] | [
10
] | [
26
] | |
2024-11-18T19:14:28.304638+00:00 | 1,615,313,793,000 | 76e70a5237b88f7e72ff8be7a970438cd9cd94ed | 3 | {
"blob_id": "76e70a5237b88f7e72ff8be7a970438cd9cd94ed",
"branch_name": "refs/heads/main",
"committer_date": 1615313793000,
"content_id": "6ae3b1c132f7ff1220ac0d9c69c65cdfb99db7a8",
"detected_licenses": [
"MIT"
],
"directory_id": "0bca91dd6124c37344104a70e020f8372c035800",
"extension": "py",
"file... | 2.8125 | stackv2 | """
Created on Mon Jan 11 20:08:27 2021
#! Python 3.8
@author: Francis Neequaye
francis.neequaye@gmail.com
"""
"""
Script Instructions
_____
1.Enter the remote IP's addresses of
Cisco (or other) devices on each search
of the Hosts.dat file
2. Enter input commands on each line of
the Commands.dat file
"""
... | 228 | 21.59 | 132 | 19 | 1,150 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_48149ba2262546fb_33bbd686", "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."
] | [
118
] | [
null
] | [
13
] | [
70
] | |
2024-11-18T19:14:31.993710+00:00 | 1,509,816,419,000 | 762c72f973269dc88589a74304ee0cf83b8d0fae | 3 | {
"blob_id": "762c72f973269dc88589a74304ee0cf83b8d0fae",
"branch_name": "refs/heads/master",
"committer_date": 1509816419000,
"content_id": "62245b208e1e0fc07f5cc4107c65bf19756a25fc",
"detected_licenses": [
"MIT"
],
"directory_id": "778e8d8b13d50a9dcf9f29796117c9b2ea1ddb44",
"extension": "py",
"fi... | 2.578125 | stackv2 | #!/usr/bin/env python
"""
Usage: tibudecrypt.py [-v] <file>
tibudecrypt.py [-v] <file> [<password>]
tibudecrypt.py --version
tibudecrypt.py -h | --help
Arguments:
<file> File to decrypt.
<password> Password to use to decrypt file.
Options:
-v --verbose Enable verbose ... | 260 | 30.72 | 104 | 16 | 1,879 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_2dc20aa69fe27096_6412a2b5", "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.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expen... | [
130,
138
] | [
null,
null
] | [
13,
25
] | [
21,
33
] | |
2024-11-18T19:14:37.505584+00:00 | 1,617,464,886,000 | 2b0bddfbe88537b38175d46aba5f14586a44426a | 3 | {
"blob_id": "2b0bddfbe88537b38175d46aba5f14586a44426a",
"branch_name": "refs/heads/main",
"committer_date": 1617464886000,
"content_id": "d6fba9e8cc989075a5646dded9ceab52bcf73a6d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5cf183a2948988dcd89fcc761149b90307ff9083",
"extension": "py",
... | 2.53125 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Ph0nest v1.0
# Author: vsecoder
import os
def MAIN():
try:
import random
import sys
from colorama import Fore, Back, Style
from aiogram import Bot, types
from aiogram.dispatcher import Dispatcher
from aiogram.utils import executor
from aiogram.types import Rep... | 66 | 27.09 | 141 | 25 | 514 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7c987f90b3f61d02_384c82ad", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
48
] | [
49
] | [
13
] | [
60
] | |
2024-11-18T19:14:38.995305+00:00 | 1,579,205,623,000 | d8083b45330392bd6e1b6f211b5b56d4a85d17dd | 3 | {
"blob_id": "d8083b45330392bd6e1b6f211b5b56d4a85d17dd",
"branch_name": "refs/heads/master",
"committer_date": 1579205623000,
"content_id": "73b716d0852cdcdb1ae695534d79bad26adbac31",
"detected_licenses": [
"MIT"
],
"directory_id": "e631449f576a8d2b8497aaf39d37cf28dbf825fd",
"extension": "py",
"fi... | 2.75 | stackv2 | import pygame , sys , socket , time
vec = pygame.math.Vector2
from settings import *
import MenuPrincipal
import requests
import json
HOST = '127.0.0.1'
PORT = 9000
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((HOST, PORT))
pygame.init()
class ghostMulti:
def __init__(self):
self.scre... | 226 | 38.84 | 154 | 22 | 2,131 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d1748bf6fe030e01_47efefcf", "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)."
] | [
75
] | [
null
] | [
13
] | [
86
] | |
2024-11-18T19:14:52.334831+00:00 | 1,634,716,035,000 | cabc3091b1cf0d4e8133c071e5ef43ceaacdf60e | 2 | {
"blob_id": "cabc3091b1cf0d4e8133c071e5ef43ceaacdf60e",
"branch_name": "refs/heads/main",
"committer_date": 1634716035000,
"content_id": "00024373689a41660fe75b268b6df1027ea0fb85",
"detected_licenses": [
"MIT"
],
"directory_id": "aa84e9f0df8b972be3c14bb378113dce09b9f37f",
"extension": "py",
"file... | 2.5 | stackv2 | import datetime as dt
from typing import List, Optional
import requests
import re
import json
from src.services.wbes.getMaxRev import getMaxRevForDate
from src.services.wbes.wbesUtils import getDefaultReqHeaders
from src.typeDefs.wbes.schDataRow import ISchDataRow
def convertDataArrayToSchRows(dataArray: List[List[str... | 48 | 39.56 | 148 | 16 | 515 | python | [{"finding_id": "codeql_py/request-without-cert-validation_4941839cdc127d76_e6101b1f", "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)."
] | [
41
] | [
null
] | [
9
] | [
60
] | |
2024-11-18T19:27:44.327411+00:00 | 1,411,481,174,000 | 7872ef8566df5bb7a2fa708496de7008e82deaf5 | 3 | {
"blob_id": "7872ef8566df5bb7a2fa708496de7008e82deaf5",
"branch_name": "refs/heads/master",
"committer_date": 1411481174000,
"content_id": "9788cbc101207b70acfbd81861656192c2dcea43",
"detected_licenses": [
"MIT"
],
"directory_id": "4b1ed50e9a36fe34f0379e23f4b743c61a86ada8",
"extension": "py",
"fi... | 3.046875 | stackv2 | '''
Copyright (c) 2014 blu3b0lt
DES3 implementation
'''
from Crypto.Cipher import DES3
from Crypto import Random
key = b'DES is very old!'
iv = Random.new().read(DES3.block_size)
cipher = DES3.new(key, DES3.MODE_OFB, iv)
print "Enter text to be encrypted: "
plaintext = raw_input()
msg = iv + cipher.encrypt(plaintext)... | 19 | 25.21 | 59 | 11 | 148 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_75f6c2edf4c062d4_ec0421e3", "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."
] | [
13,
17
] | [
null,
null
] | [
12,
7
] | [
37,
44
] | |
2024-11-18T19:27:50.669435+00:00 | 1,568,299,105,000 | 62a8612cb3547d64d5a3b3bfe83af47b3560e432 | 2 | {
"blob_id": "62a8612cb3547d64d5a3b3bfe83af47b3560e432",
"branch_name": "refs/heads/master",
"committer_date": 1568299105000,
"content_id": "8e44829605ed8e24d746a8bcba1911c586fe4a7b",
"detected_licenses": [
"MIT"
],
"directory_id": "1cf02c615be74adb16c9d43e3ace0246626f7fbd",
"extension": "py",
"fi... | 2.359375 | stackv2 | """Config flow for Uk Carbon Intensity."""
import logging
import requests
from homeassistant import config_entries
from . import const
_LOGGER = logging.getLogger(__name__)
@config_entries.HANDLERS.register(const.DOMAIN)
class UkCarbonIntensityFlowHandler(config_entries.ConfigFlow):
"""Config flow for the uk c... | 36 | 33.78 | 85 | 14 | 271 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ed70077ed9cb396e_547f0ae3", "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."
] | [
18,
19
] | [
null,
null
] | [
22,
22
] | [
47,
48
] | |
2024-11-18T20:06:00.890439+00:00 | 1,547,572,571,000 | 09c98e869bf749a33adf9c44188238ed8c7217c5 | 2 | {
"blob_id": "09c98e869bf749a33adf9c44188238ed8c7217c5",
"branch_name": "refs/heads/master",
"committer_date": 1547572571000,
"content_id": "b492d61bdac170e29043f020b91372ce4719688b",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "1b6177e1c76f9fd32dff0c7289a6644cbe123d7b",
"extension": "p... | 2.3125 | stackv2 | from redash.authentication.org_resolving import current_org
from redash.authentication import create_and_login_user, logout_and_redirect_to_index, get_next_path
from flask_login import current_user, login_required, login_user, logout_user
from flask import flash, redirect, render_template, request, url_for, Blueprint
f... | 109 | 35.26 | 124 | 18 | 816 | python | [{"finding_id": "codeql_py/ldap-injection_868b6df0776185e7_97425f26", "tool_name": "codeql", "rule_id": "py/ldap-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "LDAP query parameter (filter) depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-090"
] | [
"py/ldap-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"LDAP query parameter (filter) depends on a [user-provided value](1)."
] | [
98
] | [
null
] | [
17
] | [
71
] | |
2024-11-18T20:06:19.227007+00:00 | 1,617,169,651,000 | a7ed22f4eaab2a38e6b9dd8f952e33808395858d | 3 | {
"blob_id": "a7ed22f4eaab2a38e6b9dd8f952e33808395858d",
"branch_name": "refs/heads/master",
"committer_date": 1617169651000,
"content_id": "97071e15d28d4251096a21f2fa1d63b050e74b05",
"detected_licenses": [
"MIT"
],
"directory_id": "77e22775135dff0de080573c7a6e83ef373fe4cb",
"extension": "py",
"fi... | 2.640625 | stackv2 | import os
import pycurl
import tarfile, zipfile
import glob, shutil
import logging
class _Downloader:
def __init__(self, url, compress_ext='tar'):
self.url = url
_compress_exts = ['tar', 'zip']
if not compress_ext in _compress_exts:
raise ValueError("Invalid argument, select pr... | 53 | 31.06 | 136 | 16 | 395 | python | [{"finding_id": "codeql_py/tarslip_5353804212783344_bec54031", "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)."
] | [
44
] | [
null
] | [
17
] | [
22
] | |
2024-11-18T20:18:22.142607+00:00 | 1,653,410,082,000 | 5724b79040179494fff06828578a3aaa62a0db01 | 2 | {
"blob_id": "5724b79040179494fff06828578a3aaa62a0db01",
"branch_name": "refs/heads/master",
"committer_date": 1653410082000,
"content_id": "38c6cb69861f9427cb91d8060472473040214398",
"detected_licenses": [
"MIT"
],
"directory_id": "deff7bddbb6ff9bbb0518b2f705265cc0c57c09f",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/python3
import os
import re
import fileinput
import requests
main_dir = "/home/poznan.tbhydro.net/admin/Projekty/prywatne/gatsby/velomelon/blog"
directory = os.fsencode(main_dir)
patImgSrc = re.compile('src\s *=\s*"([^"]+)"')
temp_name = 'temp_file'
for dir in os.listdir(directory):
dir_str = os.fsdeco... | 42 | 40.83 | 83 | 23 | 377 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a23d79c868073db5_583d03cd", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [googleusercontent.com](1) may be at an arbitrary posit... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [googleusercontent.com](1) may be at an arbitrary position in the sanitized URL."
] | [
23
] | [
null
] | [
39
] | [
67
] | |
2024-11-18T20:18:23.146298+00:00 | 1,595,215,154,000 | c189be379fa2314630d9a962b7e2f5ffd5e5ae3f | 3 | {
"blob_id": "c189be379fa2314630d9a962b7e2f5ffd5e5ae3f",
"branch_name": "refs/heads/master",
"committer_date": 1595215154000,
"content_id": "215f3b8f816ce5333afa8bb9833132b79518933f",
"detected_licenses": [
"MIT"
],
"directory_id": "96f8b71fa966a3027df29d4b78530d002c3b38cb",
"extension": "py",
"fi... | 2.578125 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Thu Jun 4 20:54:04 2020
@author: @irvincabezas
"""
from flask import Flask, request
from flask_restful import Resource, Api
import subprocess, os
app = Flask(__name__)
api = Api(app)
users = []
def runProcess(exe):
p = subprocess.Popen(exe, stdout=subprocess.PIPE, st... | 42 | 26.02 | 117 | 19 | 285 | python | [{"finding_id": "codeql_py/command-line-injection_c1974fe92823e5f7_4e0dc6d2", "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": {... | 1 | true | [
"CWE-078"
] | [
"py/command-line-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1)."
] | [
18
] | [
null
] | [
26
] | [
29
] | |
2024-11-18T20:18:25.672587+00:00 | 1,614,041,195,000 | 847f8628f827f96e32bd7931f0153be184fb100b | 3 | {
"blob_id": "847f8628f827f96e32bd7931f0153be184fb100b",
"branch_name": "refs/heads/master",
"committer_date": 1614041195000,
"content_id": "9e0d45787421b01abffc279d4d5e53af16ebb9c7",
"detected_licenses": [
"MIT"
],
"directory_id": "dcc8baabb2b501e61cf6da98a356bc8513b8da52",
"extension": "py",
"fi... | 2.828125 | stackv2 | """Run an example script to quickly test."""
import asyncio
import logging
from aiohttp import ClientSession
from pymyq import login
from pymyq.errors import MyQError, RequestError
from pymyq.garagedoor import STATE_OPEN, STATE_CLOSED
_LOGGER = logging.getLogger()
EMAIL = "<EMAIL>"
PASSWORD = "<PASSWORD>"
ISSUE_COM... | 160 | 44.59 | 103 | 34 | 1,115 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e56647d8f9ee1f6c_a287f37c", "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."
] | [
43
] | [
null
] | [
19
] | [
40
] | |
2024-11-18T20:31:29.152618+00:00 | 1,607,381,464,000 | 2c238dbe2576ad8663fa5332e6203f763ba64ef3 | 3 | {
"blob_id": "2c238dbe2576ad8663fa5332e6203f763ba64ef3",
"branch_name": "refs/heads/main",
"committer_date": 1607381464000,
"content_id": "7bb0cbf0b6aeccbcb4f6333f40a12fcb2e2cea69",
"detected_licenses": [
"MIT"
],
"directory_id": "be9d23040d1a9c9d92f8554ba73a8ab4d53700a4",
"extension": "py",
"file... | 2.53125 | stackv2 | from flask import Flask, request, jsonify, make_response
from flask_cors import CORS
from flask_restplus import Api, Resource, fields
from sklearn.externals import joblib
from sampleParser import parseInput, makeSample
import tensorflow as tf
from tensorflow import keras
import numpy as np
import torch
import torch.nn ... | 90 | 30.73 | 113 | 21 | 683 | python | [{"finding_id": "codeql_py/stack-trace-exposure_cef672b4c5d3b2eb_d996180b", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 1 | true | [
"CWE-209"
] | [
"py/stack-trace-exposure"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
86
] | [
90
] | [
19
] | [
5
] | |
2024-11-18T20:31:37.991849+00:00 | 1,634,154,272,000 | 49a44cfa2d4d321ef6f49652e698ac60c9b3931f | 3 | {
"blob_id": "49a44cfa2d4d321ef6f49652e698ac60c9b3931f",
"branch_name": "refs/heads/main",
"committer_date": 1634154272000,
"content_id": "e00a8a6635aea2c8014bb5d4c2f7d66d9be6ed7e",
"detected_licenses": [
"MIT"
],
"directory_id": "e80f55c54c46f09ed0d02d2ea7b5bd5d360a04ab",
"extension": "py",
"file... | 2.75 | stackv2 | '''
Creates Snakefiles for ATACseq pipeline with default settings
'''
# from os import mkdir
import argparse
import pathlib
# import time
# import string
from jinja2 import Environment, FileSystemLoader
def init_argparse():
'''
function docstring goes here
'''
parser = argparse.ArgumentParser(
... | 117 | 28.74 | 99 | 15 | 809 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9afb3aa721668748_42509fb4", "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."
] | [
53
] | [
54
] | [
11
] | [
48
] | |
2024-11-18T20:43:20.074889+00:00 | 1,633,686,739,000 | e5c995fbe2454c57547a8faae57d828fc22103de | 4 | {
"blob_id": "e5c995fbe2454c57547a8faae57d828fc22103de",
"branch_name": "refs/heads/master",
"committer_date": 1633686739000,
"content_id": "3b5990663f571dfdf368e5af587ed321fdff7a44",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "fa7f72fe2369733f8f97d2324d8e236deb6eab39",
"extension": "py",
... | 3.6875 | stackv2 | #password generator
import random
letter=[]
for i in range(65,91):
letter.append(chr(i))
for i in range(97,123):
letter.append(chr(i))
number=["0","1","2","3","4","5","6","7","8","9"]
char=["~","!","@","#","$","%","^","&","*"]
a=int(input("Enter the number of letters\n"))
b=int(input("Enter the number of number... | 25 | 24.8 | 48 | 10 | 202 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ff8546c65ed91ae1_bd826b81", "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."
] | [
25
] | [
null
] | [
7
] | [
15
] | |
2024-11-18T20:43:20.924063+00:00 | 1,624,660,222,000 | 194e07d89ffcca0af1e84f10a07f912a26a2f5cf | 3 | {
"blob_id": "194e07d89ffcca0af1e84f10a07f912a26a2f5cf",
"branch_name": "refs/heads/master",
"committer_date": 1624660222000,
"content_id": "f1625f4d46f633e88526c4560ec72f256a61cda3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "29028c31919bae266d6c1080c923709b2b2e0ba4",
"extension": "py"... | 3.03125 | stackv2 | """Not being used because currently using api endpoint /notifier"""
import json
import os
import requests
from collections import defaultdict
from helpers import database, extract_zip, send_text
class Notifier():
def __init__(self):
self.all_availabile_ids = []
self.zip_availability_map = defaultd... | 97 | 39.36 | 115 | 16 | 847 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_54d5e6bd58b8692a_b423c7f5", "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."
] | [
88
] | [
null
] | [
23
] | [
89
] | |
2024-11-18T20:43:54.366460+00:00 | 1,504,785,384,000 | ad66560305c3942d95a35059ea65070f917e4f8f | 3 | {
"blob_id": "ad66560305c3942d95a35059ea65070f917e4f8f",
"branch_name": "refs/heads/master",
"committer_date": 1504785384000,
"content_id": "91117a447e1a2c66e297411f8866180cb9afffe8",
"detected_licenses": [
"MIT"
],
"directory_id": "ef48e3f55044614c8d2eb5ec69e7ad3e9444e9cf",
"extension": "py",
"fi... | 3 | stackv2 | import json
import socket
import logging
import urllib2
import ssl
from collections import namedtuple
LOGGER = logging.getLogger(__name__)
class Messenger:
"""A class which takes care of the socket communication with oxd Server.
The object is initialized with the port number
"""
def __init__(self, ... | 159 | 31.65 | 94 | 16 | 1,099 | python | [{"finding_id": "codeql_py/insecure-protocol_92b0ad183a04e546_a5ef7116", "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.SSLContext](1).", "remediation": "", "lo... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)."
] | [
152
] | [
null
] | [
20
] | [
54
] | |
2024-11-18T20:44:17.320772+00:00 | 1,586,905,748,000 | f23c93a9adf3000b6b67fe0b3120901edf9c7739 | 3 | {
"blob_id": "f23c93a9adf3000b6b67fe0b3120901edf9c7739",
"branch_name": "refs/heads/master",
"committer_date": 1586905748000,
"content_id": "1fc6a60b76ada68b5894a6d7d2c61c06bacb372c",
"detected_licenses": [
"MIT"
],
"directory_id": "898773d9e8165f00c38929c9edf330373cf48e20",
"extension": "py",
"fi... | 2.71875 | stackv2 | from lib.menu import clear, menu
from colorama import init, Fore, Back, Style
import math, random, datetime, sys
import lib.print as printMenu
visaPrefixList = [4539,4556,4916,4532,4929,40240071,4485,4716,4]
mastercardPrefixList = [51,52,53,54,55,2221,2222,2223,2224,2225,2226,2227,2228,2229,223,224,225,226,227,228,2... | 102 | 26.45 | 137 | 19 | 823 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dda48e78c29b8dd1_53984263", "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."
] | [
68
] | [
null
] | [
11
] | [
21
] | |
2024-11-18T20:44:18.356064+00:00 | 1,638,315,592,000 | 222821382a3127019199bc95b732e2ee5f01f04e | 3 | {
"blob_id": "222821382a3127019199bc95b732e2ee5f01f04e",
"branch_name": "refs/heads/master",
"committer_date": 1638315592000,
"content_id": "de48ddbe616f81aee0011f133ed4ea32d5e9e99c",
"detected_licenses": [
"MIT"
],
"directory_id": "4a27942007c50de691621dd77c6be0d95aed0b2e",
"extension": "py",
"fi... | 2.546875 | stackv2 | """
Benchmark of automatic code for a CCD mosaic term.
This example shows a trivial automatic optimization and code generation of the
evaluation of a mosaic term in CCD doubles amplitude equations. Performance of
different printers are benchmarked.
"""
import subprocess
import sys
import types
from drudge import P... | 192 | 20.85 | 79 | 13 | 1,201 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_8ea6dc7905870795_2763c752", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
121,
171
] | [
150,
189
] | [
21,
20
] | [
5,
5
] | |
2024-11-18T20:57:30.314435+00:00 | 1,588,465,109,000 | aaeeb34f9a4c85a64582208aaa0bae9476fd35aa | 3 | {
"blob_id": "aaeeb34f9a4c85a64582208aaa0bae9476fd35aa",
"branch_name": "refs/heads/master",
"committer_date": 1588465109000,
"content_id": "6c217db1a69122ec3be3a87b627c184c18140042",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "147bd7d55b472e90a4343b8890cc4e808a176fbb",
"extension": "p... | 3.078125 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""Generate various math column addition worksheet
"""
import argparse
from collections import namedtuple
from jinja2 import Environment, FileSystemLoader
import os
from pprint import pprint
import random
import sys
from column_decimal import ColumnDecimal
def add_math_para... | 181 | 30.76 | 102 | 15 | 1,351 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_42e587dff3035b3c_3133c8ac", "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."
] | [
165
] | [
null
] | [
11
] | [
37
] | |
2024-11-18T20:57:33.847145+00:00 | 1,607,934,116,000 | d6aa9aff73938569a43d572e479e65b16acc6e86 | 3 | {
"blob_id": "d6aa9aff73938569a43d572e479e65b16acc6e86",
"branch_name": "refs/heads/master",
"committer_date": 1607934116000,
"content_id": "f4e9d120d97e53a96ad2626590ca381674129290",
"detected_licenses": [
"MIT"
],
"directory_id": "ea5c1de05ad3668c4cf36beae800fc33b3b4598b",
"extension": "py",
"fi... | 2.8125 | stackv2 | """
docat utilities
"""
import os
import subprocess
from pathlib import Path
from zipfile import ZipFile
from jinja2 import Template
def create_symlink(source, destination):
"""
Create a symlink from source to destination, if the
destination is already a symlink, it will be overwritten.
Args:
... | 66 | 30 | 87 | 17 | 449 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_0ad24179dc666679_6ab71cda", "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."
] | [
42
] | [
null
] | [
31
] | [
80
] | |
2024-11-18T20:58:17.479800+00:00 | 1,571,393,103,000 | 10356b911f58370546988f36d958a0e05006bdef | 3 | {
"blob_id": "10356b911f58370546988f36d958a0e05006bdef",
"branch_name": "refs/heads/master",
"committer_date": 1571393103000,
"content_id": "b3dd9a7317384ad1c44b93682ee56114a98aa9f5",
"detected_licenses": [
"MIT"
],
"directory_id": "bf53931505601b3e11edc80fd436a51f8ecdbbe2",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python3
import sys
import requests
requests.packages.urllib3.disable_warnings()
import lxml.html as lh
OK, CORRUPT, MUMBLE, DOWN, CHECKER_ERROR = 101, 102, 103, 104, 110
def trace(public="", private=""):
if public:
print(public)
if private:
print(private, file=sys.stderr)
c... | 49 | 41.18 | 135 | 15 | 476 | python | [{"finding_id": "codeql_py/request-without-cert-validation_bc2aba6b963e0989_b65afeb0", "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)."
] | [
23
] | [
null
] | [
17
] | [
126
] | |
2024-11-18T20:58:42.807141+00:00 | 1,510,846,894,000 | bbbc66b0004c71fc57a250e59bcba5654b4ea5da | 2 | {
"blob_id": "bbbc66b0004c71fc57a250e59bcba5654b4ea5da",
"branch_name": "refs/heads/master",
"committer_date": 1510846894000,
"content_id": "5af14b90f8f6d402cd685099417a6acc3d84b85b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "de111d8c7137ba46983cb43bc2511b2d4668a875",
"extension": "py"... | 2.359375 | stackv2 | from flask import Flask, redirect, make_response, Response, render_template, request, send_from_directory, url_for, jsonify
from elasticsearch import Elasticsearch
from datetime import datetime
from newsdb import get_news
import simplejson
import json
import os
import datetime
import sys
if sys.version_info.major < 3:... | 94 | 26.22 | 150 | 12 | 673 | python | [{"finding_id": "codeql_py/flask-debug_56f9b6572eddc22c_246e60b6", "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)."
] | [
94,
79
] | [
null,
null
] | [
5,
12
] | [
40,
42
] | |
2024-11-18T21:10:09.546030+00:00 | 1,691,665,204,000 | b438287ca1439e025cf66553a9665e6a38b8a5e6 | 2 | {
"blob_id": "b438287ca1439e025cf66553a9665e6a38b8a5e6",
"branch_name": "refs/heads/master",
"committer_date": 1691665204000,
"content_id": "567b99cbecdd27fd5be116435a238bcaf9a2ba0a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8adaec7baeb4b6ef02e162f5f8d437e19c6feee5",
"extension": "py"... | 2.5 | stackv2 | # -*- coding: utf-8 -*-
# Copyright 2019 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 181 | 35.87 | 100 | 14 | 1,503 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_46e02a164842d230_5b50b813", "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."
] | [
88
] | [
null
] | [
11
] | [
49
] | |
2024-11-18T21:10:14.911357+00:00 | 1,574,142,729,000 | d3923030986f2ccb0cf7c54a21e19ceef9a135de | 2 | {
"blob_id": "d3923030986f2ccb0cf7c54a21e19ceef9a135de",
"branch_name": "refs/heads/master",
"committer_date": 1574142729000,
"content_id": "89e9d9e2d34f306922e388a033b14ab6b75136fc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "57ca08782a87ad84fff70714893bcfd2b7d58dd1",
"extension": "py"... | 2.40625 | stackv2 | #coding=utf-8
from selenium import webdriver
# from selenium.webdriver.firefox.options import Options
# from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
import time
import json
import random
import requests
import re
import datetime
import io
# from bs4 import BeautifulSoup
import sys
#import http.... | 148 | 35.76 | 141 | 22 | 1,397 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_716363b78eb7420a_8ac8da9c", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression log... | [
98,
114,
120,
127,
71
] | [
null,
null,
null,
null,
null
] | [
39,
35,
35,
35,
19
] | [
73,
97,
97,
95,
27
] | |
2024-11-18T21:10:18.410625+00:00 | 1,515,117,904,000 | 2ae67396e8d283742ed3d29b6b60dd165c0d558a | 2 | {
"blob_id": "2ae67396e8d283742ed3d29b6b60dd165c0d558a",
"branch_name": "refs/heads/master",
"committer_date": 1515117904000,
"content_id": "0f7b8850f5a4c79bc7d7291651bbbe61b056b691",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "66fc0de885f1f1d8217c5c23542f0d2e3a8189e3",
"extension": "p... | 2.453125 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from django.http import JsonResponse
from django.shortcuts import render
import paramiko
import sys
import json
import os
import datetime
import subprocess
from django.conf import settings
from git import Repo
from book.models import book
def createABook(request):
contex... | 175 | 36.55 | 136 | 18 | 1,599 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_6297a53e0be8f911_b4d90755", "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."
] | [
162
] | [
null
] | [
9
] | [
66
] | |
2024-11-18T21:10:26.385011+00:00 | 1,676,981,900,000 | e3fc51c3694ed59d8a9b65ddef35d464adbf6b3f | 3 | {
"blob_id": "e3fc51c3694ed59d8a9b65ddef35d464adbf6b3f",
"branch_name": "refs/heads/master",
"committer_date": 1676981900000,
"content_id": "8bb47dff515f4a268ac69b70447dbba9a332612c",
"detected_licenses": [
"MIT"
],
"directory_id": "437d1cb5eb9c902b14c483366604b203d885000f",
"extension": "py",
"fi... | 2.84375 | stackv2 | import collections
import hashlib
import logging
from typing import Optional
from urllib.parse import urljoin
import requests
import xmltodict as xmltodict
import settings
class Client:
"""
tls_verify: can either be a boolean (True/False) to enable/disable TLS CA verification or
a string tha... | 87 | 30.37 | 97 | 15 | 630 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_3a4be65fee1bfda2_2b0e32be", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure."
] | [
42
] | [
null
] | [
17
] | [
42
] | |
2024-11-18T21:10:37.577570+00:00 | 1,646,120,245,000 | 0821355a789f2ab8f50a520aaa136e492caa1964 | 2 | {
"blob_id": "0821355a789f2ab8f50a520aaa136e492caa1964",
"branch_name": "refs/heads/master",
"committer_date": 1646120245000,
"content_id": "3af82befe989c32a68d9c1e944dce1630dd2d852",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "9d45c025a8fce775ef5f87da5a7cf900b710a9ed",
"extension": "p... | 2.359375 | stackv2 | import re
from allmychanges.downloaders.appstore import (
AppStoreAppNotFound,
get_itunes_app_id,
get_itunes_app_data)
def normalize_url(url, for_checkout=True, return_itunes_data=False):
"""Normalize url either for browser or for checkout.
Usually, difference is in the schema.
It normalizes ... | 56 | 33.48 | 113 | 17 | 468 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_1618414faaca941b_474608f8", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [itunes.apple.com](1) may be at an arbitrary position i... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [itunes.apple.com](1) may be at an arbitrary position in the sanitized URL."
] | [
43
] | [
null
] | [
10
] | [
35
] | |
2024-11-18T21:11:01.895543+00:00 | 1,588,804,120,000 | 703119f94acbdd8f486331ed72d42da40dc057bd | 2 | {
"blob_id": "703119f94acbdd8f486331ed72d42da40dc057bd",
"branch_name": "refs/heads/master",
"committer_date": 1588804120000,
"content_id": "3bb6baf6fd9fdf06da351d5cdc82d19cbba74af3",
"detected_licenses": [
"MIT"
],
"directory_id": "a0ccc4fd3a250485f0ef403d0e682c6ae0abb48d",
"extension": "py",
"fi... | 2.375 | stackv2 | #! /usr/bin/env python3.6
"""
app.py
Stripe Payments Demo. Created by Adrienne Dreyfus (@adrind).
This is our Flask server that handles requests from our Stripe checkout flow.
It has all the endpoints you need to accept payments.
Python 3.6 or newer required.
"""
import stripe
import json
import setup
import os
fr... | 208 | 34.74 | 119 | 21 | 1,595 | python | [{"finding_id": "codeql_py/stack-trace-exposure_932d3c1f69aa60b0_8b758a21", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
112,
128,
146
] | [
null,
null,
null
] | [
24,
24,
20
] | [
25,
25,
21
] | |
2024-11-18T21:11:07.052022+00:00 | 1,673,886,042,000 | 5792a1bba6ef738686a749e2dffbca3267093659 | 2 | {
"blob_id": "5792a1bba6ef738686a749e2dffbca3267093659",
"branch_name": "refs/heads/master",
"committer_date": 1673886042000,
"content_id": "975286125c782fd8020277aa41454f1ab8d5f9b1",
"detected_licenses": [
"MIT"
],
"directory_id": "aadc922193417e8fac7da0fe0b11a62ca7212619",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
from flask import Flask, request, render_template, session, jsonify, redirect
from flask.sessions import SessionInterface
from beaker.middleware import SessionMiddleware
from time import time
import game
from config import FB_APP_ID, CANONICAL_URL, \
SESSION_ENCRYPT_KEY, SESSION_VALIDATE_KEY... | 314 | 28.23 | 79 | 18 | 2,081 | python | [{"finding_id": "codeql_py/flask-debug_40bc7d3bf2d87545_0e1fb4d9", "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)."
] | [
314,
82
] | [
null,
null
] | [
5,
29
] | [
24,
32
] | |
2024-11-18T21:11:18.202452+00:00 | 1,689,912,169,000 | d05bbc11a793639466b013aa69d56e6d9f6fa931 | 2 | {
"blob_id": "d05bbc11a793639466b013aa69d56e6d9f6fa931",
"branch_name": "refs/heads/main",
"committer_date": 1689912169000,
"content_id": "5cf06a83e4c04b0a2a406d3839f94d22ba4ec713",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "0ed62eec4eea9931f08f383cf657f3ca1a3ef4f9",
"extension": "py"... | 2.421875 | stackv2 | import jsonpatch
import re
import dpath
from cedar.utils import general_utils as utils
class AddOrderToUiPatch(object):
def __init__(self):
self.description = "Adds the missing order field in the _ui object"
self.from_version = "1.0.0"
self.to_version = "1.1.0"
def is_applied(self, e... | 59 | 33.37 | 104 | 17 | 449 | python | [{"finding_id": "codeql_py/redos_381be77ecb2438c7_276e6c1e", "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 'object has missing required prope... | 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 'object has missing required properties (\\['' and containing many repetitions of 'a',''.",
"This part of the regular expression may cause exponential backtracking on strings starting with 'object has missing required... | [
19,
19
] | [
null,
null
] | [
20,
36
] | [
23,
39
] | |
2024-11-18T19:03:23.432183+00:00 | 1,669,112,271,000 | 606811e60caf3600496a55981769c1cf7fbe3809 | 3 | {
"blob_id": "606811e60caf3600496a55981769c1cf7fbe3809",
"branch_name": "refs/heads/master",
"committer_date": 1669112271000,
"content_id": "cfb1cefc73f33b1dcd3c63f71dddb46d5362ce5e",
"detected_licenses": [
"MIT"
],
"directory_id": "fb0299c4998eb10d5f7205d83187c48b245e1fc3",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
from flask import Flask, render_template, request, send_from_directory, redirect, url_for
from app import app
from .ASCII_Art import ascii
UPLOAD_FOLDER = os.path.dirname(__file__)
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER + "/static/images"
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg'])
@app.route('/')... | 40 | 32.05 | 133 | 13 | 302 | python | [{"finding_id": "codeql_py/path-injection_c4970f98f715e72b_71ffec4e", "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)."
] | [
28
] | [
null
] | [
19
] | [
20
] | |
2024-11-18T19:28:38.153659+00:00 | 1,363,905,357,000 | 4ee02446a1ff7c826a706c370fcec0f659223188 | 3 | {
"blob_id": "4ee02446a1ff7c826a706c370fcec0f659223188",
"branch_name": "refs/heads/master",
"committer_date": 1363905357000,
"content_id": "c5d334d3b17f79d389df5a85b5339447df722e38",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e2f90b0af5e151dac603f53587b3a0617a3f3ab3",
"extension": "py"... | 2.59375 | stackv2 | #!/usr/bin/python
import sys
import requests
from flask import Flask, Response
app = Flask(__name__)
@app.route("/add_uniq/<colname>/<path:url>")
def add_uniq(colname, url):
r = requests.get(url, stream=True)
def gen_lines():
i = 0
for line in r.iter_lines():
if not i:
... | 34 | 19 | 53 | 16 | 166 | python | [{"finding_id": "codeql_py/full-ssrf_025242eceb5c0eb2_33e633e3", "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)."
] | [
11
] | [
null
] | [
9
] | [
39
] | |
2024-11-18T19:28:49.324363+00:00 | 1,607,478,732,000 | 89bafe0a31b114cd7b6f4bad37bb297df4e15be4 | 3 | {
"blob_id": "89bafe0a31b114cd7b6f4bad37bb297df4e15be4",
"branch_name": "refs/heads/main",
"committer_date": 1607478732000,
"content_id": "e1af4ac3e633d228bd49c3690092d9da7edebfa8",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "f15c2b681f4de97a5c4ff745ade090e93b348c5d",
"extensi... | 2.5625 | stackv2 | import werkzeug
from flask import Flask, request, jsonify, flash, redirect, url_for
import flask
app = Flask(__name__)
#@app.route('/api/postname', methods = ['GET', 'POST'])
"""#@app.route('/')
def handle_request():
print("receive")
json = request.get_json()
print("receive")
print(json)
with ope... | 63 | 21.65 | 82 | 11 | 386 | python | [{"finding_id": "codeql_py/reflective-xss_684d15f9bcfc0bf1_af64436a", "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)."
] | [
47
] | [
null
] | [
12
] | [
30
] | |
2024-11-18T19:39:49.207400+00:00 | 1,618,686,955,000 | 83bb25530b4b770667ce790bcef1c4a069d5fe2d | 3 | {
"blob_id": "83bb25530b4b770667ce790bcef1c4a069d5fe2d",
"branch_name": "refs/heads/master",
"committer_date": 1618686955000,
"content_id": "dc8aa74cf7ece7b1d4cc72b29068fe5ef7144e04",
"detected_licenses": [
"MIT"
],
"directory_id": "9738d1951cdbfe1d59424c12059e58abc883eb2b",
"extension": "py",
"fi... | 2.875 | stackv2 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import sys
import requests
API_BASE_URL = "http://www.apilayer.net/api/historical?format=1"
f_api_file = open('exchangerate_apikey', 'r')
EXCHANGE_RATE_API_KEY = "access_key=" + f_api_file.read().strip()
f_api_file.close()
def retrieve_exchange_rate(date, currency = 'USD... | 30 | 31.67 | 158 | 13 | 270 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d6b2d989e10c3ca1_7062491f", "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."
] | [
19
] | [
null
] | [
11
] | [
18
] | |
2024-11-18T19:40:01.723441+00:00 | 1,443,207,859,000 | d17c344c58d781e66b1077c94d8b7452be18d269 | 4 | {
"blob_id": "d17c344c58d781e66b1077c94d8b7452be18d269",
"branch_name": "refs/heads/master",
"committer_date": 1443207859000,
"content_id": "d56042099823989c87ec2eab3dd367da66ca9c5e",
"detected_licenses": [
"MIT"
],
"directory_id": "ebd553b2b0f930ec5e0fb1c5df53d7d2cc123beb",
"extension": "py",
"fi... | 4.09375 | stackv2 | _author_ = "danny.rash"
# CIS-125
# Star Wars Name Maker
#
# Uses a combination of your first name, last name, mother's maiden name, and town you were born in to create your Star Wars name
# Declare Magic numbers and constants
# LOOPCOUNTER = 2
# name = Danny
# Write program code here
print("Find out your Star War... | 26 | 29.88 | 138 | 10 | 204 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_60df248cc557b83b_5bad1564", "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."
] | [
26
] | [
null
] | [
86
] | [
138
] | |
2024-11-18T20:18:34.073161+00:00 | 1,615,535,618,000 | b96afa9d585512098baf85a14243feb2070b1be9 | 3 | {
"blob_id": "b96afa9d585512098baf85a14243feb2070b1be9",
"branch_name": "refs/heads/master",
"committer_date": 1615535618000,
"content_id": "93304db3ae74da88c507a7937d0c26d58c9e58d8",
"detected_licenses": [
"AFL-3.0"
],
"directory_id": "b52b4322ee4cff1000641b9a8a8007a4b9a17d89",
"extension": "py",
... | 2.75 | stackv2 | import os
import sys
import logging
from astropy.time import Time
from time import strptime, strftime
from astropy.utils import iers
logger = logging.getLogger(__name__)
def sfreq(freqs):
if len(freqs) != 24:
print("There are not 24 coarse chans defined for this obs. Got: %s" % freqs)
return
... | 122 | 35.17 | 162 | 18 | 1,110 | python | [{"finding_id": "codeql_py/overly-permissive-file_c2f0eb3cf9cf9fcd_822c6332", "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."
] | [
64
] | [
null
] | [
9
] | [
30
] | |
2024-11-18T20:18:35.357996+00:00 | 1,625,658,736,000 | 5ca39d6bd31a68c85e37bf8f3ec2735666a7e884 | 2 | {
"blob_id": "5ca39d6bd31a68c85e37bf8f3ec2735666a7e884",
"branch_name": "refs/heads/master",
"committer_date": 1625658736000,
"content_id": "b07fc46ad2dabfa9cede108b0b4cdfcdacbf7e24",
"detected_licenses": [
"MIT"
],
"directory_id": "2770d1f59779fe78060ac40da2fbce5007f7e5f5",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python3
import os
import sys
import shutil
import pathlib
import requests
import argparse
try:
import requests
except ImportError:
sys.exit("You need requests. run 'pip install requests'")
try:
from bs4 import BeautifulSoup
except ImportError:
sys.exit("You need BeautifulSoup. run 'pip ... | 107 | 30.13 | 141 | 14 | 910 | python | [{"finding_id": "codeql_py/overly-permissive-file_69aedfb5bdfbebf0_8002f892", "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."
] | [
101
] | [
null
] | [
5
] | [
38
] | |
2024-11-18T20:29:55.719820+00:00 | 1,678,400,411,000 | 55380e524aa602707a9cd105219e2a638d2a3b04 | 3 | {
"blob_id": "55380e524aa602707a9cd105219e2a638d2a3b04",
"branch_name": "refs/heads/master",
"committer_date": 1678400411000,
"content_id": "b65ee9e65fe32412963f7cb625c54983bc01a431",
"detected_licenses": [
"MIT"
],
"directory_id": "9115f8d0435cb07c27e49cf6aa6e2d7e645a5fb3",
"extension": "py",
"fi... | 2.5625 | stackv2 | import base64
import hashlib
import json
import logging
import socket
import threading
import websocket
import time
from . import exceptions
from . import base_classes
from . import events
LOG = logging.getLogger(__name__)
class obsws:
"""
Core class for using obs-websocket-py
Simple usage: (v5 api)
... | 397 | 34.7 | 144 | 25 | 2,836 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_2d68b9bad642907b_c141fdd0", "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."
] | [
209
] | [
null
] | [
17
] | [
55
] | |
2024-11-18T20:51:27.397880+00:00 | 1,558,531,094,000 | ccbed1c63b8128b98520524abe0683b665f747f5 | 2 | {
"blob_id": "ccbed1c63b8128b98520524abe0683b665f747f5",
"branch_name": "refs/heads/master",
"committer_date": 1558531094000,
"content_id": "3118adf209ddf8280cb3043e83330d99f2744ec4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b2ee67ed87486e44bb4dff69296be09c814bcfa2",
"extension": "py"... | 2.421875 | stackv2 | #!flask/bin/python
from flask import Flask, jsonify,abort
# 导入selenium的浏览器驱动接口
from selenium import webdriver
# 要想调用键盘按键操作需要引入keys包
from selenium.webdriver.common.keys import Keys
# 导入chrome选项
from selenium.webdriver.chrome.options import Options
import re
import time
import base64
import requests
import json
impor... | 108 | 30.72 | 117 | 15 | 1,057 | python | [{"finding_id": "codeql_py/flask-debug_8bd0fe4c0d40ca39_fabebfb5", "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)."
] | [
108,
105
] | [
null,
null
] | [
5,
12
] | [
24,
114
] | |
2024-11-18T20:51:32.310445+00:00 | 1,511,226,999,000 | 198d99946bfda640d68c7031848ee89ed29a4bbe | 3 | {
"blob_id": "198d99946bfda640d68c7031848ee89ed29a4bbe",
"branch_name": "refs/heads/master",
"committer_date": 1511226999000,
"content_id": "6e6185e1bf847551be82cf2093daee69deaa1640",
"detected_licenses": [
"MIT"
],
"directory_id": "11affa82c386ca11f8f30a631df1d5944cf6f346",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import ssl, socket
import pprint
import argparse
from datetime import datetime
URLS_TO_CHECK = []
# parse the arguments
parser = argparse.ArgumentParser()
parser.add_argument('-d', action="store_true", default=False, dest="discover", help="Zabbix discover mode.")
parser.... | 57 | 21.93 | 108 | 12 | 342 | python | [{"finding_id": "codeql_py/insecure-protocol_75402d99112055b8_956fed94", "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)."
] | [
40
] | [
null
] | [
7
] | [
10
] | |
2024-11-18T20:51:46.083387+00:00 | 1,523,411,708,000 | 7001ec9d156efe0545f0f56cd1e16ca1f4ed2ed3 | 2 | {
"blob_id": "7001ec9d156efe0545f0f56cd1e16ca1f4ed2ed3",
"branch_name": "refs/heads/master",
"committer_date": 1523411708000,
"content_id": "5ef4c1dd74da1024a805755d2a30403ea2669d3d",
"detected_licenses": [
"MIT"
],
"directory_id": "6c9b741e72c9dd51f21017e2c2ecffc54f5108ec",
"extension": "py",
"fi... | 2.328125 | stackv2 | from pyramid.response import Response
from pyramid.view import view_config
from ..sample_data import MOCK_DATA
from sqlalchemy.exc import DBAPIError
from pyramid.httpexceptions import HTTPFound, HTTPNotFound, HTTPBadRequest
from pyramid.security import NO_PERMISSION_REQUIRED
from ..models import Stock
from . import DB_... | 65 | 32.43 | 106 | 17 | 473 | python | [{"finding_id": "codeql_py/partial-ssrf_a033e5367c067e04_91c78764", "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)."
] | [
33
] | [
null
] | [
20
] | [
78
] | |
2024-11-18T19:07:02.300621+00:00 | 1,623,596,016,000 | 51daa0feb84051dae32d37a25dfafa5b5dfa3ebc | 3 | {
"blob_id": "51daa0feb84051dae32d37a25dfafa5b5dfa3ebc",
"branch_name": "refs/heads/main",
"committer_date": 1623596016000,
"content_id": "4784c40b48cc97f26912333e60fec1b969ae0b1e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4ae7328eede53b164383b50d1df1534b0c6dd678",
"extension": "py",
... | 3 | stackv2 | import pdb
import hashlib
import datetime
from bson.timestamp import Timestamp
def convert_to_SHA256(x):
"""Convert a given string to SHA256-encoded string.
:param x: arbitrary string.
:type x: str
:return: SHA256 encoded string
:rtype: str
"""
result = hashlib.sha256(x.encode())
resul... | 105 | 29.35 | 85 | 15 | 781 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e6999c1415ffee12_789cc93a", "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."
] | [
14
] | [
null
] | [
29
] | [
39
] | |
2024-11-18T19:07:05.228526+00:00 | 1,584,022,950,000 | e3c082e74a9328f35d465714bc15006f55fde5b7 | 2 | {
"blob_id": "e3c082e74a9328f35d465714bc15006f55fde5b7",
"branch_name": "refs/heads/master",
"committer_date": 1584022950000,
"content_id": "c47c15ab621e66019df852acbee2d4f47be9ce0c",
"detected_licenses": [
"MIT"
],
"directory_id": "5dbfcf4f1c49cd2dae5dcf872d72745721ea1ab2",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding:utf-8 -*-
from flask import current_app, render_template_string
import mimetypes, requests, os, json
mimetypes.init()
def guess_mimetype(name):
type_found = mimetypes.guess_type(name)
if type_found:
return type_found[0] # Best guess
return 'text/plain'
class Mailgun(object):
... | 162 | 31.91 | 104 | 19 | 1,175 | python | [{"finding_id": "codeql_py/request-without-cert-validation_cb1e75ced1027ffb_a8592341", "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)."
] | [
149
] | [
156
] | [
21
] | [
18
] | |
2024-11-18T19:07:10.576681+00:00 | 1,674,790,888,000 | e96dd0e41c2f5faa7bbc418fc720cecaeba59cc2 | 3 | {
"blob_id": "e96dd0e41c2f5faa7bbc418fc720cecaeba59cc2",
"branch_name": "refs/heads/master",
"committer_date": 1674790888000,
"content_id": "264419339fdf3807b5c7c0c84c8334c12ed272bd",
"detected_licenses": [
"MIT"
],
"directory_id": "c5e947afb0d5baf71be9a8c440a76069eed3c0f7",
"extension": "py",
"fi... | 2.6875 | stackv2 | import logging
import re
import sys
URL_PATTERN = re.compile(
r"https?:\/\/(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&\/=]*)"
)
NEWLINE_PATTERN = re.compile(r"\s*\n\s*")
SPACE_PATTERN = re.compile(r" +")
ID_TAG_PATTERN = re.compile(r"[@#][a-zA-Z가-힣_.]+")
SNS_PATTERN = r... | 64 | 33.09 | 112 | 15 | 644 | python | [{"finding_id": "codeql_py/overly-large-range_a73acd985b756b5c_fcea3c8d", "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\\\\[\\\\\\\\]^_`a-z{{|}}~\\u... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_`a-z{{|}}~\\u007f\\u0080...."
] | [
13
] | [
null
] | [
34
] | [
37
] | |
2024-11-18T19:18:52.185483+00:00 | 1,494,424,016,000 | 86115e2be3bdb5d32b4cfa657c234bb772003db8 | 3 | {
"blob_id": "86115e2be3bdb5d32b4cfa657c234bb772003db8",
"branch_name": "refs/heads/master",
"committer_date": 1494424016000,
"content_id": "e4cf1d3f4c6311202e6d30f5d78f2f66eeb96550",
"detected_licenses": [
"MIT"
],
"directory_id": "180b72be1770438751a26c0a4e28f3c9a54d2dca",
"extension": "py",
"fi... | 2.765625 | stackv2 | import sys
from daug.utils import transform_minibatch
from daug.utils import generate_transformations
import cv2
import numpy as np
from os import listdir, mkdir
from os.path import join, isdir, isfile
def load_cifar10():
import cPickle as pickle
import tarfile
path = join('cifar10', 'cifar-10-python.tar... | 126 | 32.23 | 77 | 14 | 1,229 | python | [{"finding_id": "codeql_py/tarslip_97048586cdb374de_9452d863", "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)."
] | [
19
] | [
null
] | [
9
] | [
10
] | |
2024-11-18T19:19:07.334674+00:00 | 1,581,865,153,000 | d3650cbc8cc554fa2c147e1395639589622cc97a | 3 | {
"blob_id": "d3650cbc8cc554fa2c147e1395639589622cc97a",
"branch_name": "refs/heads/master",
"committer_date": 1581865153000,
"content_id": "bdaea0fdd72a7025acbbf3158b241e88da4afa97",
"detected_licenses": [
"MIT"
],
"directory_id": "8ef89c329c8f86b65e1f1bfbb647b4e098fd1df0",
"extension": "py",
"fi... | 3.046875 | stackv2 | import sys
import yaml
import time
from jinja2 import Template
def print_items(items, print_template=None):
if print_template is None:
if len(items) == 0:
return
if type(items[0]) in [int, str]:
print("\n".join([str(job) for job in items]))
elif type(items[0]) == d... | 26 | 23.85 | 62 | 16 | 143 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b6a830f7fffb73c6_c86cf990", "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."
] | [
21
] | [
null
] | [
20
] | [
44
] | |
2024-11-18T19:19:15.247112+00:00 | 1,494,874,895,000 | 5ff829a85e6337cd1a7506526dc1db0da9c81b6a | 3 | {
"blob_id": "5ff829a85e6337cd1a7506526dc1db0da9c81b6a",
"branch_name": "refs/heads/master",
"committer_date": 1494875104000,
"content_id": "539d546c66a7192a7880bf96b152e7531c8d99c7",
"detected_licenses": [
"MIT"
],
"directory_id": "e0e7ad47d29c23099bd01e3fceb3d17b9d824e6a",
"extension": "py",
"fi... | 2.765625 | stackv2 | # -*- coding: utf-8 -*-
"""!weather <zip or place name> return the 5-day forecast"""
try:
from urllib import quote
except ImportError:
from urllib.request import quote
import os
import re
import requests
import time
import logging
from limbo.conf import goog_api_key, openweather_appid
LOG = logging.getLogger(... | 83 | 27.36 | 110 | 19 | 640 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c55b9cf3d7cb130a_efef98bc", "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."
] | [
48,
65
] | [
null,
null
] | [
26,
18
] | [
85,
26
] | |
2024-11-18T19:19:18.527622+00:00 | 1,341,897,409,000 | 757c81ca852df170b695f409d08f66e19cddf144 | 2 | {
"blob_id": "757c81ca852df170b695f409d08f66e19cddf144",
"branch_name": "refs/heads/master",
"committer_date": 1341897409000,
"content_id": "d52dd499851fc6537f0d2f26bb870c8910d390c9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "09c25595f44ba524af35f7b3fc745eae8cad9cbd",
"extension": "py"... | 2.40625 | stackv2 | '''
Created on Jan 20, 2011
@author: ashwin
Licensed to Ashwin Panchapakesan under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
Ashwin licenses this file to You under the Apache License, Version 2.0
(the "Lic... | 299 | 29.32 | 120 | 36 | 2,846 | python | [{"finding_id": "codeql_py/overly-large-range_fa0b7a3c3ae74e07_cf8805f3", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 3 | true | [
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"Suspicious character range that overlaps wi... | [
148,
152,
154
] | [
null,
null,
null
] | [
24,
23,
23
] | [
27,
26,
26
] | |
2024-11-18T19:29:43.254397+00:00 | 1,613,312,274,000 | 5e822b6269bec8a18c1dd89536975c930682f522 | 3 | {
"blob_id": "5e822b6269bec8a18c1dd89536975c930682f522",
"branch_name": "refs/heads/main",
"committer_date": 1613312274000,
"content_id": "916fded75666507c14b08d3be62253c873e7e385",
"detected_licenses": [
"MIT"
],
"directory_id": "134766a4e998d58e9315dfde1fb6427022764497",
"extension": "py",
"file... | 2.65625 | stackv2 | import os
from pathlib import Path
from flask import Flask
from osgeo import gdal
app = Flask(__name__)
root = Path(os.path.abspath(__file__)).parent
@app.route('/')
def hello_world():
return 'Hello, World!'
@app.route('/name/<path:filename>')
def file_name(filename):
srcfile = root / filename
return... | 34 | 18.71 | 60 | 11 | 175 | python | [{"finding_id": "codeql_py/reflective-xss_a5983ead9f064075_c58d8f53", "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)."
] | [
20,
30
] | [
null,
null
] | [
12,
12
] | [
24,
18
] | |
2024-11-18T19:29:53.411571+00:00 | 1,576,151,078,000 | 81297245ef578e072aed6fe1be21b5b0cd1f6257 | 2 | {
"blob_id": "81297245ef578e072aed6fe1be21b5b0cd1f6257",
"branch_name": "refs/heads/master",
"committer_date": 1576151078000,
"content_id": "3acf9fac2bc1d83bddba56723467b9b4f735cd09",
"detected_licenses": [
"MIT"
],
"directory_id": "b4ab554b502126aa57676e4f9e1eb8df7f2c846f",
"extension": "py",
"fi... | 2.421875 | stackv2 | """MIDDLEWARE"""
from functools import wraps
import json
import logging
from flask import request
from recentimagery.routes.api import error
def get_recent_params(func):
@wraps(func)
def wrapper(*args, **kwargs):
if request.method == 'GET':
lat = request.args.get('lat')
lon = r... | 82 | 34.65 | 105 | 17 | 705 | python | [{"finding_id": "codeql_py/log-injection_9e50b5f726445b82_3ac09520", "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)."
] | [
42
] | [
null
] | [
26
] | [
67
] | |
2024-11-18T19:44:34.454152+00:00 | 1,491,416,123,000 | af320daefc875c4728a71556eed5440cd21c38ba | 2 | {
"blob_id": "af320daefc875c4728a71556eed5440cd21c38ba",
"branch_name": "refs/heads/master",
"committer_date": 1491416123000,
"content_id": "95ca8e6d0fcb18efb67f1f92c46e3fd792d1cd56",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b30a8202a89914a5dc1dc6a9d19564d27df7bd5f",
"extension": "py"... | 2.5 | stackv2 | from flask_restful import abort, Resource
from datetime import datetime
DATABASE = {
'projects/0/datasets/4':{},
'projects/0/datasets/2':{},
'projects/2/datasets/4':{},
'projects/3/datasets/1':{}
}
def abort_if_link_doesnt_exist(id):
if id not in DATABASE:
abort(404)
import re
def get_list(filter):
... | 55 | 28.49 | 93 | 14 | 468 | python | [{"finding_id": "codeql_py/regex-injection_d1494bc05bcf5c78_1a71a759", "tool_name": "codeql", "rule_id": "py/regex-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This regular expression depends on a [user-provided value](1) and is executed by [re.match](2).\nThis reg... | 1 | true | [
"CWE-730"
] | [
"py/regex-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression depends on a [user-provided value](1) and is executed by [re.match](2).\nThis regular expression depends on a [user-provided value](3) and is executed by [re.match](2).\nThis regular expression depends on a [user-provided value](4) and is executed by [re.match](2).\nThis regular expression ... | [
19
] | [
null
] | [
24
] | [
45
] | |
2024-11-18T19:58:13.543066+00:00 | 1,615,475,013,000 | 4b2b19780c8b6435e917bdaae7d56c1996e8623c | 3 | {
"blob_id": "4b2b19780c8b6435e917bdaae7d56c1996e8623c",
"branch_name": "refs/heads/master",
"committer_date": 1615475013000,
"content_id": "e15045100d096ca5cb809e9331da3b792f6d690f",
"detected_licenses": [
"MIT"
],
"directory_id": "58510107244391646bda9443fa03f34a7f189d41",
"extension": "py",
"fi... | 2.53125 | stackv2 | from typing import Optional
from pydantic import BaseSettings, Field
class Settings(BaseSettings):
ENVIRONMENT: str = Field(None, env="ENVIRONMENT") # por default, 'env' is a environment var
VAR: Optional[str]
JWT_SECRET: Optional[str]
class Config:
env_file: str = "../config.env"
class D... | 36 | 18.58 | 96 | 10 | 162 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1d4c8a3dd34682fa_4808f1dd", "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."
] | [
36
] | [
null
] | [
7
] | [
24
] | |
2024-11-18T20:10:26.425570+00:00 | 1,628,891,253,000 | 83f9e4f4c00f809ec18fc56dc0a742a529271a33 | 3 | {
"blob_id": "83f9e4f4c00f809ec18fc56dc0a742a529271a33",
"branch_name": "refs/heads/main",
"committer_date": 1628891253000,
"content_id": "de86e159da71c00742bdcbb390e98ae81a11639f",
"detected_licenses": [
"MIT"
],
"directory_id": "e8243e7fd057d542a82c4bdad3ee0f5f557c34b0",
"extension": "py",
"file... | 2.859375 | stackv2 | """
Spirent Network Emulator ReST Client
This module is Python ReST client for SNE ReST API
"""
__Version_ = '0.2'
__Author__ = 'Poornima Wari'
('\n'
' ----------------------\n'
' Modification History\n'
' --------------------\n'
' 0.2 : 8/12/2021 Poornima Wari\n'
' - updated error... | 368 | 36.36 | 120 | 21 | 2,998 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8c21dff64b49bcf9_b5cf9493", "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."
] | [
201
] | [
null
] | [
22
] | [
112
] | |
2024-11-18T20:10:28.427375+00:00 | 1,588,807,569,000 | 4b86c6abd4cba461666fe5133c69911575d308f3 | 3 | {
"blob_id": "4b86c6abd4cba461666fe5133c69911575d308f3",
"branch_name": "refs/heads/master",
"committer_date": 1588807569000,
"content_id": "73c00021ff9eb5e1d9bc97da7e89ca5d2959de11",
"detected_licenses": [
"MIT"
],
"directory_id": "653855ce321dd6c388b4357ad23156a102308670",
"extension": "py",
"fi... | 3.046875 | stackv2 | #!/usr/bin/env python
import hashlib
import urllib2
import ssl
import re
def mac(username, key):
msg = "{}{}".format(username, key)
sha1 = hashlib.sha1()
sha1.update(msg)
return sha1.hexdigest()
if __name__ == "__main__":
username = "12345678901234567890"
key = ""
for i in range(1, 21):
tmp_userna... | 31 | 26.71 | 82 | 15 | 270 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_36689fdd0c73cae5_bbeb03ce", "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.\... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"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.\n[Sensitive data (id)](3) is used in a hashing algorithm (SHA1) that is insecure."
] | [
11
] | [
null
] | [
15
] | [
18
] | |
2024-11-18T20:10:31.387135+00:00 | 1,589,352,376,000 | b40e84aea4aca6fd5a59c288f2b849e9fde2ad18 | 2 | {
"blob_id": "b40e84aea4aca6fd5a59c288f2b849e9fde2ad18",
"branch_name": "refs/heads/master",
"committer_date": 1589352376000,
"content_id": "ba5159afcb7e002a299b967e48270da501780f75",
"detected_licenses": [
"MIT"
],
"directory_id": "c60f17b77004b71f4358f582f88e6813a0694040",
"extension": "py",
"fi... | 2.5 | stackv2 | import datetime
import sqlalchemy
import hashlib
from typing import Iterable, Optional
from .db_session import SqlAlchemyBase, create_session
from src.misc_funcs import generate_random_string
from sqlalchemy import orm, select
from flask_login import UserMixin
from sqlalchemy_serializer import SerializerMixin
assoc... | 365 | 40.53 | 128 | 22 | 2,659 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_db882d3e0cee72dd_4df5580b", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
102
] | [
null
] | [
53
] | [
85
] | |
2024-11-18T20:49:15.100394+00:00 | 1,599,412,900,000 | d69d2194413060fefd465029a372d79d11bd6a9d | 3 | {
"blob_id": "d69d2194413060fefd465029a372d79d11bd6a9d",
"branch_name": "refs/heads/master",
"committer_date": 1599412900000,
"content_id": "f7d04c7621c1e797dc006de32b89782d9a3854b8",
"detected_licenses": [
"MIT"
],
"directory_id": "6e8d639d433a58e6afcc1114891c5c42a874c9bf",
"extension": "py",
"fi... | 3.3125 | stackv2 | """ This file contains logic for creating files """
from flask import Response
from jinja2 import Template
import json
import csv
from io import StringIO
from application.utils import create_file_response
class FileCreator:
""" Used to create a file with provided data
Attributes:
... | 125 | 23.43 | 124 | 18 | 584 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_692c0cb574cace7a_c0e5e8f8", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
60
] | [
72
] | [
20
] | [
17
] | |
2024-11-18T20:49:17.003766+00:00 | 1,639,562,473,000 | 8b89f0a8a141da150303a33896d9d26831d257e0 | 3 | {
"blob_id": "8b89f0a8a141da150303a33896d9d26831d257e0",
"branch_name": "refs/heads/master",
"committer_date": 1639562473000,
"content_id": "d6aa7b6d28a444053f75e4ff26036ad80e60e577",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f9d5d1d2ae0f586c6e3a2cd786f1b502936e0957",
"extension": "py"... | 3.09375 | stackv2 | import tarfile
import argparse
import os
"""make_tarfile
Compress all files under src_dir into one tarfile output_tar
Params:
output_tar: target tar file, e.g., test.tar.gz
src_dir: file dir to compress
"""
def make_tarfile(output_tar, src_dir):
print(output_tar)
print(src_dir)
with tar... | 117 | 26.98 | 110 | 17 | 828 | python | [{"finding_id": "codeql_py/tarslip_9c649b880ccdea03_18a26d37", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
30,
86
] | [
null,
null
] | [
9,
13
] | [
12,
16
] | |
2024-11-18T20:49:33.928590+00:00 | 1,377,637,787,000 | 78a746e14b996480beab800ea7a3681999c5a6f7 | 3 | {
"blob_id": "78a746e14b996480beab800ea7a3681999c5a6f7",
"branch_name": "refs/heads/master",
"committer_date": 1377637787000,
"content_id": "a8efb7dc275801edc7e0e390616a2f1d0ca65ba3",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "ea24e0ec27640a6dc7e322c45cb31ee1765dac6c",
"extension": "p... | 2.578125 | stackv2 | from flask import Flask, jsonify, render_template, request
import json
import os
import tempfile
app = Flask(__name__)
from git_subprocess import Repository
repo_path = '/tmp/test/'
# Set up a git repository for a storage backend
repo = Repository(repo_path or tempfile.mkdtemp())
repo.init()
# Homepage - just rend... | 77 | 23.34 | 70 | 17 | 444 | python | [{"finding_id": "codeql_py/flask-debug_a6ff1802b0ee6c6d_f5936b28", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 4 | true | [
"CWE-215",
"CWE-079",
"CWE-022",
"CWE-022"
] | [
"py/flask-debug",
"py/reflective-xss",
"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.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
75,
62,
52,
68
] | [
null,
null,
null,
null
] | [
5,
12,
15,
37
] | [
35,
48,
23,
63
] | |
2024-11-18T20:49:37.184160+00:00 | 1,663,051,309,000 | 9c20dda67c5d9db243bdb72d1b347e231a23e1b7 | 2 | {
"blob_id": "9c20dda67c5d9db243bdb72d1b347e231a23e1b7",
"branch_name": "refs/heads/master",
"committer_date": 1663051309000,
"content_id": "60b488071b0006ee512463e423f240f903a834d9",
"detected_licenses": [
"MIT"
],
"directory_id": "7eecac93e2fa04537f4348bdf172d9beb127427a",
"extension": "py",
"fi... | 2.34375 | stackv2 | from PIL import Image
import socket
import os
from flask import Flask, render_template, request, session, flash
from pre import pre_process_me
from datetime import timedelta
from model_predict import predict_me
app = Flask(__name__)
app.secret_key = b'some_secret'
UPLOAD_FOLDER = os.path.basename('uploads')
app.config[... | 111 | 26.18 | 101 | 16 | 732 | python | [{"finding_id": "codeql_py/path-injection_f6dad33564e5cf94_057376b6", "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", ... | 4 | true | [
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
81,
88,
98,
105
] | [
null,
null,
null,
null
] | [
15,
19,
15,
19
] | [
16,
20,
16,
20
] | |
2024-11-18T20:49:39.763409+00:00 | 1,632,226,764,000 | 62e8480a3b6708301b2c227ec5bfc56198beefd2 | 4 | {
"blob_id": "62e8480a3b6708301b2c227ec5bfc56198beefd2",
"branch_name": "refs/heads/main",
"committer_date": 1632226764000,
"content_id": "898fa894dc8ad9179f3b70eeab4a184b8e80472c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a0e1d6587370d87d0e57ce23ba75d883502af5b5",
"extension": "py",
... | 3.625 | stackv2 | employees = {
'Alice': 100000,
'Bob': 98000,
'Cena': 127000,
'Dwayne': 158000,
'Frank': 88000
}
# find the top earner (every one with salary greater than or equal to 1 lakh)
top_earners = []
for name,salary in employees.items():
if salary >= 100000:
top_earners.append((name,salary))
p... | 21 | 19.9 | 77 | 10 | 165 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1999f36ceac4b07f_598211a2", "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."
] | [
16,
21
] | [
null,
null
] | [
7,
7
] | [
18,
18
] | |
2024-11-18T20:50:09.151278+00:00 | 1,598,491,863,000 | daacfaa798db538bf8bfff5d5040c1d25dfeaa8d | 3 | {
"blob_id": "daacfaa798db538bf8bfff5d5040c1d25dfeaa8d",
"branch_name": "refs/heads/master",
"committer_date": 1598491863000,
"content_id": "a3d68ccabdd088203e04e3365f3fb7e599356f26",
"detected_licenses": [
"MIT"
],
"directory_id": "b9c8e8d1ba5e3eb6d83f859055307ffb61f11be3",
"extension": "py",
"fi... | 2.625 | stackv2 | # !/usr/bin/env python3
# encoding: utf-8
# author: niko.zhang
# py_ver: py3
"""
调用企业微信消息接口发送消息
可以指定某个用户、某个部门或者某个标签内的所有人员
初始化对象需要输入企业ID,应用Secret和AgentId
密钥需要现在企业微信后台建立应用后才能获取
该代码需要在python3下的环境执行,不然会报消息类型错误
UPDATE: 20200812
"""
import os
import json
import requests
import logging
from logging import handlers
import pl... | 240 | 34.99 | 119 | 17 | 1,959 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_5b162911321d759a_29dadf8a", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text."
] | [
93
] | [
null
] | [
28
] | [
60
] | |
2024-11-18T20:50:09.752004+00:00 | 1,632,405,859,000 | 826194d1ad8673b41b5b9397eddd272484be60a7 | 4 | {
"blob_id": "826194d1ad8673b41b5b9397eddd272484be60a7",
"branch_name": "refs/heads/main",
"committer_date": 1632405859000,
"content_id": "103f87b7686fc7adba66521ac14db09a56f40158",
"detected_licenses": [
"MIT"
],
"directory_id": "52b2e49773020ba6ff1581ab00aa0136a0ecda89",
"extension": "py",
"file... | 3.734375 | stackv2 | # Name - Ojasva Singh
# Roll No - 2020318
'''
- This is the skeleton code, wherein you have to write the logic for each of the
functions defined below.
- DO NOT modify/delete the given functions.
- DO NOT import any python libraries. You may only import a2.py.
- Make sure to return value as specified in the functi... | 189 | 26.87 | 116 | 18 | 1,339 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7cb290ebcae4e95c_9f28adf6", "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."
] | [
85
] | [
null
] | [
15
] | [
61
] | |
2024-11-18T20:50:16.543890+00:00 | 1,636,794,572,000 | d879ae4b90b188c96573fd4d59cc45cdb038a557 | 2 | {
"blob_id": "d879ae4b90b188c96573fd4d59cc45cdb038a557",
"branch_name": "refs/heads/main",
"committer_date": 1636803814000,
"content_id": "0f4df44a3722370c6a961f40a183942aad280ab6",
"detected_licenses": [
"MIT"
],
"directory_id": "bfcbbf45b7ceb9f98b009e34857ab689a92a1a7f",
"extension": "py",
"file... | 2.4375 | stackv2 | import json
import logging
import os
import boto3
import psycopg2
def handler(event, context):
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
logger.setLevel(logging.INFO)
master_arn = os.getenv('SECRETS_RDS_MASTER_ARN')
user_arn = os.getenv('SECRETS_RDS_USER_A... | 60 | 33.15 | 89 | 13 | 503 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_37fa56242f869c84_aa5282ef", "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... | 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 (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
40,
43,
52,
60
] | [
null,
null,
null,
null
] | [
21,
17,
17,
17
] | [
59,
55,
67,
65
] | |
2024-11-18T20:50:17.453561+00:00 | 1,693,275,722,000 | 5707de3c6185619db572e9b89595f3f1286b54be | 3 | {
"blob_id": "5707de3c6185619db572e9b89595f3f1286b54be",
"branch_name": "refs/heads/master",
"committer_date": 1693275722000,
"content_id": "c60743eed7140807e9d7093112ab50e9bd8dc014",
"detected_licenses": [
"MIT"
],
"directory_id": "6d326bf37d99f4a2f089429769e41f4b16ee1a90",
"extension": "py",
"fi... | 2.765625 | stackv2 | import os
import pathlib
import hashlib
import xml.etree.cElementTree as ET
from getpass import getpass
from typing import List, Optional
from xml.etree.ElementTree import Element as XMLElement
from .log import logger
from .utils import AutoRepr
from .keepass_wrapper import KeepassWrapper
class Credential(AutoRepr)... | 164 | 34.38 | 116 | 23 | 1,244 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_a3d5f156277c7af7_02747fd5", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
57
] | [
58
] | [
34
] | [
33
] | |
2024-11-18T20:50:17.646712+00:00 | 1,450,730,918,000 | 53afe3cda2f076bedcf00b29ed38a388b6b3ea00 | 3 | {
"blob_id": "53afe3cda2f076bedcf00b29ed38a388b6b3ea00",
"branch_name": "refs/heads/master",
"committer_date": 1450730918000,
"content_id": "64ff04cc69a7795d18fdae0d5ccad0052ad1e4cb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1d6636cffa027bdc9e350ca639c440344ac0cd15",
"extension": "py"... | 2.90625 | stackv2 | # import the requests library so we can use it to make REST calls
import requests, json
# disable warnings about using certificate verification
requests.packages.urllib3.disable_warnings()
# the main function
def main(person_id, person_email, room_id, text):
# define a variable for the hostname of Spark
hostn... | 37 | 31.7 | 94 | 10 | 273 | python | [{"finding_id": "codeql_py/request-without-cert-validation_5c236d75ace5de02_bfe9464c", "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)."
] | [
31
] | [
null
] | [
20
] | [
95
] | |
2024-11-18T20:50:28.838270+00:00 | 1,641,986,743,000 | 9fb3797570315f15374652409d8b3063e167ac81 | 3 | {
"blob_id": "9fb3797570315f15374652409d8b3063e167ac81",
"branch_name": "refs/heads/master",
"committer_date": 1641986743000,
"content_id": "b34999c45cc54caadfc48f7c205a2e4a37d19f86",
"detected_licenses": [
"MIT"
],
"directory_id": "638106685218fe56d9320aaea13652b32bf20026",
"extension": "py",
"fi... | 2.96875 | stackv2 | # -*- coding:utf-8 -*-
"""
This module is used to generate README file content list
"""
import os
import re
_relative_path = "./Algorithm"
_README_TEMPLE = """
# LeetCode Solution
[Leetcode](https://leetcode-cn.com/problemset/all/) algorithm or database problemset.
Problem | Solution | Level
:---|:---:|:--:
%s
"""... | 52 | 30.87 | 169 | 17 | 462 | python | [{"finding_id": "codeql_py/overly-large-range_32606b7d09f0aae3_52e2a2d9", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and overlaps with A-Z in ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with 0-9 in the same character class, and overlaps with A-Z in the same character class, and overlaps with a-z in the same character class."
] | [
24
] | [
null
] | [
161
] | [
164
] | |
2024-11-18T20:50:31.524900+00:00 | 1,506,097,796,000 | 7665e79354d06b5f081cdaa54e48ff80f5ecc89f | 3 | {
"blob_id": "7665e79354d06b5f081cdaa54e48ff80f5ecc89f",
"branch_name": "refs/heads/master",
"committer_date": 1506097796000,
"content_id": "f25528bbcaed2948d39090d88b24da020f42e364",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d9b5b58245be95d972b7af11977e6a53cb4014a6",
"extension": "py"... | 2.828125 | stackv2 | #!/usr/bin/env python
# coding=utf-8
import threading
import paramiko
import subprocess
def ssh_command(ip, user, passwd, command, port=22):
client = paramiko.SSHClient()
# paramiko支持用密钥认证代,实际环境推荐使用密钥认证,这里设置账号和密码认证
# client.load_host_keys('/home/justin/.ssh/known_hosts')
# 设置自动添加和保存目标SSH服务器的SSH密钥
... | 33 | 31.24 | 73 | 16 | 319 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_4ecd665b2925027e_fec74145", "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."
] | [
15
] | [
null
] | [
5
] | [
65
] | |
2024-11-18T20:50:34.297220+00:00 | 1,522,982,392,000 | eab48982b096a34d11660514539e0012812e5a75 | 2 | {
"blob_id": "eab48982b096a34d11660514539e0012812e5a75",
"branch_name": "refs/heads/master",
"committer_date": 1522982392000,
"content_id": "1d2b0f628e79e2d18ec7f430ec2b520aa53465cf",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8ddbc257c7a1ca9582030bc7b6cbd76f9076b332",
"extension": "py"... | 2.359375 | stackv2 | import sys
import application
import json
from jinja2 import Template, Environment, FileSystemLoader
import os
PROJECT_NAME = ""
def render(tpl_path, context):
path, filename = os.path.split(tpl_path)
return Environment(
loader=FileSystemLoader(path or './')
).get_template(filename).render(context... | 77 | 33.51 | 118 | 16 | 571 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_8dbac8e40a7947da_dbc964ee", "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."
] | [
11
] | [
13
] | [
12
] | [
6
] | |
2024-11-18T20:50:50.552935+00:00 | 1,619,837,739,000 | 13b8bfade7d64a0d2da7a058dbfd0aba9b487341 | 3 | {
"blob_id": "13b8bfade7d64a0d2da7a058dbfd0aba9b487341",
"branch_name": "refs/heads/main",
"committer_date": 1619837739000,
"content_id": "28f1b3c3a27d78bfd489ec395c1c230d13458473",
"detected_licenses": [
"MIT"
],
"directory_id": "3ae9f97f677c43bd457924530b9fde64949105f9",
"extension": "py",
"file... | 2.75 | stackv2 | # LOGIN AND DATABASE ACCESS.
from flask import request, render_template, session, url_for, redirect, flash, Blueprint
from datetime import timedelta
# Create a blueprint.
log = Blueprint("log", __name__, static_folder="static",
template_folder="templates")
# Store session.
# session.permanent = True... | 70 | 30.16 | 88 | 16 | 478 | python | [{"finding_id": "codeql_py/url-redirection_d653bde2fb3cc69f_65b5ede8", "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)."
] | [
40
] | [
null
] | [
29
] | [
45
] | |
2024-11-18T20:50:55.244914+00:00 | 1,550,153,196,000 | 3fe30874aa2a0a63a606b1923df1c7bf39a8d650 | 3 | {
"blob_id": "3fe30874aa2a0a63a606b1923df1c7bf39a8d650",
"branch_name": "refs/heads/master",
"committer_date": 1550153196000,
"content_id": "227bb322450625e3470187cdc90f0ce89a126de3",
"detected_licenses": [
"Apache-2.0",
"MIT"
],
"directory_id": "ede3ecc0f427fb63c3baf66aef86c9566392fafe",
"exten... | 2.515625 | stackv2 | from flask import Flask
import pytest
import os
import importlib
import sys
MODULE_NAMES = ['numpy', 'scipy', 'sklearn', 'pandas']
modules = {}
for m in MODULE_NAMES:
try:
modules[m] = importlib.import_module(m)
except ImportError:
modules[m] = None
app = Flask(__name__)
@app.route('/<modul... | 68 | 29.56 | 94 | 16 | 514 | python | [{"finding_id": "codeql_py/flask-debug_745ccfefb390c020_d547217d", "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)."
] | [
68,
34,
40
] | [
null,
null,
null
] | [
5,
12,
12
] | [
51,
25,
24
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.