added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T20:15:51.906893+00:00 | 1,512,380,055,000 | f00911b3361346a06ce3cc80e064aa7c2e252ec1 | 3 | {
"blob_id": "f00911b3361346a06ce3cc80e064aa7c2e252ec1",
"branch_name": "refs/heads/master",
"committer_date": 1512380143000,
"content_id": "f3b2a12e29ce46e79e31208f85f81980bf10e684",
"detected_licenses": [
"MIT"
],
"directory_id": "bdfef377b6a7e27668ffb8d53671f7657bd6ace8",
"extension": "py",
"fi... | 2.75 | stackv2 | from flask import request, flash, redirect
from werkzeug.utils import secure_filename
import os
# Utility files are silly. Develop this with caution
def upload_file(app, request_file, allowed_types=None):
# if user does not select file, browser also
# submit a empty part without filename
file_name = None
... | 23 | 37.52 | 79 | 13 | 181 | python | [{"finding_id": "codeql_py/url-redirection_a8d4d96257df3269_9189d131", "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)."
] | [
14
] | [
null
] | [
25
] | [
36
] | |
2024-11-18T20:15:55.077233+00:00 | 1,528,387,580,000 | 36cea824ee6a981d391c6cf3a546c7c57d2ab7ef | 3 | {
"blob_id": "36cea824ee6a981d391c6cf3a546c7c57d2ab7ef",
"branch_name": "refs/heads/master",
"committer_date": 1528387580000,
"content_id": "3a710e00d504cdf5df17f7f5bd4ca2e2b4f1d8e9",
"detected_licenses": [
"MIT"
],
"directory_id": "025b4839292d66123c9e5802a9005381734d73d0",
"extension": "py",
"fi... | 2.984375 | stackv2 | #!/usr/bin/python
# vim : set fileencoding=utf-8 :
#
# mergeSegToCtm.py
#
# Enhance the CTM file by adding extra fields with the diarisation
# information
#
# First argument is the seg file
# Second argument is the ctm file
#
import sys, codecs, argparse, json, re
def seg_ctm_to_txt(seg_file, ctm_file, out_file = No... | 120 | 30.2 | 136 | 22 | 842 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5cb23614009c5e4c_4bcf0842", "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."
] | [
79
] | [
null
] | [
27
] | [
55
] | |
2024-11-18T20:15:59.979127+00:00 | 1,454,903,117,000 | 381adbccd757e7cb01541fdfba1b35854b424b36 | 2 | {
"blob_id": "381adbccd757e7cb01541fdfba1b35854b424b36",
"branch_name": "refs/heads/master",
"committer_date": 1454903117000,
"content_id": "f00d5c5faaf23fdd31e85ccbb2e85632fbb9e23c",
"detected_licenses": [
"MIT"
],
"directory_id": "af906ac785573a9362980bab633ba29fb479abc2",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/python
import os
import pprint
import logging
import dropbox
import plistlib
from jinja2 import Template, Environment, FileSystemLoader
class JournalWriter:
"""
Converts Dropbox entry into journal entry file
"""
log = logging.getLogger('lately.journal')
yamldivide = "---"
def __init__(self, ... | 182 | 27.03 | 98 | 16 | 1,304 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2bd70ae50375fef0_16245dac", "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."
] | [
137
] | [
140
] | [
28
] | [
25
] | |
2024-11-18T20:16:00.749030+00:00 | 1,686,085,704,000 | 3dd2592e5aac43bcdf97264c8305dd906dd8a95d | 2 | {
"blob_id": "3dd2592e5aac43bcdf97264c8305dd906dd8a95d",
"branch_name": "refs/heads/main",
"committer_date": 1686088258000,
"content_id": "d06ee9f8c8d256576531372cfef6c36e1789886a",
"detected_licenses": [
"MIT"
],
"directory_id": "723c96ca83e8a84bf7c6c1ef3351a188bc0a77cb",
"extension": "py",
"file... | 2.40625 | stackv2 | #!/usr/bin/env python
# * coding: utf8 *
'''
LocatorPallet.py
A module that contains a pallet definition for data to support the web api locator services and
methods to keep them current.
Pre-requisites
- The `secrets.py` file has been populated from the template file
- The locators in `self.services` have bee... | 367 | 39.94 | 164 | 21 | 3,255 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ae328320e8deed99_71d2fac0", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secre... | [
79,
174,
174
] | [
null,
null,
null
] | [
45,
44,
65
] | [
57,
63,
74
] | |
2024-11-18T19:23:05.348345+00:00 | 1,623,648,313,000 | 26ab28d3922154d97ff005911440a7f1d345a8a4 | 3 | {
"blob_id": "26ab28d3922154d97ff005911440a7f1d345a8a4",
"branch_name": "refs/heads/master",
"committer_date": 1623648313000,
"content_id": "a2b6ffe9132bb80059fb521ba5f6271c6d3b3bfb",
"detected_licenses": [
"MIT"
],
"directory_id": "e64934bc6ffea1b28828ede22ec065eb4c29f11a",
"extension": "py",
"fi... | 2.5625 | stackv2 | import csv
import time
import click
import pandas as pd
from jinja2 import Template
from slack_sdk.errors import SlackApiError
from .utils import die, load_csv
from .client import client, list_channels
def create_or_update_channel(channels, channel_name, topic=None, purpose=None, dry_run=False, is_private=False, jo... | 172 | 32.63 | 123 | 19 | 1,436 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4457018cb3638873_286c1db6", "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."
] | [
114
] | [
null
] | [
14
] | [
44
] | |
2024-11-18T19:23:07.066983+00:00 | 1,504,270,299,000 | 57dbc8d4ff8b6ace12bc281f9ecd15222edf4621 | 3 | {
"blob_id": "57dbc8d4ff8b6ace12bc281f9ecd15222edf4621",
"branch_name": "refs/heads/master",
"committer_date": 1504270299000,
"content_id": "c3da5f3bc7659c3ee8ba2113cf5a3e577ae9b099",
"detected_licenses": [
"MIT"
],
"directory_id": "80b6fc399eb57a61f6be818e8ad9cb854b33edc4",
"extension": "py",
"fi... | 2.625 | stackv2 | '''
Station_map.py a initially written by Kiaran (kg382) and adapted by Simon (sdat2) produced to make a nice GMT map
Creates a file containing three columns: The name of the station, station lat, station lon'
Runs through the first signal in each station and takes the lat, lon of the station.
-------------------------... | 189 | 39.32 | 173 | 20 | 1,838 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_9064c2366f170e7f_8091b478", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text.",
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
163,
188
] | [
null,
null
] | [
21,
36
] | [
31,
44
] | |
2024-11-18T19:38:12.772265+00:00 | 1,593,452,640,000 | 488c43f8e584ff92b0f30c5d5257ecd0fff47767 | 3 | {
"blob_id": "488c43f8e584ff92b0f30c5d5257ecd0fff47767",
"branch_name": "refs/heads/master",
"committer_date": 1593452640000,
"content_id": "8069d267da690903a0044b2fa5494012fa0ac2ed",
"detected_licenses": [
"MIT"
],
"directory_id": "6ad9b9ff626eb6dcdcedfe0e4aa112d0cf813ea8",
"extension": "py",
"fi... | 2.859375 | stackv2 | """
Miscellaneous utility functions.
"""
__author__ = "Steven Kearnes"
__copyright__ = "Copyright 2014, Stanford University"
__license__ = "BSD 3-clause"
import gzip
import numpy as np
import os
import pandas as pd
import sys
import tempfile
import tarfile
import zipfile
try:
from urllib.request import urlretrieve... | 225 | 22.87 | 93 | 16 | 1,382 | python | [{"finding_id": "codeql_py/tarslip_443c70c784b80c70_6991c20b", "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)."
] | [
172
] | [
null
] | [
3
] | [
6
] | |
2024-11-18T20:10:44.296631+00:00 | 1,605,665,425,000 | 945efbe53955606c4ef3db4f88996bc3f1bfc0b2 | 2 | {
"blob_id": "945efbe53955606c4ef3db4f88996bc3f1bfc0b2",
"branch_name": "refs/heads/main",
"committer_date": 1605665425000,
"content_id": "6ea58cfb5bdc029837e6ec874972744dbc933cc7",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "d44ac8b4298f23c2e51f25e6a6bcdbe867848c2d",
"extension": "py",
"... | 2.46875 | stackv2 | import os
from dotenv import load_dotenv, find_dotenv # pip install -U python-dotenv
try:
load_dotenv(find_dotenv(raise_error_if_not_found=True))
SECRET_KEY = os.environ.get("SECRET_KEY")
DATABASE_MYSQ_HOST = os.environ.get("DATABASE_MYSQ_HOST")
DATABASE_MYSQL_USER = os.environ.get("DATABASE_MYSQL_USE... | 18 | 38.61 | 75 | 10 | 172 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6f9fa55bf238a15a_d0a3d9cf", "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."
] | [
18
] | [
null
] | [
11
] | [
58
] | |
2024-11-18T20:10:47.017316+00:00 | 1,537,389,791,000 | 9d3f1c35103711d9858eceaf6fe06439b11f123a | 2 | {
"blob_id": "9d3f1c35103711d9858eceaf6fe06439b11f123a",
"branch_name": "refs/heads/master",
"committer_date": 1537389791000,
"content_id": "44eb400bf8b3a352d3b61efd4f4fe8f58d04ce30",
"detected_licenses": [
"MIT"
],
"directory_id": "dccfb6e58b28141d1a5e8a28a50449bf32d0db62",
"extension": "py",
"fi... | 2.390625 | stackv2 | from flask import Flask
from flask import request
from flask import Response
import os
import socket
import json
app = Flask(__name__)
configuration = {}
@app.route("/")
def home():
return '/ on host: {host}'.format(host=socket.gethostname())
@app.route("/hello")
def hello():
global configuration
return... | 36 | 24.39 | 100 | 14 | 214 | python | [{"finding_id": "codeql_py/reflective-xss_bfbceeb9b2b569aa_ca57c0ea", "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)."
] | [
19,
33
] | [
null,
null
] | [
12,
12
] | [
101,
37
] | |
2024-11-18T20:10:58.522267+00:00 | 1,656,701,251,000 | 97224a51bcf60660df42b3c26877322e18a82dc1 | 3 | {
"blob_id": "97224a51bcf60660df42b3c26877322e18a82dc1",
"branch_name": "refs/heads/master",
"committer_date": 1656701251000,
"content_id": "860fa099cc514bfa78f72406e2e23bec37462938",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cf90040cc14a32f1f96bc41473c4d98982f24917",
"extension": "py"... | 2.96875 | stackv2 | import re
import glob
import sys
import os
from openpyxl import Workbook
from pprint import pprint
re_key = re.compile(r'(\S*)\s*=\s*\{\s*Name\s*=\s*(\S*)\s*\n')
re_parameter = re.compile(r'(\{(?:\s*.* = .*\s*\n)*\})')
re_key_value_parameter = re.compile(r'\s*(?P<key>\S*) = (?P<value>\S*)( .*)?\s*\n')
def parse_mtl(... | 167 | 36.2 | 131 | 21 | 1,443 | python | [{"finding_id": "codeql_py/redos_08a0ce1cc1b553de_5c66ac5d", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '{{' and containing many repetitio... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '{{' and containing many repetitions of ' = = \\n'.",
"This part of the regular expression may cause exponential backtracking on strings starting with '{{ = ' and containing many repetitions of '\\n\\n = '."
] | [
9,
9
] | [
null,
null
] | [
38,
45
] | [
40,
48
] | |
2024-11-18T20:11:05.466960+00:00 | 1,560,859,162,000 | b469afc9dc844cfa5f0b3a89c46e285def4242a4 | 3 | {
"blob_id": "b469afc9dc844cfa5f0b3a89c46e285def4242a4",
"branch_name": "refs/heads/master",
"committer_date": 1560859162000,
"content_id": "5bd74a23bf0cf814b1900e2cb88bcb61c5f1f1e8",
"detected_licenses": [
"MIT"
],
"directory_id": "b1d757d679f092c57da69233890624253e5c4bf0",
"extension": "py",
"fi... | 2.625 | stackv2 | """
Module contains functions related to SSH.
Most of this script is adapted from:
https://github.com/paramiko/paramiko/blob/master/demos/forward.py
"""
import os
import select
import socketserver
from paramiko import RSAKey, SSHClient, AutoAddPolicy
from paramiko.ssh_exception import SSHException
from bokchoi impor... | 114 | 31.39 | 89 | 15 | 732 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_76dee1b4031df5ef_6dfbcdc7", "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."
] | [
62
] | [
null
] | [
9
] | [
65
] | |
2024-11-18T20:26:00.516053+00:00 | 1,597,112,484,000 | 668e34b74aa4e8dbc179bd8b54fe9e51a368811c | 3 | {
"blob_id": "668e34b74aa4e8dbc179bd8b54fe9e51a368811c",
"branch_name": "refs/heads/master",
"committer_date": 1597112484000,
"content_id": "f89da88c7ebe4c445c50209d4727a13769a9f16d",
"detected_licenses": [
"MIT"
],
"directory_id": "caa690224de2f9ee246e938e46de14105ecda1f8",
"extension": "py",
"fi... | 2.578125 | stackv2 | import db
from flask import Flask, render_template, request,redirect,url_for
app = Flask(__name__)
currentUserID=0
@app.route('/')
def home():
return render_template('index.html')
@app.route('/index')
def root():
return render_template('index.html')
#admin related routes
@app.route('/admin',methods=['GE... | 266 | 32.18 | 100 | 16 | 1,831 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_95c98426d2c635ab_b9d19c77", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-215"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/flask-debug"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
59,
62,
266
] | [
null,
null,
null
] | [
15,
15,
5
] | [
31,
23,
53
] | |
2024-11-18T20:26:03.214964+00:00 | 1,668,716,942,000 | fe4387f3915f36fc50fb92e52de0bacfb56f16ae | 2 | {
"blob_id": "fe4387f3915f36fc50fb92e52de0bacfb56f16ae",
"branch_name": "refs/heads/master",
"committer_date": 1668716942000,
"content_id": "31794181513c0ba33744f81f2fbe62037c5fd420",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c71b829956879975aa54ff4fb97b0d3aeca96222",
"extension": "py"... | 2.3125 | stackv2 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 67 | 43.43 | 75 | 19 | 633 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f4b300238e4632dd_9323db3f", "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)."
] | [
65
] | [
null
] | [
20
] | [
71
] | |
2024-11-18T20:26:04.440075+00:00 | 1,514,557,489,000 | 81a64fbebd58803b1138c6e21f1a645758d108b0 | 3 | {
"blob_id": "81a64fbebd58803b1138c6e21f1a645758d108b0",
"branch_name": "refs/heads/master",
"committer_date": 1514557489000,
"content_id": "93f6a5c6545b5d1e5a5db0bc0eada769273e7573",
"detected_licenses": [
"MIT"
],
"directory_id": "31b416cf4622b370b363508df1211870270f11e2",
"extension": "py",
"fi... | 2.765625 | stackv2 | """
Forwarder module
This is the Forwarder module of AlarmForwarder
:license: MIT, see LICENSE for more details
:copyright: (c) 2016 by NETHINKS GmbH, see AUTORS for more details
"""
import email
from email.mime.text import MIMEText
import json
import logging
import re
import smtplib
import sys
from collections impor... | 482 | 35.82 | 113 | 18 | 3,643 | python | [{"finding_id": "codeql_py/request-without-cert-validation_75607e8dd9b1816e_4e76566b", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
417,
467
] | [
418,
468
] | [
24,
24
] | [
51,
52
] | |
2024-11-18T20:26:11.861663+00:00 | 1,449,835,400,000 | 4eff61138aa2f42b0b8fc2cc41ac286e912825b6 | 2 | {
"blob_id": "4eff61138aa2f42b0b8fc2cc41ac286e912825b6",
"branch_name": "refs/heads/master",
"committer_date": 1449835400000,
"content_id": "ccd6ec3af876c78e49661c4b1d34b50087b57aad",
"detected_licenses": [
"MIT"
],
"directory_id": "98afb3284b84f617b524b6a5bab041cc4a3cff13",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python
import os
import json
import socket
import logging
from random import randint
from bottle import route, request, response, error, hook, default_app
from logentries import LogentriesHandler
from dicttoxml import dicttoxml
import pydenticon
def get_ipaddress():
"""Return the IP address of the ... | 172 | 28.34 | 86 | 19 | 1,169 | python | [{"finding_id": "codeql_py/reflective-xss_aae72aef5b69b754_676f99b3", "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... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
113,
143,
148
] | [
null,
null,
null
] | [
16,
16,
16
] | [
23,
35,
31
] | |
2024-11-18T20:26:39.771349+00:00 | 1,481,074,475,000 | 64a3f76e256641b6ff3f1819c61701e3b102a5b4 | 2 | {
"blob_id": "64a3f76e256641b6ff3f1819c61701e3b102a5b4",
"branch_name": "refs/heads/master",
"committer_date": 1481074475000,
"content_id": "4a8bc9b8feb011fcb8a067f2e119b90f66c96f01",
"detected_licenses": [
"MIT"
],
"directory_id": "62d575a483cbdda6d9e327e683d5fcfd0484a6f9",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os
from flask import current_app, request, Blueprint
upload_config_api = Blueprint('upload_config_api', __name__)
from werkzeug.utils import secure_filename
ALLOWED_EXTENSIONS = {'job', 'scope'}
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS
@u... | 42 | 32.79 | 105 | 15 | 313 | python | [{"finding_id": "codeql_py/path-injection_2639b7e23df4097d_64c63218", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 3 | true | [
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
23,
24,
25
] | [
null,
null,
null
] | [
35,
29,
23
] | [
48,
42,
60
] | |
2024-11-18T20:26:42.253914+00:00 | 1,569,761,976,000 | c8a151245c7608c68239522d1035f63b4dc30859 | 3 | {
"blob_id": "c8a151245c7608c68239522d1035f63b4dc30859",
"branch_name": "refs/heads/master",
"committer_date": 1569761976000,
"content_id": "3e854808207a5038b799dcedddb408063e94ea09",
"detected_licenses": [
"MIT"
],
"directory_id": "9d4865342a43bc38dde13d154d4374de32f74e39",
"extension": "py",
"fi... | 3.34375 | stackv2 | """
Example of hooking the keyboard on Linux using pyxhook
Generates JSON for keystroke timings. Refer paper for format.
"""
from __future__ import print_function
# Libraries we need
import pyxhook
import time
import json
password = ".tie5Roanl"
frequency_password_entry = 10
key_timings = dict()
user_keystroke_tim... | 218 | 39.12 | 120 | 21 | 2,279 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_375111b8c1553bc6_c0201009", "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."
] | [
148
] | [
null
] | [
15
] | [
94
] | |
2024-11-18T20:26:49.033831+00:00 | 1,693,530,396,000 | d40b39593fee50bf310c9648113065e7204201b0 | 3 | {
"blob_id": "d40b39593fee50bf310c9648113065e7204201b0",
"branch_name": "refs/heads/main",
"committer_date": 1693530396000,
"content_id": "5524b1c4f3249fb673ea4f55581cecaccb0d5f29",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e0a41dd1b88d09b90b8fb432dd76871708e8a266",
"extension": "py"... | 2.71875 | stackv2 | """
A directive for including a GMT plot in a Sphinx document.
Options
-------
The ``gmtplot`` directive supports the following options:
show-code
Whether to show the source code. The default can be changed by the
``gmtplot_show_code`` variable in ``conf.py``.
language
Specify the language of the source... | 485 | 31.57 | 87 | 21 | 3,639 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_751dd8237a84ca36_67d899e8", "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."
] | [
449
] | [
null
] | [
13
] | [
38
] | |
2024-11-18T20:26:55.519503+00:00 | 1,561,318,994,000 | f305ab122629c40f67f95530a1a21ca0c0ebb260 | 3 | {
"blob_id": "f305ab122629c40f67f95530a1a21ca0c0ebb260",
"branch_name": "refs/heads/master",
"committer_date": 1561318994000,
"content_id": "29afd23366c400c30d9a586f1a520a51c0b0c870",
"detected_licenses": [
"MIT"
],
"directory_id": "0f6df8d0a74a5985cb05848f5f411e9379bf7928",
"extension": "py",
"fi... | 2.96875 | stackv2 | import os
import requests
import json
import csv
import time
import pygal
from urllib.parse import urlencode
from urllib.parse import unquote
from dotenv import load_dotenv
load_dotenv()
def to_usd(my_price):
return "${0:,.2f}".format(my_price)
##1. INFO INPUT AND VALIDATION
while True:
selected_symbol = i... | 161 | 28 | 114 | 13 | 1,170 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e5092f6c7ada5aca_814d5a8a", "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."
] | [
102
] | [
null
] | [
7
] | [
38
] | |
2024-11-18T20:26:57.342807+00:00 | 1,513,283,532,000 | 76df15e49f1a85d3230875916fb576b5f81883c0 | 3 | {
"blob_id": "76df15e49f1a85d3230875916fb576b5f81883c0",
"branch_name": "refs/heads/master",
"committer_date": 1513283532000,
"content_id": "f4105888622cc3ec3c6d0121b337e5f0a9a86eaa",
"detected_licenses": [
"MIT"
],
"directory_id": "9f16058a25f494c53d28548d138ebb533bb9c71e",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!/usr/bin/env python
import argparse
import hashlib
import logging
import multiprocessing as mp
import os
import shutil
import sys
import requests
__dir__ = os.path.dirname(__file__)
sys.path[1:1] = [os.path.normpath(
os.path.join(__dir__, '..'))
]
from core.scrapers import create_scraper_by_type
from core.goo... | 132 | 38.7 | 101 | 20 | 1,037 | python | [{"finding_id": "codeql_py/request-without-cert-validation_7aa8eb728df2fea5_d68de48d", "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)."
] | [
62
] | [
null
] | [
28
] | [
76
] | |
2024-11-18T20:26:59.550183+00:00 | 1,563,323,188,000 | 82ef8781639948ef4ce3b881b54ab3c7b5c425ad | 2 | {
"blob_id": "82ef8781639948ef4ce3b881b54ab3c7b5c425ad",
"branch_name": "refs/heads/master",
"committer_date": 1563323188000,
"content_id": "8edd52d176c76b036dd3b16aa7a0fb9ab367c0c1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5220345999e9b07e58ef9e25caf939875c6ac276",
"extension": "py"... | 2.359375 | stackv2 | import re
import logging
import requests
from django.conf import settings
from django.core.files.storage import get_storage_class
logger = logging.getLogger(__name__)
StorageClass = get_storage_class(settings.DEFAULT_FILE_STORAGE)
if hasattr(settings, 'USE_AWS') and settings.USE_AWS:
BundleStorage = StorageClas... | 120 | 42.62 | 113 | 25 | 1,067 | python | [{"finding_id": "codeql_py/redos_5aecb71937e5de66_2663852d", "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 '<script' and containing many repe... | 2 | true | [
"CWE-1333",
"CWE-116"
] | [
"py/redos",
"py/bad-tag-filter"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<script' and containing many repetitions of ' '.",
"This regular expression does not match upper case <SCRIPT> tags."
] | [
31,
31
] | [
null,
null
] | [
34,
20
] | [
38,
51
] | |
2024-11-18T20:27:02.694086+00:00 | 1,628,310,529,000 | 87cad8d2676dba31b3d8ae3cac40d64d661df9e7 | 3 | {
"blob_id": "87cad8d2676dba31b3d8ae3cac40d64d661df9e7",
"branch_name": "refs/heads/master",
"committer_date": 1628310529000,
"content_id": "e771a72bc0b8e28d62cb44b6a7477c1580695d5d",
"detected_licenses": [
"MIT"
],
"directory_id": "a905694c4d0e17081378735d990f43552b728e36",
"extension": "py",
"fi... | 2.59375 | stackv2 | import math
import requests
import json
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from django.conf import settings
from .models import Newsletter
from .serializers import NewsletterSerializer
MAIL_CHIMP_API_KEY = settings.MAIL_CHIMP_API_KE... | 124 | 31.23 | 88 | 17 | 812 | python | [{"finding_id": "codeql_py/stack-trace-exposure_e34e90ba0c04c475_e544d601", "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."
] | [
97
] | [
null
] | [
17
] | [
34
] | |
2024-11-18T20:52:20.086015+00:00 | 1,503,112,199,000 | 3f2afa465bd1af9b23f4cc7719ad9004551de323 | 4 | {
"blob_id": "3f2afa465bd1af9b23f4cc7719ad9004551de323",
"branch_name": "refs/heads/master",
"committer_date": 1503112199000,
"content_id": "cd216d79f09321f6c71b9e523ed4a4d93fae6eda",
"detected_licenses": [
"MIT"
],
"directory_id": "dfb8cc6645bc020b2f518013e61b7409a72e6969",
"extension": "py",
"fi... | 3.53125 | stackv2 | # Description: Passphrase generator emulating the Diceware technique
# Inspired by: Micah Lee's article on The Intercept
# Author: Edison Suen
import secrets
WORDLIST = 'diceware.wordlist.txt'
INDEX_LENGTH = 5
def load():
word_dict = {}
with open (WORDLIST) as f:
for line in f.readlines():
index, word = line.... | 39 | 27.31 | 79 | 14 | 285 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fdaee7deafca3cf3_712f643e", "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."
] | [
32
] | [
null
] | [
8
] | [
51
] | |
2024-11-18T20:52:36.485635+00:00 | 1,588,657,624,000 | 612fc72a74ce55d7897b11f1a74bf1863e42bb9e | 2 | {
"blob_id": "612fc72a74ce55d7897b11f1a74bf1863e42bb9e",
"branch_name": "refs/heads/master",
"committer_date": 1588657624000,
"content_id": "71ca21ddc0d05eebfa8f4c6c83b00de3dcb28dba",
"detected_licenses": [
"MIT"
],
"directory_id": "e4dc45c68cf35a2d7025af2f2b1bd9cd52a8ca4d",
"extension": "py",
"fi... | 2.375 | stackv2 | from flask import jsonify
from flask import request
from app import app
import re
import sys
import itertools
import more_itertools
def options(s):
if len(s) > 0 and s[0] == '{':
return [opt for opt in s[1:-1].split('|')]
return [s]
@app.route("/spin", methods=['POST'])
def index():
try:
inp = request.json... | 30 | 20.47 | 58 | 16 | 176 | python | [{"finding_id": "codeql_py/stack-trace-exposure_64b1f6858e031295_dfe9ea7f", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-1333"
] | [
"py/stack-trace-exposure",
"py/polynomial-redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings starting with '{{' and with many repetitions of '{{'."
] | [
30,
20
] | [
null,
null
] | [
20,
47
] | [
26,
54
] | |
2024-11-18T20:52:50.907580+00:00 | 1,555,808,805,000 | 409150c099b96b8dec524d412e36fc02bdfafb46 | 3 | {
"blob_id": "409150c099b96b8dec524d412e36fc02bdfafb46",
"branch_name": "refs/heads/master",
"committer_date": 1555808805000,
"content_id": "5a94db3c3bd3e912e5270d7bf3720a506e5a892a",
"detected_licenses": [
"MIT"
],
"directory_id": "ac86892f932db046576a79abb3e5d58cef10821a",
"extension": "py",
"fi... | 2.71875 | stackv2 | # Keras
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from keras.models import Sequential
from keras.layers import Dense, Flatten, LSTM, Conv1D, MaxPooling1D, Dropout, Activation
from keras.layers.embeddings import Embedding
## Plot
import plotly.offline as py
im... | 200 | 30 | 110 | 13 | 1,788 | python | [{"finding_id": "codeql_py/overly-large-range_5909d729f65b904d_55a5f318", "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:;<=\\]."
] | [
56
] | [
null
] | [
39
] | [
42
] | |
2024-11-18T20:52:53.208346+00:00 | 1,622,753,325,000 | 157d5120b26f9497b35b8b88bb09600e07012320 | 3 | {
"blob_id": "157d5120b26f9497b35b8b88bb09600e07012320",
"branch_name": "refs/heads/main",
"committer_date": 1622753325000,
"content_id": "4a8c19a454255780002ffa5f096e3e0e0ae481ef",
"detected_licenses": [
"BSL-1.0"
],
"directory_id": "1d00b3edda1165d8de7034a5898955860cd1f53e",
"extension": "py",
"... | 3.203125 | stackv2 | import hashlib
import csv
import re
from dataclasses import dataclass
# TODO: default şifre "00000000" oluşturulacak
PSW = "psw.csv"
csv.register_dialect('myDialect', delimiter='|', quoting=csv.QUOTE_NONE, skipinitialspace=True, quotechar='')
def hasher(value):
"""
Sha-256 algoritmasını kullananan hash fonksiyonu... | 152 | 24.55 | 109 | 21 | 1,278 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f42f1a6b3821f378_b302da0b", "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.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
22
] | [
null
] | [
19
] | [
40
] | |
2024-11-18T19:02:59.578535+00:00 | 1,692,185,618,000 | 7b9132ab2e15b003719bf2d9927c7d6b2f719933 | 2 | {
"blob_id": "7b9132ab2e15b003719bf2d9927c7d6b2f719933",
"branch_name": "refs/heads/main",
"committer_date": 1692185618000,
"content_id": "33b67ed2396062f32633c3d9de386dba92e7470c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "b7b409c839b4110e23219483f667f8d01989221f",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/env python3
"""
Cleanup images that don't match the current image prefix.
Currently deletes all images that don't match the current prefix,
as well as old builds of the binderhub-ci-repos.
Requires aiohttp and tqdm:
python3 -m pip install aiohttp aiodns tqdm aiohttp-client-cache aiosqlite
Usage:
./s... | 503 | 32.57 | 113 | 20 | 3,566 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_1349fd179b680bb1_859ecee2", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [gcr.io](1) may be at an arbitrary position in the sani... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [gcr.io](1) may be at an arbitrary position in the sanitized URL."
] | [
235
] | [
null
] | [
8
] | [
35
] | |
2024-11-18T19:03:03.737144+00:00 | 1,629,040,613,000 | dd70737cffe7d9ca536c29398b073180f1fe5bde | 3 | {
"blob_id": "dd70737cffe7d9ca536c29398b073180f1fe5bde",
"branch_name": "refs/heads/main",
"committer_date": 1629040613000,
"content_id": "1fb26669a4ebc344cbcae14c1fa83356ae9d4756",
"detected_licenses": [
"MIT"
],
"directory_id": "4ecfdfc03a19ec69028e02c205641a26f3cb07a1",
"extension": "py",
"file... | 2.640625 | stackv2 | import sqlite3
import flask
import json
from flask import request
import logging
from time import sleep, time
from random import seed, uniform
log = logging.getLogger("werkzeug")
log.setLevel(logging.ERROR)
app = flask.Flask("shared DB")
dbfile = "shared_db.sqlite"
def start_db(dbcon, dbcur):
dbcur.execute("CRE... | 110 | 38.22 | 169 | 15 | 1,059 | python | [{"finding_id": "codeql_py/stack-trace-exposure_9e6cd0fd04b9f63a_b93baa70", "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.", "... | 8 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-089",
"CWE-089",
"CWE-089",
"CWE-089"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
46,
64,
83,
101,
57,
74,
77,
94
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
16,
16,
16,
16,
32,
32,
32,
32
] | [
103,
103,
103,
103,
39,
39,
39,
39
] | |
2024-11-18T19:14:24.963935+00:00 | 1,583,573,661,000 | 8943d7fddcb7e420d04383d66248f3ec3b38a680 | 3 | {
"blob_id": "8943d7fddcb7e420d04383d66248f3ec3b38a680",
"branch_name": "refs/heads/master",
"committer_date": 1583573661000,
"content_id": "4f12fe72ac9bf8a80ea6d9939bb8155581b0f7b9",
"detected_licenses": [
"MIT"
],
"directory_id": "26434eae734699d90796ec05525ed19d63f74769",
"extension": "py",
"fi... | 2.625 | stackv2 | import PyPDF2
import os
import hashlib
from AbsaReader import getNotificationDetails as getAbsaNotificationDetails
from CapitecReader import getNotificationDetails as getCapitecNotificationDetails
from StandardBankReader import getNotificationDetails as getStandardNotificationDetails
#this should be moved to the rea... | 146 | 36.01 | 141 | 16 | 1,273 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_054a3149933178a5_c41fc293", "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."
] | [
96,
96
] | [
null,
null
] | [
30,
39
] | [
37,
46
] | |
2024-11-18T19:14:28.083894+00:00 | 1,590,081,109,000 | e618c810d0cac927bcb0bcc21cabd09edfb76353 | 2 | {
"blob_id": "e618c810d0cac927bcb0bcc21cabd09edfb76353",
"branch_name": "refs/heads/master",
"committer_date": 1590081109000,
"content_id": "ed70627fee29bbe772205b5b6ea3b40a0e3ba20f",
"detected_licenses": [
"MIT"
],
"directory_id": "0cdbb4b5a463800ffadf12e32ab0db425463491b",
"extension": "py",
"fi... | 2.453125 | stackv2 | import mysql.connector
from flask import Flask, render_template, request, redirect, url_for
import requests
app = Flask(__name__)
cnx = mysql.connector.connect(user='root', password='1990', # change for required database
host='127.0.0.1', database = 'project1',
... | 300 | 34.39 | 174 | 23 | 2,457 | python | [{"finding_id": "codeql_py/flask-debug_7785d9afb63fa266_da0ef568", "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.", ... | 6 | true | [
"CWE-215",
"CWE-089",
"CWE-089",
"CWE-089",
"CWE-089",
"CWE-089"
] | [
"py/flask-debug",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1).",
"This SQL query de... | [
300,
48,
79,
158,
167,
187
] | [
null,
null,
null,
null,
null,
null
] | [
5,
28,
28,
28,
28,
28
] | [
24,
31,
31,
31,
31,
31
] | |
2024-11-18T19:14:34.788812+00:00 | 1,577,765,636,000 | 39dc170f8909ee243152d792f94c1023675052e0 | 3 | {
"blob_id": "39dc170f8909ee243152d792f94c1023675052e0",
"branch_name": "refs/heads/master",
"committer_date": 1577765636000,
"content_id": "67c04d39044f3d9a5736b0d4660f0bb7c41d5f15",
"detected_licenses": [
"MIT"
],
"directory_id": "8f198f895a9bbbc61e5425d31ee02ead13610cd3",
"extension": "py",
"fi... | 3.453125 | stackv2 | #!/usr/bin/python3
"""
Sript that starts a Flask web application
"""
from flask import Flask
app = Flask(__name__)
@app.route('/', strict_slashes=False)
def hello_bh():
"""
function to return Hello BH!
"""
return "Hello BH!"
@app.route('/bh', strict_slashes=False)
def bh():
"""
funct... | 48 | 20.75 | 65 | 11 | 256 | python | [{"finding_id": "codeql_py/reflective-xss_b07e0eeab1869d05_fb7e4a5e", "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... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
30,
38,
46
] | [
null,
null,
null
] | [
12,
12,
16
] | [
49,
54,
42
] | |
2024-11-18T19:14:51.170183+00:00 | 1,575,549,514,000 | 68854374b0a3bda975d5c06dfe1caca0f6600c15 | 3 | {
"blob_id": "68854374b0a3bda975d5c06dfe1caca0f6600c15",
"branch_name": "refs/heads/master",
"committer_date": 1575549514000,
"content_id": "4e5e72a7d90b2eef28a9afc9efa3558821bffc8d",
"detected_licenses": [
"MIT"
],
"directory_id": "5e67a23400d15d77b07920960b6eb2e363450089",
"extension": "py",
"fi... | 2.71875 | stackv2 | """
Setup envs for dev environment
"""
import secrets
import shutil
def get_random_string():
return secrets.token_urlsafe(16)
def set_key_random(file_path, key):
secret = get_random_string()
with open(file_path, 'r+') as config_file:
file_contents = config_file.read().replace(key, secret, 1)
... | 36 | 19.11 | 66 | 12 | 171 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_1aadf22f7a711e2f_a6baa139", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text."
] | [
19
] | [
null
] | [
27
] | [
40
] | |
2024-11-18T19:14:54.680555+00:00 | 1,627,170,125,000 | 67a2d9d2ed64b3696540e59780f5575a7d5d2801 | 4 | {
"blob_id": "67a2d9d2ed64b3696540e59780f5575a7d5d2801",
"branch_name": "refs/heads/master",
"committer_date": 1627170125000,
"content_id": "a4cfd0f4f8bb2172a14d53b56f0268fb7cd63cf0",
"detected_licenses": [
"Unlicense"
],
"directory_id": "3ac53a446d095ce48c90a1fc9488cf45f7d9773b",
"extension": "py",... | 4.03125 | stackv2 | # Import datetime so that it can be
# used to compute a person's age.
from datetime import datetime
def main():
run = True
while run:
user_input = input('\nDo you want to accept user input? If not, sample data will be loaded (Y/N) ').upper()
if user_input == 'Y':
gender = input("Please enter your gender (M o... | 163 | 28.44 | 109 | 17 | 1,506 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_99f907f58027c649_2ca30f99", "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."
] | [
64
] | [
null
] | [
9
] | [
36
] | |
2024-11-18T19:38:26.524233+00:00 | 1,690,556,429,000 | e2d8c9fcab9807265374ea2a302d13e60a5b4ec6 | 3 | {
"blob_id": "e2d8c9fcab9807265374ea2a302d13e60a5b4ec6",
"branch_name": "refs/heads/master",
"committer_date": 1690556429000,
"content_id": "d9caaea8866c6472ece08bfb2f571fdd0f4223be",
"detected_licenses": [
"MIT"
],
"directory_id": "7d9d651cc5ecbd520b73779631a5d7c8eae40aca",
"extension": "py",
"fi... | 2.8125 | stackv2 | import numpy as np
import jinja2
class DDS(object):
def __init__(self, name, f_exe, n_phase=24, n_amplitude=16, n_sine=8, n_fine=6, n_fine_word=8):
# This ensures that the LUTs don't have excessive entries.
assert (n_phase - n_sine - n_fine - 2) >= 0
sine_lut = self._generate_sine_lut(n... | 91 | 31.58 | 99 | 16 | 862 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5d93175f59568edd_ec147556", "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."
] | [
33
] | [
null
] | [
15
] | [
86
] | |
2024-11-18T19:38:29.222783+00:00 | 1,517,130,940,000 | 99d0f4e4ce67ccd8a8b793cd87d98afb7f1c872f | 3 | {
"blob_id": "99d0f4e4ce67ccd8a8b793cd87d98afb7f1c872f",
"branch_name": "refs/heads/master",
"committer_date": 1517130940000,
"content_id": "7ef2cec82108ce02a54932bc553967b46a6a3722",
"detected_licenses": [
"MIT"
],
"directory_id": "3e175cfc3a40b3073c9ea355c1835fe398b9b321",
"extension": "py",
"fi... | 2.5625 | stackv2 | from flask import Flask
from flask import jsonify
from flask import request
from bs4 import BeautifulSoup
import requests
app = Flask(__name__)
@app.route('/')
def hello_world():
return '<a href="https://github.com/sinchang/pypi-api">Project GitHub</a>'
@app.route('/package/<name>')
def get_package_info(name):
... | 86 | 28.09 | 93 | 19 | 672 | python | [{"finding_id": "codeql_py/flask-debug_e9d980ebe40eb311_d3645a52", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-918",
"CWE-918"
] | [
"py/flask-debug",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
86,
16,
61
] | [
null,
null,
null
] | [
3,
7,
7
] | [
22,
24,
65
] | |
2024-11-18T19:38:45.799915+00:00 | 1,371,990,805,000 | 2a1b18b7d3c73bb1284438fb358ddeb31268c02a | 3 | {
"blob_id": "2a1b18b7d3c73bb1284438fb358ddeb31268c02a",
"branch_name": "refs/heads/master",
"committer_date": 1371990805000,
"content_id": "4eb7754dadb1498f0d95f077711b131052db0824",
"detected_licenses": [
"MIT"
],
"directory_id": "7f5e3980c9e4e9b18997b4a9abefd0ae09d03f71",
"extension": "py",
"fi... | 2.546875 | stackv2 | #coding=utf8
#siddontang@gmail.com
import time
import hmac
import hashlib
from misc import Singleton
class Auth(Singleton):
def __init__(self):
pass
def loadAuth(self):
self._auths = {
'test' : '123'
}
def checkAuth(self, auth):
auth = auth.decode('base64')
... | 33 | 22.03 | 67 | 14 | 193 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_1b2211b5d2561fff_23ad4c3a", "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."
] | [
27
] | [
null
] | [
34
] | [
42
] | |
2024-11-18T19:38:56.875041+00:00 | 1,660,075,142,000 | 476378bfda211475f18f4dd029426fc47f6b7b06 | 2 | {
"blob_id": "476378bfda211475f18f4dd029426fc47f6b7b06",
"branch_name": "refs/heads/master",
"committer_date": 1660075142000,
"content_id": "f1ccb756e533cf9b69d7eea02a9f51e0f91893d5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bacfc8a576fc28558fc466677227fcdaf0d7ccb4",
"extension": "py"... | 2.484375 | stackv2 | import jinja2
import os
import sys
from jinja2 import Template
import io
latex_jinja_env = jinja2.Environment(
block_start_string = '\BLOCK{',
block_end_string = '}',
variable_start_string = '\VAR{',
variable_end_string = '}',
comment_start_string = '\#{',
comment_end_string = '}',
line_statement_prefix = '%%',
... | 102 | 24.53 | 102 | 27 | 719 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e1957f9fccd0002b_c6eeeb87", "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."
] | [
6
] | [
19
] | [
19
] | [
2
] | |
2024-11-18T20:06:08.497977+00:00 | 1,487,064,121,000 | 2f14e2833a33aa07c66b72eeffd6be5db533ca73 | 4 | {
"blob_id": "2f14e2833a33aa07c66b72eeffd6be5db533ca73",
"branch_name": "refs/heads/master",
"committer_date": 1487064199000,
"content_id": "8b0ccaf01091130c0ff9c9b29eb883dfcd5a4901",
"detected_licenses": [
"MIT"
],
"directory_id": "d0f87ffb2b501469659df7962e779012acdeda62",
"extension": "py",
"fi... | 3.5 | stackv2 | from base64 import b64decode
from S1C07 import aes_ecb_decrypt
from S3C18 import aes_ctr
from Crypto import Random
from Crypto.Cipher import AES
from S2C10 import xor_data
import struct
class Oracle:
def __init__(self):
self._key = Random.new().read(AES.key_size[0])
def edit(self, ciphertext, offset... | 81 | 39.11 | 101 | 16 | 737 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_a742eaad54c45e41_78981c53", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
31
] | [
null
] | [
26
] | [
70
] | |
2024-11-18T20:06:17.272760+00:00 | 1,663,745,805,000 | 38619835ca4644a454b402abfe4ed808aba48793 | 3 | {
"blob_id": "38619835ca4644a454b402abfe4ed808aba48793",
"branch_name": "refs/heads/master",
"committer_date": 1663745805000,
"content_id": "c8ec4f855b5dcf76fb034691f34b083af67d6895",
"detected_licenses": [
"MIT"
],
"directory_id": "e02e46f43db8a13b1ab7378bb86104bfd334cafa",
"extension": "py",
"fi... | 2.953125 | stackv2 | import hashlib
import imghdr
import sys
import tarfile
import urllib.request
from itertools import islice
from os.path import join, isfile
from typing import Union, List
from dataset.shared import dir_root, maybe_create_folder
class ImagenetDownloader:
def __init__(self, links_source: str, dest_dir: str):
... | 117 | 37.85 | 127 | 19 | 922 | python | [{"finding_id": "codeql_py/tarslip_3190cc9bbcf5a113_fcbeae42", "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)."
] | [
32
] | [
null
] | [
17
] | [
20
] | |
2024-11-18T20:06:25.004834+00:00 | 1,466,373,023,000 | e7d8c41fb43d53fe9ce887fe7dff2af1884dc2dc | 3 | {
"blob_id": "e7d8c41fb43d53fe9ce887fe7dff2af1884dc2dc",
"branch_name": "refs/heads/master",
"committer_date": 1466373023000,
"content_id": "0fe600cd459ef5489a5a6701a610cc4f34fd4991",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "53d991f76eafed2dd41623d29d4321efdb972ef1",
"extension": "py"... | 2.84375 | stackv2 | #!/usr/bin/env python3
import sys
import argparse
import yaml
import boto3
import csv
import os
parser = argparse.ArgumentParser()
class Connect:
def __init__(self, access_key=None, secret_key=None, region=None, profile=None, output_type=None):
self.profile = args.profile if profile is None else profile
... | 91 | 41 | 110 | 18 | 760 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d436f172b98fafe9_0eda894d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text."
] | [
27
] | [
null
] | [
39
] | [
49
] | |
2024-11-18T20:18:14.371398+00:00 | 1,544,066,982,000 | b01c749a27fa7757c3eafbc2cbee63d4c69bd0d0 | 3 | {
"blob_id": "b01c749a27fa7757c3eafbc2cbee63d4c69bd0d0",
"branch_name": "refs/heads/master",
"committer_date": 1544066982000,
"content_id": "9f52bf60813e468d809a26aba8c6a6b485f20c99",
"detected_licenses": [
"Unlicense"
],
"directory_id": "2274fafdf959bcdddf380157418ee57b49c84ce9",
"extension": "py",... | 2.578125 | stackv2 | #-*- coding: utf-8 -*-
import paramiko
import threading
import getpass
import os
import sys
import traceback
import time
# 获取SSH连接的客户端
def _get_client(hostname, port, username, password,timeout = 10):
port = int(port)
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy()... | 209 | 40.17 | 132 | 17 | 2,213 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_10e15d3c584d207a_6abf81d2", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
14
] | [
null
] | [
5
] | [
65
] | |
2024-11-18T20:18:23.739569+00:00 | 1,606,846,422,000 | a3eccdf1b29718161ad6fbe104169e16b6550b59 | 2 | {
"blob_id": "a3eccdf1b29718161ad6fbe104169e16b6550b59",
"branch_name": "refs/heads/master",
"committer_date": 1606846422000,
"content_id": "92c22e5fb45c2cbe36b2762571872c655ff236a9",
"detected_licenses": [
"MIT"
],
"directory_id": "8c03e42d7fff1fec3ff9a9a9a559351982fc26b5",
"extension": "py",
"fi... | 2.328125 | stackv2 | from app.models.base import BaseModel
from datetime import datetime
from secrets import token_hex
from hashlib import sha512
from uuid import uuid4
from re import search, compile
def is_email(email):
if search(compile('[^@]+@[^@]+\.[^@]+'), email):
return True
return False
class User(BaseModel):
... | 233 | 38.29 | 133 | 20 | 1,837 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_cf71970da1d16255_1adb2a22", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 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 (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computational... | [
95,
136
] | [
null,
null
] | [
47,
17
] | [
85,
50
] | |
2024-11-18T20:31:28.583102+00:00 | 1,598,460,074,000 | 46833aa63ae91a43332f5964669697d21263e7de | 3 | {
"blob_id": "46833aa63ae91a43332f5964669697d21263e7de",
"branch_name": "refs/heads/master",
"committer_date": 1598460074000,
"content_id": "a0aa30d504c00986ae989dc79f9f3bb2dad81d86",
"detected_licenses": [
"MIT"
],
"directory_id": "b5cbb014021cfbf823b9411c5432a136e844f230",
"extension": "py",
"fi... | 3.015625 | stackv2 | import bs4
import requests
import re
import json
from geopy.geocoders import Nominatim
from geopy.extra.rate_limiter import RateLimiter
def getSoup(link):
page = requests.get(link)
return bs4.BeautifulSoup(page.content, 'html.parser')
def get_hospital_geocodes(hospital_list):
# initialize geolocator objec... | 91 | 36.02 | 169 | 19 | 761 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_12527890f2920e6a_a591d785", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text."
] | [
88
] | [
null
] | [
30
] | [
70
] | |
2024-11-18T20:31:30.497203+00:00 | 1,664,705,478,000 | 96664cdbb202807f966ba677771da80638c21ed9 | 3 | {
"blob_id": "96664cdbb202807f966ba677771da80638c21ed9",
"branch_name": "refs/heads/master",
"committer_date": 1664705478000,
"content_id": "43344eec8f29248b4a5c0e711c0e729fe29dd2a8",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "26f2d12fb6c8447092a5f918d5d10ccf141458ae",
"extension": "p... | 2.625 | stackv2 | #!/usr/bin/env python3
import argparse
import re
from datetime import timedelta
from os import chmod
from os.path import dirname, exists, join
from shutil import copy
from subprocess import PIPE, run
from slugify import slugify
def valid_time(option):
match = re.match(r"(?P<H>\d\d)?:?(?P<M>\d\d):(?P<S>\d\d)(?P<... | 146 | 33.84 | 113 | 19 | 1,393 | python | [{"finding_id": "codeql_py/overly-permissive-file_90768b6de9a59b0e_6d4c8488", "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."
] | [
145
] | [
null
] | [
5
] | [
39
] | |
2024-11-18T20:31:36.330512+00:00 | 1,634,649,155,000 | e692ca55066f00cf0dce1baad6ad518a23cba81d | 2 | {
"blob_id": "e692ca55066f00cf0dce1baad6ad518a23cba81d",
"branch_name": "refs/heads/master",
"committer_date": 1634649155000,
"content_id": "ed0eea6136230cb58b4a897848350f1e96ccbf6d",
"detected_licenses": [
"MIT"
],
"directory_id": "a0440f5bb1f0ec50df9f711b23b0823eeba63566",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os
from flask import Flask, render_template, request, redirect, send_file, url_for
from src.s3_upload import upload_file
app = Flask(__name__, static_folder="./static", static_url_path="/")
@app.route("/", methods=['GET','POST'])
def upload():
if request.method == "GET":
return render_template('ind... | 21 | 35.43 | 79 | 17 | 175 | python | [{"finding_id": "codeql_py/flask-debug_34cf21bcebb01a99_01b5725b", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-022"
] | [
"py/flask-debug",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This path depends on a [user-provided value](1)."
] | [
21,
13
] | [
null,
null
] | [
5,
16
] | [
35,
52
] | |
2024-11-18T20:31:43.242031+00:00 | 1,509,726,106,000 | 64cc282d8636a2e188505f7bcfc64e60d7ab3c2b | 3 | {
"blob_id": "64cc282d8636a2e188505f7bcfc64e60d7ab3c2b",
"branch_name": "refs/heads/master",
"committer_date": 1509726106000,
"content_id": "4cf4830c1a59bed8765d3880b6fa7d467dec8531",
"detected_licenses": [
"MIT"
],
"directory_id": "0173eddd099df4fbde41816e57fa3c5545912366",
"extension": "py",
"fi... | 2.59375 | stackv2 | import numpy as np
import scipy.io
import os
import urllib
import tarfile
import zipfile
import matplotlib.pyplot as plt
main_folder = os.path.expanduser('~')+'/DataSets/'
def _make(folder):
if not os.path.isdir(folder):
os.mkdir(folder)
def create_1_hot(y, num_classes=10):
assert 1 in y.shape or l... | 213 | 27.23 | 80 | 14 | 1,675 | python | [{"finding_id": "codeql_py/tarslip_b34dce19e9b8c6ba_b1209729", "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)."
] | [
124
] | [
null
] | [
5
] | [
8
] | |
2024-11-18T20:31:43.308332+00:00 | 1,543,865,435,000 | 05c037b87c014381ae5e7b554e76b381c509f995 | 2 | {
"blob_id": "05c037b87c014381ae5e7b554e76b381c509f995",
"branch_name": "refs/heads/master",
"committer_date": 1543865435000,
"content_id": "7cb847700725f7a485ce06341c020e7c024e30b1",
"detected_licenses": [
"MIT"
],
"directory_id": "b71b784621414de4795487369791950f48d5f101",
"extension": "py",
"fi... | 2.46875 | stackv2 | # -*- coding: utf-8 -*-
import argparse
import json
import logging
import pika
import sys
import time
from datetime import datetime
from flask import Flask
from flask_cors import CORS
from uuid import uuid4
from yaml import load, YAMLError
app = Flask(__name__)
settings = dict()
g_rabbitmq_cnx = None
g_rabbitmq_cha... | 186 | 33.35 | 116 | 15 | 1,463 | python | [{"finding_id": "codeql_py/stack-trace-exposure_62137fb975e65579_1c014538", "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.", "... | 6 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"Cross-site scripting vul... | [
103,
119,
135,
97,
117,
133
] | [
null,
null,
null,
null,
null,
null
] | [
16,
16,
16,
16,
16,
16
] | [
43,
43,
43,
62,
62,
84
] | |
2024-11-18T20:43:18.767879+00:00 | 1,571,386,608,000 | f3cb03c474d96b9823f61afe7ff55599b9e9e2df | 4 | {
"blob_id": "f3cb03c474d96b9823f61afe7ff55599b9e9e2df",
"branch_name": "refs/heads/master",
"committer_date": 1571386608000,
"content_id": "3bd9858febe458d840a00d2647fa3b301998b35f",
"detected_licenses": [
"MIT"
],
"directory_id": "c35008ff51c71e03bd4d14fdc3b561d4efe6d25a",
"extension": "py",
"fi... | 3.71875 | stackv2 | '''
BenJek Program
Mengelola pangkalan data akun driver BenJek.
'''
drivers = {}
BenJek_income = 0
class BenJekDriver(object):
'''
Kelas yang merupakan driver BenJek.
'''
def __init__(self, driver_name, service_type):
'''
Membuat sebuah instance dari BenJekDriver.
'''
... | 138 | 29.8 | 73 | 16 | 1,098 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2b9bc1135b9c8c87_b1f34b2d", "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."
] | [
132
] | [
null
] | [
19
] | [
29
] | |
2024-11-18T20:43:32.025837+00:00 | 1,679,014,974,000 | 516d9d478d761b1133fd5cfe4890e53c87717898 | 3 | {
"blob_id": "516d9d478d761b1133fd5cfe4890e53c87717898",
"branch_name": "refs/heads/master",
"committer_date": 1679014974000,
"content_id": "1e4a22cbbfb80972a4b7ff3f3280e161bb7c90c5",
"detected_licenses": [
"MIT"
],
"directory_id": "ee746391bbe63d1cac6ee9147616a6f4f8d12dd1",
"extension": "py",
"fi... | 2.59375 | stackv2 | __author__ = 'n3k'
from cert_slayer.Logger import Logger
from http.server import HTTPServer, SimpleHTTPRequestHandler
import ssl
import threading
from io import BytesIO
from ssl import SSLError
class FakeHTTPServer(HTTPServer):
def __init__(self, server_address, RequestHandlerClass, bind_and_activate=True, callba... | 128 | 28.5 | 126 | 14 | 838 | python | [{"finding_id": "codeql_py/insecure-default-protocol_65d21b1c94552c07_91394071", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
30
] | [
null
] | [
29
] | [
127
] | |
2024-11-18T20:43:33.846795+00:00 | 1,602,408,421,000 | 5f293f1ac225ecefbd46821003850ed83c554c6e | 3 | {
"blob_id": "5f293f1ac225ecefbd46821003850ed83c554c6e",
"branch_name": "refs/heads/master",
"committer_date": 1602408421000,
"content_id": "934dfa8272d8c8e89fed928ff79d3cc3b967a2c6",
"detected_licenses": [
"MIT"
],
"directory_id": "bd864512264121be1c13a84f59fd4bdc33f89429",
"extension": "py",
"fi... | 2.984375 | stackv2 | from aes.transformations import *
from aes.key_expansion import *
"""
See "A Tutorial on White-box AES", page 6
"""
def do_aes_128(_in, key):
rkeys = key_expansion(key)
state = _in
for i in range(1, 10):
state = shift_rows(state)
state = add_round_key(state, shift_rows(rkeys[i-1]))
state = sub_bytes(state... | 34 | 20.91 | 62 | 14 | 227 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_b1ad3abfd1ea6229_e4f46610", "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."
] | [
34
] | [
null
] | [
7
] | [
54
] | |
2024-11-18T20:43:36.109808+00:00 | 1,599,127,077,000 | f671dee1e4ac9646c2bd98e9110a1239a6000d4f | 3 | {
"blob_id": "f671dee1e4ac9646c2bd98e9110a1239a6000d4f",
"branch_name": "refs/heads/master",
"committer_date": 1599127077000,
"content_id": "5c29996de83ce61a6220c14a404f3bafff1c25b2",
"detected_licenses": [
"MIT"
],
"directory_id": "f5aaf1eebc01584754d76cbb776885d104d1c78b",
"extension": "py",
"fi... | 2.953125 | stackv2 | import random
from string import ascii_uppercase
from faker import Faker
from faker.providers import BaseProvider
import rstr
from faker_extensions.data import financial_institutions
# map uppercase letters to numbers for check digit generation
UPPERCASE_LETTERS = {l: str(n) for l, n in zip(ascii_uppercase, range(10... | 90 | 30.52 | 114 | 14 | 651 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_49c2c8d5caa77177_c6e83421", "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."
] | [
80
] | [
null
] | [
11
] | [
15
] | |
2024-11-18T20:43:38.783507+00:00 | 1,541,345,487,000 | 0e8aece16548044c9b7aab8c1b02379f0d3b36cd | 3 | {
"blob_id": "0e8aece16548044c9b7aab8c1b02379f0d3b36cd",
"branch_name": "refs/heads/master",
"committer_date": 1541345487000,
"content_id": "8587ed87836a59e9c36d04db69f650c10d9dabff",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "40bd88f374927058aa74ac32264e766754c09766",
"extension": "py"... | 2.6875 | stackv2 | from __future__ import print_function
import requests
import requests.packages.urllib3
from .endpoint_manager import EndpointManager
from .exceptions import *
requests.packages.urllib3.disable_warnings()
class Requester(EndpointManager):
"""Base class responsible to trigger requests to VBB rest API"""
def _... | 66 | 34.15 | 105 | 16 | 453 | python | [{"finding_id": "codeql_py/request-without-cert-validation_e033ca0997fc7391_86b015bb", "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)."
] | [
47
] | [
null
] | [
25
] | [
89
] | |
2024-11-18T20:43:51.316772+00:00 | 1,605,344,536,000 | 4b2eaa1d65b670f11a817c441b8ebf6cfb57caad | 3 | {
"blob_id": "4b2eaa1d65b670f11a817c441b8ebf6cfb57caad",
"branch_name": "refs/heads/main",
"committer_date": 1605344536000,
"content_id": "27d323f2dc100da3e7fafd7ddee4a9877201ae3c",
"detected_licenses": [
"MIT"
],
"directory_id": "9764b94e94ffe294da914cfd066df5f7371815cd",
"extension": "py",
"file... | 2.6875 | stackv2 | import yaml
import os
import feedparser
import html2text as ht
import hashlib
from jinja2 import Environment
from jinja2 import FileSystemLoader
import datetime
import pytz
from github import Github
def read_config():
with open("subscribe_list.yaml", encoding="UTF-8") as fs:
datas = yaml.load(fs, Loader=y... | 98 | 30.4 | 111 | 18 | 771 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_a55c668bba3dae12_ea3b7c8e", "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."
] | [
62
] | [
null
] | [
11
] | [
71
] | |
2024-11-18T20:44:11.897772+00:00 | 1,433,772,262,000 | 2808aeacab0671153d92927360a68c6610fa643c | 2 | {
"blob_id": "2808aeacab0671153d92927360a68c6610fa643c",
"branch_name": "refs/heads/master",
"committer_date": 1433772262000,
"content_id": "40eb856e6d2880d9199d5c04e95553f6b9229d1e",
"detected_licenses": [
"Unlicense"
],
"directory_id": "b73429c3138f1d83b6db480c9269b6fbd249d18f",
"extension": "py",... | 2.34375 | stackv2 | import re
from svg_config import Config
def matraz_svg(license=None, contact=False, documentation=False, doi=None):
blocks = re.split(r'<!-- .* -->', Config)
image = blocks[0]
current_box = 1
if license:
image += blocks[current_box]
image += 'LICENSE (' + license + ')'
imag... | 40 | 24.77 | 75 | 11 | 250 | python | [{"finding_id": "codeql_py/bad-tag-filter_45d79e23f7f39696_35a3afd6", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines."
] | [
8
] | [
null
] | [
25
] | [
36
] | |
2024-11-18T20:57:29.321235+00:00 | 1,553,697,887,000 | 69ce56ce11961131f73063d71e0f373fc810b161 | 2 | {
"blob_id": "69ce56ce11961131f73063d71e0f373fc810b161",
"branch_name": "refs/heads/master",
"committer_date": 1553697887000,
"content_id": "61a456c16626bc982712cc581f87d9b6e621e2f8",
"detected_licenses": [
"Python-2.0"
],
"directory_id": "cb5b73002959e9e011afd823883239cfb5d5528f",
"extension": "py"... | 2.4375 | stackv2 | # -*- coding: utf-8 -*-
"""
Cross-classes utils
"""
from functools import reduce
import hashlib
import traceback
import re
from excalibur.exceptions import WrongSignatureError
ALL_KEYWORD = "all"
PLUGIN_NAME_SEPARATOR = "|"
SOURCE_SEPARATOR = ","
def add_args_then_encode(x, y, arguments):
"""
sha1checks are ... | 242 | 26.33 | 96 | 15 | 1,445 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_158f1f29e8df5a4c_73c8f7fa", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expen... | [
37
] | [
null
] | [
29
] | [
46
] | |
2024-11-18T20:58:01.026420+00:00 | 1,556,733,595,000 | 734e84ee581985315a6d834f19c3173e102f66b9 | 2 | {
"blob_id": "734e84ee581985315a6d834f19c3173e102f66b9",
"branch_name": "refs/heads/master",
"committer_date": 1556733595000,
"content_id": "4bcffcc14c611dc941774b2bfec23bdc94dd1b10",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b05df53a1cfe1747e425e55f2f365f6abebbaf58",
"extension": "py"... | 2.453125 | stackv2 | from graphql_client import GraphQLClient
from graphql_http_client import query, mutation
import json
ws_url = "ws://localhost:8080/subscriptions"
"""
Uploads a file to cibridge and returns the data id.
param:file - Takes the path to the input file
returns: data id of the file
"""
def upload_file(file):
add_data... | 220 | 27.02 | 108 | 13 | 1,357 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ab1a955c6228135c_6b634cab", "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."
] | [
161,
165
] | [
null,
null
] | [
11,
11
] | [
57,
58
] | |
2024-11-18T20:58:03.980631+00:00 | 1,671,981,807,000 | 6ef0f042dc9f3a51f25b04a5dc916a0ebedea418 | 3 | {
"blob_id": "6ef0f042dc9f3a51f25b04a5dc916a0ebedea418",
"branch_name": "refs/heads/master",
"committer_date": 1671981807000,
"content_id": "140e1c019414bf221e3ed2952b2c0a1fd6290a05",
"detected_licenses": [
"MIT"
],
"directory_id": "fc9390a7b3edee292e920624706b0e9e04c38603",
"extension": "py",
"fi... | 3.4375 | stackv2 | from collections import defaultdict
def part_1():
file = open('input.txt', 'r')
letters = defaultdict(lambda: 0)
valid_passwords = 0
for line in file:
spl = line.split()
range_split = spl[0].split(sep="-")
letter = spl[1][0]
range_for_letter = (int(range_split[0]) + ... | 27 | 23.96 | 105 | 13 | 172 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_205c5027928e14e4_77730328", "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."
] | [
27
] | [
null
] | [
7
] | [
15
] | |
2024-11-18T20:58:08.952918+00:00 | 1,525,195,631,000 | 9f735149c4f2c73ed4e7cf07e29f2d8af5f8b340 | 3 | {
"blob_id": "9f735149c4f2c73ed4e7cf07e29f2d8af5f8b340",
"branch_name": "refs/heads/master",
"committer_date": 1525195631000,
"content_id": "273dcbff174f047cc5f80c2ab7e518232470ccd5",
"detected_licenses": [
"MIT"
],
"directory_id": "7d8433866ee3858da1bd0a25051b0698f6a4bdb2",
"extension": "py",
"fi... | 2.9375 | stackv2 | import jinja2
import os
class OutOfCellsError(ValueError):
pass
class Format:
def __init__(self, cols, rows, skip=None, use=None):
self.current = 0
self.y = 0
self.x = -1
self.cols = cols
self.rows = rows
if skip and use:
raise ValueError("Don't us... | 122 | 25.64 | 93 | 16 | 863 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_a0fd9f07f8796021_135d8d95", "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."
] | [
115
] | [
null
] | [
12
] | [
64
] | |
2024-11-18T21:10:20.522397+00:00 | 1,537,092,056,000 | 0a92fe34dbfb2691fb05e4ae8c252dc540ca681a | 3 | {
"blob_id": "0a92fe34dbfb2691fb05e4ae8c252dc540ca681a",
"branch_name": "refs/heads/master",
"committer_date": 1537092056000,
"content_id": "fa5bd1df4ef57d76da60146aca9cc53ca88526b6",
"detected_licenses": [
"MIT"
],
"directory_id": "821dbb7828e623e97be0353e9ea47e632b804558",
"extension": "py",
"fi... | 2.671875 | stackv2 | '''This script collect all functions for functions for twitter'''
from tweepy import OAuthHandler, API, TweepError
import webbrowser
import time
from socialpy import SOCIALPY_KEY_FILE
from socialpy.funcs import check
from socialpy.client import Gateway
def setup():
'''This function gives you all the keys for the ... | 56 | 37.98 | 80 | 12 | 554 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9ac5d5a8ce6717c8_3813a349", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
43,
45
] | [
null,
null
] | [
23,
23
] | [
38,
47
] | |
2024-11-18T21:10:32.861385+00:00 | 1,418,659,639,000 | b79f66e41db292b13fc1c43ce2c54dea8ad616f4 | 3 | {
"blob_id": "b79f66e41db292b13fc1c43ce2c54dea8ad616f4",
"branch_name": "refs/heads/master",
"committer_date": 1418659639000,
"content_id": "42e564d32423f77c6048057437662083f04bc1cf",
"detected_licenses": [
"MIT"
],
"directory_id": "08e3a5780fd40a978e64250a4870def68416d1df",
"extension": "py",
"fi... | 2.765625 | stackv2 | #!/usr/bin/env python
import socket, threading, hashlib, os
import SocketServer, ssl, subprocess
import sys, time, signal
from weasel.bot.keymanager import KeyManager
from weasel.shared.config import BotConfig
from weasel.shared.parser import BotParser
from weasel.bot.statusmgr import StatusManager
shutdown_signaled ... | 119 | 37.38 | 112 | 16 | 956 | python | [{"finding_id": "codeql_py/insecure-default-protocol_116228b26f553411_bef1ac82", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
64
] | [
65
] | [
23
] | [
88
] | |
2024-11-18T21:10:33.312575+00:00 | 1,545,056,695,000 | d7b03af3b732002b4d671e2e6dc53fce0a2044fe | 3 | {
"blob_id": "d7b03af3b732002b4d671e2e6dc53fce0a2044fe",
"branch_name": "refs/heads/master",
"committer_date": 1545056695000,
"content_id": "77ed619b6ccedb0729ef848710bb4247575ee133",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a672226db9f44eb803ab8692887418ab63f0a141",
"extension": "py"... | 3.0625 | stackv2 | """
A simple proxy server. Usage:
http://hostname:port/p/(URL to be proxied, minus protocol)
For example:
http://localhost:8080/p/www.google.com
"""
from flask import Flask, render_template, request, abort, Response, redirect
import requests
import logging
import pdb
import re
app = Flask(__name__.split('.')[0])
l... | 114 | 31.9 | 119 | 17 | 997 | python | [{"finding_id": "codeql_py/flask-debug_986d5faa5c97ddc8_f87272b7", "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.", ... | 14 | true | [
"CWE-215",
"CWE-918",
"CWE-079",
"CWE-601",
"CWE-601",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/flask-debug",
"py/full-ssrf",
"py/reflective-xss",
"py/url-redirection",
"py/url-redirection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"The full URL of this request depends on a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-p... | [
114,
80,
68,
33,
54,
26,
32,
53,
61,
73,
79,
79,
108,
108
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
5,
12,
21,
25,
29,
38,
53,
57,
56,
29,
47,
52,
61,
67
] | [
52,
80,
31,
37,
41,
41,
65,
69,
59,
32,
50,
59,
65,
71
] | |
2024-11-18T21:10:38.231448+00:00 | 1,613,298,574,000 | 172d638ab606422eefe46750ded550f5442feda4 | 2 | {
"blob_id": "172d638ab606422eefe46750ded550f5442feda4",
"branch_name": "refs/heads/master",
"committer_date": 1613298574000,
"content_id": "b0c29d5cbc19c9ae7797122412a60df5e7d6d30b",
"detected_licenses": [
"MIT"
],
"directory_id": "d7db3bf5661c763a0db819fb54f61cf98bf68123",
"extension": "py",
"fi... | 2.3125 | stackv2 | from subprocess import run, PIPE, STDOUT
import os
import json
import click
MFA_PROFILE = os.environ.get("AWS_MFA_PROFILE", "mfa-profile")
def get_config(key, profile):
result = run(["aws", "configure", "--profile", profile, "get", key], stdout=PIPE, stderr=STDOUT)
if result.returncode != 0:
click.e... | 143 | 26.31 | 100 | 12 | 889 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fef339e56edc2c4d_fd8b8ff0", "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."
] | [
64
] | [
null
] | [
11
] | [
62
] | |
2024-11-18T21:10:44.478287+00:00 | 1,553,255,786,000 | 7a3f73a550b6cab0f672ebb48c8129169232c250 | 3 | {
"blob_id": "7a3f73a550b6cab0f672ebb48c8129169232c250",
"branch_name": "refs/heads/master",
"committer_date": 1553255786000,
"content_id": "729e289b158daf5eb19f4962036e6e42e029ccfa",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9a8f269018432a51629cd4b394bb6083c2ee0e61",
"extension": "py"... | 2.546875 | stackv2 | from bottle import get, put, request, route, static_file, FileUpload
import requests
import os
downloads_path = os.path.join(os.path.dirname(__file__), '..', 'downloads')
# Helper function to check if a file is downloadable
def is_downloadable(content_type):
if 'html' in content_type.lower():
print('Conte... | 64 | 27.72 | 75 | 16 | 426 | python | [{"finding_id": "codeql_py/reflective-xss_d963ca597c15d804_f557882e", "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... | 4 | true | [
"CWE-079",
"CWE-022",
"CWE-918",
"CWE-918"
] | [
"py/reflective-xss",
"py/path-injection",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
62,
59,
48,
53
] | [
null,
null,
null,
null
] | [
16,
14,
9,
13
] | [
24,
23,
49,
52
] | |
2024-11-18T21:11:01.597083+00:00 | 1,546,797,958,000 | bbf29826ad224f3f42f19dd7b5a9cf00b5116244 | 3 | {
"blob_id": "bbf29826ad224f3f42f19dd7b5a9cf00b5116244",
"branch_name": "refs/heads/master",
"committer_date": 1546797958000,
"content_id": "7a50d6dea9ac0f55af007919a82e31ba7ff4734d",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "a57ff9725fbf1309a2c63860d1c3728f75c70785",
"ext... | 2.78125 | stackv2 | import argparse
from pathlib import Path
import markdown2
import jinja2
import os
import shutil
parser = argparse.ArgumentParser()
parser.add_argument("-i", help="Chemin du/des source.", type=str)
parser.add_argument("-o", help="Chemin du dossier des fichiers générés.", type=str)
parser.add_argument("-t", help="Chem... | 186 | 33.62 | 88 | 32 | 1,130 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5cc9d98b52408909_afac4c8a", "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."
] | [
118,
175
] | [
120,
null
] | [
46,
38
] | [
38,
75
] | |
2024-11-18T19:03:22.159569+00:00 | 1,558,087,464,000 | 0424c0510abe938d73cd972b0eda3815d8ce81d0 | 3 | {
"blob_id": "0424c0510abe938d73cd972b0eda3815d8ce81d0",
"branch_name": "refs/heads/master",
"committer_date": 1558087464000,
"content_id": "3ec34fc9b623475df569adb42cffd689f9448774",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "41f5c290c1727aa219bd6e5c2c5676ad815f41af",
"extension": "py"... | 2.8125 | stackv2 | from flask import Flask
from flask import render_template as render
from flask import request
from flask import abort
import os
app = Flask(__name__)
# Port number is required to fetch from env variable
# http://docs.cloudfoundry.org/devguide/deploy-apps/environment-variable.html#PORT
cf_port = int(os.getenv("PORT")... | 82 | 28.34 | 95 | 11 | 594 | python | [{"finding_id": "codeql_py/flask-debug_c42cd7cbeb897e47_8ff8aee7", "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)."
] | [
82,
76
] | [
null,
null
] | [
5,
12
] | [
54,
43
] | |
2024-11-18T19:03:39.733681+00:00 | 1,616,590,129,000 | 144d33fec81904be7dfd8816992c24802c45b186 | 2 | {
"blob_id": "144d33fec81904be7dfd8816992c24802c45b186",
"branch_name": "refs/heads/master",
"committer_date": 1616590129000,
"content_id": "4ca5e8b4dc03fe52832d526e45a8e4c55752eeb9",
"detected_licenses": [
"MIT"
],
"directory_id": "359f8234cc26f04532be1962cc86c6d15517b91a",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python3
import requests
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
import sys
if len(sys.argv) < 3:
print('\n[*] USAGE: ./{file} <shell url> <password>\nExample\n\t: ./{file} https://mail.example.com/aspnet_... | 26 | 38.62 | 162 | 15 | 279 | python | [{"finding_id": "codeql_py/request-without-cert-validation_56c50680f4056286_a9b60c6f", "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)."
] | [
16
] | [
null
] | [
15
] | [
148
] | |
2024-11-18T19:03:40.151752+00:00 | 1,486,572,396,000 | b8a56aac6cf979b3860a3b2c0cdbcb2d0e0d86ae | 3 | {
"blob_id": "b8a56aac6cf979b3860a3b2c0cdbcb2d0e0d86ae",
"branch_name": "refs/heads/master",
"committer_date": 1486572396000,
"content_id": "ff1925c6fe10b1758b349fcf987bb6fb900976bb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4eb66338d985f96578d6bc9d9d9322936706bbb2",
"extension": "py"... | 2.53125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Utilities: Jinja2 templates
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from io import open
import jinja2
clas... | 32 | 32.38 | 112 | 15 | 273 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_07f038b018ff9f68_7c5cd884", "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
] | [
23
] | [
20
] | [
50
] | |
2024-11-18T19:39:36.663058+00:00 | 1,532,432,986,000 | 6b645998c28626d580a6f791c2fb3659cf416d12 | 2 | {
"blob_id": "6b645998c28626d580a6f791c2fb3659cf416d12",
"branch_name": "refs/heads/master",
"committer_date": 1532432986000,
"content_id": "2013e8a0df392cb938677eb55b7f56bee0d68661",
"detected_licenses": [
"MIT"
],
"directory_id": "8888c5fdef972ee055ae5f690f58b18785f75cd8",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python
import os
import optparse
import nest
import nest_apps.simple_network as simple
from flask import Flask, request, jsonify
app = Flask(__name__)
# --------------------------
# General request
# --------------------------
@app.route('/', methods=['GET'])
def index():
response = {
'n... | 59 | 27.27 | 79 | 16 | 373 | python | [{"finding_id": "codeql_py/stack-trace-exposure_f083834fb0340525_924fd3c8", "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."
] | [
38
] | [
null
] | [
20
] | [
28
] | |
2024-11-18T19:39:36.709134+00:00 | 1,553,088,683,000 | 724601587e449918b951c8cd932badbcd9062479 | 2 | {
"blob_id": "724601587e449918b951c8cd932badbcd9062479",
"branch_name": "refs/heads/master",
"committer_date": 1553088683000,
"content_id": "f16030a4c3c905bdb9f934d2e867bee3d32bcdc6",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "3f0b141d12c74ce72cc1d090e22d3dce7a08db35",
"extension": "p... | 2.328125 | stackv2 | #coding:utf-8
from flask import *
import hashlib,re
import db,modules
def Can_Login(req):
username,password = req['username'],req['password']
if username == '': return 0,'用户名不能为空'
if password == '': return 0,'密码不能为空'
if not modules.Vaild_Username(username):
return 0,'用户名只能包含大小写字母,数字,下划线和减号'
nowuser = db.Read_... | 42 | 30.71 | 72 | 18 | 381 | python | [{"finding_id": "codeql_py/insecure-cookie_7fb432dc10675b45_b15f96da", "tool_name": "codeql", "rule_id": "py/insecure-cookie", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Cookie is added to response without the 'secure' flag being set.", "remediation": "", "location": {"file_path"... | 5 | true | [
"CWE-614",
"CWE-020",
"CWE-1004",
"CWE-327",
"CWE-327"
] | [
"py/insecure-cookie",
"py/cookie-injection",
"py/client-exposed-cookie",
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is added to response without the 'secure' flag being set.",
"Cookie is constructed from a [user-supplied input](1).\nCookie is constructed from a [user-supplied input](2).\nCookie is constructed from a [user-supplied input](3).",
"Sensitive server cookie is set without HttpOnly flag.",
"[Sensitive dat... | [
39,
39,
39,
17,
18
] | [
null,
null,
null,
null,
null
] | [
4,
31,
4,
35,
31
] | [
60,
39,
60,
59,
55
] | |
2024-11-18T20:18:02.463592+00:00 | 1,491,562,485,000 | 8d0cfd0cc80bbd1c2a4c6940022dc373b09ef091 | 2 | {
"blob_id": "8d0cfd0cc80bbd1c2a4c6940022dc373b09ef091",
"branch_name": "refs/heads/master",
"committer_date": 1491562485000,
"content_id": "fb8a53e1651c048185c0c2d8e6babefc66403686",
"detected_licenses": [
"MIT"
],
"directory_id": "2406fd307e308f276b2660f6a32f8251605137c9",
"extension": "py",
"fi... | 2.46875 | stackv2 | from flask import Blueprint,request,redirect,url_for, render_template
from bs4 import BeautifulSoup
import requests
from urllib.parse import urljoin
from URLOptimize import URLOptimize
links_blueprint = Blueprint('links_blueprint',__name__)
@links_blueprint.route('/links')
def links():
url = request.args.get('url... | 25 | 28.36 | 77 | 14 | 171 | python | [{"finding_id": "codeql_py/full-ssrf_3862f034d0a4d122_046f3df3", "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)."
] | [
15
] | [
null
] | [
17
] | [
34
] | |
2024-11-18T20:18:06.657690+00:00 | 1,558,934,470,000 | 558ce37a292b24e0f4a8fa263067762e8750b18b | 3 | {
"blob_id": "558ce37a292b24e0f4a8fa263067762e8750b18b",
"branch_name": "refs/heads/master",
"committer_date": 1558934470000,
"content_id": "453f22a25aaa6c954107afde3389c591ca84c3db",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "075409c467b6e68fd6d330efae7bf8783c91eba3",
"extension": "py"... | 2.546875 | stackv2 | import hashlib
from flask_mail import Message
from flask_api.app import mail, app
from flask_api.api.restplus import async
def send_sms(phone_number, validate_number):
"""
发送短信
:param phone_number:
:param validate_number:
:return:
"""
return True, ""
def encrypted_password(password):
... | 39 | 20.13 | 66 | 10 | 208 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_ac1706a6ffe05558_ee8f5515", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
25
] | [
null
] | [
16
] | [
40
] | |
2024-11-18T20:18:44.372244+00:00 | 1,676,102,623,000 | 0b0bc90dff3e9ea07187aa18137de1458ba6162a | 2 | {
"blob_id": "0b0bc90dff3e9ea07187aa18137de1458ba6162a",
"branch_name": "refs/heads/master",
"committer_date": 1676102623000,
"content_id": "099fadcc930f2c39eacea7d9107b617dd409f3c4",
"detected_licenses": [
"MIT"
],
"directory_id": "b8fe690095ec5220d64cbe0549728bd2721d00bd",
"extension": "py",
"fi... | 2.40625 | stackv2 | #
# Gallery WebApp
# Copyright 2019-2022 Craig Drummond <craig.p.drummond@gmail.com>
# Licensed under the MIT license.
#
import json
import os
import datetime
import re
from . import config
from . import utils
from . import log
from flask import Blueprint, abort, request
api = Blueprint(__name__, __name__)
def resol... | 218 | 35.06 | 131 | 24 | 1,814 | python | [{"finding_id": "codeql_py/path-injection_bf4a4b3d426b131f_10560452", "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", ... | 10 | true | [
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"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).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](... | [
47,
52,
54,
56,
69,
70,
127,
134,
167,
171
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
19,
23,
23,
35,
29,
26,
29,
26,
29,
26
] | [
27,
31,
31,
73,
58,
61,
53,
56,
53,
56
] | |
2024-11-18T20:18:58.996932+00:00 | 1,512,146,918,000 | 1ed73b7168866fdf63dac2661fb036bf420b7b80 | 3 | {
"blob_id": "1ed73b7168866fdf63dac2661fb036bf420b7b80",
"branch_name": "refs/heads/master",
"committer_date": 1512146918000,
"content_id": "190790dff1b48b1f6b2a91f6ece87fa45c2c9a52",
"detected_licenses": [
"Artistic-2.0"
],
"directory_id": "f37a00d8d7e7a9f6692efbf689bf8449e8846ffb",
"extension": "p... | 2.59375 | stackv2 | #!/usr/bin/env python
import re
import sys
import urllib2
from jinja2 import Template
from jinja2 import Environment
from jinja2 import FileSystemLoader
import xml.etree.ElementTree as ET
from weasyprint import HTML
from weasyprint import CSS
#---------------------------------------------------------------------
... | 63 | 20.48 | 70 | 12 | 303 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_90fee9164d568165_6cbecb7c", "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
] | [
null
] | [
7
] | [
48
] | |
2024-11-18T20:51:29.849261+00:00 | 1,625,104,339,000 | b4052fc6c595e76eb6f82d05bdfdbee46e9774e8 | 2 | {
"blob_id": "b4052fc6c595e76eb6f82d05bdfdbee46e9774e8",
"branch_name": "refs/heads/master",
"committer_date": 1625104339000,
"content_id": "05246c752acedc9a888e311d643eb8f7bb8a1ae3",
"detected_licenses": [
"MIT"
],
"directory_id": "6d7afcf7d9d590c2d3f55ca0298673f03f7d8cc8",
"extension": "py",
"fi... | 2.359375 | stackv2 | # No restocks, only releases
from random_user_agent.params import SoftwareName, HardwareType
from random_user_agent.user_agent import UserAgent
from fp.fp import FreeProxy
from bs4 import BeautifulSoup
import requests
import urllib3
from datetime import datetime
import time
import json
import logging
import dotenv
... | 218 | 31.82 | 123 | 20 | 1,589 | python | [{"finding_id": "codeql_py/request-without-cert-validation_0d7e50f4c6dcf2c6_81d0d68b", "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)."
] | [
106
] | [
null
] | [
12
] | [
84
] | |
2024-11-18T20:51:46.230281+00:00 | 1,572,971,803,000 | 883d73cbcfdd4fb96387fef61fd3e0247ca2b91d | 3 | {
"blob_id": "883d73cbcfdd4fb96387fef61fd3e0247ca2b91d",
"branch_name": "refs/heads/master",
"committer_date": 1572971803000,
"content_id": "11c8dc78de2f0a0fe4bd287c6172417bd3b91bcb",
"detected_licenses": [
"MIT"
],
"directory_id": "36a86af672a9510a88d735cd8d8ddb15f366f523",
"extension": "py",
"fi... | 2.53125 | stackv2 | import logging
import hashlib, functools, io
from struct import pack, unpack
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives.ciphers import Cipher, algorit... | 91 | 40.8 | 140 | 17 | 1,095 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f38ad35182f6dbea_70b7e9c9", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in... | 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 (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally... | [
16,
18
] | [
null,
null
] | [
31,
29
] | [
32,
30
] | |
2024-11-18T19:07:13.462538+00:00 | 1,687,206,116,000 | 7d6f347e509253deeca27480b3f6b0bf90eab888 | 2 | {
"blob_id": "7d6f347e509253deeca27480b3f6b0bf90eab888",
"branch_name": "refs/heads/master",
"committer_date": 1687206116000,
"content_id": "f6678b89af05d8411e777bc2b1879accc702c29a",
"detected_licenses": [
"MIT"
],
"directory_id": "e3fd4acd6bd8f53abe5cd783816415f3d9428c63",
"extension": "py",
"fi... | 2.453125 | stackv2 | import json
import re
from db import db, User, Event
from flask import Flask, request
import helpers
import users_dao
db_filename = "ff.db"
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///%s' % db_filename
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
app.config['SQLALCHEMY_ECHO'] = Tr... | 261 | 32.23 | 133 | 16 | 1,931 | python | [{"finding_id": "codeql_py/flask-debug_348548b8329dc3b1_8435928a", "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.", ... | 6 | true | [
"CWE-215",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a ... | [
261,
86,
105,
167,
187,
221
] | [
null,
null,
null,
null,
null,
null
] | [
5,
16,
16,
16,
16,
16
] | [
51,
28,
29,
29,
29,
29
] | |
2024-11-18T19:18:54.489237+00:00 | 1,550,392,462,000 | ade62d02bdd1668d9a128d886fa00d45ba28d908 | 3 | {
"blob_id": "ade62d02bdd1668d9a128d886fa00d45ba28d908",
"branch_name": "refs/heads/master",
"committer_date": 1550392462000,
"content_id": "cec04c0a56c911a96557fd0c696b980e0f36266b",
"detected_licenses": [
"MIT"
],
"directory_id": "68d20f52a5936112c35a2ea23740dcdd892b97a8",
"extension": "py",
"fi... | 2.78125 | stackv2 | #!/usr/bin/env python3
"""
Open the TOKYDOOR by sending a command on Bluetooth
# sudo pip3 install gatt
# sudo apt-get install python3-dbus
#
# https://github.com/getsenic/gatt-python
# all AT commands for Bluetooth 4.0:
# http://fab.cba.mit.edu/classes/863.15/doc/tutorials/programming/bluetooth/bluetooth40_en.pdf
... | 152 | 41.81 | 156 | 18 | 1,492 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4806007678bb16ba_f9596288", "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.", "... | 8 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive... | [
31,
35,
39,
43,
45,
47,
101,
109
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
15,
15,
15,
15,
19,
23,
27,
23
] | [
52,
76,
55,
60,
74,
94,
30,
26
] | |
2024-11-18T19:19:00.367310+00:00 | 1,595,099,643,000 | f619dcb208f4c8d08210e47fc07106ad0626bbf2 | 3 | {
"blob_id": "f619dcb208f4c8d08210e47fc07106ad0626bbf2",
"branch_name": "refs/heads/master",
"committer_date": 1595099643000,
"content_id": "8e1244f979348a99773f08e086acba53c7f4785b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "56db8b27fa5bf02408ab9d6e782710dcee4540ed",
"extension": "py"... | 2.984375 | stackv2 | import requests
import tempfile
import os
import tarfile
fooddb_version = 'foodb_2020_4_7_csv'
def download(save_path):
"""
Downloads and extract a tar.gz in a temporary directory and saves the directory in save_path
:param save_path: specifies the location to save the directory
:return: a folder wit... | 32 | 29.19 | 96 | 10 | 242 | python | [{"finding_id": "codeql_py/tarslip_2355e7d7280dcfdb_fe7102c3", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
31
] | [
null
] | [
5
] | [
7
] | |
2024-11-18T19:29:48.179119+00:00 | 1,584,955,364,000 | 0c179dd0013e956c71c06266a61efc5d3fc9cebf | 3 | {
"blob_id": "0c179dd0013e956c71c06266a61efc5d3fc9cebf",
"branch_name": "refs/heads/master",
"committer_date": 1584955364000,
"content_id": "d686c33c6e17bbe0d31f4023c12c67ce5f6d49e0",
"detected_licenses": [
"MIT"
],
"directory_id": "9c14e3cf501998a0835e8b49539bf363df23ba3e",
"extension": "py",
"fi... | 2.859375 | stackv2 | """SSL verification utility."""
import argparse
import csv
import logging
import socket
import ssl
from concurrent.futures import ThreadPoolExecutor
from typing import Dict, List, Optional, Tuple, Type, Union
logging.basicConfig()
logger = logging.getLogger("ssl_verify")
class CSVReport:
"""Report writer."""
... | 174 | 31.33 | 97 | 18 | 1,218 | python | [{"finding_id": "codeql_py/insecure-protocol_bd5dd2493f89d34a_f4ddbb08", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.SSLContext](1)."
] | [
105
] | [
null
] | [
14
] | [
21
] | |
2024-11-18T19:29:50.170736+00:00 | 1,578,252,391,000 | ed1fee2aebd7cc6d0ee2e9baa7e0fc9ddb2e0b21 | 3 | {
"blob_id": "ed1fee2aebd7cc6d0ee2e9baa7e0fc9ddb2e0b21",
"branch_name": "refs/heads/master",
"committer_date": 1578252391000,
"content_id": "ac8821454ed22eba93959db6f92eec20405318aa",
"detected_licenses": [
"MIT"
],
"directory_id": "01adf3ce18f0afbbbfaa7290773e8bd5730a938c",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Flask, url_for, jsonify
import sqlite3, logging
logging.basicConfig(level=logging.DEBUG, format='%(message)s')
application = Flask(__name__)
@application.route('/')
def welcome():
return 'Welcome to the coffee shop.'
@application.route('/menu/<drinks>', methods=['GET'])
def show_drinks(drinks)... | 26 | 26.92 | 69 | 14 | 181 | python | [{"finding_id": "codeql_py/sql-injection_d11c100230a2be36_dbad4839", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 1 | true | [
"CWE-089"
] | [
"py/sql-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1)."
] | [
17
] | [
null
] | [
27
] | [
57
] | |
2024-11-18T19:29:52.440238+00:00 | 1,621,261,992,000 | 327281ea0823459533f5d5b4b1b6d9711db07d1d | 3 | {
"blob_id": "327281ea0823459533f5d5b4b1b6d9711db07d1d",
"branch_name": "refs/heads/master",
"committer_date": 1621261992000,
"content_id": "b32dafb84aad9f196357787590e2a61f0109289c",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7170560e3fc1ca5d8863bfe6fb0d75f46f8c0fc7",
"extension": "p... | 2.546875 | stackv2 | from tornado import gen
from jupyterhub.handlers import BaseHandler
class LTI11AuthenticateHandler(BaseHandler):
"""
Handler for /lti/launch
Implements v1 of the LTI protocol for passing authentication information
through.
If there's a custom parameter called 'next', will redirect user to
t... | 51 | 44.47 | 164 | 13 | 588 | python | [{"finding_id": "codeql_py/url-redirection_e37f38a6d19d3fc3_b537e367", "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)."
] | [
51
] | [
null
] | [
23
] | [
36
] | |
2024-11-18T19:44:25.036658+00:00 | 1,669,840,522,000 | 23f5a21cd42e1a00c73ba56450c36dc87775acb4 | 2 | {
"blob_id": "23f5a21cd42e1a00c73ba56450c36dc87775acb4",
"branch_name": "refs/heads/main",
"committer_date": 1669840522000,
"content_id": "53b66b20ec8e4ef6aaf16d11d886ce50a23ed021",
"detected_licenses": [
"MIT"
],
"directory_id": "ad990f6e9b140167b37b122b4ee909c8d2b4a781",
"extension": "py",
"file... | 2.4375 | stackv2 | # Copyright (c) 2022 Board of Regents of the University of Wisconsin System
import os
import re
import pathlib
from datetime import datetime
from urllib import parse
from flask import Flask, request, abort, redirect, Response
app = Flask(__name__)
REDIRECTS_PATH = pathlib.Path(os.environ['REDIRECTS_PATH'])
HITCOUNT... | 173 | 28.54 | 78 | 18 | 1,298 | python | [{"finding_id": "codeql_py/path-injection_5a8962b828509ea7_32b82487", "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", ... | 18 | true | [
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](... | [
64,
64,
65,
76,
76,
77,
112,
119,
150,
169,
44,
47,
59,
71,
115,
122,
158,
168
] | [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
] | [
9,
32,
25,
9,
31,
25,
19,
19,
19,
15,
21,
26,
22,
22,
26,
26,
26,
22
] | [
18,
41,
34,
17,
39,
33,
28,
28,
27,
25,
46,
60,
48,
47,
70,
61,
60,
52
] | |
2024-11-18T19:44:28.088748+00:00 | 1,618,327,780,000 | 280f70c7607f8f45b27007d986a95bb28c7a6aa7 | 3 | {
"blob_id": "280f70c7607f8f45b27007d986a95bb28c7a6aa7",
"branch_name": "refs/heads/master",
"committer_date": 1618327780000,
"content_id": "80cce66bc99ec3668546447480ea649451cc7d3b",
"detected_licenses": [
"MIT"
],
"directory_id": "418339d4325d0b33811288937306466c4e872a0b",
"extension": "py",
"fi... | 2.765625 | stackv2 | import os
import pickle
###############################################################################
## Employee class
##
class ConfigEmployee(object):
def __init__(self, parent=None):
self.config_dict = dict()
self.employee_dict = dict()
self.employee_conf_path = ""
self.emplo... | 108 | 36.03 | 79 | 14 | 819 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_95674e51dd07ddbc_fbf29fa4", "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."
] | [
80
] | [
null
] | [
20
] | [
21
] | |
2024-11-18T19:44:43.213198+00:00 | 1,485,095,593,000 | 9f978771c9e097d02a981cf0e0555418f3e2cbad | 3 | {
"blob_id": "9f978771c9e097d02a981cf0e0555418f3e2cbad",
"branch_name": "refs/heads/master",
"committer_date": 1485095593000,
"content_id": "de9470eeee8d74c4c6167595a2008f431f7258a5",
"detected_licenses": [
"MIT"
],
"directory_id": "56be6bfd7ae0f4b950e9fd7e6890e17500774cbb",
"extension": "py",
"fi... | 2.78125 | stackv2 | import requests
import math
import json
SEARCH_RADIUS = 0.25 # miles
CHICAGO_AREA = 227.3 # square miles
def todegrees(miles):
return miles / 69.0
def tomiles(degrees):
return degrees * 69
SEARCH_OFFSET = todegrees(SEARCH_RADIUS)
def blocksincity(sidelength):
"""Calculates the number of blocks with ... | 126 | 31.54 | 85 | 27 | 1,108 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cca5c0021ee7f007_6a83616e", "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."
] | [
47
] | [
null
] | [
19
] | [
50
] | |
2024-11-18T19:58:01.693809+00:00 | 1,627,988,503,000 | 911baf5cae4f00e533ec75693b00622e483b43a1 | 2 | {
"blob_id": "911baf5cae4f00e533ec75693b00622e483b43a1",
"branch_name": "refs/heads/master",
"committer_date": 1627988503000,
"content_id": "f30da61e2d9a9001bf21fb8f26c36899db5c2afd",
"detected_licenses": [
"MIT"
],
"directory_id": "b724425e693347c76df524251425792a9013ab72",
"extension": "py",
"fi... | 2.375 | stackv2 | from flask import Flask
from flask import request
from waitress import serve
import synonyms as sy
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/synonyms/<word>')
def synonyms(word):
size = int(request.args.get('size', 10))
res = sy.nearby(word, size)
r... | 27 | 17.74 | 44 | 13 | 135 | python | [{"finding_id": "codeql_py/reflective-xss_37781fa5d39f2955_f6c22b30", "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)."
] | [
18
] | [
23
] | [
12
] | [
6
] | |
2024-11-18T20:10:26.800511+00:00 | 1,517,572,163,000 | af504408cc90d7a3d3db8ffbf685ed107c2e3f08 | 3 | {
"blob_id": "af504408cc90d7a3d3db8ffbf685ed107c2e3f08",
"branch_name": "refs/heads/master",
"committer_date": 1517572163000,
"content_id": "57558d863c4c8f66093a0640dfe53af824099d0e",
"detected_licenses": [
"MIT"
],
"directory_id": "a92820973c6af869fda01ecce5aba6de1eaf0e79",
"extension": "py",
"fi... | 2.71875 | stackv2 | """Run code in a jail."""
import logging
import os
import os.path
import resource
import shutil
import subprocess
import sys
import threading
import time
from .util import temp_directory
log = logging.getLogger(__name__)
# TODO: limit too much stdout data?
# Configure the commands
# COMMANDS is a map from an abst... | 281 | 31.29 | 95 | 19 | 2,176 | python | [{"finding_id": "codeql_py/overly-permissive-file_b678c47ea906a241_7d2b2be0", "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": ... | 2 | true | [
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world writable."
] | [
162,
168
] | [
null,
null
] | [
9,
9
] | [
32,
31
] | |
2024-11-18T20:23:30.642606+00:00 | 1,553,131,695,000 | 21737209c9e7030bcbd8bbbba8fe592e01241a54 | 2 | {
"blob_id": "21737209c9e7030bcbd8bbbba8fe592e01241a54",
"branch_name": "refs/heads/master",
"committer_date": 1553131695000,
"content_id": "07f0107dc2e76daf071d25c040617589c84c0b0d",
"detected_licenses": [
"MIT"
],
"directory_id": "9dc9f5956ce47fcc5f6ad7d670cf1f1518c3bca4",
"extension": "py",
"fi... | 2.484375 | stackv2 |
import base64
import binascii
import hashlib
import hmac
import json
import os
import xml.dom.minidom
from flask import Flask, request
from flask import jsonify
app = Flask(__name__)
WEBHOOK_KEY = os.getenv('ARLO_WEBHOOK_KEY', 'Your base64 encoded key here...')
@app.route("/")
def home():
return jsonify(hello... | 50 | 23.92 | 97 | 19 | 303 | python | [{"finding_id": "codeql_py/xml-bomb_bcbf77839e5c9f44_21691c03", "tool_name": "codeql", "rule_id": "py/xml-bomb", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "XML parsing depends on a [user-provided value](1) without guarding against uncontrolled entity expansion.", "remediatio... | 1 | true | [
"CWE-776"
] | [
"py/xml-bomb"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"XML parsing depends on a [user-provided value](1) without guarding against uncontrolled entity expansion."
] | [
27
] | [
null
] | [
43
] | [
55
] | |
2024-11-18T20:23:33.431743+00:00 | 1,481,300,565,000 | a4d570f81c5d49cd4a69c5cdcfa8e2476aaf80d1 | 3 | {
"blob_id": "a4d570f81c5d49cd4a69c5cdcfa8e2476aaf80d1",
"branch_name": "refs/heads/master",
"committer_date": 1481300565000,
"content_id": "04b598b461b6bfb8dc6178f71ada9b1827da2f92",
"detected_licenses": [
"MIT"
],
"directory_id": "9a5ba50e0d7a63c9e63089be72eeeb8a5ab0f083",
"extension": "py",
"fi... | 2.75 | stackv2 | from splinter import Browser
import urllib.request
import codecs
import time
import json
import wget
import uuid
import hashlib
##########
# Bandcamp Bulk Album Downloader
#
# This script will download free albums from BandCamp without user-interaction.
# Note: This script does NOT rip audio from BandCamp pages, it j... | 145 | 35.01 | 130 | 20 | 1,371 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f889d31be3064d7c_8d1c38de", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
78
] | [
null
] | [
27
] | [
53
] | |
2024-11-18T20:23:36.397120+00:00 | 1,612,256,411,000 | a7c4477a0b1be02d531ddaa480b0454a93e71064 | 2 | {
"blob_id": "a7c4477a0b1be02d531ddaa480b0454a93e71064",
"branch_name": "refs/heads/master",
"committer_date": 1612256411000,
"content_id": "ebd61a124935d7cbe6662632e26abfe72ea96f97",
"detected_licenses": [
"MIT"
],
"directory_id": "1306391b509e1d3a7c6b502779c567403650e269",
"extension": "py",
"fi... | 2.390625 | stackv2 | # /psqtraviscontainer/debian_package.py
#
# Functionality common to debian packages.
#
# See /LICENCE.md for Copyright information
"""Functionality common to debian packages."""
import tarfile
from contextlib import closing
def extract_deb_data(archive, extract_dir):
"""Extract archive to extract_dir."""
# ... | 33 | 29.21 | 79 | 18 | 213 | python | [{"finding_id": "codeql_py/tarslip_f2cbf56b154c236b_c90c8b5e", "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)."
] | [
25
] | [
null
] | [
21
] | [
29
] | |
2024-11-18T20:49:40.656358+00:00 | 1,575,120,818,000 | 517decd41d507fd86f796632efea26b9ac641553 | 3 | {
"blob_id": "517decd41d507fd86f796632efea26b9ac641553",
"branch_name": "refs/heads/master",
"committer_date": 1575120818000,
"content_id": "fbf52cd2ef7e9125627d40cf7ff4aa5afee7e419",
"detected_licenses": [
"MIT"
],
"directory_id": "1cd3cc18760c78633634c03ce6ce5ec3646e1d95",
"extension": "py",
"fi... | 2.578125 | stackv2 | from flask import Flask, request, jsonify
from flask_cors import CORS
from io import BytesIO
import sqlite3
import face_recognition
import requests
import numpy
app = Flask(__name__)
CORS(app) # make it accessible for requests
@app.route('/actor', methods=['GET', 'POST'])
def get_new_actor():
img_id = request.a... | 63 | 24.41 | 69 | 16 | 385 | python | [{"finding_id": "codeql_py/partial-ssrf_bdf4b6db2fc622cc_60df34ea", "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... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
20,
23
] | [
null,
null
] | [
16,
16
] | [
61,
37
] | |
2024-11-18T20:49:53.141451+00:00 | 1,585,129,940,000 | e31903cf2629afdfad9ef8ede3d16986624cfdc2 | 2 | {
"blob_id": "e31903cf2629afdfad9ef8ede3d16986624cfdc2",
"branch_name": "refs/heads/master",
"committer_date": 1585129940000,
"content_id": "3598fe84801b56d95e7f1c3df3d7deac8fe36790",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c384bf34ba25d058e177d143eb799f9a95bbcb32",
"extension": "py"... | 2.40625 | stackv2 | # -*- coding:utf-8 -*-
import subprocess
import os
import abc
import logging
import uuid
import json
_logger = logging.getLogger(__name__)
class DataXConnectionInfo(object):
def __init__(self, db_type, host, port, schema, username, password):
self.db_type = db_type
self.host = host
self... | 240 | 25.27 | 82 | 18 | 1,355 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_9ba1bc31012c5495_a589f0ee", "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."
] | [
138
] | [
null
] | [
18
] | [
34
] | |
2024-11-18T20:50:10.534988+00:00 | 1,494,875,804,000 | ba8d50a9160c18e33d748c3eb7527dcd6ae388b8 | 2 | {
"blob_id": "ba8d50a9160c18e33d748c3eb7527dcd6ae388b8",
"branch_name": "refs/heads/master",
"committer_date": 1494875804000,
"content_id": "21cb2f66d7da1161f0e024cff56cdae4633bca09",
"detected_licenses": [
"MIT"
],
"directory_id": "222bf5322bcc7ef8ed53c8aecabfbe089f998c41",
"extension": "py",
"fi... | 2.4375 | stackv2 | #!/usr/local/env python
# REQ:
# Billboard
# flask
import billboard
import datetime
import json
from config import WUML_SECRET, MY_URL, MY_PORT, APP_PATH
from flask import Flask
from flask import request
from flask import render_template
from os import listdir
from os.path import isfile, join
app = Flask(__name__)... | 191 | 30.81 | 133 | 19 | 1,705 | python | [{"finding_id": "codeql_py/flask-debug_ee7ec3de190be2f8_73ffd68d", "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-117",
"CWE-117"
] | [
"py/flask-debug",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
191,
163,
178
] | [
null,
null,
null
] | [
5,
20,
20
] | [
66,
51,
51
] | |
2024-11-18T20:50:17.925673+00:00 | 1,602,959,498,000 | ce675deaf1ec1fe7052e3e9f78d006a4adfe00af | 3 | {
"blob_id": "ce675deaf1ec1fe7052e3e9f78d006a4adfe00af",
"branch_name": "refs/heads/main",
"committer_date": 1602959498000,
"content_id": "c536409968663033b49b7b0847abe9b43e2ea374",
"detected_licenses": [
"Unlicense"
],
"directory_id": "8ce58e9bf98b4df33e8b88106b27f68c79dd38d6",
"extension": "py",
... | 2.796875 | stackv2 | from flask import Flask
from flask import request, redirect, render_template
import flask
app = Flask(__name__)
#The default route renders the index and shows the form
@app.route('/')
def displayIndexPage():
return flask.send_file("index.html")
"""
This is the route for the database viewer, when the user clicks t... | 93 | 40.98 | 175 | 21 | 829 | python | [{"finding_id": "codeql_py/sql-injection_820dea95fd0c4de5_b1610243", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown... | 2 | true | [
"CWE-089",
"CWE-089"
] | [
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1)."
] | [
67,
78
] | [
null,
null
] | [
29,
37
] | [
43,
49
] | |
2024-11-18T20:50:30.612716+00:00 | 1,546,859,647,000 | 91eda4f30d1c15ef78b830ae5fd7cdfb532bd314 | 3 | {
"blob_id": "91eda4f30d1c15ef78b830ae5fd7cdfb532bd314",
"branch_name": "refs/heads/main",
"committer_date": 1546859647000,
"content_id": "c7ee17b0dd8f4530c9ea9b19b38b3a04e172fb48",
"detected_licenses": [
"MIT"
],
"directory_id": "81ffad0e50e96d5e2f64f016ebf80f95116d5ec6",
"extension": "py",
"file... | 2.625 | stackv2 | #! /usr/bin/env python3
import base64
import requests
import json
import sys
import sched
import configparser, os
import time
import argparse
#read config from CLI config file (~/.nemxorc)
config = configparser.ConfigParser()
homedir = os.path.expanduser("~")
config.read(homedir+'/.nexmorc')
API_KEY = config['creden... | 79 | 33.43 | 138 | 16 | 724 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7c695ef2536366e5_a3b23914", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 6 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive d... | [
30,
44,
45,
57,
71,
72
] | [
null,
null,
null,
null,
null,
null
] | [
11,
11,
11,
12,
11,
11
] | [
67,
15,
20,
21,
19,
78
] | |
2024-11-18T20:50:37.937371+00:00 | 1,687,893,405,000 | 3c9134fd9f44a01ebbcaf601c2d4ee03d288fc0c | 4 | {
"blob_id": "3c9134fd9f44a01ebbcaf601c2d4ee03d288fc0c",
"branch_name": "refs/heads/master",
"committer_date": 1687893405000,
"content_id": "0e63b2cde22a14c84dbc605580693461f6a4304e",
"detected_licenses": [
"MIT"
],
"directory_id": "ee67abf5cd4ada91c1c8f68eecefbbab6ea02ae3",
"extension": "py",
"fi... | 3.625 | stackv2 | #!/usr/bin/python3
#
# Takes two files on input. Tries to find every line of the second file within the first file
# and for every found match - extracts password value from the second file's line. Then prints these correlations.
#
# In other words:
#
# FileA:
# some-user@example.com,68eacb97d86f0c4621fa2b0... | 65 | 31.85 | 114 | 16 | 585 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_506fbecd55907432_2e39dcad", "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."
] | [
61
] | [
null
] | [
23
] | [
55
] | |
2024-11-18T20:50:40.409349+00:00 | 1,568,065,504,000 | b53f557aee11cdb57cac2bcc8c19db34b2bf0f5d | 3 | {
"blob_id": "b53f557aee11cdb57cac2bcc8c19db34b2bf0f5d",
"branch_name": "refs/heads/master",
"committer_date": 1568065504000,
"content_id": "753918151f1188caddc973181bb21cde37c03dfc",
"detected_licenses": [
"MIT"
],
"directory_id": "f8bf2ed4f0a6f83fb08f7144c5406107879b33fc",
"extension": "py",
"fi... | 2.953125 | stackv2 | import ftplib
import logging
import paramiko
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
def send_pages_ftp(pages, host, user, password='',
path=None, rename=True):
"""Upload a set of Pages to an FTP server
pages: [Page],
host: str,
user: str,
... | 119 | 33.13 | 73 | 17 | 892 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_50343fdca9961864_eeeccd23", "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."
] | [
79
] | [
null
] | [
5
] | [
67
] | |
2024-11-18T20:50:46.497680+00:00 | 1,580,858,100,000 | 9e0394b2a7d5c34955dd9e8641fccbca41cc4b92 | 2 | {
"blob_id": "9e0394b2a7d5c34955dd9e8641fccbca41cc4b92",
"branch_name": "refs/heads/master",
"committer_date": 1580858100000,
"content_id": "ba61c2cbea9d59fc1acda2e3efed8674510864b9",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "fa208127fc3230cb842c78d7aa8d342321af94ef",
"exten... | 2.3125 | stackv2 | #pip includes
from flask import Flask, session, redirect, url_for, escape, request, render_template
from sqlalchemy import create_engine, Column, Integer, String, DateTime
from sqlalchemy.ext.declarative import declarative_base
from werkzeug.utils import secure_filename
#main python includes
import datetime, uuid, os... | 84 | 34.32 | 88 | 20 | 712 | python | [{"finding_id": "codeql_py/flask-debug_cd6d7fb9e4b88a13_8d40d0f9", "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-732"
] | [
"py/flask-debug",
"py/overly-permissive-file"
] | [
"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.",
"Overly permissive mask in chmod sets file to world writable."
] | [
82,
50
] | [
null,
null
] | [
5,
15
] | [
51,
77
] | |
2024-11-18T20:50:52.829487+00:00 | 1,676,139,610,000 | ec0f11e3e03c4aa0597e60686c63a28fae963526 | 3 | {
"blob_id": "ec0f11e3e03c4aa0597e60686c63a28fae963526",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "f529a67c26ac5d6f57b11427dfdb7e3f26702a5e",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 2.8125 | stackv2 | #!/usr/bin/python
"""
Karl's unix/rsync time-machine script.
Maintains daily and monthly snapshots of a directory tree, hard linked to save
space when files don't change.
Inspired by http://www.mikerubel.org/computers/rsync_snapshots/, but using
more robust coding practices.
Features:
* The script fails if it's curre... | 193 | 28.32 | 79 | 13 | 1,437 | python | [{"finding_id": "codeql_py/overly-permissive-file_9cb4b2631f4a5b84_5d7c405c", "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."
] | [
105
] | [
null
] | [
9
] | [
31
] | |
2024-11-18T20:50:53.146612+00:00 | 1,586,757,333,000 | af0617e68a9579b4c8759d0c3d278cf752c6c44e | 2 | {
"blob_id": "af0617e68a9579b4c8759d0c3d278cf752c6c44e",
"branch_name": "refs/heads/master",
"committer_date": 1586757333000,
"content_id": "c9d42d8df575501caa58971b9c21f933656c8ab1",
"detected_licenses": [
"MIT"
],
"directory_id": "bf76d24f1e9d1bb5edbd46751e0d0b4391a0abcd",
"extension": "py",
"fi... | 2.484375 | stackv2 | import numpy as np
import matplotlib.pyplot as dsvis
import joblib
import os
import sys
from flask import Flask, render_template, request, url_for
import webbrowser
from threading import Timer
from time import time
class Graph:
def __init__(self, title="Graph"):
self.graph=dict()
self.name=titl... | 223 | 22.71 | 112 | 21 | 1,290 | python | [{"finding_id": "codeql_py/unsafe-deserialization_219669f70b482ab4_b4d91e89", "tool_name": "codeql", "rule_id": "py/unsafe-deserialization", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Unsafe deserialization depends on a [user-provided value](1).", "remediation": "", "locatio... | 2 | true | [
"CWE-502",
"CWE-215"
] | [
"py/unsafe-deserialization",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Unsafe deserialization depends on a [user-provided value](1).",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
168,
223
] | [
null,
null
] | [
23,
5
] | [
27,
24
] | |
2024-11-18T20:51:08.906381+00:00 | 1,499,799,541,000 | f66bc33544f74758a405a192b363c2a7ac8101e3 | 2 | {
"blob_id": "f66bc33544f74758a405a192b363c2a7ac8101e3",
"branch_name": "refs/heads/master",
"committer_date": 1499799541000,
"content_id": "829b8546a7b965062d24a55b387650d2084029ac",
"detected_licenses": [
"MIT"
],
"directory_id": "447ec18e38f289f8ac45acae6bfd7aecfcb16271",
"extension": "py",
"fi... | 2.34375 | stackv2 | import jinja2
import os
class SilentUndefined(jinja2.Undefined):
def _fail_with_undefined_error(self, *args, **kwargs):
return None
class Jinja2(object):
def __init__(self, app, **config):
self.app = app
self.root_dir = config.get('root_dir')
self.env = jinja2.Environment(
... | 37 | 27.22 | 72 | 17 | 234 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_47691780376821c8_648daa7e", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
14
] | [
17
] | [
20
] | [
10
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.