added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T01:28:59.141741+00:00 | 1,629,644,762,000 | 63aed3fac5b0d31feb909b1132ac854efcbc704a | 3 | {
"blob_id": "63aed3fac5b0d31feb909b1132ac854efcbc704a",
"branch_name": "refs/heads/master",
"committer_date": 1629644762000,
"content_id": "b9088371041a410043cc2df18379d844ae780f7e",
"detected_licenses": [
"MIT"
],
"directory_id": "4bfb5b54439ceb7ff97ee3e8dc617d72ec7b5ab6",
"extension": "py",
"fi... | 2.546875 | stackv2 | import os
import sys
from flask import Flask
from flask import redirect
from flask import request
from flask import url_for
from flask_sqlalchemy import SQLAlchemy
from jinja2 import Environment
from sqlalchemy_utils import database_exists
if 'AGAMA_DATABASE_URI' not in os.environ:
print('''
ERROR: Environment v... | 192 | 38.55 | 119 | 13 | 2,821 | python | [{"finding_id": "codeql_py/reflective-xss_151e7cbac99f82b4_cf7bdc94", "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-117",
"CWE-117",
"CWE-117"
] | [
"py/reflective-xss",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
74,
77,
88,
99
] | [
null,
null,
null,
null
] | [
16,
25,
25,
25
] | [
62,
53,
51,
91
] | |
2024-11-19T01:29:26.441869+00:00 | 1,586,597,427,000 | 8c53addddab80529b000313d907298a11e4ebff0 | 4 | {
"blob_id": "8c53addddab80529b000313d907298a11e4ebff0",
"branch_name": "refs/heads/master",
"committer_date": 1586597427000,
"content_id": "5eff9ead05ff50f158888eb549c1057a9425b525",
"detected_licenses": [
"MIT"
],
"directory_id": "3e527ba541586cdcf0c129e6b5bfb5fc8397294b",
"extension": "py",
"fi... | 3.703125 | stackv2 | #!/usr/bin/python3
import random, string, pyperclip
## User Input for length of password between 8 - 40 characters ✅
def main():
while True:
pwd_length = input('How long would you like the password to be?\n(Mut be between 8-40 characters long): ')
## DONE Generate password ✅
while int(pwd_len... | 36 | 32.67 | 122 | 15 | 281 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3eddfeb12e61ea69_3cc70529", "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."
] | [
21
] | [
null
] | [
24
] | [
56
] | |
2024-11-19T01:29:33.615095+00:00 | 1,586,481,811,000 | 7dd97b3019a2189a847c9152c1baf39848b259b8 | 3 | {
"blob_id": "7dd97b3019a2189a847c9152c1baf39848b259b8",
"branch_name": "refs/heads/master",
"committer_date": 1586481811000,
"content_id": "28a66c2f068b5fe3b1b7521ead2e58965acc2128",
"detected_licenses": [
"MIT"
],
"directory_id": "767e22d676ab15d21d824a537b9a88d11f731d1a",
"extension": "py",
"fi... | 2.546875 | stackv2 | """
This file (attempts to) send files to storage pool.
Usually called as a subprocess.
"""
import os
import sys
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
import requests
from requests.auth import HTTPBasicAuth
from src.praxxis.sqlite import sqlite_telemetry
def send(user_in... | 79 | 33.42 | 120 | 16 | 637 | python | [{"finding_id": "codeql_py/request-without-cert-validation_67474fe96d21e3da_ff43ebfe", "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)."
] | [
42
] | [
43
] | [
13
] | [
61
] | |
2024-11-19T01:29:56.217221+00:00 | 1,575,605,555,000 | dd0373dcc10f3b35ec72532ee6afd56c7b393e78 | 2 | {
"blob_id": "dd0373dcc10f3b35ec72532ee6afd56c7b393e78",
"branch_name": "refs/heads/master",
"committer_date": 1575605555000,
"content_id": "11cb9ca49fa787a0cbe64724643e695903d41a37",
"detected_licenses": [
"MIT"
],
"directory_id": "3901a9fdc95461cd5e6b57fda671c87ddf95f773",
"extension": "py",
"fi... | 2.453125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2019/1/29 4:32 PM
# @Author : Karl
# @File : rotated_marker.py
from __future__ import (absolute_import, division, print_function)
import json
from branca.element import Figure, JavascriptLink
from folium.map import Marker
from folium.utilities import _v... | 59 | 29.92 | 128 | 12 | 422 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_7f202a0643797def_5d980250", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
22
] | [
28
] | [
17
] | [
17
] | |
2024-11-19T01:29:57.701270+00:00 | 1,622,519,847,000 | 30c865e8d6261230569354d594b7736d17c75ca3 | 3 | {
"blob_id": "30c865e8d6261230569354d594b7736d17c75ca3",
"branch_name": "refs/heads/main",
"committer_date": 1622519847000,
"content_id": "953f41c00c60bf97a4e69207a2620a1c48a0bd71",
"detected_licenses": [
"MIT"
],
"directory_id": "18583a11d56299ab679d337c94f68f92fc518701",
"extension": "py",
"file... | 2.640625 | stackv2 | from dotenv import load_dotenv # pip install python-dotenv
from geopy import distance
from googleplaces import GooglePlaces, types, lang
import json
import os
import pgeocode
import requests as req
load_dotenv()
GOOGLE_API_KEY = os.getenv('GOOGLE_API_KEY')
google_places = GooglePlaces(GOOGLE_API_KEY)
d... | 57 | 42.61 | 139 | 18 | 645 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_512091617a579b11_e391e7d4", "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... | 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.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
37,
55
] | [
null,
null
] | [
11,
11
] | [
90,
70
] | |
2024-11-19T01:30:37.511977+00:00 | 1,676,139,610,000 | a570f27a7c1170f47520d0fd62cc5ef08e71442c | 4 | {
"blob_id": "a570f27a7c1170f47520d0fd62cc5ef08e71442c",
"branch_name": "refs/heads/master",
"committer_date": 1676139610000,
"content_id": "4ab198d900965b661dbb57b70023f8d4c2106db6",
"detected_licenses": [
"MIT"
],
"directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9",
"extension": "py",
"fi... | 3.59375 | stackv2 | #
# HashUtils - Simple functions derivated from standard Python hashlib.
#
__author__ = 'Mauro Baraldi (mauro@visie.com.br)'
__version__ = '0.0.2: February 17, 2011'
import re
import hashlib
from datetime import datetime
class Hash:
"""Common facilities using hashlib standard lib. Algotrithm used in all
... | 61 | 32.89 | 79 | 15 | 676 | python | [{"finding_id": "codeql_py/overly-large-range_577e9cda846fb6ff_46f2ad91", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
49
] | [
null
] | [
33
] | [
36
] | |
2024-11-19T01:54:50.802167+00:00 | 1,480,086,734,000 | 6808c590afd03550a27f7a6e1f130d1061be866e | 3 | {
"blob_id": "6808c590afd03550a27f7a6e1f130d1061be866e",
"branch_name": "refs/heads/master",
"committer_date": 1480086734000,
"content_id": "817c2e7636337e7b019ed4effa1bfeb50c3ef8fc",
"detected_licenses": [
"MIT"
],
"directory_id": "da32a83d704ca8fe6d614ee9ddc21d96cb21908c",
"extension": "py",
"fi... | 2.671875 | stackv2 | # -*- coding: UTF-8 -*-
import BaseHTTPServer
import json
from ocr_casia import MyModel
import numpy as np
import random
import pandas as pd
from os import system
#服务器端配置
HOST_NAME = 'localhost'
PORT_NUMBER = 9000
#这个值是通过运行神经网络设计脚本得到的最优值
# -*- coding: UTF-8 -*-
#加载数据的说明文件
# labels 1~6对应六种情感
# 1 angry
# 2 fear... | 99 | 25.36 | 164 | 18 | 717 | python | [{"finding_id": "codeql_py/command-line-injection_117a9ca20ebef680_95334bbf", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 1 | true | [
"CWE-078"
] | [
"py/command-line-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1)."
] | [
41
] | [
null
] | [
12
] | [
164
] | |
2024-11-19T01:54:56.449556+00:00 | 1,508,069,381,000 | 80295b1a52652711b0503ddb89cbd962bc5349e0 | 2 | {
"blob_id": "80295b1a52652711b0503ddb89cbd962bc5349e0",
"branch_name": "refs/heads/master",
"committer_date": 1508069381000,
"content_id": "f234c6b36f3e8bdc1b1eb6525b51f35796527a57",
"detected_licenses": [
"MIT"
],
"directory_id": "d63b987111c939bb8442daedddc45eb713b9b811",
"extension": "py",
"fi... | 2.34375 | stackv2 | #! /usr/bin/python3
import argparse
import hashlib
import os
import jinja2
def main():
# create web-base.properties
template_dir = os.path.dirname(os.path.realpath(__file__)) + "/templates"
jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir))
jinja_tpl = jinja_env.get_template... | 22 | 20.32 | 80 | 12 | 112 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3753e45760e3731b_1ba6d2df", "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."
] | [
12
] | [
null
] | [
17
] | [
81
] | |
2024-11-19T01:54:56.617358+00:00 | 1,406,400,218,000 | 2dfb1ac35db97752b644f64d9964ff2de5091b6d | 3 | {
"blob_id": "2dfb1ac35db97752b644f64d9964ff2de5091b6d",
"branch_name": "refs/heads/master",
"committer_date": 1406400218000,
"content_id": "47d46cc96d46b705802fc8bf8ae2fe6d70ee8f8d",
"detected_licenses": [
"MIT"
],
"directory_id": "8a22dc31e8b87690087b219a87754f3a2bc0721c",
"extension": "py",
"fi... | 2.71875 | stackv2 | import socket
import ssl
from select import select
class SocketConnection:
def __init__(self, host: str, port: int, useSsl: bool):
self.host = host
self.port = port
self.useSsl = useSsl
self.__sendbuf = b''
self.__recvbuf = b''
self.__socket = self._getSocket()
def _getSocket(self) -> socket.socket:
s ... | 69 | 26.39 | 123 | 18 | 530 | python | [{"finding_id": "codeql_py/insecure-protocol_4dda5b375d58c982_8a5bddf2", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).", "remediation": "", "l... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1)."
] | [
23
] | [
null
] | [
10
] | [
62
] | |
2024-11-19T01:55:04.972870+00:00 | 1,622,298,775,000 | 86e933a21acb6bceaad3f7f460e2ef9f9b027db8 | 3 | {
"blob_id": "86e933a21acb6bceaad3f7f460e2ef9f9b027db8",
"branch_name": "refs/heads/main",
"committer_date": 1622298775000,
"content_id": "3a4fb57b459c419ac7ed3b31347ce02f99534c67",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "07f6a9284517ec196d02322115323ff2f49bb34c",
"extension": "py",
... | 2.78125 | stackv2 | import os
import zipfile
import requests
def download_extract(url):
"""
Download the movielens dataset.
"""
BASE_DIR = './data/'
os.makedirs(f'{BASE_DIR}', exist_ok=True)
fname = os.path.join(BASE_DIR, url.split('/')[-1])
print(f'Downloading {fname} from {url}...')
r = requests.ge... | 27 | 21.96 | 53 | 12 | 161 | python | [{"finding_id": "codeql_py/request-without-cert-validation_fe4a35177724d6af_fe884d99", "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
] | [
8
] | [
52
] | |
2024-11-19T01:55:09.094725+00:00 | 1,636,113,645,000 | 01fb637f241e248805f21b60bcc719d970ddf9e4 | 3 | {
"blob_id": "01fb637f241e248805f21b60bcc719d970ddf9e4",
"branch_name": "refs/heads/master",
"committer_date": 1636113645000,
"content_id": "befd6783d7c2dfe4e4887ef2c0e4347a10a5f63f",
"detected_licenses": [
"MIT"
],
"directory_id": "80f4b570fdf6ef0f941ae3b2263bbfc9a0eef35c",
"extension": "py",
"fi... | 2.6875 | stackv2 | # dump_data.py
# initialize SPARKDATASET_HOME, and
# dump sparkdataset/resources.tar.gz into $HOME/.sparkdataset/
import tarfile
from os import mkdir as os_mkdir
from os import path as os_path
from os.path import join as path_join
def __setup_db():
homedir = os_path.expanduser('~')
SPARKDATASET_HOME = path_j... | 42 | 33.45 | 76 | 12 | 362 | python | [{"finding_id": "codeql_py/tarslip_591d39649f957d5f_b3951b48", "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)."
] | [
40
] | [
null
] | [
9
] | [
12
] | |
2024-11-19T01:55:17.684491+00:00 | 1,479,412,636,000 | ba6defa107f8d86cd0ed0717e13f8b48bb700cba | 3 | {
"blob_id": "ba6defa107f8d86cd0ed0717e13f8b48bb700cba",
"branch_name": "refs/heads/master",
"committer_date": 1479412636000,
"content_id": "9fcd4d94a17e5a12b66af016386a514c6dcfdaa5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1c0214642fa6a68bf2a79a8a75407f827e5ba7dc",
"extension": "py"... | 3 | stackv2 | import os
import shutil
import tarfile
import tempfile
from app.util.process_utils import Popen_with_delayed_expansion
def async_delete(path):
"""
Asynchronously delete a file or a directory. This functionality is handy for deleting large directories.
For example, in ClusterRunner, deleting the results d... | 118 | 31.05 | 116 | 13 | 876 | python | [{"finding_id": "codeql_py/tarslip_424820f0e84dc8ce_b44fdea9", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
87
] | [
null
] | [
13
] | [
14
] | |
2024-11-19T02:07:09.743429+00:00 | 1,500,265,579,000 | 1917f0c4bca03bc349cbcd328f388c4cb36bafa6 | 2 | {
"blob_id": "1917f0c4bca03bc349cbcd328f388c4cb36bafa6",
"branch_name": "refs/heads/master",
"committer_date": 1500265579000,
"content_id": "8bfdcca1431d85723aa7b93c967d14640ccbde64",
"detected_licenses": [
"MIT"
],
"directory_id": "b6dc64f10dc5fa0f0ada05be50d887795ae5d462",
"extension": "py",
"fi... | 2.421875 | stackv2 | import pyautogui, flask
app = flask.Flask(__name__)
@app.route('/')
def send_index_page():
return flask.render_template('index.html')
@app.route('/keypress/<keypress>')
def process_key(keypress=None):
if(keypress):
print('Received keypress for ' + keypress)
pyautogui.keyDown(keypress)
... | 24 | 21.38 | 50 | 12 | 135 | python | [{"finding_id": "codeql_py/flask-debug_8713c787ac9000cf_3cad980c", "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)."
] | [
24,
19
] | [
null,
null
] | [
5,
12
] | [
40,
20
] | |
2024-11-19T02:07:14.999587+00:00 | 1,455,538,914,000 | c1c77cc848cabd51db6927ca0d9293ad704ee6ee | 3 | {
"blob_id": "c1c77cc848cabd51db6927ca0d9293ad704ee6ee",
"branch_name": "refs/heads/master",
"committer_date": 1455538914000,
"content_id": "e7c8f645579242bfe0ee320a761ba9afdd682a79",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8502661035c17637740abb3762605c5624df1d43",
"extension": "p... | 2.703125 | stackv2 | #!/usr/bin/env python
import os
import sys
import anydbm as dbm
import select
import imp
import paramiko
from pprint import pprint
def getcmd(metric, param):
"""
Generate command for the target host
:param metric:
:param param:
:return:
"""
# Load correct metric function from lib/mtype.... | 155 | 22.26 | 79 | 15 | 931 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_788eb289cdbdc32a_b01ee809", "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."
] | [
49
] | [
null
] | [
5
] | [
62
] | |
2024-11-19T02:07:24.870450+00:00 | 1,513,265,880,000 | 302dbc3f2c26f345e1a7beda8b97e13dc491ecfd | 3 | {
"blob_id": "302dbc3f2c26f345e1a7beda8b97e13dc491ecfd",
"branch_name": "refs/heads/master",
"committer_date": 1513265880000,
"content_id": "62e87b94a34f4d5b3b0ab0a2c6752ff95fad7a5d",
"detected_licenses": [
"MIT"
],
"directory_id": "407d2acb663f6dc01ff3150075352105be314643",
"extension": "py",
"fi... | 3.03125 | stackv2 | from bricklayer.pieces.enums import Dimensions
from bricklayer.utils.bricklayer_exceptions import OutOfBoundsException
from jinja2 import Environment, PackageLoader
from math import sin, cos, atan2, pi
from numpy import matrix
import copy
class Coordinate:
u"""
A class used to define a coordinate within the v... | 251 | 34.63 | 164 | 17 | 2,416 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bb49315f0f9a96d5_61648540", "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."
] | [
212
] | [
null
] | [
19
] | [
79
] | |
2024-11-19T02:31:14.613081+00:00 | 1,616,612,788,000 | 32842e73f9aabbcd1c3726211259d7a997ef0193 | 3 | {
"blob_id": "32842e73f9aabbcd1c3726211259d7a997ef0193",
"branch_name": "refs/heads/master",
"committer_date": 1616612788000,
"content_id": "3d48e761b4f9af4a280391ced7572284e5c65112",
"detected_licenses": [
"MIT"
],
"directory_id": "b23ccc50f6097188698a988f271ba1d0a15e4467",
"extension": "py",
"fi... | 2.9375 | stackv2 | from typing import List, Dict
from flask import Flask, json, request
app = Flask(__name__)
class User:
username: str
email: str
firstName: str
lastName: str
def __init__(self, username=None, email=None, first_name=None, last_name=None) -> None:
super().__init__()
self.username =... | 103 | 25.08 | 94 | 14 | 632 | python | [{"finding_id": "codeql_py/reflective-xss_3273d348de9e2e58_4cb35f6b", "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)."
] | [
61
] | [
null
] | [
44
] | [
82
] | |
2024-11-19T02:31:19.222239+00:00 | 1,485,511,137,000 | 3272b61ebc1d10d59dbab1893ce7839c0ad19308 | 3 | {
"blob_id": "3272b61ebc1d10d59dbab1893ce7839c0ad19308",
"branch_name": "refs/heads/master",
"committer_date": 1485511137000,
"content_id": "bb4edcc41cc7d9bea9bfa3a54debd80aab5cb254",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e1418dc389ac32a149536f7f95ba42727e7b9815",
"extension": "py"... | 2.546875 | stackv2 | # -*- coding: utf-8 -*-
import json
from tornado.web import Application, RequestHandler
from tornado.ioloop import IOLoop
import logging
import sys
from urllib.parse import unquote_plus
from taxonomy import taxonomy as taxonomy
from classification import Classificator
class ClassificationService(RequestHandler):
... | 68 | 33.43 | 100 | 16 | 469 | python | [{"finding_id": "codeql_py/reflective-xss_1116c62d8f79c032_cec3bdc9", "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-117"
] | [
"py/reflective-xss",
"py/log-injection"
] | [
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
47,
43
] | [
null,
null
] | [
20,
27
] | [
40,
53
] | |
2024-11-19T02:31:42.096536+00:00 | 1,614,541,944,000 | 1358889cf473cec0cf642444ecee72232f749bcb | 3 | {
"blob_id": "1358889cf473cec0cf642444ecee72232f749bcb",
"branch_name": "refs/heads/master",
"committer_date": 1614541944000,
"content_id": "df2fd832fb87b37af329fa3d602fbb28a1b2438b",
"detected_licenses": [
"MIT"
],
"directory_id": "61f7abf48499962592a623b641fec0fbfc42bfe7",
"extension": "py",
"fi... | 2.546875 | stackv2 | """Library to handle connection with Switchbot"""
import time
import binascii
import logging
import bluepy
DEFAULT_RETRY_COUNT = 3
DEFAULT_RETRY_TIMEOUT = 0.2
UUID = "cba20d00-224d-11e6-9fb8-0002a5d5c51b"
HANDLE = "cba20002-224d-11e6-9fb8-0002a5d5c51b"
KEY_PASSWORD_PREFIX = "5711"
PRESS_KEY = "570100"
ON_KEY = "5... | 150 | 33.43 | 111 | 19 | 1,314 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7fb2c5b7b61951a7_6e0b4347", "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."
] | [
86,
98
] | [
null,
null
] | [
46,
58
] | [
49,
65
] | |
2024-11-19T02:32:50.436200+00:00 | 1,588,109,497,000 | c618e5f207344bb24575cdc2d11c7c5cbfcec99d | 2 | {
"blob_id": "c618e5f207344bb24575cdc2d11c7c5cbfcec99d",
"branch_name": "refs/heads/master",
"committer_date": 1588109497000,
"content_id": "745e78f8d5ec2b1a86feca34db13e74b42c8ab9b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "909374cbc2ed8da4505f1eabfaa7cc96228a3bf2",
"extension": "p... | 2.328125 | stackv2 | # pylint: disable=unused-import, wrong-import-order
import neuralmonkey.checkpython
# pylint: enable=unused-import, wrong-import-order
import argparse
import os
import json
import datetime
import flask
from flask import Flask, request, Response, render_template
import numpy as np
from neuralmonkey.config.configurati... | 119 | 30.42 | 78 | 17 | 817 | python | [{"finding_id": "codeql_py/stack-trace-exposure_ac8c8b874ac0400a_546f8b34", "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."
] | [
88
] | [
null
] | [
31
] | [
44
] | |
2024-11-19T02:33:00.767755+00:00 | 1,433,483,153,000 | 20e577558730c6af35d2a5995d8cd367e3cd1e0f | 2 | {
"blob_id": "20e577558730c6af35d2a5995d8cd367e3cd1e0f",
"branch_name": "refs/heads/master",
"committer_date": 1433483153000,
"content_id": "6073ad57a7fd2ec64d81d931a212caa8997ee930",
"detected_licenses": [
"MIT"
],
"directory_id": "4a639adec5166a1777eb3226d41fd74371e2010f",
"extension": "py",
"fi... | 2.46875 | stackv2 | # Command-line example for sharing files, including text, images etc
import os, sys, uuid, mimetypes
import requests
from requests_oauthlib import OAuth2Session
import flask
def debug(*things):
string = ' '.join(str(t) for t in things)
sys.stderr.write(string+'\n')
# Note: No error handling
class TheGridA... | 93 | 34.48 | 109 | 16 | 784 | python | [{"finding_id": "codeql_py/stack-trace-exposure_7707f76422857a4f_65c30413", "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."
] | [
42
] | [
null
] | [
24
] | [
25
] | |
2024-11-19T02:33:01.494791+00:00 | 1,530,688,989,000 | 298cbde7897ba9894234cb23ab1afdb528122bdc | 3 | {
"blob_id": "298cbde7897ba9894234cb23ab1afdb528122bdc",
"branch_name": "refs/heads/master",
"committer_date": 1530688989000,
"content_id": "1837b6b7d3de9df9c845e9f811f6628f4ecca24b",
"detected_licenses": [
"MIT"
],
"directory_id": "0d89178849bf9fdcc6fabd7d78d5dbc0f341d62a",
"extension": "py",
"fi... | 2.53125 | stackv2 | # -*- coding: utf-8 -*-
import scrapy
import re
import json
import hashlib
from scrapy.http import Request
from scrapy.spiders import Rule
from scrapy.linkextractors import LinkExtractor
from datetime import datetime
from urllib import parse
import functools
def extract_links(func):
@functools.wraps(func)
def ... | 143 | 36.58 | 106 | 18 | 1,350 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_04a0329ca529975b_a212268c", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'yingyuyufa.com', so it might match ... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-hostname-regexp",
"py/incomplete-hostname-regexp"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'yingyuyufa.com', so it might match more hosts than expected.",
"This regular expression has an unescaped '.' before 'yingyuyufa.com', so it might match more hosts than expected."
] | [
128,
135
] | [
null,
null
] | [
29,
29
] | [
85,
85
] | |
2024-11-19T02:33:11.342712+00:00 | 1,677,501,366,000 | afc85505b705c336f9359032cc18f4c008ec3cb2 | 2 | {
"blob_id": "afc85505b705c336f9359032cc18f4c008ec3cb2",
"branch_name": "refs/heads/master",
"committer_date": 1677501366000,
"content_id": "055c88a999cd9004c144e2c535a3c487b1a47c26",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bbb28eff8475c17bb84a20704858369353018020",
"extension": "py"... | 2.40625 | stackv2 | #!/usr/bin/env python3
import boto3
import botocore
import jinja2
import os
import sys
import yaml
import glob
import json
def main():
if 'AWS_PROFILE' in os.environ:
boto3.setup_default_session(profile_name=os.environ['AWS_PROFILE'])
if 'AWS_REGION' in os.environ:
secrets_manager = boto3.cli... | 52 | 30.81 | 122 | 16 | 363 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b33e5c481adf4c6f_aabdbb2f", "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."
] | [
44
] | [
null
] | [
24
] | [
59
] | |
2024-11-19T02:43:24.903587+00:00 | 1,604,395,608,000 | 2e8c0e1b936b5521dd30f0eb2cb905eabb1690f0 | 3 | {
"blob_id": "2e8c0e1b936b5521dd30f0eb2cb905eabb1690f0",
"branch_name": "refs/heads/master",
"committer_date": 1604395608000,
"content_id": "c3e2eea6aae770f8d294e9ff9d5183a68ed4f494",
"detected_licenses": [
"MIT"
],
"directory_id": "7f47812d784e47ce454acfb74f58335f033170c1",
"extension": "py",
"fi... | 2.5625 | stackv2 | from flask import redirect, render_template, flash, Blueprint, request, url_for
from flask_login import login_required, logout_user, current_user, login_user
from werkzeug.security import generate_password_hash
from .forms import LoginForm, SignupForm
from .models import db, User
from . import login_manager
auth_bp = ... | 85 | 32.54 | 87 | 20 | 563 | python | [{"finding_id": "codeql_py/url-redirection_c781b146784c1d85_1316bfe4", "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)."
] | [
30
] | [
null
] | [
37
] | [
69
] | |
2024-11-19T02:43:27.681339+00:00 | 1,450,449,179,000 | 2562439db99bf837b80c7a8e82789df6b9abbc26 | 3 | {
"blob_id": "2562439db99bf837b80c7a8e82789df6b9abbc26",
"branch_name": "refs/heads/master",
"committer_date": 1450449179000,
"content_id": "5315b1c941cdd7067e82014afd5f4488ea3aa3ba",
"detected_licenses": [
"MIT"
],
"directory_id": "63707a29e880362be2f1f68c7bbe8bd11455bcdf",
"extension": "py",
"fi... | 2.78125 | stackv2 | #!/usr/bin/env python
import os
import subprocess
from jinja2 import Template
import urllib
import urllib2
import base64
def yesOrNo(prompt):
""" A wrapped raw_input that expects a yes or no from the user """
yes = set(['yes', 'y', 'ye'])
no = set(['no', 'n', ''])
# blank defaults to no
while Tr... | 85 | 29.79 | 159 | 15 | 687 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_04891ba3b7cac5a4_301c37d3", "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."
] | [
47
] | [
null
] | [
12
] | [
29
] | |
2024-11-19T02:43:28.320923+00:00 | 1,438,198,643,000 | 782eb36fb23ff4f27aa6c67cc90b81f40f64e5bd | 2 | {
"blob_id": "782eb36fb23ff4f27aa6c67cc90b81f40f64e5bd",
"branch_name": "refs/heads/master",
"committer_date": 1438198643000,
"content_id": "a699c8a0de1c3a509aee82dcece43931a7384641",
"detected_licenses": [
"MIT"
],
"directory_id": "d2eeecfd131c662ed282d2994a864b1aafc5bfec",
"extension": "py",
"fi... | 2.328125 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import OrderedDict
from cryptacular.bcrypt import BCRYPTPasswordManager
import datetime
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from models import User, Group, Criteria
import os
from pyramid.ht... | 372 | 33.16 | 79 | 19 | 2,544 | python | [{"finding_id": "codeql_py/stack-trace-exposure_0ec6b2a52ce9923f_ed730804", "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-079"
] | [
"py/stack-trace-exposure",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
193,
193
] | [
null,
null
] | [
12,
12
] | [
18,
18
] | |
2024-11-19T02:43:31.732767+00:00 | 1,581,870,850,000 | a61bd9a7d71b87c8b52135de04d7e858bd18f463 | 3 | {
"blob_id": "a61bd9a7d71b87c8b52135de04d7e858bd18f463",
"branch_name": "refs/heads/master",
"committer_date": 1581870850000,
"content_id": "a5eeca3ad9b1d84fc94324dde993104728162166",
"detected_licenses": [
"MIT"
],
"directory_id": "f8148c49193c868a773794f9836d7465e4f71112",
"extension": "py",
"fi... | 2.671875 | stackv2 | from flask import Response
from flask import request
from lib.util import random_str
from lib.util import config
from jwcrypto import jwt
from jwcrypto import jwk
import json
import bcrypt
import requests
class AdminController:
@staticmethod
def generate_new_token():
"""
Generates admin token... | 105 | 34.89 | 117 | 19 | 829 | python | [{"finding_id": "codeql_py/partial-ssrf_d81a264cbee3929e_cec3944d", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
41
] | [
43
] | [
15
] | [
11
] | |
2024-11-19T02:55:08.898217+00:00 | 1,626,289,053,000 | 8cb8a9352a151fd5db8eb2a7946328b6b6097e48 | 2 | {
"blob_id": "8cb8a9352a151fd5db8eb2a7946328b6b6097e48",
"branch_name": "refs/heads/main",
"committer_date": 1626289053000,
"content_id": "48215dbd4761fe38878d5b13f47471a897a17256",
"detected_licenses": [
"MIT"
],
"directory_id": "e6e7d02e633d3d2d9c6d4846cb8272863bcbaead",
"extension": "py",
"file... | 2.34375 | stackv2 | """
bossServices.py - Implements basic services
for the boss application.
"""
# Python Imports
import json
import sys
import time
sys.path.append("..")
# Basic Django Tools
from django.http import QueryDict, JsonResponse
# Service Decorators
from django.views.decorators.http import require_http_methods
from d... | 60 | 24.13 | 106 | 18 | 386 | python | [{"finding_id": "codeql_py/stack-trace-exposure_9c92b3ff1580d7aa_c005b86f", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user."
] | [
48,
60
] | [
null,
null
] | [
23,
23
] | [
54,
54
] | |
2024-11-19T02:55:08.973625+00:00 | 1,634,402,020,000 | dc05ecabdd36e440597835d0ed6c45d5a958d7d7 | 2 | {
"blob_id": "dc05ecabdd36e440597835d0ed6c45d5a958d7d7",
"branch_name": "refs/heads/master",
"committer_date": 1634402020000,
"content_id": "e073079795ca1f699c82ca5b00c7672e36fbf14e",
"detected_licenses": [
"MIT"
],
"directory_id": "02e28714a0e050ef819887abcea4f7d9cc5cd358",
"extension": "py",
"fi... | 2.359375 | stackv2 | import configparser
import os
import shutil
from pathlib import Path
from dotenv import load_dotenv
from modules.helpers import read_json, random_alphanumeric_string
from modules.logging import logger
def get_app_secret():
return os.environ['APP_SECRET']
def check_application_secret():
application_secret ... | 61 | 32.62 | 113 | 15 | 469 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_072187644d518f85_2760cdc1", "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."
] | [
21
] | [
null
] | [
21
] | [
61
] | |
2024-11-19T02:55:11.495776+00:00 | 1,519,761,156,000 | 49ac297dfd153f186b57a9d8ae98c89d3815a879 | 3 | {
"blob_id": "49ac297dfd153f186b57a9d8ae98c89d3815a879",
"branch_name": "refs/heads/master",
"committer_date": 1519761156000,
"content_id": "e3cb29aa3e0867b1f59456802da30fd741376187",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "284ab2737f9a034fb1f6db38d87d71031e1b38cf",
"extension": "p... | 2.578125 | stackv2 | #!/usr/bin/env python
"""
Python script for building documentation.
To build the docs you must have all optional dependencies for pandas
installed. See the installation instructions for a list of these.
Usage
-----
$ python make.py clean
$ python make.py html
$ python make.py latex
"""
import sys
import o... | 243 | 31.32 | 79 | 17 | 1,597 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_38fef98e03250590_32ce8d43", "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."
] | [
44
] | [
null
] | [
13
] | [
38
] | |
2024-11-19T02:55:17.737941+00:00 | 1,527,739,920,000 | 08a800868726bb1ef561db57190ed4be63498e83 | 3 | {
"blob_id": "08a800868726bb1ef561db57190ed4be63498e83",
"branch_name": "refs/heads/master",
"committer_date": 1527739920000,
"content_id": "8c20d38ed6175a59d715f1a73a14efdbeda43408",
"detected_licenses": [
"MIT"
],
"directory_id": "ce9d5ab183e8f91194db99eed212f94b0bf55178",
"extension": "py",
"fi... | 2.84375 | stackv2 | #!/usr/bin/python
# coding=UTF-8
import re
from bs4 import BeautifulSoup
from bs4.element import NavigableString
class HtmlToken():
"""
An HTML token is a composite object containing a value, and the corresponding HTML element from where that value was extracted.
It also holds a list of textual and structural ... | 252 | 32.58 | 129 | 21 | 2,411 | python | [{"finding_id": "codeql_py/overly-large-range_21ef13dace3a3256_b19081bb", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
47
] | [
null
] | [
44
] | [
47
] | |
2024-11-19T02:55:22.726641+00:00 | 1,612,760,485,000 | e92076d2bbc85cee496e56902dc153411cbeda02 | 2 | {
"blob_id": "e92076d2bbc85cee496e56902dc153411cbeda02",
"branch_name": "refs/heads/master",
"committer_date": 1612760485000,
"content_id": "b3a04510d2472dc7c9d08fa1584d44842ab4d287",
"detected_licenses": [
"MIT"
],
"directory_id": "9960a29359150d9b698d87c327cbac4544935bc3",
"extension": "py",
"fi... | 2.3125 | stackv2 | import requests
import os
from celery import shared_task
from django.core.mail import send_mail
from django.urls import reverse
@shared_task(bind=True)
def debug_task(self):
print('Request: {0!r}'.format(self.request))
@shared_task()
def send_email_async(subject, email, body):
send_email()
@shared_task()... | 47 | 21.17 | 66 | 13 | 266 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0b193565969e06a4_dfaf544b", "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."
] | [
47
] | [
null
] | [
11
] | [
50
] | |
2024-11-19T02:55:52.812656+00:00 | 1,505,808,974,000 | 57e786e11fa9cd4fb4cda3457c7b677fbfb71451 | 3 | {
"blob_id": "57e786e11fa9cd4fb4cda3457c7b677fbfb71451",
"branch_name": "refs/heads/master",
"committer_date": 1505808974000,
"content_id": "4135f677c9417aa26063edf70446e52d48654e40",
"detected_licenses": [
"MIT"
],
"directory_id": "f8b6b4e111c2c1b4ecc5329974e13e1c72899d20",
"extension": "py",
"fi... | 2.828125 | stackv2 | """Python class file of fetching routes from OpenRouteService's Directions API
"""
import logging
import json
from time import sleep
from uritemplate import URITemplate
from .base import RoutingService
LOGGER = logging.getLogger(__name__)
class OpenRouteServiceRouter(RoutingService):
""" Wrapper class of OpenRo... | 100 | 41.35 | 175 | 15 | 976 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7602447c6d8c8dcb_6380674b", "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."
] | [
52
] | [
null
] | [
22
] | [
29
] | |
2024-11-19T02:55:54.045717+00:00 | 1,575,919,725,000 | 316687b8f66bbe38b30db8264a27613b850bfa3c | 4 | {
"blob_id": "316687b8f66bbe38b30db8264a27613b850bfa3c",
"branch_name": "refs/heads/master",
"committer_date": 1575919725000,
"content_id": "314de7c22e3a0eea957f3c869f3eceb052ca79e8",
"detected_licenses": [
"MIT"
],
"directory_id": "2da6e8c9de86cb2286cf52337089fc2527a2dbaf",
"extension": "py",
"fi... | 3.578125 | stackv2 | from sys import stdin
def digit(number, index):
return number // 10**index % 10
def different_passwords(range_start, range_end):
sum = 0
for password in range(range_start, range_end + 1):
digits = [digit(password, 0), digit(password, 1), digit(password, 2), digit(
password, 3), digit... | 42 | 44.45 | 99 | 17 | 560 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1f11266208c99fb1_f29608a1", "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."
] | [
39,
41
] | [
40,
42
] | [
23,
23
] | [
56,
56
] | |
2024-11-19T02:56:09.979183+00:00 | 1,595,252,956,000 | 0407ba5a839e4b1b666202db304c99e27324c68a | 2 | {
"blob_id": "0407ba5a839e4b1b666202db304c99e27324c68a",
"branch_name": "refs/heads/master",
"committer_date": 1595252956000,
"content_id": "5212febf0c70fa6f9ba99f9af8ade3a4cdf2f0ba",
"detected_licenses": [
"MIT"
],
"directory_id": "02eb6779c25793c61f13b61650be099692fa6ab2",
"extension": "py",
"fi... | 2.359375 | stackv2 |
from flask import Flask, request, jsonify
from joblib import dump, load
import random
from flask_cors import CORS
from .nlp import generate_contract
from tinydb import TinyDB, Query
# https://github.com/msiemens/tinydb
db = TinyDB('files/db.json')
table = db.table('uploads')
from .skynet import Skynet
app = Flask(_... | 64 | 21.3 | 53 | 12 | 384 | python | [{"finding_id": "codeql_py/reflective-xss_4765732fa8be2f50_c205f42e", "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-022"
] | [
"py/reflective-xss",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
47,
40
] | [
null,
null
] | [
12,
15
] | [
18,
24
] | |
2024-11-19T03:10:21.235995+00:00 | 1,614,422,050,000 | b61ee71937b72913daf0b2173685532c8a3c6e54 | 3 | {
"blob_id": "b61ee71937b72913daf0b2173685532c8a3c6e54",
"branch_name": "refs/heads/master",
"committer_date": 1614422050000,
"content_id": "015a180702d308f860a1b95acf027c6b34429417",
"detected_licenses": [
"MIT"
],
"directory_id": "423ba8c9161ab5a2a38f2abf09ea8757f350b8d5",
"extension": "py",
"fi... | 2.515625 | stackv2 | """SCRIPT SERVICE"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import random
import datetime
import string
import logging
from uuid import UUID
from gefapi import db
from gefapi.models import User
from gefapi.errors import UserNotFound, UserDuplicate... | 170 | 34.8 | 121 | 21 | 1,224 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0d839f31f41803c6_2f6c89bd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
32,
94
] | [
null,
null
] | [
22,
22
] | [
30,
30
] | |
2024-11-19T03:10:33.056950+00:00 | 1,402,252,876,000 | e3e87c05803f27addda21d2962c0774bb32b2c05 | 2 | {
"blob_id": "e3e87c05803f27addda21d2962c0774bb32b2c05",
"branch_name": "refs/heads/master",
"committer_date": 1402252876000,
"content_id": "4820033a6cfe22d19cd1802e2c5b95b68abe49f9",
"detected_licenses": [
"MIT"
],
"directory_id": "468ed476fda7864f14804566746e8727a4b59a44",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import flask
import redis
import json
import re
from flask import Response, request
import dateutil.parser
import logging
from particle.helpers import *
from particle.common import db
urllib3_logger = logging.getLogger('urllib3')
urllib3_logger.setLevel(logging.CRITICAL)... | 146 | 25.58 | 88 | 27 | 960 | python | [{"finding_id": "codeql_py/regex-injection_bfe9ebc1fcca9194_38a61721", "tool_name": "codeql", "rule_id": "py/regex-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This regular expression depends on a [user-provided value](1) and is executed by [re.search](2).\nThis re... | 1 | true | [
"CWE-730"
] | [
"py/regex-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression depends on a [user-provided value](1) and is executed by [re.search](2).\nThis regular expression depends on a [user-provided value](1) and is executed by [re.search](2).\nThis regular expression depends on a [user-provided value](1) and is executed by [re.search](2).\nThis regular expressi... | [
98
] | [
null
] | [
26
] | [
29
] | |
2024-11-19T03:10:33.348111+00:00 | 1,607,585,701,000 | 2940f70e6b44c2fb29e9b331102e5a5e1549f94b | 3 | {
"blob_id": "2940f70e6b44c2fb29e9b331102e5a5e1549f94b",
"branch_name": "refs/heads/master",
"committer_date": 1607585701000,
"content_id": "dfc70bd6bd80f87ddb51f5f0b641dfcb5eaabaa6",
"detected_licenses": [
"MIT"
],
"directory_id": "a4397232cd62e8553c76d6d79964dbd09b0220ea",
"extension": "py",
"fi... | 2.640625 | stackv2 | #!/usr/bin/env python
# -*- coding:utf-8 -*-_
import sys
import platform
def md5_count(yingjian_info):
import hashlib
import random
random.seed(4)
demo_val = yingjian_info
md5_val = hashlib.md5(demo_val.encode('utf-8')).hexdigest()
md5_val_list = list(md5_val)
random.shuffle(md5_val_list)... | 180 | 20.7 | 98 | 14 | 1,089 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7641310dc549767f_6b0c727a", "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-327"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"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.",
"[Sensitive data (private)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
64,
168,
13
] | [
null,
null,
null
] | [
11,
11,
27
] | [
14,
18,
51
] | |
2024-11-19T03:10:36.598512+00:00 | 1,604,865,974,000 | 7010c1bb0a19b7cfb8fa5440b36a337cbaff4a74 | 3 | {
"blob_id": "7010c1bb0a19b7cfb8fa5440b36a337cbaff4a74",
"branch_name": "refs/heads/master",
"committer_date": 1604865974000,
"content_id": "40eda1c65c77b1e37e753ac5d7d92eddb1cbb6f5",
"detected_licenses": [
"MIT"
],
"directory_id": "59a33dd492f3babce4ec808ca15a038fb6468d00",
"extension": "py",
"fi... | 2.8125 | stackv2 | from flask import Flask, request
app = Flask(__name__)
@app.route("/",methods=['POST','GET'])
def mainm():
if request.method=='POST':
#Retrieve the data_id submitted by the user. Get the data corresponding
# to this id and return it back to the user.
record = request.get_json()['data_id']... | 17 | 31.76 | 80 | 12 | 143 | python | [{"finding_id": "codeql_py/flask-debug_5046030ec0270f45_f8ddb1e4", "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)."
] | [
17,
12
] | [
null,
null
] | [
5,
16
] | [
51,
75
] | |
2024-11-19T03:10:48.690643+00:00 | 1,481,394,162,000 | 3d99b67fcbef429b0207fafc5c5cc970908a9e90 | 2 | {
"blob_id": "3d99b67fcbef429b0207fafc5c5cc970908a9e90",
"branch_name": "refs/heads/master",
"committer_date": 1481394162000,
"content_id": "5212549cdbde77f3286de57e782984f6387f9281",
"detected_licenses": [
"MIT"
],
"directory_id": "5becdb2dd098d2f1a9197cf8ab194cc0fc5c16dc",
"extension": "py",
"fi... | 2.40625 | stackv2 | import jinja2
import os
from sqldoc.renderer.renderer import Renderer
default_template_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'templates')
class JinjaRenderer(Renderer):
def __init__(self, configuration):
super().__init__(configuration)
self.template = jinja2.Environment(... | 23 | 34.35 | 112 | 17 | 154 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_6569eb2978fa97e6_f3aaa561", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
11
] | [
null
] | [
25
] | [
112
] | |
2024-11-19T03:10:50.398585+00:00 | 1,647,715,298,000 | 881ab1b87585f8b89f94447a2103d02c19cd0d6e | 2 | {
"blob_id": "881ab1b87585f8b89f94447a2103d02c19cd0d6e",
"branch_name": "refs/heads/master",
"committer_date": 1647715298000,
"content_id": "0e0254daea327554dd83ab09beac0168dc83f9fa",
"detected_licenses": [
"MIT"
],
"directory_id": "bf1c2007bd5e58596d16125a339d333fc94d3094",
"extension": "py",
"fi... | 2.421875 | stackv2 | import re
import requests
from bs4 import BeautifulSoup
from tenyksservice import TenyksService, run_service, FilterChain
class TenyksTwitter(TenyksService):
direct_only = False
irc_message_filters = {
'tweet': FilterChain([r'((https?)://(www\.)?twitter\.com/[^.\s]+/[^.\s]+)']),
}
def __in... | 45 | 37.11 | 128 | 18 | 433 | python | [{"finding_id": "codeql_py/overly-large-range_1f538d76bc6cfc07_51c6f22b", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 3 | true | [
"CWE-020",
"CWE-020",
"CWE-1333"
] | [
"py/overly-large-range",
"py/overly-large-range",
"py/redos"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].",
"This part of the regular expression may cause exponential backtracking on strings starting with 'http... | [
21,
26,
26
] | [
null,
null,
null
] | [
63,
75,
58
] | [
66,
78,
85
] | |
2024-11-19T03:10:51.651429+00:00 | 1,623,014,065,000 | f5e61ef235daadf433d3911a618dcaac95917449 | 2 | {
"blob_id": "f5e61ef235daadf433d3911a618dcaac95917449",
"branch_name": "refs/heads/main",
"committer_date": 1623014065000,
"content_id": "9568b06ce2d8401ceea2152a41a4f500959585a1",
"detected_licenses": [
"MIT"
],
"directory_id": "ad0ea0c2dadcca4e5a11f740ba1e7705f53b2d54",
"extension": "py",
"file... | 2.484375 | stackv2 | """
General Utility Functions
Author: Keegan Skeate
Contact: <keegan@cannlytics.com>
Created: 11/26/2020
Updated: 4/21/2021
"""
# External imports
from django.utils.crypto import get_random_string
# Internal imports
from cannlytics.firebase import get_document, get_collection, get_user
from api.auth import auth
from ... | 175 | 30.37 | 99 | 16 | 1,218 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7b959be36d1a6b19_df36676b", "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."
] | [
159
] | [
null
] | [
20
] | [
70
] | |
2024-11-19T03:22:22.514796+00:00 | 1,612,513,701,000 | e1cbe92c70b64fec0784f00316988f00a6a1838e | 3 | {
"blob_id": "e1cbe92c70b64fec0784f00316988f00a6a1838e",
"branch_name": "refs/heads/main",
"committer_date": 1612513701000,
"content_id": "c607adb2d7081ad8ffd8bdaf401ad36e046bcd56",
"detected_licenses": [
"MIT"
],
"directory_id": "ed596e8861fa31f6b58fe4c8a82b5bd8daf8a131",
"extension": "py",
"file... | 2.734375 | stackv2 | #!/usr/bin/python3
#(c) 2020 Will Smith
import requests
import json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
username = 'username'
password = 'password'
switch1 = 'https://<1st Switch IP or Hostname>/rest/v10.04/'
switch... | 64 | 33.16 | 88 | 11 | 555 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d1a25ed627a75130_e74ca08c", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
21,
26,
30
] | [
null,
null,
null
] | [
16,
14,
23
] | [
85,
89,
79
] | |
2024-11-19T03:43:53.673716+00:00 | 1,463,056,888,000 | b4210997beacd4a4cc518b12c21e44e57ade4873 | 3 | {
"blob_id": "b4210997beacd4a4cc518b12c21e44e57ade4873",
"branch_name": "refs/heads/master",
"committer_date": 1463056888000,
"content_id": "d1da5f18abe7459a668134125c3d6658c1256281",
"detected_licenses": [
"MIT"
],
"directory_id": "f19c6294ca0668b4c6e0459b4c4289387a2976dc",
"extension": "py",
"fi... | 3.296875 | stackv2 | """Challenge encrypter and decrypter functions
Notes on security:
ECB (default with no challenge) is not entirely secure, however, unless
there is a server that can encrypt and pass nonces on the other side,
this is probably the only option
If a challenge is provided, the remote endpoint must use CBC to encrypt
the fi... | 51 | 27.35 | 77 | 12 | 384 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_5a11ba94919a13f4_0ef4ef71", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode CBC](1) is broken or weak, and should not be used.\n[The block mode ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode CBC](1) is broken or weak, and should not be used.\n[The block mode ECB](2) is broken or weak, and should not be used.\n[The block mode CBC](3) is broken or weak, and should not be used.\n[The block mode ECB](4) is broken or weak, and should not be used.",
"[The block mode CBC](1) is broken or we... | [
45,
51
] | [
null,
null
] | [
29,
12
] | [
51,
54
] | |
2024-11-19T03:44:08.953241+00:00 | 1,510,216,371,000 | cb9a673e574c23caadf0c849830cb1f95aa46fac | 3 | {
"blob_id": "cb9a673e574c23caadf0c849830cb1f95aa46fac",
"branch_name": "refs/heads/master",
"committer_date": 1510216371000,
"content_id": "8bcbf719e4f3e092bec513104130be60b8f958eb",
"detected_licenses": [
"MIT"
],
"directory_id": "9d3647abf84679824437a3452737bc180ca0fd7a",
"extension": "py",
"fi... | 3.140625 | stackv2 | import csv
import argparse
arg_p = argparse.ArgumentParser()
arg_p.add_argument('-csv', default='')
args = vars(arg_p.parse_args())
CSV = args['csv']
class Player():
def __init__(self, position, name, salary, points, value):
self.self = self
self.position = position
self.name = name
... | 135 | 31.36 | 118 | 17 | 1,082 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3733cb5db233c856_46dbb987", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text.\nThis expression logs [sensitive data (private)]... | [
135
] | [
null
] | [
7
] | [
34
] | |
2024-11-19T03:44:26.915181+00:00 | 1,580,825,370,000 | 7272a72c25b38f58f0285ec7d961e085a4c11505 | 3 | {
"blob_id": "7272a72c25b38f58f0285ec7d961e085a4c11505",
"branch_name": "refs/heads/master",
"committer_date": 1580825370000,
"content_id": "7997c0e25cb2f5b0f7159f7da8f3bc39175b659f",
"detected_licenses": [
"MIT"
],
"directory_id": "0045754b58604087a570d874bb6d00694a94e229",
"extension": "py",
"fi... | 2.59375 | stackv2 | # Calculate Percentage Rain Affected Matches for Each Player
# Modules
from espncricinfo.player import Player
from espncricinfo.match import Match
from espncricinfo.series import Series
import json
import pdb
from collections import Counter
from tqdm import tqdm
import pandas as pd
import os
import warnings
warnings.f... | 98 | 35.39 | 113 | 17 | 1,087 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_3f2f20f42b0f767b_32a246dc", "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.",... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text."
] | [
89
] | [
null
] | [
12
] | [
20
] | |
2024-11-19T02:08:19.209618+00:00 | 1,581,956,149,000 | 597befa4a48e577edbc73e0b39deaa9b6be92ac4 | 3 | {
"blob_id": "597befa4a48e577edbc73e0b39deaa9b6be92ac4",
"branch_name": "refs/heads/master",
"committer_date": 1581956149000,
"content_id": "309beacff3655b2ea9444e594a764dacf780ac3b",
"detected_licenses": [
"MIT"
],
"directory_id": "b7899f2f724e9873e7197ff0e1d0c1ee190e1ed1",
"extension": "py",
"fi... | 2.84375 | stackv2 | import yaml, logging, bcrypt
from .data import *
class Accounts(DataCasting, object):
def __init__(self, admin="", password=""):
super().__init__('acct')
self.accounts = []
for u in self.list():
self.accounts.append(Account(u))
if not self.accounts:
logging.... | 109 | 24.72 | 88 | 16 | 607 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8076867552690e6f_67780a8d", "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."
] | [
12
] | [
null
] | [
26
] | [
79
] | |
2024-11-19T02:58:13.921189+00:00 | 1,499,346,806,000 | 3e35835ce0658cd7ed60ab005825500a0e9ee119 | 2 | {
"blob_id": "3e35835ce0658cd7ed60ab005825500a0e9ee119",
"branch_name": "refs/heads/master",
"committer_date": 1499346806000,
"content_id": "82d2a3e0d6c0b0811d2a6c561ee095b8f165fe70",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "efcc2b20606ac4acbac918bb5f687a8a8c77aba8",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python
import http.client, base64
import json
import os
import requests
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in global layout
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
req = request.get_json(... | 123 | 34.21 | 155 | 22 | 1,134 | python | [{"finding_id": "codeql_py/reflective-xss_2e5f9e208dc1a26a_42c5eb69", "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-918",
"CWE-918",
"CWE-918"
] | [
"py/reflective-xss",
"py/partial-ssrf",
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to 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).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
26,
45,
47,
69
] | [
null,
null,
null,
null
] | [
23,
18,
18,
15
] | [
26,
38,
39,
35
] | |
2024-11-19T03:10:26.370962+00:00 | 1,517,637,061,000 | 1831ffba82e8c0c4f8ad006b69d13fa23c95cbe4 | 3 | {
"blob_id": "1831ffba82e8c0c4f8ad006b69d13fa23c95cbe4",
"branch_name": "refs/heads/master",
"committer_date": 1517637061000,
"content_id": "64d55c4bc5582cedde38a042a23c1d5d7551f9a7",
"detected_licenses": [
"MIT"
],
"directory_id": "40a275cafa13db102147a780730867f430e2c239",
"extension": "py",
"fi... | 3.03125 | stackv2 | # reconsitution of unzip2.py
import zipfile
def extractFile(zFile, password):
try:
zFile.extractall(pwd = password.encode(encoding = 'utf-8'))
return password
except:
return
def main():
zFile = zipfile.ZipFile("evil.zip")
with open('dictionary.txt','r') as passFile:
lin... | 23 | 23.83 | 67 | 14 | 135 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_094ad840e0444105_109ce058", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
19
] | [
null
] | [
19
] | [
47
] | |
2024-11-19T03:10:35.769890+00:00 | 1,567,425,137,000 | 271c64dd2ce3c82f895dd186976f405cdeb53256 | 3 | {
"blob_id": "271c64dd2ce3c82f895dd186976f405cdeb53256",
"branch_name": "refs/heads/master",
"committer_date": 1567756066000,
"content_id": "f6e45383acb6db8c19179b7684ea18641b36acb5",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "8c2b089a859fc0538b06ceb9b0bc2879b47c1c08",
"extension": "p... | 2.75 | stackv2 | import os
import shutil
from jinja2 import Template
from .util import create_dir
from .template import TEMPLATE_DIR
__copyright__ = 'Copyright (C) 2019, Nokia'
class Resource():
def __init__(self, src_path, dst_path):
self._src_path = self._get_path_with_trailing_slash(src_path)
self._dst_path =... | 80 | 27.51 | 78 | 19 | 535 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ad2cdb250419b3a1_33321d5d", "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."
] | [
24
] | [
null
] | [
20
] | [
38
] | |
2024-11-19T03:22:33.748499+00:00 | 1,607,917,805,000 | b264c24b814c85907b4915167904f6cdbab6babe | 2 | {
"blob_id": "b264c24b814c85907b4915167904f6cdbab6babe",
"branch_name": "refs/heads/main",
"committer_date": 1607917805000,
"content_id": "d3ac0778b4a66ab806f477cd16a8ee5a601e2475",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0b9fcbef83c79ca912cf703708768548f65382eb",
"extension": "py",
... | 2.40625 | stackv2 | import re
import requests
from webpt import find
from urllib.parse import urlparse
import threading
import urllib.request
import time
requests.packages.urllib3.disable_warnings() # noqa
class SubDomains:
def __init__(self, url):
self.url = url
self.domains = []
self.all_links = []
... | 228 | 41.94 | 156 | 29 | 2,300 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_3dd252d074c90ee0_87e2210c", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://www.baidu.com](1) may be at an arbitrary positi... | 10 | true | [
"CWE-020",
"CWE-020",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert... | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [http://www.baidu.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [google.com](1) may be at an arbitrary position in the sanitized URL.",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate valida... | [
37,
202,
62,
70,
126,
155,
162,
172,
181,
194
] | [
null,
null,
null,
null,
null,
null,
null,
null,
182,
null
] | [
12,
20,
33,
19,
23,
17,
19,
15,
15,
39
] | [
41,
42,
107,
73,
97,
115,
82,
91,
152,
95
] | |
2024-11-19T03:22:39.050467+00:00 | 1,479,425,558,000 | a5b3d4c42b3fd44c3c778f9a88e1f4970e7633b6 | 3 | {
"blob_id": "a5b3d4c42b3fd44c3c778f9a88e1f4970e7633b6",
"branch_name": "refs/heads/master",
"committer_date": 1479425558000,
"content_id": "dc43967357e6def0810b33ed4c441b542b498ff1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "34043301a8ee967416f44babf5033f8a32a06108",
"extension": "py"... | 2.546875 | stackv2 | #! /usr/bin/python3
# -*- coding: utf8 -*-
#
# **** NOT A MULTI-THREADED APPLICATION. NEVER TRY TO RUN THE MULTIPLE INSTANCE
# **** OF SCRIPT. CAN CAUSE UNPREDICTABLE ISSUES WITH MERGING.
#
# The script to download and apply patches on a given repo.
# It does the following
# 1. Download patches on local-machine at LOCA... | 255 | 36.49 | 95 | 15 | 1,970 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_3d45db4e6d9b12c6_e69f9b42", "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."
] | [
120
] | [
null
] | [
5
] | [
62
] | |
2024-11-19T03:22:49.119659+00:00 | 1,540,707,547,000 | 98e20007f672ab1e8941dbf4080bb6160d5e4494 | 3 | {
"blob_id": "98e20007f672ab1e8941dbf4080bb6160d5e4494",
"branch_name": "refs/heads/master",
"committer_date": 1540707547000,
"content_id": "033ff32e7048e215ff0327d60907b55f1ff8ae1f",
"detected_licenses": [
"MIT"
],
"directory_id": "20338015363441a18ea4399d46f1aae6cfab6f4b",
"extension": "py",
"fi... | 2.578125 | stackv2 | import urllib
import webbrowser
import requests
from requests_oauthlib import OAuth1
API_KEY = 'dummy_ApiKey'
SECRET_KEY = 'dummy_SecretKey'
request_url = 'https://api.zaim.net/v2/auth/request'
authorize_url = 'https://auth.zaim.net/users/auth'
access_token_url = 'https://api.zaim.net/v2/auth/access'
access_url = '... | 42 | 28.4 | 149 | 11 | 330 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f3aa402ac5104c58_b2d62195", "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."
] | [
42
] | [
null
] | [
11
] | [
27
] | |
2024-11-19T03:22:55.613792+00:00 | 1,605,087,241,000 | ac6edb2e5cf5945adc7099ce055861cbec3bc860 | 2 | {
"blob_id": "ac6edb2e5cf5945adc7099ce055861cbec3bc860",
"branch_name": "refs/heads/master",
"committer_date": 1605087241000,
"content_id": "82858dc755346f4eceb2a56c6d0a6784bae3f626",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "efc9ddbd0e475dd51946dfc4055fed51226e6da3",
"extension": "py"... | 2.3125 | stackv2 | from django.forms import Form, widgets, fields
from django.forms.models import ValidationError
from django.db.models import Q
from scripts import functions
from model_model import models
import re
class LoginForm(Form):
username = fields.CharField(error_messages={'required': '用户名不能为空'},
... | 96 | 45.95 | 101 | 15 | 827 | python | [{"finding_id": "codeql_py/redos_a845ce5ad79e88da_bcbfc1cb", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '0'.", "remediati... | 3 | true | [
"CWE-1333",
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos",
"py/polynomial-redos"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '0'.",
"This part of the regular expression may cause exponential backtracking on strings starting with '0@' and containing many repetitions of '0'.",
"This [regular expression](1) that depends on a... | [
88,
88,
89
] | [
null,
null,
null
] | [
31,
69,
60
] | [
44,
82,
69
] | |
2024-11-19T03:22:56.952370+00:00 | 1,582,649,860,000 | 942b58be82f1348329cf34f7373ffcefb39b2054 | 3 | {
"blob_id": "942b58be82f1348329cf34f7373ffcefb39b2054",
"branch_name": "refs/heads/master",
"committer_date": 1582649860000,
"content_id": "640125838fcd57b1817b502885880cf638c52630",
"detected_licenses": [
"MIT"
],
"directory_id": "9ab07db903aa3ee4ebf4205d3d39c3c113445ddf",
"extension": "py",
"fi... | 2.703125 | stackv2 | from flask import Flask, request
from webexteamssdk import WebexTeamsAPI
import json
import requests
#
# TASK 4
#
# Your task: Create an chatbot which sends out a multiple choice question using
# adaptive cards.
#
# Before you start make sure you prepare your environment properly:
# - update the access token in the ... | 121 | 34.14 | 81 | 12 | 1,074 | python | [{"finding_id": "codeql_py/partial-ssrf_77fa4dd31e269224_36628611", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
91
] | [
null
] | [
14
] | [
48
] | |
2024-11-19T01:55:37.841890+00:00 | 1,693,527,043,000 | 6e523db552144e7f629b21f3e7156659edee2bd0 | 3 | {
"blob_id": "6e523db552144e7f629b21f3e7156659edee2bd0",
"branch_name": "refs/heads/main",
"committer_date": 1693527043000,
"content_id": "f09a893a9fa02345347a2e0c7cb55e8a38885984",
"detected_licenses": [
"MIT"
],
"directory_id": "b537104f2dc768721cc09a3368d76f9828b4bd41",
"extension": "py",
"file... | 2.515625 | stackv2 | from __future__ import annotations
import abc
import dataclasses
import datetime
import http
import math
import operator
try:
import tomllib
except ModuleNotFoundError:
import tomli as tomllib
import typing
import feedparser
import gidgethub.abc
import gidgethub.httpx
import httpx
import iso8601
import jinj... | 379 | 32.79 | 113 | 16 | 2,867 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_cdec1d04775a99e3_38857d83", "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."
] | [
305
] | [
null
] | [
20
] | [
48
] | |
2024-11-19T02:17:36.096998+00:00 | 1,514,445,954,000 | 5762dbe976bd106463489e388f472b6a2c86c899 | 3 | {
"blob_id": "5762dbe976bd106463489e388f472b6a2c86c899",
"branch_name": "refs/heads/master",
"committer_date": 1514445954000,
"content_id": "4e7c29a28794c509aa8038555b21d4a79d9c6e33",
"detected_licenses": [
"MIT"
],
"directory_id": "b90232521b3b0c90952b0d8724e61ee05b7bae29",
"extension": "py",
"fi... | 2.546875 | stackv2 | from datetime import date
from hashlib import md5
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, String, Date, Text, Enum
from database import engine
ARTICLE = 'article'
ESSAY = 'essay'
TYPE_ENUM = (ARTICLE, ESSAY)
Base = declarative_base();
class Article(Base):
__... | 54 | 23.74 | 64 | 12 | 342 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_40d573fc6c34ad09_331057e5", "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."
] | [
47
] | [
null
] | [
31
] | [
39
] | |
2024-11-19T02:17:42.430035+00:00 | 1,688,907,840,000 | 271fbfcfd254edb53bf5c3768064d48ab2d1f944 | 3 | {
"blob_id": "271fbfcfd254edb53bf5c3768064d48ab2d1f944",
"branch_name": "refs/heads/master",
"committer_date": 1688907840000,
"content_id": "a46e23c06f455e8e555edc9eb2daadd6100361c1",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "310aced05cabaec1a706f37d2aa6023ca121c069",
"extension": "p... | 2.625 | stackv2 | from __future__ import annotations
from hashlib import md5
from typing import overload, TypeVar, TYPE_CHECKING
import turbo_sticks.config as config
from turbo_sticks.db import DBSession
from turbo_sticks.enums import ACL
from turbo_sticks.util import encrypt, decrypt, urandom
if TYPE_CHECKING:
from .types import... | 377 | 31.74 | 78 | 20 | 2,472 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_32330f0e7906f666_8b6ec22c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally exp... | [
132,
350
] | [
null,
null
] | [
13,
17
] | [
47,
51
] | |
2024-11-19T02:18:08.993892+00:00 | 1,624,880,559,000 | 14033f040ef7938ac7ae9b8130452ddf387551dd | 3 | {
"blob_id": "14033f040ef7938ac7ae9b8130452ddf387551dd",
"branch_name": "refs/heads/master",
"committer_date": 1624880559000,
"content_id": "b2b3f823ac79211f4867befdacd4a88668de5cf2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b103ee07e2b2a3c9c475301baf46f31d045dd82f",
"extension": "py"... | 2.8125 | stackv2 | """
This examples show how to train a Bi-Encoder for the MS Marco dataset (https://github.com/microsoft/MSMARCO-Passage-Ranking).
The queries and passages are passed independently to the transformer network to produce fixed sized embeddings.
These embeddings can then be compared using cosine-similarity to find matchin... | 184 | 42.05 | 166 | 15 | 1,841 | python | [{"finding_id": "codeql_py/tarslip_279aafbbf3a8ab14_b670c011", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/tarslip",
"py/tarslip"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1).",
"This file extraction depends on a [potentially untrusted source](1)."
] | [
71,
90
] | [
null,
null
] | [
9,
9
] | [
12,
12
] | |
2024-11-19T02:18:22.281216+00:00 | 1,577,042,957,000 | f318df2c80fe91e9950eadeda0f6f81fe29790db | 3 | {
"blob_id": "f318df2c80fe91e9950eadeda0f6f81fe29790db",
"branch_name": "refs/heads/master",
"committer_date": 1577042957000,
"content_id": "6200d0d315fb40af56e4e7daa77e99eefc468058",
"detected_licenses": [
"MIT"
],
"directory_id": "4a25b707e62d595a303986c9b25c828b6a0075c6",
"extension": "py",
"fi... | 3 | stackv2 | '''
This module contains objects and functions to be used by "TurbulenceSuite.py"
'''
def convert_date_format(date_input):
'''
Purpose: convert a datetime.datetime object to its string equivalent,
in YYYY-MM-DD format.
Output: a string object containing the date in YYYY-MM-DD format.
"da... | 409 | 38.55 | 121 | 21 | 3,646 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0e237c928c64513a_1a00d001", "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."
] | [
385
] | [
null
] | [
11
] | [
33
] | |
2024-11-19T02:29:50.401208+00:00 | 1,610,133,876,000 | 54c0ccd3cd33733b424bfd4ad3f58575168a3b53 | 3 | {
"blob_id": "54c0ccd3cd33733b424bfd4ad3f58575168a3b53",
"branch_name": "refs/heads/master",
"committer_date": 1610133876000,
"content_id": "f1826e99dd0dab4ea1a81aab81387f0954c821bf",
"detected_licenses": [
"MIT"
],
"directory_id": "8e2c82b817c59aa237b263ca17cc7eb9218045b0",
"extension": "py",
"fi... | 3.109375 | stackv2 | import datetime
import hashlib
import json
import os
import re
import subprocess
import sys
import urllib.parse
import urllib.request
def urltopdf(filename, outdir, chrome_bin_path):
"""Scans file for URLs and renders all urls
as PDF using headless Chrome/Chromium.
Args:
filename: File to scan fo... | 122 | 30.7 | 140 | 17 | 928 | python | [{"finding_id": "codeql_py/overly-large-range_ff0047948bbe05f7_468258d4", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
29
] | [
null
] | [
49
] | [
52
] | |
2024-11-19T02:29:58.944622+00:00 | 1,693,195,417,000 | bb9fba733ee5c589212240c4bdbcb7fc81f66a1e | 3 | {
"blob_id": "bb9fba733ee5c589212240c4bdbcb7fc81f66a1e",
"branch_name": "refs/heads/master",
"committer_date": 1693195417000,
"content_id": "4c901a75d3ad8fb15bc27967ad5a1665db6294fc",
"detected_licenses": [
"MIT"
],
"directory_id": "deda1742a61225a8c7ecd1833ec388f72d8bcc4f",
"extension": "py",
"fi... | 2.78125 | stackv2 | from flask import request, jsonify, make_response
from flask.views import MethodView
from ..database_setup import Basic_Information
from .. import db
from . import basic_information
import json
import logging
from datetime import datetime, timezone
from sqlalchemy.exc import IntegrityError
logger = logging.getLogger(... | 142 | 35.02 | 78 | 19 | 1,049 | python | [{"finding_id": "codeql_py/reflective-xss_dc494791ca45e7da_6501d86c", "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... | 5 | true | [
"CWE-079",
"CWE-079",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided valu... | [
92,
133,
89,
97,
130
] | [
93,
135,
90,
98,
131
] | [
17,
17,
17,
17,
17
] | [
68,
34,
33,
33,
33
] | |
2024-11-19T02:30:13.290915+00:00 | 1,541,035,968,000 | e5d58203e620d14c3b968d9199e0372c36949b40 | 2 | {
"blob_id": "e5d58203e620d14c3b968d9199e0372c36949b40",
"branch_name": "refs/heads/master",
"committer_date": 1541035968000,
"content_id": "0e50d3a0e01d3c3e05979732258a8717e0718294",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "125336490fbd33fffd4361ec4a8c4b4749f2942f",
"extension": "py"... | 2.484375 | stackv2 | from os.path import expanduser
import re
import cStringIO,operator
import math
import random
import sys
import inspect
import ConfigParser
import os
import ConfigParser
from pathlib import Path
from jinja2 import Environment, FileSystemLoader
from .pretty import *
DEBUG = 0
def select_region():
menu = {
... | 527 | 27.23 | 139 | 26 | 3,512 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_c13b4ecce041db59_adb8b9c6", "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."
] | [
491
] | [
null
] | [
23
] | [
57
] | |
2024-11-19T02:30:14.688951+00:00 | 1,521,980,841,000 | 823848e58faceceb584d8d8d4f28e228e5c97b3b | 3 | {
"blob_id": "823848e58faceceb584d8d8d4f28e228e5c97b3b",
"branch_name": "refs/heads/master",
"committer_date": 1521981738000,
"content_id": "daf94fb408b4dc4b6b3f40365686e3b1ae251fff",
"detected_licenses": [
"MIT"
],
"directory_id": "e36667428f1c474e1be9f50f2ce8a837548fae79",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!/usr/local/bin/python3
import math
import os
import random
import string
import IPython
def generate_password(pass_len):
symbols = string.printable.strip()
return ''.join([symbols[math.floor(int(x) / 256 * len(symbols))] for x in os.urandom(pass_len)])
with open('./docker-compose.yml.template') as f:
... | 34 | 19.35 | 100 | 15 | 177 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_db50fc4f1d782fac_3b065c7d", "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."
] | [
24
] | [
null
] | [
7
] | [
15
] | |
2024-11-19T02:30:15.031120+00:00 | 1,615,863,243,000 | 182c3887e6ff4c99344f5dbb8db021ad576f61b2 | 3 | {
"blob_id": "182c3887e6ff4c99344f5dbb8db021ad576f61b2",
"branch_name": "refs/heads/main",
"committer_date": 1615863243000,
"content_id": "7040cbb1ecbe97e76c4e50eeb6b5e9b562eb07f8",
"detected_licenses": [
"MIT"
],
"directory_id": "684289e7d85e4eac97cedada1500da24c329be1a",
"extension": "py",
"file... | 2.609375 | stackv2 | import re
import subprocess
import sys
import yaml
import applescript
from os.path import basename
from time import sleep
from AppKit import NSWorkspace
CLEAR_SCREEN = '\033[2J'
TOP_LEFT = '\033[1;1H'
SHOW_CURSOR = '\033[?25h'
HIDE_CURSOR = '\033[?25l'
UNDERLINE_ON = '\033[4m'
UNDERLINE_OFF = '\033[24m'
def on_conte... | 111 | 35.2 | 115 | 27 | 993 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_aed2cb27d0ef7bb2_a54236c4", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'github.com', so it might match more... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'github.com', so it might match more hosts than expected."
] | [
47
] | [
null
] | [
22
] | [
48
] | |
2024-11-19T02:30:21.422599+00:00 | 1,433,365,706,000 | 91163df7d3e8b869113e20fc6323eabf737cf420 | 3 | {
"blob_id": "91163df7d3e8b869113e20fc6323eabf737cf420",
"branch_name": "refs/heads/master",
"committer_date": 1433365706000,
"content_id": "962fece765f655257a5b936e53d3b0142add3b0d",
"detected_licenses": [
"ISC"
],
"directory_id": "cb2eab1ad7e8a27d141f898b9398aac47c0c8849",
"extension": "py",
"fi... | 2.78125 | stackv2 | from abc import ABCMeta, abstractmethod
import ast
from datetime import datetime
import requests
class Crawler():
__metaclass__ = ABCMeta
def __init__(self):
self.ips = []
self.public_keys = []
@abstractmethod
def process_node(self, node, hops):
pass
def crawl(self, ip_address, port, hops=0):
... | 36 | 30.97 | 84 | 17 | 290 | python | [{"finding_id": "codeql_py/request-without-cert-validation_c9f7e22c5ff70797_37f0d487", "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)."
] | [
18
] | [
null
] | [
9
] | [
85
] | |
2024-11-19T02:30:21.819467+00:00 | 1,550,605,117,000 | 4521c013fa9add766cd6392993f84625aa243830 | 3 | {
"blob_id": "4521c013fa9add766cd6392993f84625aa243830",
"branch_name": "refs/heads/master",
"committer_date": 1550605117000,
"content_id": "fe123280323f5d26be3f325c3913cd065a0ec959",
"detected_licenses": [
"MIT"
],
"directory_id": "4519241de4da3d1274a8b90c60eb90eea6d286cd",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import session, redirect, url_for, render_template, request, jsonify
import sqlite3
from . import main
from .forms import LoginForm, RegistrationForm, LoginForm_exp
from flask_wtf import FlaskForm as BaseForm
roomlist = []
user_list = []
roomlist.append('public') # we create the default room
@main.rou... | 98 | 39.21 | 110 | 21 | 796 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8a3de5b6ca6dbf11_38258e04", "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.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
31,
57
] | [
null,
58
] | [
27,
19
] | [
61,
83
] | |
2024-11-19T02:30:29.475991+00:00 | 1,693,952,634,000 | 62217dd7a74923af91cb95fe901d47c592349198 | 3 | {
"blob_id": "62217dd7a74923af91cb95fe901d47c592349198",
"branch_name": "refs/heads/main",
"committer_date": 1693952634000,
"content_id": "c7603f90e9939f5c364ccf23fc816608a65b0e5c",
"detected_licenses": [
"MIT"
],
"directory_id": "25315b066fd9742d9c8c8be1d0dc70c2dc39a71a",
"extension": "py",
"file... | 2.546875 | stackv2 | import datetime
import urllib
from .compilerdownloader import CrosswordCompilerDownloader
from ..util import XWordDLException
class GlobeAndMailDownloader(CrosswordCompilerDownloader):
command = 'tgam'
outlet = 'The Globe And Mail (Cryptic)'
outlet_prefix = 'Globe And Mail'
def __init__(self, **kwarg... | 60 | 32.2 | 125 | 15 | 479 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_982203c0f2bdd6e5_73eb3fbf", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [theglobeandmail.com](1) may be at an arbitrary positio... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [theglobeandmail.com](1) may be at an arbitrary position in the sanitized URL."
] | [
25
] | [
null
] | [
16
] | [
62
] | |
2024-11-19T02:30:38.154495+00:00 | 1,621,708,582,000 | 5052a923889370b7834c01d539b0d2d9d6dd7c62 | 2 | {
"blob_id": "5052a923889370b7834c01d539b0d2d9d6dd7c62",
"branch_name": "refs/heads/main",
"committer_date": 1621708582000,
"content_id": "8ceb714b7a4d53f34b6d75b19bb0ad8dddc83171",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e82418449bdf4c548c9efc76ab732623f74ad396",
"extension": "py",
... | 2.40625 | stackv2 | # Author: 14281055 Liheng Chen CIT BJTU
# File Name: DownloadLinuxKernel.py
import Repository
import random
import bs4
import os
import re
def download_certain_version_number_linux_kernel(hyperlink, save_dir):
content = Repository.requests_get_content(hyperlink, timeout=10,
... | 50 | 43.72 | 107 | 21 | 499 | python | [{"finding_id": "codeql_py/redos_f682ca9d7d5a0a4d_11a86896", "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 'linux-9a' and containing many rep... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with 'linux-9a' and containing many repetitions of '99'."
] | [
20
] | [
null
] | [
43
] | [
46
] | |
2024-11-19T02:41:43.107783+00:00 | 1,584,426,881,000 | 59af05deaee64a0d5fd4e646f1e84efffbf2c166 | 3 | {
"blob_id": "59af05deaee64a0d5fd4e646f1e84efffbf2c166",
"branch_name": "refs/heads/master",
"committer_date": 1584426881000,
"content_id": "86cddbd08cc7c89138a974b6ca7a0bfd236fed90",
"detected_licenses": [
"MIT"
],
"directory_id": "d9bd1d1ae094c4b1eb945857847cf6cd6815adbb",
"extension": "py",
"fi... | 2.953125 | stackv2 | import pandas as pd
def generate_one_table(df, fp):
df = df.sort_values(['date', 'paper_link'], ascending=False).reset_index(drop=True)
print('| Model | Title | Publication | Paper | Link |', file=fp)
print('| ----- | ----- | ----------- | ----- | ---- |', file=fp)
length = len(df['date'])
for i in range(lengt... | 94 | 24.93 | 112 | 17 | 718 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a655dfc59bcaa537_15ce9421", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [github.com](1) may be at an arbitrary position in the sanitized URL."
] | [
21
] | [
null
] | [
18
] | [
54
] | |
2024-11-19T02:41:45.426424+00:00 | 1,588,166,765,000 | e383051fbaa689c48a0fa9d1d7f2bd02c4d7cead | 2 | {
"blob_id": "e383051fbaa689c48a0fa9d1d7f2bd02c4d7cead",
"branch_name": "refs/heads/master",
"committer_date": 1588166765000,
"content_id": "dac493acad3cf3710949a9fde4de5b0afe1f46ec",
"detected_licenses": [
"MIT"
],
"directory_id": "fcc6377289b0531b8aec5ee3c91a127dbc8e9103",
"extension": "py",
"fi... | 2.390625 | stackv2 | import os
import shutil
from flask import Flask, request, render_template, url_for, redirect
from waitress import serve
import hashlib
import look
import logging
import json
import base64
import pathlib
app = Flask(__name__)
app.config["ALLOWED_IMAGE_EXTENSIONS"] = ["JPEG", "JPG", "PNG", "GIF"]
predict_dir = os.path... | 88 | 24.25 | 76 | 17 | 477 | python | [{"finding_id": "codeql_py/path-injection_b914dfb6e62d08e0_b70e4929", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 2 | true | [
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
39,
74
] | [
null,
null
] | [
19,
20
] | [
27,
34
] | |
2024-11-18T18:05:45.019647+00:00 | 1,483,524,554,000 | f95d9273a02058c86d42790528ce33727054d07f | 3 | {
"blob_id": "f95d9273a02058c86d42790528ce33727054d07f",
"branch_name": "refs/heads/master",
"committer_date": 1483524554000,
"content_id": "f3d6d8e2965c6bb85f0d1db87c243c5349b94904",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "10eb13d4656dbe04441798f075a5f3fc2239e644",
"extension": "p... | 2.578125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A python command line tool to automate building and deployment of Sphinx documentation on GitHub static pages"""
from subprocess import call
import os
from distutils.dir_util import copy_tree, remove_tree
import shutil
from tempfile import mkdtemp
from datetime import ... | 226 | 30.29 | 115 | 15 | 1,660 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_6a790783fefcb7e7_60fe533d", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [github.com](1) may be at an arbitrary position in the sanitized URL."
] | [
49
] | [
null
] | [
12
] | [
29
] | |
2024-11-18T18:05:45.460623+00:00 | 1,554,827,588,000 | f98ab083fe8934c2bc8f49e8d5dda9c9acf5f472 | 3 | {
"blob_id": "f98ab083fe8934c2bc8f49e8d5dda9c9acf5f472",
"branch_name": "refs/heads/master",
"committer_date": 1554827588000,
"content_id": "ef2edc461c9fb1aef708fdf893cccbc10156d80a",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "0e616da4677bfe7c2d2d942a03d628ff02573264",
"extension": "p... | 2.921875 | stackv2 | #!/usr/bin/env python
from BaseHTTPServer import *
from mimetypes import guess_type
import os
class WasmHandler(BaseHTTPRequestHandler):
def do_GET(self):
try:
if self.path in ("", "/"):
filepath = "html/bad.html"
else:
filepath = self.path.lstrip("/... | 39 | 27.77 | 65 | 16 | 249 | python | [{"finding_id": "codeql_py/http-response-splitting_5d90fe94435bc202_9730665f", "tool_name": "codeql", "rule_id": "py/http-response-splitting", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This HTTP header is constructed from a [user-provided value](1).", "remediation": "", "lo... | 2 | true | [
"CWE-113",
"CWE-022"
] | [
"py/http-response-splitting",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This HTTP header is constructed from a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
27,
15
] | [
null,
null
] | [
46,
22
] | [
54,
49
] | |
2024-11-18T18:15:55.265067+00:00 | 1,469,079,940,000 | d231d7a7e3bbd8dbe46478743939f8e59166bb47 | 3 | {
"blob_id": "d231d7a7e3bbd8dbe46478743939f8e59166bb47",
"branch_name": "refs/heads/master",
"committer_date": 1469079940000,
"content_id": "06081ebbcb41add97cc2a622b67d7be5209cc731",
"detected_licenses": [
"MIT"
],
"directory_id": "bcfd35d0fbebaf5d62a5619492105507e039293e",
"extension": "py",
"fi... | 2.671875 | stackv2 | from util.util import handle_chimp_response
from util.util import transform_member
from util.util import bad_resp_match
from requests.auth import HTTPBasicAuth
from json import dumps
import requests
import os
class ChimpRequester(object):
"""ChimpRequester sends authenticated requests to mailchimp to do various
... | 187 | 29.14 | 95 | 13 | 1,260 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_da83d59b50cc7656_930c8b70", "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."
] | [
181
] | [
187
] | [
15
] | [
48
] | |
2024-11-18T19:31:06.302857+00:00 | 1,560,069,261,000 | a51868134631c0da485ff303b47f23469829e9ed | 3 | {
"blob_id": "a51868134631c0da485ff303b47f23469829e9ed",
"branch_name": "refs/heads/master",
"committer_date": 1560069261000,
"content_id": "7476adbfc94593277ad0330e9b08c5467bf93a03",
"detected_licenses": [
"MIT"
],
"directory_id": "adc869830dd67acec04799e63926ab2fd69a75d2",
"extension": "py",
"fi... | 3.265625 | stackv2 | from typing import List
import pandas as pd
import numpy as np
import itertools
import matplotlib.pyplot as plt
from matplotlib.colors import LinearSegmentedColormap
WORK_FILE: str = "datasets/adult.data"
COLUMNS: List[str] = ["age", "workclass", "fnlwgt", "education", "education-num", "marital-status",
... | 171 | 33.42 | 118 | 15 | 1,592 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d139ece90044aee3_a3349ee3", "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."
] | [
155
] | [
null
] | [
11
] | [
22
] | |
2024-11-18T19:11:48.335225+00:00 | 1,462,310,790,000 | dcd6dd86b7dade32e20002778c3a84f083148bb5 | 3 | {
"blob_id": "dcd6dd86b7dade32e20002778c3a84f083148bb5",
"branch_name": "refs/heads/master",
"committer_date": 1462310790000,
"content_id": "599a1c0c5a80adf00eab2fa0ef8cc137ee97637e",
"detected_licenses": [
"MIT"
],
"directory_id": "7c04fe45e41d812f753d78aac87102f7896c2fa3",
"extension": "py",
"fi... | 2.765625 | stackv2 | from contextlib import closing
import hashlib
import json
import requests
import time
class EventStream(object):
ENDPOINT = 'https://data.mixpanel.com/api'
VERSION = '2.0'
def __init__(self, api_key, api_secret):
self.api_key = api_key
self.api_secret = api_secret
def request(self,... | 72 | 27.08 | 78 | 19 | 437 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_9e5b86188d61ca5a_da480707", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
70
] | [
null
] | [
25
] | [
56
] | |
2024-11-18T19:23:48.587787+00:00 | 1,634,912,260,000 | e712297c1a9fc745c18f418a6813423215245cdc | 3 | {
"blob_id": "e712297c1a9fc745c18f418a6813423215245cdc",
"branch_name": "refs/heads/main",
"committer_date": 1634912260000,
"content_id": "01a2cb62f35ff1d7650d5857ffcec2bb9ed20417",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6aff9e00d0e3a764260d8cf2540e52e937406288",
"extension": "py",
... | 2.53125 | stackv2 | import paramiko
from paramiko.client import SSHClient
from scp import SCPClient
from typing import Tuple
import os
import errno
from posixpath import expanduser
from zcore.common import FileManager
from zcore.processor.service import ProcessorService
class NodeProcessorService(ProcessorService):
def __init__(self)... | 117 | 29.91 | 96 | 17 | 737 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_e2bdb23aedbf2bfa_a9ed9701", "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."
] | [
39
] | [
null
] | [
13
] | [
77
] | |
2024-11-18T19:23:53.997898+00:00 | 1,622,930,640,000 | fa4dfc2b8d6f2e6e59e3210b976281c2c4348077 | 3 | {
"blob_id": "fa4dfc2b8d6f2e6e59e3210b976281c2c4348077",
"branch_name": "refs/heads/master",
"committer_date": 1622930640000,
"content_id": "153a9d44b566b5d8c0bfb44a0276ec7d3de07e1e",
"detected_licenses": [
"MIT"
],
"directory_id": "019d96ea1edf876aa297ddce65b18ebd7cd22c2d",
"extension": "py",
"fi... | 2.609375 | stackv2 | #!/usr/bin/env python
from __future__ import division
import simplejson as json
from PIL import Image
from dateutil import parser
from optparse import OptionParser
from subprocess import call
from datetime import datetime, timedelta
from os import listdir
from os.path import isfile, join
from io import StringIO
from d... | 244 | 38.93 | 156 | 22 | 2,210 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6ec845eea050b327_93f69ea4", "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... | 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.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
219,
220
] | [
null,
null
] | [
27,
27
] | [
136,
91
] | |
2024-11-18T19:24:05.494215+00:00 | 1,603,654,650,000 | f5ce43a5834a1ae804d74fb0d72feffbb3bfd1a8 | 2 | {
"blob_id": "f5ce43a5834a1ae804d74fb0d72feffbb3bfd1a8",
"branch_name": "refs/heads/master",
"committer_date": 1603654650000,
"content_id": "2505b68716fc83786179cdcfb16f7c1251274ae7",
"detected_licenses": [
"MIT"
],
"directory_id": "ef3cceffeb23352e87dce248ed8d968c646b121d",
"extension": "py",
"fi... | 2.421875 | stackv2 | import requests
import sqlite3
import msal
from flask import (
Blueprint, flash, g, redirect, render_template, request, url_for, session,
current_app
)
from .oauth import get_token_from_cache
from .db import get_db, modified_date_db
bp = Blueprint('recipes', __name__)
@bp.route('/')
def index():
if not s... | 126 | 29.57 | 113 | 17 | 879 | python | [{"finding_id": "codeql_py/full-ssrf_25b4f6d8be5fae98_fd1d928d", "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)."
] | [
99
] | [
102
] | [
14
] | [
10
] | |
2024-11-18T19:58:35.069382+00:00 | 1,519,446,774,000 | 12acf697d4933a4c58809591a25f3ccd052833ff | 3 | {
"blob_id": "12acf697d4933a4c58809591a25f3ccd052833ff",
"branch_name": "refs/heads/master",
"committer_date": 1519446774000,
"content_id": "580453f0fd4567b5e44645eb7595469920ccb1e9",
"detected_licenses": [
"MIT"
],
"directory_id": "59749f91dffc8f415a8df1d38e6a81bd21f7c502",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python
import jinja2
import argparse
import os
import json
import glob
if __name__ == "__main__":
# parse arguments
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--templates", help="templates directory", default='templates')
parser.add_argument("-x", "--extension", help=... | 36 | 41.17 | 93 | 15 | 320 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_45c57517a0820f53_88bdc66d", "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."
] | [
19
] | [
null
] | [
20
] | [
62
] | |
2024-11-18T19:58:36.291562+00:00 | 1,628,036,765,000 | cddabfdc9d05a27705280c204368951dcebf42f2 | 3 | {
"blob_id": "cddabfdc9d05a27705280c204368951dcebf42f2",
"branch_name": "refs/heads/main",
"committer_date": 1628036765000,
"content_id": "612194e73ef9cf6eefbf7ed44cfee70e7eb34478",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "557f376abc8cb4eb1f73a5251e16c389dfb29ec7",
"extension": "py",
... | 2.8125 | stackv2 | from os import error
from pathlib import Path
import requests
from datetime import datetime
from jinja2 import Template
import logging
logger = logging.getLogger(__name__)
def get_repos() -> list:
"""Get a list of repositories from Github
Returns:
list: List of dictionaries containing repos.
"""... | 46 | 22.74 | 71 | 13 | 247 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_cf0107092a564ba1_76e4eed2", "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."
] | [
37
] | [
null
] | [
16
] | [
72
] | |
2024-11-18T18:39:30.570958+00:00 | 1,681,836,800,000 | 1ee1db52212ba14e154ea4746cbe74baf04890fb | 3 | {
"blob_id": "1ee1db52212ba14e154ea4746cbe74baf04890fb",
"branch_name": "refs/heads/master",
"committer_date": 1681836800000,
"content_id": "829a40ef4c7b568d5411579238c4d07bd2df40b9",
"detected_licenses": [
"MIT"
],
"directory_id": "9acd360d688177e03a77dff6d391c60ad1b82295",
"extension": "py",
"fi... | 2.578125 | stackv2 | """
client
~~~~~~~~~~
This is the client used by the Service class to communicate with the API.
"""
import os
import pkgutil
from importlib import import_module
from pathlib import Path
import logging
from typing import Optional, Union, Dict, List
from urllib.parse import urlsplit
from posixpath import join as urljoi... | 244 | 34.12 | 98 | 17 | 1,887 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_baae0e1fdf56cf14_342d842b", "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."
] | [
59
] | [
null
] | [
76
] | [
80
] | |
2024-11-18T18:39:35.810012+00:00 | 1,439,144,945,000 | f640008adc0a7bab5ba1662f623f082d1b0769bb | 3 | {
"blob_id": "f640008adc0a7bab5ba1662f623f082d1b0769bb",
"branch_name": "refs/heads/master",
"committer_date": 1439144945000,
"content_id": "35420274b01c4dbdfe6e814273d4aed895529f3c",
"detected_licenses": [
"MIT"
],
"directory_id": "a392e8642663ece07dd818ca3ec3ad7b31583efc",
"extension": "py",
"fi... | 2.84375 | stackv2 | # coding:utf-8
import os
import time
import hashlib
import urllib
def get_token(username="beordle"):
def _get_token(username):
#不同站点可使用不同密钥
privatekey = "2324dsf34##4f$43etg4_3t5g?rt)u434"
timea = str(int(time.time() + 24 * 60 * 60)) # 设置有效期为1天
token = timea + hashlib.md5(timea +... | 70 | 28.84 | 90 | 16 | 732 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_819149eab2e5be67_0ea162da", "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)](2) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (MD5) that is insecure."
] | [
14
] | [
null
] | [
37
] | [
66
] | |
2024-11-18T18:46:56.333641+00:00 | 1,574,141,902,000 | 135aab81b0c7098a1d93f9eb14632d96c1abfedb | 2 | {
"blob_id": "135aab81b0c7098a1d93f9eb14632d96c1abfedb",
"branch_name": "refs/heads/master",
"committer_date": 1574141902000,
"content_id": "7bf8ba9a6ac4ab8eb1295989ffbc1a058be2d78d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "b096d05c08ab37795bc66cd70cc4bcbc589e549c",
"extension": "py"... | 2.359375 | stackv2 | # -*- coding: utf-8 -*-
import json
import os
import sys
from flask import Flask, send_from_directory, render_template, request
app = Flask(__name__, static_url_path='')
work_dir = os.path.realpath('../demo_dir')
@app.route('/')
def root():
audio_files = sorted(os.listdir(os.path.join(work_dir, 'audio')))
f... | 60 | 26.57 | 78 | 17 | 393 | python | [{"finding_id": "codeql_py/path-injection_852ec52d5abfe3ef_f682a6aa", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
44
] | [
null
] | [
19
] | [
53
] | |
2024-11-18T18:47:04.128560+00:00 | 1,571,655,422,000 | e199207e4864e8e456633222080d423d99b7fcd7 | 2 | {
"blob_id": "e199207e4864e8e456633222080d423d99b7fcd7",
"branch_name": "refs/heads/master",
"committer_date": 1571655422000,
"content_id": "beac71edff82ffbc6a0669797c54220bab6cf52f",
"detected_licenses": [
"MIT"
],
"directory_id": "811ff0945e840142d9efef6328e0ca02b0456d03",
"extension": "py",
"fi... | 2.484375 | stackv2 | import time
import redis
import requests
import os
import json
from requests.packages.urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
cache = redis.Redis(host='redis', port=6379)
ES_INDEX = os.getenv("ES_INDEX")
ES_URI = os.getenv("ES_URI")
ES_MAX_SIZE... | 110 | 31.43 | 127 | 15 | 875 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9cf156fcc94edba1_ad5dee62", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 7 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
14,
25,
31,
35,
54,
56,
71
] | [
null,
null,
null,
null,
null,
null,
null
] | [
9,
9,
9,
9,
9,
9,
9
] | [
54,
79,
80,
67,
106,
128,
109
] | |
2024-11-18T20:58:17.734848+00:00 | 1,685,318,243,000 | c4c7e8a3a25224e4596f35d5dd540a69e34a5601 | 3 | {
"blob_id": "c4c7e8a3a25224e4596f35d5dd540a69e34a5601",
"branch_name": "refs/heads/master",
"committer_date": 1685318243000,
"content_id": "63cacc14e5b8d245eaba4a1a36ca3a8a389a721a",
"detected_licenses": [
"MIT"
],
"directory_id": "9715e9574af50d641bba6a43c841d9fe011412b4",
"extension": "py",
"fi... | 2.828125 | stackv2 | #!/usr/bin/env python3
from argparse import ArgumentParser
import boto3
import json
import os
import time
ACCESS_ID = "AWS_ACCESS_KEY_ID"
SECRET_KEY = "AWS_SECRET_ACCESS_KEY"
SESSION_KEY = "AWS_SESSION_TOKEN"
def assumeRole(client, arn):
response = client.assume_role (
RoleArn = arn,
RoleSessionN... | 65 | 26.23 | 109 | 14 | 394 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8176bd1592aeac2c_dd091376", "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."
] | [
31
] | [
null
] | [
11
] | [
109
] | |
2024-11-18T19:49:11.089837+00:00 | 1,599,978,247,000 | 4c083ac6bbd920011c88cfb37bfaa861ddbd5eae | 2 | {
"blob_id": "4c083ac6bbd920011c88cfb37bfaa861ddbd5eae",
"branch_name": "refs/heads/master",
"committer_date": 1599978247000,
"content_id": "ca37a6857789ae4ffb46149dd512e744528e3fd6",
"detected_licenses": [
"MIT"
],
"directory_id": "392a66babd5879259b2ad51835664e06b93f0a67",
"extension": "py",
"fi... | 2.390625 | stackv2 | #! /usr/bin/env python3.6
"""
server.py
Stripe Sample.
Python 3.6 or newer required.
"""
import json
import os
import secrets
import string
import stripe
from dotenv import load_dotenv, find_dotenv
from flask import Flask, jsonify, render_template, redirect, request, session, send_from_directory
import urllib
# Set... | 74 | 30.82 | 102 | 17 | 581 | python | [{"finding_id": "codeql_py/reflective-xss_5ed37443438f4281_80d607d2", "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)."
] | [
54,
61
] | [
null,
null
] | [
12,
12
] | [
97,
77
] | |
2024-11-18T19:49:11.387198+00:00 | 1,615,684,834,000 | 7f2ecf48b51337fc2fd6bc283c302b4b230e819c | 3 | {
"blob_id": "7f2ecf48b51337fc2fd6bc283c302b4b230e819c",
"branch_name": "refs/heads/master",
"committer_date": 1615684834000,
"content_id": "ba6558797243feb3c0b204a58fcd47dd2ddb61f9",
"detected_licenses": [
"MIT",
"Python-2.0"
],
"directory_id": "e3a8e4c13f3ebd5cd8284d4b0795b7cb88472c2f",
"exten... | 3.40625 | stackv2 | from io import open
import sys
def read_people_cvs_exercise():
list_of_keys = ['id', 'name', 'last_name', 'date_of_birth']
try:
file = open("people.csv", "r", encoding="utf8")
lines = file.readlines()
person_list = []
for line in lines:
person_values = line.replace... | 61 | 28.85 | 97 | 16 | 402 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8471ba4a0b663629_a1d89463", "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."
] | [
19
] | [
20
] | [
19
] | [
72
] | |
2024-11-18T20:15:50.418835+00:00 | 1,549,979,592,000 | 35f0719545e2807a69acfaa346c5685e373eba00 | 2 | {
"blob_id": "35f0719545e2807a69acfaa346c5685e373eba00",
"branch_name": "refs/heads/master",
"committer_date": 1549979592000,
"content_id": "43ca7977d3f722d3736c4a19b4d2b6a27692c277",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0a3bf0a6f10eb143c9291090125946538ee73279",
"extension": "py"... | 2.375 | stackv2 | import re
from requests import get
from lxml import html
from nltk.tokenize import sent_tokenize
from bs4 import BeautifulSoup
import itertools
def get_summary(tree):
summary_block = tree.xpath('//ol[@class="lx-c-summary-points gel-long-primer"]')
if len(summary_block) == 1:
summary = [line + "." ... | 231 | 34.56 | 118 | 24 | 2,374 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_affd8f1121fbf115_3be95252", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://twitter.com/](1) may be at an arbitrary positi... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://twitter.com/](1) may be at an arbitrary position in the sanitized URL."
] | [
59
] | [
null
] | [
20
] | [
50
] | |
2024-11-18T19:23:05.408557+00:00 | 1,459,708,637,000 | d3f3d8f82f5ecec975f12b0a2a249cefd55d9e00 | 3 | {
"blob_id": "d3f3d8f82f5ecec975f12b0a2a249cefd55d9e00",
"branch_name": "refs/heads/master",
"committer_date": 1459708637000,
"content_id": "1696980ec3547b4a14c8c577017dcd5493d93b5f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5222fa1fa95b372c3a39a8972bc8d3074d9568bf",
"extension": "py"... | 2.640625 | stackv2 | from flask import Flask
from sim import similarity
from summarize_app import summarize_app
app = Flask(__name__)
app.register_blueprint(summarize_app)
@app.route("/hello")
@app.route("/hello/<name>")
def hello(name=None):
return "Hello World! Your name is %s." % name
@app.route("/test")
def test():
array = ... | 24 | 22.42 | 53 | 9 | 144 | python | [{"finding_id": "codeql_py/reflective-xss_ba7b50075b155e4d_cbdc8461", "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)."
] | [
11
] | [
null
] | [
12
] | [
50
] | |
2024-11-18T19:38:08.147803+00:00 | 1,672,346,959,000 | c36d111859ddb7227dce4ce4e9aba740328b4ce8 | 2 | {
"blob_id": "c36d111859ddb7227dce4ce4e9aba740328b4ce8",
"branch_name": "refs/heads/master",
"committer_date": 1672346959000,
"content_id": "80cf7236504d497fc32c0168823cf69eca855298",
"detected_licenses": [
"MIT"
],
"directory_id": "f8d6b4d3666026ed36f31ffd771d79bd6dc2048c",
"extension": "py",
"fi... | 2.421875 | stackv2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import geopy
import numpy as np
import pandas as pd
from bokeh.browserlib import view
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.models.glyphs import Circle
from bokeh.models import (
GMapPlot, Range1d, ColumnDataS... | 119 | 23.21 | 90 | 12 | 798 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b4a7a9725df17a39_15955cdc", "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."
] | [
44,
44
] | [
null,
null
] | [
21,
40
] | [
38,
58
] | |
2024-11-18T20:10:36.526666+00:00 | 1,609,670,179,000 | c2eb4a2870445f85b1d545145206b5e145085ea9 | 3 | {
"blob_id": "c2eb4a2870445f85b1d545145206b5e145085ea9",
"branch_name": "refs/heads/master",
"committer_date": 1609670179000,
"content_id": "bd03aaeb5476bbd9d1fa0c54a4f2ad5837d2c0c1",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "e8ebb989fb1dbe9bedf7727fb2903dc2e50a1f7a",
"extension": "py",
... | 2.546875 | stackv2 | from app import app
import json
import os
import cv2
import face_recognition
from flask import jsonify, request
from app.Services.studentServices import studentServices
@app.route('/get_all_students',methods=['POST'])
def get_all_students():
curser = studentServices.get_all_students()
allStudents = []
... | 71 | 29 | 80 | 15 | 436 | python | [{"finding_id": "codeql_py/path-injection_7346058c7e295ed2_76052d6c", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1)."
] | [
52
] | [
null
] | [
19
] | [
23
] | |
2024-11-18T20:10:42.896925+00:00 | 1,480,074,671,000 | f287dbd3d82fdefb154587fe85956baa6610a722 | 3 | {
"blob_id": "f287dbd3d82fdefb154587fe85956baa6610a722",
"branch_name": "refs/heads/master",
"committer_date": 1480074671000,
"content_id": "33cd959a29cd2c5b260a506282115663b0eea91c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f5105eca919a99e06d0346521acf012699322654",
"extension": "py"... | 2.640625 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf8 -*-
"""
raut2webstr-pagemodel-tree script
"""
# Copyright 2016 Martin Bukatovič <mbukatov@redhat.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License ... | 112 | 34.79 | 81 | 16 | 927 | python | [{"finding_id": "codeql_py/overly-permissive-file_1d134009daa16c3f_38096c17", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world readable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world readable."
] | [
55
] | [
null
] | [
13
] | [
65
] | |
2024-11-18T20:11:04.047895+00:00 | 1,631,126,026,000 | eff498e63373a7e9e50c8a9422cdba6ab54acfa2 | 3 | {
"blob_id": "eff498e63373a7e9e50c8a9422cdba6ab54acfa2",
"branch_name": "refs/heads/master",
"committer_date": 1631126026000,
"content_id": "7edc52bb8b0dabdd7c3aa300809a1f15288eb36b",
"detected_licenses": [
"MIT",
"CC0-1.0"
],
"directory_id": "251f5c092d4b7760cec8c2b6324e5290b917721f",
"extensio... | 2.8125 | stackv2 | # -*- coding: utf-8 -*-
import scrapy
import re
import json
from locations.items import GeojsonPointItem
WEEKDAYS = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']
class AldiESSpider(scrapy.Spider):
name = 'aldi_es'
item_attributes = { 'brand': "Aldi" }
allowed_domains = ['www.aldi.es']
start_urls = (
... | 54 | 32.15 | 99 | 18 | 440 | python | [{"finding_id": "codeql_py/redos_018a4a96f974fa37_d0c6c0ed", "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 'var dataMap = {{' and containing ... | 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 'var dataMap = {{' and containing many repetitions of ' '.",
"This part of the regular expression may cause exponential backtracking on strings starting with '\\[' and containing many repetitions of ' '."
] | [
18,
19
] | [
null,
null
] | [
47,
35
] | [
55,
42
] | |
2024-11-18T20:26:06.828248+00:00 | 1,600,210,839,000 | 78b8c58c455ca3d4a913b6c873e63b7b6ce0f1e3 | 3 | {
"blob_id": "78b8c58c455ca3d4a913b6c873e63b7b6ce0f1e3",
"branch_name": "refs/heads/master",
"committer_date": 1600210839000,
"content_id": "8e30e1d1d7749cd50a9fd94bb7e9601cd61e9532",
"detected_licenses": [
"MIT"
],
"directory_id": "369e5f0bc974464b0231dacea8f7578dcbe87264",
"extension": "py",
"fi... | 2.578125 | stackv2 | # This is a sample Python script.
# Press Shift+F10 to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
# https://medium.com/@keagileageek/paramiko-how-to-ssh-and-file-transfers-with-python-75766179de73
import paramiko
import os... | 221 | 37.6 | 129 | 16 | 1,970 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_cbc6a9453f04d386_d3372cc0", "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
] | [
9
] | [
73
] | |
2024-11-18T20:26:06.885737+00:00 | 1,516,957,295,000 | c533bbb72d60668bb219ddf32ebb507a8f194e66 | 4 | {
"blob_id": "c533bbb72d60668bb219ddf32ebb507a8f194e66",
"branch_name": "refs/heads/master",
"committer_date": 1516957295000,
"content_id": "e1d7fa3d0028017f93bf528a638c856526e15db7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "550d6012c5f14e87803dbb29abc9edf8a34a1ca9",
"extension": "py"... | 3.953125 | stackv2 | #Qna8,Qna10,Qna11,Qna12,Qna17,Qna18,Qna19,Qna20
#이름 짓기
#파스칼 표기법 : 첫단어를 대문자로 시작하여 이름을 지음 ex) Employees, RegisterEmployee // 주로 클래스를 만들 때 많이 쓰임
#카멜 표기법 : 첫단어는 소문자로 시작하여 이름을 지음 ex) employees, registerEmployee
#스네이크 표기법 : 소문자와 _ 기호를 이용해서 이름을 지음 ex) register_employee
#헝가리언 표기법 : 자료형을 의미하는 접두사를 이용해서 이름을 지음 ex) strName, isMar... | 142 | 20.8 | 92 | 13 | 1,317 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e870d4b98b6ee3f9_5361a1f2", "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."
] | [
104
] | [
null
] | [
11
] | [
39
] | |
2024-11-18T20:26:09.995351+00:00 | 1,681,176,265,000 | 0143efb524c86da825a147b0d3bbe3b97a85484e | 3 | {
"blob_id": "0143efb524c86da825a147b0d3bbe3b97a85484e",
"branch_name": "refs/heads/master",
"committer_date": 1681176265000,
"content_id": "9f36cf0f41c42f61be1bd5871f6fa506056a5cb4",
"detected_licenses": [
"MIT"
],
"directory_id": "ecabfe684900f13818f5d797883fadb77db897e7",
"extension": "py",
"fi... | 2.703125 | stackv2 | #!/usr/bin/env python
import requests
import sys
import json
import os
from PIL import Image
import piexif
import re
import datetime
try:
sys.argv[3]
except IndexError:
argverrormsg = 'Error, wrong number of arguments!\n'
argverrormsg += 'Usage: $ upload-images.py [WP REST endpoint URL] [application password] [... | 161 | 39.58 | 151 | 30 | 1,642 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2ebc50f16f07cd78_c9de018a", "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."
] | [
161
] | [
null
] | [
7
] | [
108
] | |
2024-11-18T20:26:23.333340+00:00 | 1,565,643,150,000 | e4b787b48ee57d5f664383e11d6be44c90df94a7 | 2 | {
"blob_id": "e4b787b48ee57d5f664383e11d6be44c90df94a7",
"branch_name": "refs/heads/master",
"committer_date": 1565643341000,
"content_id": "0cd86b7b966cf48a55ac7f885c8b82406d675178",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "44dd73c48b8d79a8a1778c9eae8e8547a98a2ff4",
"extension": "py"... | 2.390625 | stackv2 | #! /usr/bin/env python3
# Copyright (C) 2019 Garmin Ltd.
#
# SPDX-License-Identifier: Apache-2.0
#
from aiohttp import web
from datetime import datetime
import aiosqlite
import argparse
import logging
logger = logging.getLogger('hashserv')
db = None
async def get_equivalent(request):
db = request.app['db']
... | 167 | 31.56 | 151 | 21 | 1,224 | python | [{"finding_id": "codeql_py/log-injection_d0956e9933d70df6_1fe7b777", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](1)... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
89,
89
] | [
null,
null
] | [
25,
43
] | [
41,
50
] | |
2024-11-18T20:26:38.407890+00:00 | 1,623,460,934,000 | 613c0b79a2b2cd5d5ab2cebb003a1fe5b5c7d587 | 3 | {
"blob_id": "613c0b79a2b2cd5d5ab2cebb003a1fe5b5c7d587",
"branch_name": "refs/heads/main",
"committer_date": 1623460934000,
"content_id": "3d53eb1ad3dff0eed9416f11ff2489df2768b8e4",
"detected_licenses": [
"MIT"
],
"directory_id": "2dd8dd71e4377ff73c2cb63d5e671ef96fc052a3",
"extension": "py",
"file... | 3 | stackv2 | # Required Imports
import os
from flask import Flask, request, jsonify
from firebase_admin import credentials, firestore, initialize_app, storage
# Initialize Flask App
app = Flask(__name__)
# Initialize Firestore DB
cred = credentials.Certificate('key.json.secret')
default_app = initialize_app(cred)
db = firestore.c... | 89 | 27.83 | 76 | 16 | 623 | python | [{"finding_id": "codeql_py/stack-trace-exposure_1b839798836adc81_89717519", "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.", "... | 4 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"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... | [
36,
57,
72,
86
] | [
null,
null,
null,
null
] | [
16,
16,
16,
16
] | [
40,
40,
40,
40
] | |
2024-11-18T20:26:46.824354+00:00 | 1,624,188,273,000 | efe9baccfa218b3bf8723bc07eca15e43b015fa1 | 3 | {
"blob_id": "efe9baccfa218b3bf8723bc07eca15e43b015fa1",
"branch_name": "refs/heads/master",
"committer_date": 1624188273000,
"content_id": "baba651148dcb4079a302019ec06ceae30282866",
"detected_licenses": [
"MIT"
],
"directory_id": "8f4fcf414e6dd090718fb6c853a1519c4437aa53",
"extension": "py",
"fi... | 2.671875 | stackv2 | import streamlit as st
import requests
import base64
import cv2
import numpy as np
import matplotlib.pyplot as plt
import config
from utils import plot_image
st.title('App')
st.subheader('Detector')
image_file = st.file_uploader("Upload a file", type=("png","jpg"))
message = st.text_area("pregunta", "")
if st.butto... | 81 | 30.6 | 103 | 19 | 631 | python | [{"finding_id": "codeql_py/partial-ssrf_2cbd2a6eb63f6101_7362b347", "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).\nPart of the URL of this request depen... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depends on a [user-provided value](1)."
] | [
62
] | [
null
] | [
20
] | [
46
] | |
2024-11-18T20:26:47.333246+00:00 | 1,579,569,739,000 | 25d14e2abed577532d5d4f6361d0c3f800519147 | 2 | {
"blob_id": "25d14e2abed577532d5d4f6361d0c3f800519147",
"branch_name": "refs/heads/master",
"committer_date": 1579569739000,
"content_id": "f13840de5d35982d6c50118b98a7c94e6ce836d7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f6d52c68990249c71f9aee55902102cb8c3b1d47",
"extension": "py"... | 2.3125 | stackv2 | #!/usr/bin/env python3
import cgi, cgitb, secret, os
from templates import login_page, secret_page, after_login_incorrect
from http.cookies import SimpleCookie
cgitb.enable()
res = cgi.FieldStorage()
username = res.getfirst("username")
password = res.getfirst("password")
print("Content-Type: text/html")
form_ok = us... | 39 | 24.64 | 68 | 10 | 235 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_53acc401d60bfcfb_09708258", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
30,
37
] | [
null,
null
] | [
33,
8
] | [
41,
39
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.