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-19T02:45:46.542869+00:00 | 1,545,518,247,000 | e0fb38f60d9753ef599f0d455aaf8f237d4cd620 | 3 | {
"blob_id": "e0fb38f60d9753ef599f0d455aaf8f237d4cd620",
"branch_name": "refs/heads/master",
"committer_date": 1545518247000,
"content_id": "e2b551db3b4d7ad345ac48b2b40c2730c0a7d17d",
"detected_licenses": [
"MIT"
],
"directory_id": "547e08aedbc0ca20f364e302ca2faf1194b485f9",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/python
from scapy.all import*
def spoof_dns(pkt):
if (DNS in pkt and 'www.example.net' in pkt[DNS].qd.qname):
# Swap the source and destination IP address
IPpkt = IP(dst=pkt[IP].src, src=pkt[IP].dst)
# Swap the source and destination port number
UDPpkt = UDP(dport=pkt[UDP].sport, sport=53)
# The A... | 33 | 39.61 | 64 | 14 | 519 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_c7e1d069ca6bf6db_5c8dd3e2", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [www.example.net](1) may be at an arbitrary position in... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [www.example.net](1) may be at an arbitrary position in the sanitized URL."
] | [
4
] | [
null
] | [
21
] | [
59
] | |
2024-11-19T02:45:49.830283+00:00 | 1,527,087,227,000 | e70a3c51d20a3d0c696afc39e473c3277928addc | 2 | {
"blob_id": "e70a3c51d20a3d0c696afc39e473c3277928addc",
"branch_name": "refs/heads/master",
"committer_date": 1527087227000,
"content_id": "8a9a3e424a281acf77e0a27a3d67c885f0153974",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9938edd13436b76520992b8c5d8ced654d593483",
"extension": "py"... | 2.3125 | stackv2 | import paramiko, time, argparse, getpass, os, sys, csv
from options.settings import *
from report.checks import *
def parseArgs():
# Parse arguments and display help
parser = argparse.ArgumentParser(description='{}'.format(APP_NAME))
parser.add_argument('-i', help='ip address', default='', required=True)
parser.ad... | 287 | 30.24 | 179 | 20 | 2,491 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a2a0f5fff744fb0d_9505d9df", "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."
] | [
21
] | [
null
] | [
2
] | [
59
] | |
2024-11-19T02:45:57.574886+00:00 | 1,648,584,271,000 | f55603787a4da2a935cf37aeec27ebf9de9b3f0d | 3 | {
"blob_id": "f55603787a4da2a935cf37aeec27ebf9de9b3f0d",
"branch_name": "refs/heads/master",
"committer_date": 1648584271000,
"content_id": "3135ff4186f1163b7d9ee898c739bb0251955d43",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "64d353d6ff9cd2d0e1c03340a3f8db4f2f16884d",
"extension": "p... | 2.515625 | stackv2 | # -*- coding: utf-8 -*-
"""get_donor_data_and_metadata.py
In the context of the big data donation
project, this code grabs donor data and metadata.
This code calls accept_new_donors_and_get_donor_list.py
to get the most recent donor list
"""
# %% REQUIRED LIBRARIES
import pandas as pd
import datetime as dt
import num... | 251 | 24.47 | 79 | 15 | 1,474 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8773d6359ae9c65a_01845349", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw... | [
150,
192
] | [
null,
null
] | [
27,
45
] | [
34,
52
] | |
2024-11-19T02:45:59.566618+00:00 | 1,600,826,538,000 | 26a4555d449964ac65c1489b4895b7812bc59ba4 | 3 | {
"blob_id": "26a4555d449964ac65c1489b4895b7812bc59ba4",
"branch_name": "refs/heads/master",
"committer_date": 1600826538000,
"content_id": "eb44bc93ab71bada8ea6ee4b12e49f43ceaea4da",
"detected_licenses": [
"MIT"
],
"directory_id": "f1aed4d9680d43de689ba28c780d74e3c7639996",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!/usr/bin/python
import sys
import hmac
import hashlib
import base64
str1 = "timber"
str2 = "core"
str3 = "region"
def toBytes(para):
return bytes(para, 'latin-1')
def getPass(para):
import getpass
return getpass.getpass(para)
def keyGen(key, password):
md5one = hmac.new(toBytes(key), toBytes(password), h... | 35 | 28.51 | 84 | 12 | 352 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_ddca2f7bdde94a98_232b9f71", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi... | [
20
] | [
null
] | [
35
] | [
52
] | |
2024-11-19T02:57:19.456384+00:00 | 1,593,703,867,000 | 35aed96fcc70c85a5899430a697621cc6bd49ec8 | 3 | {
"blob_id": "35aed96fcc70c85a5899430a697621cc6bd49ec8",
"branch_name": "refs/heads/master",
"committer_date": 1593703867000,
"content_id": "5eeb0b78053c4a3857866216f5b61ca9e0fc9704",
"detected_licenses": [
"MIT"
],
"directory_id": "29d666b080f80ff1436628e56a5d8fb663532abf",
"extension": "py",
"fi... | 2.890625 | stackv2 | import datetime
import io
import os
import flask
from app.api import api
def render_error(msg, error_header="An error occured!", statusCode=500):
return flask.render_template('error.html', error_header=error_header, error_message=msg), statusCode
def get_valid_subpath(f: str, d: str):
"""
Returns the abs... | 259 | 30.42 | 115 | 21 | 1,840 | python | [{"finding_id": "codeql_py/stack-trace-exposure_fbacc9df37bc99bf_e0ea54b3", "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."
] | [
181
] | [
null
] | [
34
] | [
69
] | |
2024-11-19T02:57:20.908610+00:00 | 1,557,759,762,000 | b2f4a58bc38609c5e32749063b9915bc0547d0c5 | 2 | {
"blob_id": "b2f4a58bc38609c5e32749063b9915bc0547d0c5",
"branch_name": "refs/heads/master",
"committer_date": 1557759762000,
"content_id": "1fcefc17ca37b090aa55532f88a537bceca54dd5",
"detected_licenses": [
"MIT"
],
"directory_id": "5663080269975d9cf29f4dc130c2a04c033c9f71",
"extension": "py",
"fi... | 2.5 | stackv2 | import numpy as np
import pickle
import tensorflow as tf
from flask import Flask, request
import model
import os
import json
import requests
# Load in data structures
with open("data/wordList.txt", "rb") as fp:
wordList = pickle.load(fp)
wordList.append('<pad>')
wordList.append('<EOS>')
# Load in hyperparamters
... | 132 | 33.48 | 132 | 18 | 1,055 | python | [{"finding_id": "codeql_py/flask-debug_cf3487b108668ab4_df1b4a94", "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)."
] | [
131,
67
] | [
null,
null
] | [
5,
20
] | [
24,
54
] | |
2024-11-19T02:57:21.559659+00:00 | 1,516,168,277,000 | e0574ef3433f67de8d6b086618df873a27499cd3 | 3 | {
"blob_id": "e0574ef3433f67de8d6b086618df873a27499cd3",
"branch_name": "refs/heads/master",
"committer_date": 1516168277000,
"content_id": "e5b39490cc10dfaca17279d0600f7e81d9f0f97b",
"detected_licenses": [
"MIT"
],
"directory_id": "7bdfc477629e6122fdb01cb64420b88de9d9c6ec",
"extension": "py",
"fi... | 2.546875 | stackv2 |
# -*- coding: utf-8 -*-
import socket
from tornado.iostream import IOStream
from tornado.web import RequestHandler, asynchronous
from tornado.httpclient import HTTPRequest, AsyncHTTPClient, HTTPError
from tornado.httputil import HTTPHeaders
class ProxyHandler(RequestHandler):
'''
Proxy Handler Class
'... | 137 | 31.66 | 77 | 19 | 888 | python | [{"finding_id": "codeql_py/stack-trace-exposure_c32bd8e1b210dce8_b4487f4f", "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."
] | [
47
] | [
null
] | [
28
] | [
67
] | |
2024-11-19T02:57:26.225520+00:00 | 1,585,302,294,000 | afaad34256023a6dc95bc824a349763568269459 | 3 | {
"blob_id": "afaad34256023a6dc95bc824a349763568269459",
"branch_name": "refs/heads/master",
"committer_date": 1585302294000,
"content_id": "36c27c423600e48fae2e723aa50df2c66cdcc7d2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "3312bd9932007542e499d170bfb3966c2afea0fc",
"extension": "py"... | 2.6875 | stackv2 | # Simple Code
import logging, logging.handlers
import traceback
import yaml
from flask import Flask, request, abort, Response, stream_with_context
from werkzeug.datastructures import Headers
from io import StringIO
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
thePropertyFile = "properties.yml"
... | 81 | 33.46 | 98 | 23 | 611 | python | [{"finding_id": "codeql_py/log-injection_5aff3f3b7be5d0eb_619c3dfe", "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](2)... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2)."
] | [
35
] | [
null
] | [
17
] | [
86
] | |
2024-11-19T03:12:20.527326+00:00 | 1,561,991,014,000 | 448eb7a73c7c6779e2f7080bee98b5cfb6a0890f | 3 | {
"blob_id": "448eb7a73c7c6779e2f7080bee98b5cfb6a0890f",
"branch_name": "refs/heads/master",
"committer_date": 1561991014000,
"content_id": "b330c5e2e788d60cde8b321961ce7a12869c2764",
"detected_licenses": [
"MIT"
],
"directory_id": "8a9b5f7fd8a100c004189ff43579bbcae8f018d0",
"extension": "py",
"fi... | 2.765625 | stackv2 | import sys, argparse
import pandas as pd
import json as js
import jinja2
import pdfkit
def iterate_dicts(madmp, tplt, result):
for key, val in madmp.items():
t = type(val)
if t is dict:
print(f"dict {key}")
if key in tplt:
result = iterate_dicts(val, tplt[ke... | 72 | 27.97 | 130 | 18 | 542 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_7b9f9a20d46728dc_659893d6", "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."
] | [
65
] | [
null
] | [
20
] | [
62
] | |
2024-11-19T03:12:21.498263+00:00 | 1,478,686,937,000 | baf59968a8d2e3a375670aa7435a0be4c8fba54f | 3 | {
"blob_id": "baf59968a8d2e3a375670aa7435a0be4c8fba54f",
"branch_name": "refs/heads/master",
"committer_date": 1478686937000,
"content_id": "b389cd6cb731acf7fbb76ec4f53d363aa24f952c",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "80deaa3591c8844e23a8f645ef67747fb32dd359",
"extension": "py",
... | 2.546875 | stackv2 | import requests
import click
import configparser
import os
import re
from flask import Flask
from flask import render_template
from flask import request as flask_request
g_args = None
app = Flask(__name__)
"""
.. moduleauthor:: Tomas Kvasnicka <kvasntom@fit.cvut.cz>
:synopsis: Process GitHub issues and label ... | 377 | 37.3 | 120 | 20 | 3,220 | python | [{"finding_id": "codeql_py/partial-ssrf_57078ce5bedc594b_a7554578", "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... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).\nPart 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).\nPart of the URL of this request depends on a [user-provided value](1)."
] | [
356,
359
] | [
357,
360
] | [
17,
17
] | [
100,
100
] | |
2024-11-19T03:12:21.828785+00:00 | 1,621,756,672,000 | bd3c469289b77a6757d814f57f6acebadb81e208 | 2 | {
"blob_id": "bd3c469289b77a6757d814f57f6acebadb81e208",
"branch_name": "refs/heads/master",
"committer_date": 1621756672000,
"content_id": "4b99fbeed811d3fd8bac1788585ac91ccf334d5c",
"detected_licenses": [
"MIT"
],
"directory_id": "36304d42f9bd944259739410e9fb6242187679f9",
"extension": "py",
"fi... | 2.453125 | stackv2 | #-*- coding:utf-8 -*-
import io
import os
import sys
import urllib
import json
from http.server import HTTPServer
from http.server import SimpleHTTPRequestHandler
class MyRequestHandler(SimpleHTTPRequestHandler):
protocol_version = "HTTP/1.0"
server_version = "PSHS/0.1"
sys_version = "Python/3.8.x"
... | 77 | 33.96 | 87 | 19 | 598 | python | [{"finding_id": "codeql_py/path-injection_ed211f23215d78d7_05897a82", "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", ... | 5 | true | [
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
32,
35,
54,
55,
57
] | [
null,
null,
null,
null,
null
] | [
29,
23,
31,
27,
23
] | [
54,
48,
39,
35,
31
] | |
2024-11-19T01:57:21.015460+00:00 | 1,607,095,964,000 | 7cf969be64e218ea5491e5d1ba91da0437038d28 | 2 | {
"blob_id": "7cf969be64e218ea5491e5d1ba91da0437038d28",
"branch_name": "refs/heads/main",
"committer_date": 1607095964000,
"content_id": "aca4e80b7322336e53056186f9eb1e90de0f7af3",
"detected_licenses": [
"MIT"
],
"directory_id": "76fa79c2be62d013f1752b2f747567af9707aa9c",
"extension": "py",
"file... | 2.375 | stackv2 | #!/usr/bin/env python3
import os
import re
import sys
import stat
from colorama import init as colorama_init, Fore, Style
import pydash as _
from pathlib import Path
from mako.template import Template
REPO_DIR = Path(__file__).resolve(strict=False).parents[1]
sys.path.insert(0, str(REPO_DIR))
from utils.classes.Comp... | 61 | 24.59 | 122 | 17 | 417 | python | [{"finding_id": "codeql_py/overly-permissive-file_e1b214fa9dea507c_027014f5", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable."
] | [
54
] | [
null
] | [
3
] | [
29
] | |
2024-11-19T01:57:21.447148+00:00 | 1,435,094,749,000 | 763ed214ac49dbac6a67c0f7bf4b71eafdc24764 | 3 | {
"blob_id": "763ed214ac49dbac6a67c0f7bf4b71eafdc24764",
"branch_name": "refs/heads/master",
"committer_date": 1435094749000,
"content_id": "b1892db7842409b7e585d55690035a511289badf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "bc3d7939b69681af5048cf5afc545b481afdc8f2",
"extension": "p... | 2.71875 | stackv2 | # -*- coding: utf-8 -*-
import argparse
import io
import logging
import os
import requests
from six.moves import configparser
DEFAULT_CONFIG_FILENAME = os.path.expanduser("~/.telepath.cfg")
class BadConfigurationError(Exception):
pass
def validate_configuration(config):
if not config.has_section('telepat... | 169 | 30.21 | 79 | 15 | 1,045 | python | [{"finding_id": "codeql_py/request-without-cert-validation_045f2190d37a77bf_bd9811a0", "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)."
] | [
119
] | [
null
] | [
16
] | [
76
] | |
2024-11-19T01:57:24.913452+00:00 | 1,578,927,286,000 | 2d4cb581a766c10df3edc6116bb0a7e1bba9832f | 3 | {
"blob_id": "2d4cb581a766c10df3edc6116bb0a7e1bba9832f",
"branch_name": "refs/heads/master",
"committer_date": 1578927286000,
"content_id": "fc6335bc8f64eeb12e5cca4469822bf755490ead",
"detected_licenses": [
"MIT"
],
"directory_id": "e223250e9b17e226b81f651f25f210ff88088270",
"extension": "py",
"fi... | 2.515625 | stackv2 | from flask import Blueprint, render_template, request
from application.services.compare import image_path_dict, EnhanceEncoder
from application.services.compare import ImageEnhancer, CompareSession
from application.services.compare.Tournament import Tournament
from application.models import CompareData, ScoredParam, Us... | 192 | 24.7 | 91 | 13 | 1,133 | python | [{"finding_id": "codeql_py/stack-trace-exposure_e866cd994e17fcc2_14c7473a", "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."
] | [
100,
131
] | [
null,
null
] | [
20,
20
] | [
21,
21
] | |
2024-11-19T01:57:32.363330+00:00 | 1,495,385,947,000 | 0344847d0a2443b32a8efaeaa86e323ab77c0ed8 | 3 | {
"blob_id": "0344847d0a2443b32a8efaeaa86e323ab77c0ed8",
"branch_name": "refs/heads/master",
"committer_date": 1495385947000,
"content_id": "6f0467670c7bcdd8189aaa19dab799ef33f2a0e6",
"detected_licenses": [
"MIT"
],
"directory_id": "52f9b1d770284e5624bed2f976c74f172a875288",
"extension": "py",
"fi... | 2.59375 | stackv2 |
import matplotlib
import theano
import theano.tensor as T
import numpy as np
import matplotlib.pyplot as plt
from theano.compile.ops import as_op
from mozi.utils.progbar import Progbar
from mozi.utils.train_object_utils import is_shared_var
import tarfile, inspect, os
from six.moves.urllib.request import urlretriev... | 188 | 30.43 | 100 | 20 | 1,402 | python | [{"finding_id": "codeql_py/tarslip_3512683acff8e281_934b3015", "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)."
] | [
112
] | [
null
] | [
13
] | [
18
] | |
2024-11-19T02:11:10.269434+00:00 | 1,690,670,122,000 | 68c0bec097570ba59213b6431e883dd5781f0edb | 3 | {
"blob_id": "68c0bec097570ba59213b6431e883dd5781f0edb",
"branch_name": "refs/heads/master",
"committer_date": 1690670122000,
"content_id": "ab24eb4c625df37b4992792ce24f464ad970e989",
"detected_licenses": [
"MIT"
],
"directory_id": "7321543b219c7ff8b45598c8996193a311569b2e",
"extension": "py",
"fi... | 2.515625 | stackv2 | #!/usr/bin/env python3
import os, sys
import http.server, ssl
# for logging and CLI arguments parsing
from common import Logger, CLIParser
logger = Logger.getLogger()
Logger.disable_http_tracing()
class WebFileServer:
def start_instance(root_dir, port=80, cert_file=None, key_file=None):
Handler = http.server.S... | 53 | 31.72 | 92 | 14 | 411 | python | [{"finding_id": "codeql_py/insecure-default-protocol_11ad9769129c25e6_02b1c3b6", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in... | 1 | true | [
"CWE-327"
] | [
"py/insecure-default-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used."
] | [
18
] | [
19
] | [
22
] | [
46
] | |
2024-11-19T02:11:18.711180+00:00 | 1,690,915,105,000 | 95b115e223a67132adc0f43366e42e59520cec26 | 3 | {
"blob_id": "95b115e223a67132adc0f43366e42e59520cec26",
"branch_name": "refs/heads/master",
"committer_date": 1690915105000,
"content_id": "c7e964efe678297b034a77328dd859df51bd9477",
"detected_licenses": [
"MIT"
],
"directory_id": "69409f1579023ef560d812866f89faff70b867aa",
"extension": "py",
"fi... | 2.71875 | stackv2 | from mobify.source import MobifySource
class AosaBookSource(MobifySource):
HEADER = u"""
<h1>{title}</h1>
<p><small>{author}</small><br></p>
"""
@staticmethod
def is_my_url(url):
# http://aosabook.org/en/git.html
return '//aosabook.org/' in url
def get_html(self):
article = ... | 43 | 26.23 | 89 | 17 | 292 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_f6576a71e32e0ca0_225b6382", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [//aosabook.org/](1) may be at an arbitrary position in... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [//aosabook.org/](1) may be at an arbitrary position in the sanitized URL."
] | [
14
] | [
null
] | [
16
] | [
40
] | |
2024-11-19T02:11:26.495530+00:00 | 1,583,439,855,000 | 8d0a2b7ff767eb3c7b59bd30f4b72452aedb06e6 | 3 | {
"blob_id": "8d0a2b7ff767eb3c7b59bd30f4b72452aedb06e6",
"branch_name": "refs/heads/master",
"committer_date": 1583439855000,
"content_id": "6d87589d84e2af12be78dced7444bc2e5ca3ed3f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d2cde06348a8f2f2b6995c427d31dc011f98eb3e",
"extension": "py"... | 2.890625 | stackv2 | import os, glob, sys
import tarfile
import argparse
import subprocess
import fcntl
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('tarball') # the path with the arxiv arXiv_src_*_*.tar files
parser.add_argument('outputdir') # the path to store the expanded dirs
parser.add_ar... | 130 | 33.46 | 112 | 17 | 1,084 | python | [{"finding_id": "codeql_py/tarslip_2351104d9ff4d270_41138d2f", "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)."
] | [
53,
80
] | [
null,
null
] | [
5,
17
] | [
8,
26
] | |
2024-11-19T02:11:26.963317+00:00 | 1,357,674,597,000 | 9264566b8f5c0e80d786aef0e9952146e1581c7f | 2 | {
"blob_id": "9264566b8f5c0e80d786aef0e9952146e1581c7f",
"branch_name": "refs/heads/master",
"committer_date": 1357674597000,
"content_id": "67f54823273a155078688a32158f8769e6fc4614",
"detected_licenses": [
"MIT"
],
"directory_id": "83d7d28be3a53bf43c62a281977e171d2c2d59b7",
"extension": "py",
"fi... | 2.359375 | stackv2 | import jinja2
from app.helper import file_helper
def load(name, data={}):
# set the file
file = '%s_view.html' % name
# set the folder
folder = 'app/view/'
# and the path
path = folder + file
# check the file exists
if file_helper.check(path) is False:
# gracefully default to the standard app f... | 27 | 20.52 | 66 | 11 | 149 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b55ec0f7a6b72d04_f61c5893", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
21
] | [
null
] | [
9
] | [
67
] | |
2024-11-19T02:11:28.898088+00:00 | 1,417,133,363,000 | 5170bad5847c17fc1c90728cd6ed63a8b60b6d1f | 3 | {
"blob_id": "5170bad5847c17fc1c90728cd6ed63a8b60b6d1f",
"branch_name": "refs/heads/master",
"committer_date": 1417133363000,
"content_id": "178a734e02faf03f9ac0e71806891a12f40d6444",
"detected_licenses": [
"MIT"
],
"directory_id": "ff984c3abec76c94acc69e24084f0e3ac2e9c8a0",
"extension": "py",
"fi... | 3.203125 | stackv2 | # Copyright (c) 2013 Will Harris
# See the file license.txt for copying permission.
import re
import uritemplate
try:
from urllib import parse as urlparse
except ImportError:
import urlparse
def extract_variables(href):
"""Return a list of variable names used in a URI template."""
patterns = [re.su... | 149 | 31.67 | 79 | 15 | 1,075 | python | [{"finding_id": "codeql_py/redos_68c6e0574d8b1f9d_1b19980b", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '{{' and containing many repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '{{' and containing many repetitions of '|'."
] | [
17
] | [
null
] | [
60
] | [
65
] | |
2024-11-19T02:32:45.633267+00:00 | 1,455,887,268,000 | ab259f543bf5386868aa6e11b798f55588af09fc | 2 | {
"blob_id": "ab259f543bf5386868aa6e11b798f55588af09fc",
"branch_name": "refs/heads/master",
"committer_date": 1455887268000,
"content_id": "e68b8971f7d79ea2b1a3b033edc516fd16f37f4f",
"detected_licenses": [
"MIT"
],
"directory_id": "064da4375288dcf983188ef434ce76937bf72c47",
"extension": "py",
"fi... | 2.421875 | stackv2 | #!/usr/bin/env python
""" Usage: vmemprof <vmprof.dat>
Run with output of vmprof run with memory profiling (like vmprof.enable(fileno, 0.01, True))
"""
import vmprof
import os, json, sys
from flask import Flask, Response, request
app = Flask(__name__)
if len(sys.argv) != 2:
print __doc__
sys.exit(1)
stats =... | 83 | 27.55 | 96 | 16 | 659 | python | [{"finding_id": "codeql_py/stack-trace-exposure_121f4419bab4c00d_34128ab9", "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-215",
"CWE-022"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/flask-debug",
"py/path-injection"
] | [
"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.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"... | [
58,
80,
83,
51
] | [
null,
null,
null,
null
] | [
21,
21,
5,
21
] | [
28,
28,
24,
24
] | |
2024-11-19T02:32:56.929898+00:00 | 1,505,346,718,000 | f120f4442557b19673e44c3e80e231ce8984bbd3 | 3 | {
"blob_id": "f120f4442557b19673e44c3e80e231ce8984bbd3",
"branch_name": "refs/heads/master",
"committer_date": 1505346718000,
"content_id": "e50ba19651485b1d61ac3f4a225da07befb19907",
"detected_licenses": [
"MIT"
],
"directory_id": "eacf6dbc9fe5c0fc85b81500669ad7a6982fda0f",
"extension": "py",
"fi... | 2.890625 | stackv2 | import csv
import os #Only to check if the file already exits.
import getpass #To hide the password.
email = ""
password = ""
firstName = ""
lastName = ""
l_email = []
l_password = []
r_email = ""
download_dir = "data.csv"
def init():
global l_email, l_password
if os.path.exists("data.csv"):
pass
else:
... | 179 | 19.3 | 111 | 14 | 999 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_0d1321671fbe24d3_9bc4d273", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text."
] | [
69
] | [
null
] | [
12
] | [
15
] | |
2024-11-19T02:33:03.509243+00:00 | 1,548,100,337,000 | 998f8ba4a770c9c9a22d7b6656e2ce608186191a | 3 | {
"blob_id": "998f8ba4a770c9c9a22d7b6656e2ce608186191a",
"branch_name": "refs/heads/master",
"committer_date": 1548100337000,
"content_id": "eee7f12ece22129a020a661b045a62a66671d3b1",
"detected_licenses": [
"MIT"
],
"directory_id": "c0e2ae2a68d0384aafa7816dddc7331c2759f86d",
"extension": "py",
"fi... | 3.109375 | stackv2 | # Lets you attempt a wordpress admin panel login automatically
from selenium import webdriver
import time
class Login:
URL = 'http://10.225.147.156/wp-login.php'
passwordDictionary = []
generatedDict = []
wordlist = open("Wordlists/EncodedWordlist.txt")
charList = "abcdehilmnopqrstuky"
usernam... | 64 | 34.69 | 124 | 16 | 474 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b1ab8293844b3daa_bd382811", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
53,
55
] | [
null,
null
] | [
19,
19
] | [
117,
113
] | |
2024-11-19T02:33:24.692364+00:00 | 1,622,211,845,000 | d3ad477f8d5569583151c5aba3443988fe470a16 | 3 | {
"blob_id": "d3ad477f8d5569583151c5aba3443988fe470a16",
"branch_name": "refs/heads/master",
"committer_date": 1622211845000,
"content_id": "2859607927940ce7aa316471ae62e9a62ae15da9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e9b1faafaa2c825b58442ec439c098d8d2e10b84",
"extension": "py"... | 2.609375 | stackv2 | from flask import Blueprint, render_template, redirect, session, url_for, flash, request
from werkzeug.security import generate_password_hash
from author.models import Author
from author.forms import RegisterForm, LoginForm
from application import db
author_app = Blueprint('author_app', __name__)
@author_app.route(... | 55 | 32.95 | 106 | 16 | 407 | python | [{"finding_id": "codeql_py/url-redirection_a233e94e57637c10_e0301c59", "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)."
] | [
43
] | [
null
] | [
29
] | [
33
] | |
2024-11-19T02:46:16.435714+00:00 | 1,627,588,148,000 | 10744129fdb0450501c5902fb19165d39f2f76f6 | 2 | {
"blob_id": "10744129fdb0450501c5902fb19165d39f2f76f6",
"branch_name": "refs/heads/main",
"committer_date": 1627588148000,
"content_id": "77ba40a0b083148bef9574afa00f541450da0ae2",
"detected_licenses": [
"MIT"
],
"directory_id": "99252d7ac901abb16249c56c9a5d1172daf53cbb",
"extension": "py",
"file... | 2.328125 | stackv2 | from datetime import date, datetime
import os
import json
import math
import urllib, urllib.request
import glob
from readabilipy import simple_json_from_html_string
import requests
from nltk.stem.snowball import SnowballStemmer
from nltk.tokenize import WhitespaceTokenizer
from nltk.corpus import stopwords
from youtube... | 326 | 31.4 | 134 | 17 | 2,505 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_0aea41b48c692765_7168b4df", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [youtube.com](1) may be at an arbitrary position in the... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [youtube.com](1) may be at an arbitrary position in the sanitized URL."
] | [
320
] | [
null
] | [
8
] | [
29
] | |
2024-11-19T02:59:07.381090+00:00 | 1,633,064,602,000 | 7e5285db6d05eb4f3e25bf4be496a7a29431383e | 3 | {
"blob_id": "7e5285db6d05eb4f3e25bf4be496a7a29431383e",
"branch_name": "refs/heads/main",
"committer_date": 1633064602000,
"content_id": "c7123c0999d0937a534eb7a4189677de57cf9c0d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "49ea4a30beec18b21978d5c52077168041bc97d1",
"extension": "py",
... | 2.59375 | stackv2 |
import cgi
import cgitb
import os
from http.cookies import SimpleCookie
from templates import login_page, secret_page, after_login_incorrect
import secret
# Create simple login form
form = cgi.FieldStorage()
username = form.getvalue("username")
password = form.getvalue("password")
#print("Content-type:text/html\r\n\r... | 54 | 23.41 | 76 | 10 | 317 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_435dde25fb2a9e65_ed6cb675", "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."
] | [
50
] | [
null
] | [
11
] | [
42
] | |
2024-11-19T02:59:19.218327+00:00 | 1,497,808,777,000 | e7b4beb8ec604f9fe4d983b9096a1f4e9e22a2bd | 3 | {
"blob_id": "e7b4beb8ec604f9fe4d983b9096a1f4e9e22a2bd",
"branch_name": "refs/heads/master",
"committer_date": 1497808777000,
"content_id": "78fe61a795395547c243146fafb7d8bd12c59b18",
"detected_licenses": [
"MIT"
],
"directory_id": "022cd3429c938f8293fd57d09ab5c8e89b2d883e",
"extension": "py",
"fi... | 2.640625 | stackv2 | from pybloomd import BloomdClient
import random
import time
import uuid
import hashlib
from nyanbar import NyanBar
class BloomRouter(object):
"Automagically connects and sends keys to the right filter and server"
def __init__(self,
server,
prefix="default-",
... | 212 | 30.83 | 100 | 18 | 1,655 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_babdd86337376511_a63d11b8", "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... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"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.\n[Sensitive data (id)](4) is used in a hashing algorithm (MD5) that is in... | [
97,
98
] | [
null,
null
] | [
25,
25
] | [
29,
29
] | |
2024-11-19T02:59:56.938160+00:00 | 1,574,344,869,000 | 654f89ba98d566e584737a806b17602ff364e598 | 2 | {
"blob_id": "654f89ba98d566e584737a806b17602ff364e598",
"branch_name": "refs/heads/master",
"committer_date": 1574344869000,
"content_id": "a59cad35b71978712e2b405609b015ef25b54c96",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "41f8ee21ce1cda860f092390ead5095f6e702146",
"extension": "py"... | 2.4375 | stackv2 | import hashlib
import pymysql
from app import r
def md5(data):
'''
md5加密
:param data: 需要加密的数据
:return: 返回加密后的数据
'''
res = hashlib.md5(data.encode(encoding='UTF-8')).hexdigest()
return res
def connect_mysql(db, user_name,ip,port,passwd):
'''
连接数据库
:param db: 数据库名字
:param u... | 81 | 22.56 | 94 | 16 | 549 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_d8edc978d278ef09_c56da236", "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.",... | 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."
] | [
12
] | [
null
] | [
23
] | [
52
] | |
2024-11-19T03:24:46.124471+00:00 | 1,517,586,868,000 | a74c0ec05e8fc6292de13af20d74d7963f197dee | 2 | {
"blob_id": "a74c0ec05e8fc6292de13af20d74d7963f197dee",
"branch_name": "refs/heads/master",
"committer_date": 1517586868000,
"content_id": "40ec5030b99239ebf026db09b3cfa657d0e6a08a",
"detected_licenses": [
"MIT"
],
"directory_id": "180911c631321f6768f7ad1ec5c15e00c7b5cf0d",
"extension": "py",
"fi... | 2.390625 | stackv2 | """Views for handling simple index like original pypi
"""
import logging
from flask_login import login_required
from sqlalchemy.orm.exc import NoResultFound
from flask_principal import PermissionDenied
from flask import (
request,
render_template,
Blueprint,
abort,
send_file,
current_app
)
from... | 93 | 27.69 | 75 | 14 | 571 | python | [{"finding_id": "codeql_py/log-injection_60865002eaef864f_ee4cab2c", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
37
] | [
null
] | [
18
] | [
36
] | |
2024-11-19T03:35:19.992881+00:00 | 1,533,989,578,000 | e2ad1cfdaa39e76b7a0092abe724dcb099dd1326 | 3 | {
"blob_id": "e2ad1cfdaa39e76b7a0092abe724dcb099dd1326",
"branch_name": "refs/heads/master",
"committer_date": 1533989578000,
"content_id": "e5269c955f761840bec5509c683d4f3cdb6c039c",
"detected_licenses": [
"MIT"
],
"directory_id": "1de26b670d2846751c0ceaf5015786fd94dd702c",
"extension": "py",
"fi... | 2.90625 | stackv2 | # -*- coding: utf-8 -*-
import sys
import re
import os.path
args = sys.argv
file_name = args[1]
#ファイルの読み込み
with open(file_name, "r") as f: # 読み込み
data = f.read() # ひとまとまりのデータとして読み込む
# (fp_poly 任意の文字列 (layer F.Mask) 任意の文字列)改行があるかも)の繰り返し 改行)EOFとなっているので、
# このパターンを取得する
# re.DOTALLで複数行に対応させる .は改行にも使え... | 42 | 24.12 | 94 | 11 | 428 | python | [{"finding_id": "codeql_py/redos_a686f0653d9dcddc_07573a16", "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 '(fp_poly' and containing many rep... | 3 | true | [
"CWE-1333",
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '(fp_poly' and containing many repetitions of 'a(layer FaMask)a))(fp_poly'.",
"This part of the regular expression may cause exponential backtracking on strings starting with '(fp_polya(layer FaMask)' and containing m... | [
16,
16,
16
] | [
null,
null,
null
] | [
33,
51,
55
] | [
35,
53,
57
] | |
2024-11-19T01:38:28.323658+00:00 | 1,531,316,127,000 | b88396deef66db174702e9e5faf3bdaafd3124ba | 3 | {
"blob_id": "b88396deef66db174702e9e5faf3bdaafd3124ba",
"branch_name": "refs/heads/master",
"committer_date": 1531316127000,
"content_id": "f23312b82b7eeb087c6695b2ecd6919b704c2ba9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8d72927afae8f625da632c353d2e653b731a5cf7",
"extension": "py"... | 2.671875 | stackv2 | import re
from processutils.regexutils import pattern_find_pts
from processutils.regexutils import mask_update
class Field(object):
def __init__(self, line):
self.line = line
self.mask = [0] * len(self.line)
class Rule(object):
def __init__(self):
self.id = 0
self.desc = "Thi... | 347 | 33.12 | 119 | 21 | 3,322 | python | [{"finding_id": "codeql_py/redos_8b7f7c4ec67f5c9b_5906d73e", "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 'A'.", "remediati... | 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 containing many repetitions of 'A'.",
"This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'A'."
] | [
76,
77
] | [
null,
null
] | [
47,
54
] | [
54,
61
] | |
2024-11-19T01:38:31.966163+00:00 | 1,568,019,676,000 | 32fec019463e2e33ae942801b1c312e7d9d1089e | 2 | {
"blob_id": "32fec019463e2e33ae942801b1c312e7d9d1089e",
"branch_name": "refs/heads/master",
"committer_date": 1568019676000,
"content_id": "93283220f880bf692e4868ae334a2fd7fa8bd386",
"detected_licenses": [
"MIT"
],
"directory_id": "7af93ba62511a0807a13900fcdca169240e13db4",
"extension": "py",
"fi... | 2.328125 | stackv2 | # -*- coding: utf-8 -*-
"""User views."""
from flask import Blueprint, request, jsonify
from flask.views import MethodView
from marshmallow.exceptions import ValidationError
from expense_tracker.extensions import db, csrf_protect
from .schema import user_schema
from .models import User
from sqlalchemy.exc import SQLAlc... | 108 | 37.23 | 100 | 19 | 928 | python | [{"finding_id": "codeql_py/stack-trace-exposure_80626a42e1104078_8ec8f691", "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."
] | [
35,
53
] | [
null,
null
] | [
28,
32
] | [
45,
49
] | |
2024-11-19T01:38:46.111598+00:00 | 1,628,759,471,000 | 46cd8cafe413ade168f10096018d91ad232bbab1 | 3 | {
"blob_id": "46cd8cafe413ade168f10096018d91ad232bbab1",
"branch_name": "refs/heads/master",
"committer_date": 1628759471000,
"content_id": "b67ec36767472258dfe00d8e47209f7b39bbdf7a",
"detected_licenses": [
"MIT"
],
"directory_id": "e9643aa4c370c70a49c929a87adbd8dfd923c013",
"extension": "py",
"fi... | 2.6875 | stackv2 | # -*- coding: utf-8 -*
import base64
import hashlib
import hmac
from datetime import datetime
class AliyunCredentialsProvider:
"""
Python3.6+适用,根据阿里云的 accessKey,accessSecret,UID算出amqp连接使用的username和password
UID是资源ownerID,一般是接入点第一段
"""
ACCESS_FROM_USER: int = 0
def __init__(self, access_key: st... | 40 | 31.05 | 106 | 15 | 341 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_cd4cfa32a52c6881_a52f2135", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure."
] | [
34
] | [
null
] | [
34
] | [
41
] | |
2024-11-19T01:38:51.357855+00:00 | 1,519,755,923,000 | 3784dd3223e0591e35de89cc73b393119bdea569 | 3 | {
"blob_id": "3784dd3223e0591e35de89cc73b393119bdea569",
"branch_name": "refs/heads/master",
"committer_date": 1519755923000,
"content_id": "ffc7d45edb802003d6df645186b8ad61da406783",
"detected_licenses": [
"MIT"
],
"directory_id": "35714e32eddc47a7a42c16e440553ed435614b6f",
"extension": "py",
"fi... | 3.3125 | stackv2 | #!/usr/bin/env python3
import re
import argparse
from Crypto.Cipher import AES
from bitstring import Bits
from random import randint
from sys import byteorder
cycles = 0
def rounds(right, left, key, roundnum, decrypt):
"""
Does the repetitions of the Feistel Network.
The value of decrypt dictates whethe... | 161 | 33.47 | 82 | 17 | 1,458 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_78202533e871bb2f_1bb67c53", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
70
] | [
null
] | [
14
] | [
42
] | |
2024-11-19T01:51:59.314927+00:00 | 1,599,988,240,000 | e58e48706ab47eb11ad0257327e69e22c1a9be95 | 2 | {
"blob_id": "e58e48706ab47eb11ad0257327e69e22c1a9be95",
"branch_name": "refs/heads/master",
"committer_date": 1599988240000,
"content_id": "ee8498f7a7d01e6ab0bf8f74394e8713c133c09b",
"detected_licenses": [
"MIT"
],
"directory_id": "305a8871f26474631671f119b4a0ef5464b7b370",
"extension": "py",
"fi... | 2.3125 | stackv2 | import argparse
import configparser
import logging
import os
import sys
from sync import sync
DEFAULT_CONFIG_PATH = "config.ini"
def ReadConfig(filename):
"""Reads and returns the ConfigParser instance."""
config = configparser.RawConfigParser()
config.read(
os.path.join(os.path.abspath(os.path.... | 83 | 25.16 | 80 | 14 | 466 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ea94fad287e13b0b_540e0be7", "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
] | [
22
] | [
40
] | |
2024-11-19T01:51:59.520494+00:00 | 1,512,450,746,000 | 279c8c876a9fe90779e4be9fd5655eaddfa8d0ee | 3 | {
"blob_id": "279c8c876a9fe90779e4be9fd5655eaddfa8d0ee",
"branch_name": "refs/heads/master",
"committer_date": 1512450746000,
"content_id": "0d9170d246df5a951eb6d6c88c37f1183d3fc507",
"detected_licenses": [
"MIT"
],
"directory_id": "6369cfb23b366cab2ddea02035fc48ef224d43c5",
"extension": "py",
"fi... | 2.671875 | stackv2 | import scrapy
from sleuth_crawler.scraper.scraper.spiders.parsers import generic_page_parser, reddit_parser
from scrapy.spiders import Rule, CrawlSpider
from scrapy.linkextractors import LinkExtractor
from sleuth_crawler.scraper.scraper.settings import PARENT_URLS
class BroadCrawler(CrawlSpider):
'''
Spider th... | 88 | 30.92 | 100 | 17 | 608 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_654efbd16e1b597b_5334caa0", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [reddit.com](1) may be at an arbitrary position in the ... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [reddit.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [reddit.com](1) may be at an arbitrary position in the sanitized URL."
] | [
40,
53
] | [
null,
null
] | [
12,
12
] | [
35,
36
] | |
2024-11-19T01:52:02.283053+00:00 | 1,465,972,442,000 | 60687d24d4a64801d079bbe0a07fb72c5eb793ce | 3 | {
"blob_id": "60687d24d4a64801d079bbe0a07fb72c5eb793ce",
"branch_name": "refs/heads/master",
"committer_date": 1465972442000,
"content_id": "0bad8ad699f6abc02c009bfdb76909dd4f21d9db",
"detected_licenses": [
"MIT"
],
"directory_id": "37421e8a5d548a0a21687e799b0032a558bf0bab",
"extension": "py",
"fi... | 2.546875 | stackv2 | '''
This is the windows version of our simplePythonKeylogger. It records keystrokes using pyHook, stores
them in a file called keylogs.txt and transmits back over ssh or email/cloud.
Exit by: <backspace><delete><backspace><delete>
Keylogs are sent when the keylog file reaches 5MB
'''
from sys import exit as sysExit... | 169 | 31.98 | 140 | 17 | 1,388 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a2346a7d23283a9b_2a51c3ec", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
62
] | [
null
] | [
9
] | [
69
] | |
2024-11-19T02:04:22.562724+00:00 | 1,390,328,824,000 | 3ad651f04ba8ff1f1922bf981dd6f931c26e8172 | 3 | {
"blob_id": "3ad651f04ba8ff1f1922bf981dd6f931c26e8172",
"branch_name": "refs/heads/master",
"committer_date": 1390328824000,
"content_id": "0098d642d303c1eddcb35c6da11b0c47b32b181c",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "c6dfa8a88c66cbe51dd7d1e219a89366e7d54345",
"extension": "py",
... | 3.0625 | stackv2 | from Crypto.Cipher import AES,ARC4
import datetime
from django.utils.encoding import smart_str, smart_unicode
import base64
"""
Performs basic encryption services using the ARC4 algorithm.
@author: bill shelton
"""
def encrypt(key, data):
"""
Encrypts data AND encodes it as a base64 string. T... | 34 | 25.88 | 116 | 8 | 236 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_7d035e2e83d6271b_27ce23ac", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.", "... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used.",
"[The cryptographic algorithm ARC4](1) is broken or weak, and should not be used."
] | [
20,
34
] | [
null,
null
] | [
14,
13
] | [
34,
37
] | |
2024-11-19T02:04:40.559847+00:00 | 1,628,856,552,000 | 5d3ade9ae37d8bef2c44e3ca73fefb52350a69b1 | 4 | {
"blob_id": "5d3ade9ae37d8bef2c44e3ca73fefb52350a69b1",
"branch_name": "refs/heads/main",
"committer_date": 1628856552000,
"content_id": "75c827e332e990a38c381c834fa65e0c49dcb2bf",
"detected_licenses": [
"MIT"
],
"directory_id": "b466a62a6b8151937212688c09b3a5704eaa7466",
"extension": "py",
"file... | 4.34375 | stackv2 | class Employee:
def __init__(self, id, first_name, last_name, salary):
self.id = id
self.first_name = first_name
self.last_name = last_name
self.salary = salary
def get_full_name(self):
return f"{self.first_name} {self.last_name}"
def get_annual_salary(self):
... | 23 | 25.04 | 58 | 10 | 152 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_68dfe90610cdf403_f233005a", "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.\nThis expression logs [sensitive data (priva... | [
22,
23
] | [
null,
null
] | [
7,
7
] | [
33,
35
] | |
2024-11-19T02:04:44.718913+00:00 | 1,628,893,225,000 | e8875004c792ca847314d068ea1ec07c61cffb1a | 2 | {
"blob_id": "e8875004c792ca847314d068ea1ec07c61cffb1a",
"branch_name": "refs/heads/main",
"committer_date": 1628893225000,
"content_id": "4af9b808ab551b3554c2b27d0fd5c3462f1d1615",
"detected_licenses": [
"MIT"
],
"directory_id": "d053f0319e219f823c6c1f203b5d77c4f68fb2ca",
"extension": "py",
"file... | 2.4375 | stackv2 | from django.shortcuts import render
from django.http import JsonResponse
from rest_framework.response import Response
from rest_framework.decorators import api_view, permission_classes
from users.serializers import *
from users.models import *
# Create your views here.
from rest_framework import status
from django.cont... | 182 | 34.9 | 146 | 16 | 1,346 | python | [{"finding_id": "codeql_py/stack-trace-exposure_595175e002e823a2_1ecc2e65", "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."
] | [
162,
175
] | [
null,
null
] | [
25,
25
] | [
32,
32
] | |
2024-11-19T02:04:47.701224+00:00 | 1,568,084,722,000 | 4c386bc1791ae7dd15619f0ce6481029b5ff7e26 | 4 | {
"blob_id": "4c386bc1791ae7dd15619f0ce6481029b5ff7e26",
"branch_name": "refs/heads/master",
"committer_date": 1568084722000,
"content_id": "533e62f9fbf8f6ca9a04b6a2a97bc4ae34b1d055",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "72537f2c9c5ef3a3633777bb1622813552620158",
"extension": "py"... | 4.46875 | stackv2 | # python 一切皆对象。
# python 中所有的类都是有type() 方法创建。
# type 是类的类,属于元类。也就是说一个对象 class a(); a.__class__.__class__.class__ 最终类型肯定是type
# 通过type创建一个类
# 普通方法:要带有参数self,因为类中方法默认带self参数
def speak(self):
print("这是给类添加的普通方法")
# 类方法
@classmethod
def c_run(cls):
print("这是给类添加的类方法")
# 静态方法
@staticmethod
def s_eat():
... | 42 | 15.76 | 95 | 10 | 289 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_684ba6bf04248969_818507ac", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
39
] | [
null
] | [
19
] | [
26
] | |
2024-11-19T02:04:51.646444+00:00 | 1,418,409,549,000 | 6939cb053632c3a1bf5e6c650e025fc8a862395c | 3 | {
"blob_id": "6939cb053632c3a1bf5e6c650e025fc8a862395c",
"branch_name": "refs/heads/master",
"committer_date": 1418409549000,
"content_id": "261c7cdd33e38c90a4516ff6f98b55d003bb7efe",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "aa37dfd21317d57980ec09354f1047a7f1130db1",
"extension": "py"... | 2.9375 | stackv2 | import requests # We use Python "requests" module to do HTTP GET query
import json # Import JSON encoder and decode module
from operator import itemgetter
from apicem_config import * # APIC-EM IP is assigned in apicem_config.py
requests.packages.urllib3.disable_warnings() # Remove this line if not using... | 29 | 37.24 | 101 | 11 | 272 | python | [{"finding_id": "codeql_py/request-without-cert-validation_ab1f9faade0338f8_eebda662", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
11,
24
] | [
null,
null
] | [
7,
8
] | [
37,
38
] | |
2024-11-19T02:04:55.874481+00:00 | 1,604,587,478,000 | 7b9df81d4bf2e94b057a1f4c874bae63e2e032dc | 2 | {
"blob_id": "7b9df81d4bf2e94b057a1f4c874bae63e2e032dc",
"branch_name": "refs/heads/master",
"committer_date": 1604587478000,
"content_id": "bc24aa66d5ef190bb211a798f0931ea139b2cd77",
"detected_licenses": [
"MIT"
],
"directory_id": "733fe72e1664264fe7a7e1ca81e9ab05074f94bd",
"extension": "py",
"fi... | 2.359375 | stackv2 | import argparse, os, json, logging, config
from commandsmanager import CommandsManager
from flask import Flask, request, make_response
from urllib.parse import urlparse
from pprint import pprint
from time import time
from util import get_version
app = Flask(__name__)
cache = None
commands = None
IGNORED_URLS = ("/favi... | 157 | 25.17 | 84 | 13 | 958 | python | [{"finding_id": "codeql_py/log-injection_4a026f05c3c7969e_7367ad48", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
45
] | [
null
] | [
19
] | [
36
] | |
2024-11-19T02:28:09.848681+00:00 | 1,560,438,550,000 | d6648d3204f090ae8f18fe2b1bec906a408ff32c | 2 | {
"blob_id": "d6648d3204f090ae8f18fe2b1bec906a408ff32c",
"branch_name": "refs/heads/master",
"committer_date": 1560438550000,
"content_id": "17a37da55ed56e43d57b1429d60cf51a5f03074b",
"detected_licenses": [
"MIT"
],
"directory_id": "6cdb2d605d3f9152a3f34188822599e2b0e7b3e8",
"extension": "py",
"fi... | 2.453125 | stackv2 | import json
import os
import time
import requests
from matplotlib import pyplot as plt
from wang.yu.common.PyXmlParser import PyXmlParser
class BiliBiliUtil:
def __init__(self):
py_xml_parser = PyXmlParser(os.path.dirname(os.path.dirname(__file__)) + '/common/properties/properties.xml')
self.xml... | 120 | 48.09 | 117 | 28 | 1,300 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b158014b6c336880_ad59ad4a", "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."
] | [
118
] | [
null
] | [
15
] | [
22
] | |
2024-11-19T02:28:17.321555+00:00 | 1,588,063,954,000 | fbba20cd084febfd6ebbeb26fb34642ca747fbf5 | 3 | {
"blob_id": "fbba20cd084febfd6ebbeb26fb34642ca747fbf5",
"branch_name": "refs/heads/master",
"committer_date": 1588063954000,
"content_id": "b62bf5dc76f5915d03c2dbc3f05357e1027c8df9",
"detected_licenses": [
"MIT"
],
"directory_id": "b1d3178b40b6186e9eac62708a932615c276192f",
"extension": "py",
"fi... | 2.765625 | stackv2 | # from app import app
import urllib.request
import json
from .models import Source, Articles
# #Getting api Key
# api_key = app.config['NEWS_API_KEY']
# #Getting the Source base url
# base_url = app.config["SOURCE_BASE_URL"]
# #Getting Everything base url for articles
# articles_url = app.config['EVERYTHING_SOURC... | 115 | 26.57 | 98 | 12 | 650 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_476fcf5c0a8b1c01_55b54b19", "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."
] | [
39
] | [
null
] | [
11
] | [
25
] | |
2024-11-19T02:28:30.870646+00:00 | 1,693,569,206,000 | 9d2f2a9100af3193b4bea9be31e120f7fc958c18 | 3 | {
"blob_id": "9d2f2a9100af3193b4bea9be31e120f7fc958c18",
"branch_name": "refs/heads/main",
"committer_date": 1693595969000,
"content_id": "676a6b88f71c9d3906c0ac7afc799b48330b7c32",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "e54067b1500b492162c060ac318578538eecec18",
"extension": "py"... | 2.515625 | stackv2 | #!/usr/bin/env python3
#
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Used to download a pre-built version of Chrome for Testing for running
tests.
"""
import argparse
import io
import os
import shu... | 104 | 34.02 | 84 | 17 | 766 | python | [{"finding_id": "codeql_py/overly-permissive-file_829a81e16e623900_63d9d323", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 3 | true | [
"CWE-732",
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable."
] | [
88,
93,
97
] | [
null,
null,
null
] | [
9,
13,
17
] | [
41,
38,
55
] | |
2024-11-19T02:28:31.406629+00:00 | 1,623,072,116,000 | d13ff0a7cb991debc2d2f3e77f768536fe780472 | 3 | {
"blob_id": "d13ff0a7cb991debc2d2f3e77f768536fe780472",
"branch_name": "refs/heads/main",
"committer_date": 1623072116000,
"content_id": "25601e8cc4fafc26164ed5237d007dde71e3f379",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "629b7ae789a061c48a80ade28ad8547478c1cd1b",
"extension": "py",
... | 2.71875 | stackv2 | #!/usr/bin/env python3
# Copyright 2014 Zane Bitter <zbitter@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 at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | 221 | 31.62 | 84 | 19 | 1,504 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_16765332ddd1c28e_aa81bff5", "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."
] | [
55
] | [
null
] | [
9
] | [
74
] | |
2024-11-19T02:28:47.279638+00:00 | 1,445,907,146,000 | 6bfc26038a6fb9946e7d864995634414faad7d1b | 3 | {
"blob_id": "6bfc26038a6fb9946e7d864995634414faad7d1b",
"branch_name": "refs/heads/master",
"committer_date": 1445907146000,
"content_id": "dd4a56c87f26c32ed6862d6dac74aa3aeb88f109",
"detected_licenses": [
"MIT"
],
"directory_id": "186015870ec212e0656255d0800ddc5ce07a1b72",
"extension": "py",
"fi... | 2.609375 | stackv2 | import sys
import json
import click
import socket
import struct
import OpenSSL
from OpenSSL import SSL, crypto
def encode_notification(token, notification):
notification = json.dumps(notification, ensure_ascii=False).encode('utf-8')
wire_format = "!BH32sH%ds" % len(notification)
packed = struct.pack(
... | 70 | 25.7 | 88 | 14 | 439 | python | [{"finding_id": "codeql_py/insecure-protocol_95b0ed691383e91a_34475347", "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.Context](1).", "remediation": "", "locat... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to SSL.Context](1)."
] | [
60
] | [
null
] | [
19
] | [
48
] | |
2024-11-19T02:36:44.180016+00:00 | 1,691,099,104,000 | 6cbe6373ca35e07048e307daa414225ddfe4f7b8 | 2 | {
"blob_id": "6cbe6373ca35e07048e307daa414225ddfe4f7b8",
"branch_name": "refs/heads/master",
"committer_date": 1691099104000,
"content_id": "2dde7a29be1a9d97a9ad8980798d5e27953a9d94",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "950daffb4f7470ff0d86fa5f086df39eeb124267",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python3
import requests
import time
import sys
requests.packages.urllib3.disable_warnings()
NGINX_STATUS_AND_UPSRTEAM_ENDPOINT = sys.argv[1]
KUBERNETES_ENDPOINT = sys.argv[2]
KUBERNETES_TOKEN = sys.argv[3]
NGINX_UPSTREAM_GROUP = 'udp_backend'
NGINX_SERVER_ZONE = 'udp_server'
NGINX_STATUS_URL = NGIN... | 113 | 24.02 | 94 | 16 | 761 | python | [{"finding_id": "codeql_py/request-without-cert-validation_56f288b3822fb2d8_d79bdd1a", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
59,
70
] | [
60,
71
] | [
6,
6
] | [
19,
48
] | |
2024-11-19T02:36:47.474920+00:00 | 1,617,528,679,000 | 56281f7567636c9e15ad7f1f1841a6365bba1620 | 3 | {
"blob_id": "56281f7567636c9e15ad7f1f1841a6365bba1620",
"branch_name": "refs/heads/master",
"committer_date": 1617528815000,
"content_id": "6324b902b443a488ec6469968ac002a03933c1bb",
"detected_licenses": [
"MIT"
],
"directory_id": "7476252d43d4fb395a350838a42570c79a1cf866",
"extension": "py",
"fi... | 2.609375 | stackv2 | import os
import re
import yaml
import secrets
import hashlib
import logging
from datetime import datetime
from nslogin.storage.user_info import UserInfo
from nslogin.storage.user_table import UserTable
logger = logging.getLogger('login')
def get_user_table(config):
user_table_path = config.get('user_table', 'u... | 202 | 31.48 | 97 | 19 | 1,331 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_735fcf3ea13e85b7_6ff84ea9", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
173
] | [
null
] | [
32
] | [
53
] | |
2024-11-19T02:36:50.017282+00:00 | 1,613,389,244,000 | f9d100ccd033f79d1abeab6a6c548e9a4926e6af | 3 | {
"blob_id": "f9d100ccd033f79d1abeab6a6c548e9a4926e6af",
"branch_name": "refs/heads/master",
"committer_date": 1613389244000,
"content_id": "b2e9732c35743feb59e8b0e11b3f64f41c13e98d",
"detected_licenses": [
"MIT"
],
"directory_id": "0870f91c303fa87b2c8bd0b1ad6449774caf65df",
"extension": "py",
"fi... | 3.453125 | stackv2 | import password
import account
import pyperclip
password_obj1 = password.Password()
class Credentials:
'''
Class that adds user credentials to the app.
'''
def __init__(self):
self.credentials_list = []
def add_credential(self):
'''
Method to add existing credentials to the ... | 125 | 36.79 | 105 | 20 | 852 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_df880e03a631dcba_ce7aaa9e", "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."
] | [
41
] | [
null
] | [
23
] | [
78
] | |
2024-11-19T02:36:52.651459+00:00 | 1,442,897,077,000 | 7a1ca622e35c8446636dafb1f6191e62eca4ca61 | 2 | {
"blob_id": "7a1ca622e35c8446636dafb1f6191e62eca4ca61",
"branch_name": "refs/heads/master",
"committer_date": 1442897077000,
"content_id": "5c138d3645207e01ac6d94736511c187bed859a1",
"detected_licenses": [
"MIT"
],
"directory_id": "ddda5d1cab745ff21ae22d6b912d44059a088e1c",
"extension": "py",
"fi... | 2.453125 | stackv2 | import requests
from app import app
from flask import request
@app.route('/stock', methods=['GET', 'POST'])
def get_stock():
print request.args
ticker = request.args.get('text')
channel = request.args.get('channel_name')
r = requests.get("http://finance.yahoo.com/d/quotes.csv?s="+ticker+"&f=csl1d1t1c1o... | 21 | 47.33 | 143 | 12 | 319 | python | [{"finding_id": "codeql_py/partial-ssrf_8774b311a48cc65a_df10e11b", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
10,
20
] | [
null,
null
] | [
9,
9
] | [
99,
144
] | |
2024-11-19T02:37:02.119061+00:00 | 1,634,112,168,000 | 256dd91ede9e53a34cdd5ffb904b40a90f055cfd | 2 | {
"blob_id": "256dd91ede9e53a34cdd5ffb904b40a90f055cfd",
"branch_name": "refs/heads/master",
"committer_date": 1634112168000,
"content_id": "59e5acab008106cb62363d7b90748efafc1ac224",
"detected_licenses": [
"ISC"
],
"directory_id": "6498a96e9eecfe830fdff15f751d80ba6f4d3962",
"extension": "py",
"fi... | 2.5 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 The SymbiFlow Authors.
#
# Use of this source code is governed by a ISC-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/ISC
#
# SPDX-License-Identifier: ISC
import jinja2
from argparse import ArgumentPa... | 81 | 28.59 | 78 | 17 | 536 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_ced472cdf7cdacf0_e42feaa7", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
23
] | [
null
] | [
11
] | [
69
] | |
2024-11-19T02:37:10.706452+00:00 | 1,629,963,596,000 | bf94585f9c07632d1a24760f15c59d12239c35a6 | 2 | {
"blob_id": "bf94585f9c07632d1a24760f15c59d12239c35a6",
"branch_name": "refs/heads/main",
"committer_date": 1629963596000,
"content_id": "897aa4d7007fbc33deb9e7538b164808af3b5db9",
"detected_licenses": [
"MIT"
],
"directory_id": "060d4e8a64145a7afc9d6fd789c82adbfe2105ee",
"extension": "py",
"file... | 2.375 | stackv2 | from flask import render_template, request, redirect, url_for,flash
from flask_login import login_user, logout_user, login_required, current_user
from app.auth import auth
from app.models import User
from ..email import welcome_message
from .. import db
from .forms import RegistrationForm,LoginForm
from .. import main
... | 55 | 29.42 | 95 | 16 | 337 | python | [{"finding_id": "codeql_py/url-redirection_0d182a8d5f43c0fb_715ec7e7", "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)."
] | [
21
] | [
null
] | [
29
] | [
78
] | |
2024-11-19T02:37:13.246802+00:00 | 1,603,730,296,000 | 3b53459861b9b0f3b94a19d8fe2e2e14ee616e03 | 2 | {
"blob_id": "3b53459861b9b0f3b94a19d8fe2e2e14ee616e03",
"branch_name": "refs/heads/main",
"committer_date": 1603730296000,
"content_id": "2f9084f83c011960b59e01cea2a9f7e9c758af2d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "fa7a3a39ec129ed6163913fb8d8e999e05f8d6a1",
"extension": "py",
... | 2.453125 | stackv2 | import sqlite3
import os
import time
from flask import g
from app.myfunctions import get_dblp_url
from app.databases.create_sqlitedb import get_mysql_db
curpath = os.path.dirname(os.path.realpath(__file__))
DATABASE = os.path.join(curpath, 'static', 'pycsrankings.sqlite3')
def mysql_get_db():
db = getattr(g, '_... | 199 | 35.93 | 122 | 19 | 1,978 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a6a42e23e88faa72_d2439f9b", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [orcid.org/](1) may be at an arbitrary position in the ... | 5 | true | [
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"The string [orcid.org/](1) may be at an arbitrary position in the sanitized URL.",
"The string [scholar.google.com/](1) may be at an arbitrary position in the sanitized URL.",
"The string [twitter.com/](1) may be at an arbitrary position in the sanitized URL.",
"The string [github.com/](1) may be at an arbit... | [
181,
183,
185,
187,
189
] | [
null,
null,
null,
null,
null
] | [
12,
14,
14,
14,
14
] | [
31,
42,
35,
34,
36
] | |
2024-11-19T02:37:42.539018+00:00 | 1,601,267,510,000 | a7fb3a30723f55e3dbdea3f8baf12a8cc42ae355 | 4 | {
"blob_id": "a7fb3a30723f55e3dbdea3f8baf12a8cc42ae355",
"branch_name": "refs/heads/master",
"committer_date": 1601267510000,
"content_id": "071912b9b9e925f5344570e49d24ea3d2ce8a911",
"detected_licenses": [
"MIT"
],
"directory_id": "decd47dac515dba7276a5a097aa7c3efcb7a52ad",
"extension": "py",
"fi... | 3.59375 | stackv2 | #!/usr/bin/env python3.8
import pyperclip #importing pyperclip for copying to clipboard
from user_class import User #imporing user class
from credential_class import Credential #importing credential class
def create_user(fname, lname, password):
'''
Function to create a new user account
'''
new_user = User(fnam... | 235 | 27.89 | 139 | 27 | 1,532 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_868cbe3743d6e245_1f9c7945", "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.", ... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (p... | [
108,
165,
176,
210
] | [
null,
null,
null,
null
] | [
6,
14,
16,
16
] | [
85,
113,
128,
128
] | |
2024-11-19T02:49:09.853024+00:00 | 1,539,329,853,000 | 92c954758d3aabdb39fe01d5b0fc9b048a011729 | 2 | {
"blob_id": "92c954758d3aabdb39fe01d5b0fc9b048a011729",
"branch_name": "refs/heads/master",
"committer_date": 1539329853000,
"content_id": "d71866a486c5a1f29b8e084481cea2986f79a678",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "409fc1e5169364d3a2f9efa7aafc753ff1748929",
"extension": "py"... | 2.359375 | stackv2 | # The Proxies site is http://www.xdaili.cn/
import time
import hashlib
import requests
# MutilProcess and Gevent
from multiprocessing import Process
import gevent
from gevent import monkey; monkey.patch_all()
# 配置文件
from constant.config import conf_kv_func
import asyncio
from util.common.logger import LogBase
# fro... | 225 | 32.93 | 174 | 19 | 1,872 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d3461da5c05353d9_c3af2e70", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
109,
111
] | [
null,
null
] | [
27,
27
] | [
160,
174
] | |
2024-11-19T02:49:21.659697+00:00 | 1,554,302,645,000 | 73fa37461ed741983582f7ab116bd7c6e8db84a7 | 3 | {
"blob_id": "73fa37461ed741983582f7ab116bd7c6e8db84a7",
"branch_name": "refs/heads/master",
"committer_date": 1554302645000,
"content_id": "6b72adcb28c976754e773b13de89bef6f05bf323",
"detected_licenses": [
"MIT"
],
"directory_id": "9b1a11c85572e409478206028a8a8ff3c2a5bfc0",
"extension": "py",
"fi... | 2.703125 | stackv2 | from flask import Flask, request, redirect, url_for, session, escape
from werkzeug import secure_filename
app = Flask(__name__)
app.secret_key = '123456'
@app.route('/')
def index():
if 'username' in session:
return '<h1>Hello %s!</h1>' % escape(session['username'])
return '<h1>Hello World!</h1>'
@ap... | 60 | 26.43 | 75 | 15 | 433 | python | [{"finding_id": "codeql_py/reflective-xss_727f1d04a7c071d3_c8a63bce", "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)."
] | [
15,
19
] | [
null,
null
] | [
12,
12
] | [
39,
31
] | |
2024-11-19T02:49:24.764118+00:00 | 1,626,576,462,000 | 7c7d0fbc9ce7240adf873ba0aa56ad103a002b59 | 3 | {
"blob_id": "7c7d0fbc9ce7240adf873ba0aa56ad103a002b59",
"branch_name": "refs/heads/master",
"committer_date": 1626576462000,
"content_id": "770a3da052a7fa2ecd8982072122f007f96453ef",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "293b44a8516d96940f59a52ea1b009d2618cf1d4",
"extension": "p... | 2.75 | stackv2 | import tkinter
from tkinter.messagebox import showerror
from tkinter.filedialog import askopenfilename
from tkinter import Label, Button, Entry, Checkbutton, StringVar, IntVar
import re
import json
import subprocess
from uploadFTP import uploadFTP
def main():
inputFileName = ''
outputFileName = ''
def ... | 111 | 33.83 | 113 | 17 | 972 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_54ed164e8e6773e1_a2823a9a", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text."
] | [
47
] | [
null
] | [
37
] | [
49
] | |
2024-11-19T03:00:25.399722+00:00 | 1,542,534,025,000 | e1351c69b75edac0bc4739a3dbc74658808e1363 | 3 | {
"blob_id": "e1351c69b75edac0bc4739a3dbc74658808e1363",
"branch_name": "refs/heads/master",
"committer_date": 1542534025000,
"content_id": "5aaf69760b0e35304b4e39425ddce1296c716296",
"detected_licenses": [
"MIT"
],
"directory_id": "454f3533a8f812d0472d809a9469b93c35f3fc0d",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!flask/bin/python
from flask import Flask, jsonify
from flask import abort
from flask import request
import base64
import classification as classifier
app = Flask(__name__)
# The API of paths looks more complex (feature is not as important right now)
# -> check out DroneScanningPathSegment struct on master branch ... | 79 | 23.75 | 78 | 14 | 513 | python | [{"finding_id": "codeql_py/path-injection_f48d612f6c3d0445_27baee4f", "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)."
] | [
37
] | [
null
] | [
15
] | [
19
] | |
2024-11-19T03:11:25.775891+00:00 | 1,539,750,503,000 | 6bbf72a91cd7795dd5db0c375dbeae6ea4d9b32f | 3 | {
"blob_id": "6bbf72a91cd7795dd5db0c375dbeae6ea4d9b32f",
"branch_name": "refs/heads/master",
"committer_date": 1539750503000,
"content_id": "81314fdf717eb9ae86da46ba6116a4a73ae424a7",
"detected_licenses": [
"MIT"
],
"directory_id": "46956ad39ec6fd195d329721cc36c99949c7489f",
"extension": "py",
"fi... | 2.5625 | stackv2 | import json
import requests
import ssl
import websocket
class Manager(object):
def __init__(self, base_url, headers=None, ca_cert=None):
self.base_url = base_url
self.headers = headers if headers else {}
self.ws_headers = [': '.join([key, value]) for key, value in self.headers.items()]
... | 35 | 33.09 | 122 | 14 | 270 | python | [{"finding_id": "codeql_py/request-without-cert-validation_84849c3b244b64e6_13b35860", "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)."
] | [
30
] | [
35
] | [
16
] | [
10
] | |
2024-11-19T03:11:28.285126+00:00 | 1,591,796,810,000 | c5b2dac543a5d616f3485d22073bc7b5ded91699 | 3 | {
"blob_id": "c5b2dac543a5d616f3485d22073bc7b5ded91699",
"branch_name": "refs/heads/master",
"committer_date": 1591796810000,
"content_id": "38b2b040e1461ba313765d2ee83baad69c8b28ea",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "89c878102fa84dfb9d02ed6b7f79199b97035257",
"extension": "py"... | 2.96875 | stackv2 | from xml.dom.minidom import parse
# 读取xml文件
dom = parse('test.xml')
# 获取文档对象
data = dom.documentElement
# 根据标签名称获取元素列表
stus = data.getElementsByTagName('student')
for stu in stus:
# 获取标签属性
st_id = stu.getAttribute('id')
st_name = stu.getAttribute('name')
id = stu.getElementsByTagName('id')[0].childNo... | 20 | 32.7 | 74 | 13 | 181 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e88207e894be5924_5340db67", "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."
] | [
20
] | [
null
] | [
66
] | [
72
] | |
2024-11-19T03:11:50.060471+00:00 | 1,625,515,385,000 | 823b4a4489e2221f27af40de96143692c38416d7 | 3 | {
"blob_id": "823b4a4489e2221f27af40de96143692c38416d7",
"branch_name": "refs/heads/main",
"committer_date": 1625515385000,
"content_id": "587bae8efff7b5a752be01729025b776e8bd6cbe",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "243f90e0889dab12777572834bafa1eee6c6d453",
"extension": "py",
... | 2.578125 | stackv2 | #!/usr/bin/env python3
import sys
import secrets
try:
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.parse import urlparse, parse_qs
from http import cookies
except ImportError:
sys.exit('ERROR: It seems like you are not running Python 3. '
'This script only works w... | 232 | 31.46 | 144 | 17 | 1,772 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_922391222bb7d6d1_4fba8459", "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."
] | [
207
] | [
null
] | [
19
] | [
49
] | |
2024-11-19T03:12:00.108662+00:00 | 1,558,439,293,000 | 30533f4702618f40bed09b4314329d5c3f108c7b | 2 | {
"blob_id": "30533f4702618f40bed09b4314329d5c3f108c7b",
"branch_name": "refs/heads/master",
"committer_date": 1558439293000,
"content_id": "ac0dc715170e40fcb06665c8c2ba55368e22f45e",
"detected_licenses": [
"MIT"
],
"directory_id": "51d5e86adaf8c1ab53ba95232334c3220b8b5609",
"extension": "py",
"fi... | 2.484375 | stackv2 | import requests
requests.packages.urllib3.disable_warnings()
class Requester(object):
def __init__(self):
self.headers = {
"user-agent" : "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36",
"accept" : "*/*",
"a... | 38 | 27.89 | 138 | 14 | 276 | python | [{"finding_id": "codeql_py/request-without-cert-validation_3fd84986ca16273e_a444d055", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
23,
32
] | [
null,
null
] | [
17,
17
] | [
80,
93
] | |
2024-11-19T03:12:05.706458+00:00 | 1,565,035,204,000 | e2efcc286263e66eadf5621e7f405d0cac76426f | 4 | {
"blob_id": "e2efcc286263e66eadf5621e7f405d0cac76426f",
"branch_name": "refs/heads/master",
"committer_date": 1565035204000,
"content_id": "1b6cde56cc023cc0b1b2924c8ca887c32baa6b30",
"detected_licenses": [
"MIT"
],
"directory_id": "a4ba6b53fa96e9ce21d4356a7f8d19976e5fae40",
"extension": "py",
"fi... | 4.3125 | stackv2 | # This is a guess the number game
# Call imported functions
import random
# Define global scope
guess = None
secret_Number = random.randint(1, 100)
print('I am thinking in a number between 1 and 100')
# Ask for user input
for guess_Taken in range (1, 6):
print('Take a guess')
guess_Taken = int(input())
... | 29 | 24.72 | 93 | 11 | 193 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e82950e3f8b4ab1a_c23ae189", "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."
] | [
29
] | [
null
] | [
11
] | [
72
] | |
2024-11-19T03:12:06.172003+00:00 | 1,545,584,953,000 | 9f24c2655d43f171c852b2e060ab45a397f1275f | 2 | {
"blob_id": "9f24c2655d43f171c852b2e060ab45a397f1275f",
"branch_name": "refs/heads/master",
"committer_date": 1545584953000,
"content_id": "9f99f09f328d1e224ae94067831ab3dfe1f00b53",
"detected_licenses": [
"MIT"
],
"directory_id": "59e5591392e276cb2ec89dc98789ffe103309e23",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
from flask import Flask, request, redirect, url_for,send_file,send_from_directory,render_template
from werkzeug import secure_filename
from PIL import Image
import re
import dlib
import cv2
import os
from io import BytesIO
CURRENT_PATH = os.getcwd() # 获取当前路径
UPLOAD_FOLDER = CURRENT_PATH + '\\... | 124 | 32.17 | 97 | 22 | 1,041 | python | [{"finding_id": "codeql_py/reflective-xss_198397441d5fdff2_1d124e31", "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)."
] | [
109
] | [
null
] | [
12
] | [
18
] | |
2024-11-19T03:12:13.464887+00:00 | 1,589,576,006,000 | 823614f533406ac1d4384a572e1f2dd9fc10c19d | 2 | {
"blob_id": "823614f533406ac1d4384a572e1f2dd9fc10c19d",
"branch_name": "refs/heads/master",
"committer_date": 1589576006000,
"content_id": "69348e2fd163ae7f3930fa27bd6232b5f96fa55d",
"detected_licenses": [
"MIT"
],
"directory_id": "4ee9ca8ad710837d29904f31c19db564778e01db",
"extension": "py",
"fi... | 2.5 | stackv2 | import json
import os
import sys
import tarfile
import tempfile
import upload
import aptbranch
def load_json(filename, default=None):
if not filename or filename == "--":
return default
else:
with open(filename) as f:
return json.load(f)
def do_upload(debs, debtar, branches_yaml,... | 52 | 31.37 | 98 | 17 | 398 | python | [{"finding_id": "codeql_py/tarslip_ebadc85b142840bd_1ee58142", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
25
] | [
null
] | [
17
] | [
19
] | |
2024-11-19T03:12:15.395188+00:00 | 1,389,021,499,000 | 2d49f488bb99ba6dbac7d4c49ccfaffc63c001e8 | 3 | {
"blob_id": "2d49f488bb99ba6dbac7d4c49ccfaffc63c001e8",
"branch_name": "refs/heads/master",
"committer_date": 1389021499000,
"content_id": "61d918f3a54bcc36c7ba5dfd7b3871bb07ef4e7f",
"detected_licenses": [
"MIT"
],
"directory_id": "4ac3fcd32423ec93d15ac6863d90ee5c666f6965",
"extension": "py",
"fi... | 2.703125 | stackv2 | """
Python filer functions
"""
# Jinja2 Template filter
try:
from jinja2 import Template as jinja2_Template
def jinja2_filter(text, context):
"Filter blob through jinja2"
return jinja2_Template(text).render(context)
except ImportError:
pass
# Django Template filter
try:
from django im... | 31 | 26.23 | 86 | 11 | 184 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_77ff39d2244d47ad_2d4a3893", "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
] | [
16
] | [
37
] | |
2024-11-19T03:12:16.069108+00:00 | 1,570,854,760,000 | 564d2564f947345266a1220a39776c0e29e4ad81 | 3 | {
"blob_id": "564d2564f947345266a1220a39776c0e29e4ad81",
"branch_name": "refs/heads/master",
"committer_date": 1570854760000,
"content_id": "ee2309ac113926eb0415a45b7150ee887b9dda3b",
"detected_licenses": [
"MIT"
],
"directory_id": "f2498564e59e037427aa0a1f718fc7628e58d943",
"extension": "py",
"fi... | 2.84375 | stackv2 | # PiFrame photos.py
# Downloads photos from flickr and packages them for use on the client for the "Photos" extension.
import settings, flickrapi, requests, os, json
# AlbumSet is the top level container for the photo collection.
class AlbumSet:
def __init__(self):
self.albums = []
# addAlbum append... | 91 | 37.15 | 146 | 15 | 831 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_0e6b13658a972e81_59f3c210", "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."
] | [
86
] | [
null
] | [
30
] | [
39
] | |
2024-11-19T03:12:41.743467+00:00 | 1,600,271,993,000 | d940812e3d919353e55769207620bc37819a5847 | 3 | {
"blob_id": "d940812e3d919353e55769207620bc37819a5847",
"branch_name": "refs/heads/master",
"committer_date": 1600271993000,
"content_id": "587796a9a1cb80f4a99af6fd278d8e45da1dce10",
"detected_licenses": [
"MIT"
],
"directory_id": "9dcbc53f82164cb9411e144064ba55eebb492792",
"extension": "py",
"fi... | 2.84375 | stackv2 | import requests
import re
import pandas as pd
from bs4 import BeautifulSoup
from fake_useragent import UserAgent
import time
import pprint
# index_url = "https://www.bookmarkearth.com/page?currentPage=1"
class BookmarkSpider(object):
def __init__(self):
self.ua = UserAgent()
self.index_url = "ht... | 101 | 34.39 | 144 | 18 | 923 | python | [{"finding_id": "codeql_py/overly-large-range_8b4cc5b39a136623_a1605c99", "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\\]."
] | [
72
] | [
null
] | [
25
] | [
28
] | |
2024-11-19T03:12:48.166810+00:00 | 1,585,751,880,000 | 77bb74909fd0bd4be3d2549aa6d416b55afd0a83 | 2 | {
"blob_id": "77bb74909fd0bd4be3d2549aa6d416b55afd0a83",
"branch_name": "refs/heads/master",
"committer_date": 1585751880000,
"content_id": "f7922397030076fe8fcadfacb87f309696499086",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a8d2258e596a9bf0c25810ec05a250b662f515b1",
"extension": "py"... | 2.40625 | stackv2 | import json
import multiprocessing
import os
from django.http import HttpResponse
from dateutil.relativedelta import relativedelta
from django.utils import timezone
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from presqt.api_v1.utilities impo... | 219 | 36.55 | 98 | 20 | 1,638 | python | [{"finding_id": "codeql_py/path-injection_48b96e3b165757c9_1036bac3", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](1).", "remed... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](1)."
] | [
110
] | [
null
] | [
46
] | [
59
] | |
2024-11-19T03:12:53.534428+00:00 | 1,610,726,616,000 | 3640075fe1234cd3ff8279c555994000a98ca695 | 3 | {
"blob_id": "3640075fe1234cd3ff8279c555994000a98ca695",
"branch_name": "refs/heads/master",
"committer_date": 1610726616000,
"content_id": "443349ea8f9d8ed2457072c23338f39e0eb8d430",
"detected_licenses": [
"MIT"
],
"directory_id": "c11561aa442baf033712eb34a67e77355847631d",
"extension": "py",
"fi... | 2.84375 | stackv2 | import markovify
import config
import random
from twitter_scraper_fetcher import get_user_tweets as scrape
from better_profanity import profanity
import re
profanity.load_censor_words()
# remove emoji, punctuation, urls from tweets
def clean_tweets_data(tweets):
text = ""
# remove emoji from tweets:
emo... | 76 | 28.97 | 83 | 12 | 580 | python | [{"finding_id": "codeql_py/overly-large-range_05cc846af3df13fa_07fbe1b4", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "remediatio... | 3 | true | [
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.",
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.",
"Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class."
] | [
17,
17,
17
] | [
null,
null,
null
] | [
11,
14,
17
] | [
15,
18,
21
] | |
2024-11-19T03:35:54.275162+00:00 | 1,542,319,068,000 | 14a6a3b59abe0b864b103eaf47e3cdffb474bc95 | 3 | {
"blob_id": "14a6a3b59abe0b864b103eaf47e3cdffb474bc95",
"branch_name": "refs/heads/master",
"committer_date": 1542319068000,
"content_id": "3cf1c3c7e5359726cda9bee5aab1f474c1f9cab7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9d9a44c8e1d7baf03a0b6c4fd9c9712b8b3934bf",
"extension": "py"... | 3.453125 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
try:
message = raw_input()
except:
message = ''
shift = 3
for char in message:
if char.isalpha():
caps = False
if char.isupper():
caps = True
char = char.lower()
secretChar = chr((ord(char) + shift ... | 22 | 21.23 | 60 | 17 | 125 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_587bc48bbb0eb10f_c2ce1bea", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](1) as clear text."
] | [
19
] | [
null
] | [
15
] | [
25
] | |
2024-11-19T01:29:00.794585+00:00 | 1,635,341,756,000 | e9c3a1b5a19a493d529b44e80874dc24890199ef | 2 | {
"blob_id": "e9c3a1b5a19a493d529b44e80874dc24890199ef",
"branch_name": "refs/heads/main",
"committer_date": 1635341756000,
"content_id": "953a2e34b9c5323f4eed570162d577a455a4ee80",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2acd5555380f6dffd7a25c1ffcceacdb83ad1b41",
"extension": "py",
... | 2.375 | stackv2 | from typing import Optional
from fastapi import FastAPI, Request, Response
from fastapi.responses import JSONResponse
from pydantic import BaseModel
from datetime import datetime
from bs4 import BeautifulSoup
import httpx
import sys
from random import random
from math import log
import simplejson as json
import url... | 129 | 24.46 | 114 | 15 | 843 | python | [{"finding_id": "codeql_py/full-ssrf_e3a87dda8561b2e9_3fce8a94", "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)."
] | [
58
] | [
null
] | [
19
] | [
34
] | |
2024-11-19T01:29:01.454131+00:00 | 1,692,248,083,000 | 73b8836c2a8a8a970727275315637cd375fbde74 | 2 | {
"blob_id": "73b8836c2a8a8a970727275315637cd375fbde74",
"branch_name": "refs/heads/main",
"committer_date": 1692248083000,
"content_id": "10673fd0d65115e1b304a4ebdfb5388952aefabd",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "00bb69a3e821bd5c795c4910008c981ac8bbe776",
"extension": "py",
... | 2.375 | stackv2 | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
#import seaborn as sns
import sys
import re
probe_time = 1024
fr_time = [0] * probe_time
pp_result = [0] * probe_time
do_one = 0
do_two = 0
num_samples = 1
results = [0] * 8
samples = 0
with open ("final_result.txt") as file:
lines = file.readl... | 46 | 22.24 | 64 | 13 | 329 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9303a3348720df17_cbdfb3f3", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text."
] | [
46
] | [
null
] | [
20
] | [
26
] | |
2024-11-19T01:29:15.491566+00:00 | 1,681,647,572,000 | e63fd1200a5d71edf104d5383127daf4b8f3003a | 2 | {
"blob_id": "e63fd1200a5d71edf104d5383127daf4b8f3003a",
"branch_name": "refs/heads/master",
"committer_date": 1681647572000,
"content_id": "7ce409268f5afb42a0e87f041799e99291090c66",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d0ac5701e1be6cbdac127c9eb5088f9ead9550d3",
"extension": "py"... | 2.40625 | stackv2 | import ipaddress
import paramiko
def ssh(node, username, password, command):
try:
client_ssh = paramiko.SSHClient()
client_ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client_ssh.connect(str(ipaddress.ip_address(node)),
username=username,
... | 34 | 37.76 | 101 | 14 | 258 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_c60b6e544b58e259_22b01516", "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."
] | [
9
] | [
null
] | [
9
] | [
73
] | |
2024-11-19T01:29:31.952796+00:00 | 1,461,512,139,000 | b63f8a9c97c9d4d8bf4ddb73ea1c09ea725cd331 | 4 | {
"blob_id": "b63f8a9c97c9d4d8bf4ddb73ea1c09ea725cd331",
"branch_name": "refs/heads/master",
"committer_date": 1461512139000,
"content_id": "c8a4932a9593720132f75e2a673014b03a706ebf",
"detected_licenses": [
"MIT"
],
"directory_id": "b7e2ef043eca8fb48e19b89705cbef2151041727",
"extension": "py",
"fi... | 3.53125 | stackv2 | import csv
import concurrent.futures
from itertools import product
# Create a list of common replacements
common_replacements = {}
with open('data/small_common_replacements.txt', 'r', encoding='utf8') as file:
reader = csv.reader(file)
for row in reader:
common_replacements[row[0]] = row[1:len(row)]
... | 54 | 38.93 | 120 | 15 | 504 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f3f9b35de4d4e585_6efa0ccf", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text."
] | [
54
] | [
null
] | [
19
] | [
39
] | |
2024-11-19T01:29:49.633735+00:00 | 1,551,789,675,000 | b2834e4113575c74aca6fb5a0fef06e9603d6ce1 | 3 | {
"blob_id": "b2834e4113575c74aca6fb5a0fef06e9603d6ce1",
"branch_name": "refs/heads/master",
"committer_date": 1551789675000,
"content_id": "28da94295419beb5d6fd3744e7eb9f9a2c4c719a",
"detected_licenses": [
"MIT"
],
"directory_id": "0c58d7aba974b136a16ee92ef5d3f81d582d49e5",
"extension": "py",
"fi... | 2.59375 | stackv2 | # -*- coding:UTF-8 -*-
import json
from django.shortcuts import render
from django.contrib.auth import authenticate, login
from django.contrib.auth.backends import ModelBackend
from django.db.models import Q
from django.views.generic.base import View
# 密码转换方法
from django.contrib.auth.hashers import make_password
# 返回j... | 224 | 30.35 | 94 | 17 | 1,567 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_67698970528f7d91_41dc78b6", "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."
] | [
205
] | [
null
] | [
15
] | [
94
] | |
2024-11-19T01:30:05.926948+00:00 | 1,556,876,169,000 | 1216815c32a5b0b5248885848c539be6734bc3ff | 2 | {
"blob_id": "1216815c32a5b0b5248885848c539be6734bc3ff",
"branch_name": "refs/heads/master",
"committer_date": 1556876169000,
"content_id": "96190a1e021b319541a57eba9a42e2976403bdb8",
"detected_licenses": [
"MIT"
],
"directory_id": "3c7fd026f5b8490f634e38e37c201012360cc9c7",
"extension": "py",
"fi... | 2.34375 | stackv2 | from functools import wraps
from flask import request, redirect
def is_secure():
return (request.is_secure or
request.headers.get('X-Forwarded-Proto') == 'https' or
request.headers.get('HTTPS') == 'on')
def _ssl_req(fn, action=None):
@wraps(fn)
def decorated_view(*args, **kwargs)... | 42 | 19.43 | 67 | 13 | 199 | python | [{"finding_id": "codeql_py/url-redirection_229f8e03eccab260_4182ddc8", "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)."
] | [
37
] | [
null
] | [
25
] | [
67
] | |
2024-11-19T01:30:26.244245+00:00 | 1,485,511,280,000 | 51fa0f9b0b4beda81187668a0ecfac39bc4b7de0 | 3 | {
"blob_id": "51fa0f9b0b4beda81187668a0ecfac39bc4b7de0",
"branch_name": "refs/heads/master",
"committer_date": 1485511280000,
"content_id": "3949c784ef52127dcfb8cbb99fe6bc513b0dac40",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cba5e44b8ac0fefaea03455df220ff7e57c9115e",
"extension": "py"... | 2.59375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import tornado.ioloop
from tornado.web import Application, RequestHandler, asynchronous
from tornado.ioloop import IOLoop
from ner import Ner
import time
import json
import sys
import logging
from conf import INLINKS_THRESHOLD
# Main class
class NerService(tornado.web.... | 104 | 34.37 | 122 | 20 | 807 | python | [{"finding_id": "codeql_py/reflective-xss_585520e43c6a27da_92084b34", "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)."
] | [
56
] | [
null
] | [
20
] | [
40
] | |
2024-11-19T01:30:26.826509+00:00 | 1,508,617,650,000 | b5d2691f854bcdeadf1d4a82b77e9306fade0845 | 3 | {
"blob_id": "b5d2691f854bcdeadf1d4a82b77e9306fade0845",
"branch_name": "refs/heads/master",
"committer_date": 1508617650000,
"content_id": "288a162fd490ca93ac29f784ab059e6a1d27da12",
"detected_licenses": [
"MIT"
],
"directory_id": "f4dfa641f97ebd2dfe92f818655e96567455391c",
"extension": "py",
"fi... | 2.703125 | stackv2 | #!/usr/bin/env python
from __future__ import print_function
from db import tmdb_connector, imdb_connector
from ml.data_preprocessor import DataPreprocessor
from ml.dnn import DNN, TMP_MODEL_DIR
import tempfile, shutil
import cmd
import os
import json
import pickle, tarfile
import pandas as pd
from sklearn.model_sele... | 190 | 44.63 | 128 | 18 | 1,850 | python | [{"finding_id": "codeql_py/tarslip_216277a5e0e77a6c_7d8dcc57", "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)."
] | [
62
] | [
null
] | [
13
] | [
16
] | |
2024-11-19T01:55:13.339265+00:00 | 1,606,207,119,000 | 1dc009fc4f79185e1e9ae89a6f92fff7e778b02e | 3 | {
"blob_id": "1dc009fc4f79185e1e9ae89a6f92fff7e778b02e",
"branch_name": "refs/heads/master",
"committer_date": 1606207119000,
"content_id": "1006cb8cfaf9d2ab40ac61de60b315cb712c375b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f87f0ccf97298827198e06c2424ac745b097ba0d",
"extension": "py"... | 2.75 | stackv2 | """
provide functions to get session token
"""
import requests
import logging
from streamr.util.constant import RestfullConstant
__all__ = ['get_session_token_by_api_key']
logger = logging.getLogger(__name__)
def get_session_token_by_api_key(api_key):
"""
func:
Get a session token using th... | 46 | 30.8 | 90 | 14 | 326 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cd73aee5c11f16f4_437d6615", "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."
] | [
30
] | [
31
] | [
18
] | [
26
] | |
2024-11-19T02:06:42.105430+00:00 | 1,678,409,671,000 | 682b708a996b45f16a3d0368691e6fd547217d2d | 3 | {
"blob_id": "682b708a996b45f16a3d0368691e6fd547217d2d",
"branch_name": "refs/heads/master",
"committer_date": 1678409671000,
"content_id": "02c2402ac58f019183a4c5e5dc718fc160c26ce6",
"detected_licenses": [
"MIT"
],
"directory_id": "f1699a142192bdc833050acfbe262a2aaffcdbbe",
"extension": "py",
"fi... | 3.46875 | stackv2 | import click
from flask import Flask
app = Flask(__name__)
# the minimal Flask application
@app.route('/')
def index():
return '<h1>Hello, World!</h1>'
# bind multiple URL for one view function
@app.route('/hi')
@app.route('/hello')
def say_hello():
return '<h1>Hello, Flask!</h1>'
# dynamic route with UR... | 31 | 18.19 | 53 | 10 | 152 | python | [{"finding_id": "codeql_py/reflective-xss_3933c507bf719baa_de122769", "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)."
] | [
24
] | [
null
] | [
12
] | [
38
] | |
2024-11-19T02:06:54.482256+00:00 | 1,628,346,675,000 | bae5f7da92b1d7ae2a26e8a0c82142fecfd9beb3 | 3 | {
"blob_id": "bae5f7da92b1d7ae2a26e8a0c82142fecfd9beb3",
"branch_name": "refs/heads/main",
"committer_date": 1628346675000,
"content_id": "ca4b9e3e056ea64e59333bde586c08c18b50db86",
"detected_licenses": [
"MIT"
],
"directory_id": "5c52e64424a57b1ddf8b3d09dc98ada658739e58",
"extension": "py",
"file... | 3.125 | stackv2 | #!/usr/bin/env python
"""
2c. Execute another HTTP GET request to retrieve all of the endpoints under the "/api/dcim" parent.
Pretty print out the response.json() from this output.
This should be a dictionary with the key being the next part of the URL after "/api/dcim"
and the value being the full URL.
"""
import... | 30 | 26.77 | 100 | 9 | 200 | python | [{"finding_id": "codeql_py/request-without-cert-validation_7c38cb4640f92fb9_21e1d036", "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)."
] | [
24
] | [
null
] | [
16
] | [
69
] | |
2024-11-19T02:07:18.217276+00:00 | 1,523,353,072,000 | e38c0899daceddb2f52a01788d9e708f0b3b964c | 2 | {
"blob_id": "e38c0899daceddb2f52a01788d9e708f0b3b964c",
"branch_name": "refs/heads/master",
"committer_date": 1523353072000,
"content_id": "0ed87ad00f101dbd8849aec746210357b1f9f0dd",
"detected_licenses": [
"MIT"
],
"directory_id": "faa00723d23b5793b51bda7370e2bffe1432cefa",
"extension": "py",
"fi... | 2.46875 | stackv2 | #!/usr/bin/env python
##############################################################
# IMPORTS
##############################################################
from utils.config import Config
import xmltodict
import requests
from datetime import datetime
from ipaddress import ip_network, ip_address
import re
from openpy... | 325 | 36.72 | 90 | 28 | 2,494 | python | [{"finding_id": "codeql_py/request-without-cert-validation_939f8b61e8569ab5_d09c6d15", "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)."
] | [
34
] | [
null
] | [
13
] | [
59
] | |
2024-11-19T02:31:14.421278+00:00 | 1,692,862,028,000 | b99cb6811bc5451289ee18127e6bd0a7be7478f7 | 2 | {
"blob_id": "b99cb6811bc5451289ee18127e6bd0a7be7478f7",
"branch_name": "refs/heads/main",
"committer_date": 1692862028000,
"content_id": "f5683e9a0f4165b609294b0cdda46280bf30f670",
"detected_licenses": [
"BSD-2-Clause",
"BSD-3-Clause"
],
"directory_id": "d4239425234eacb647c4cc4f2f4c8537b618fca0",... | 2.3125 | stackv2 | # -*- coding: utf-8 -*-
"""
Chart utility functions.
"""
from __future__ import unicode_literals
import re
from collections import OrderedDict
from django.db.utils import DataError
from django.http import Http404
import six
from rest_framework.exceptions import ParseError
from onadata.apps.logger.models.data_view i... | 492 | 31.78 | 88 | 19 | 3,749 | python | [{"finding_id": "codeql_py/stack-trace-exposure_e92cbdd34cb80d21_f02bec4e", "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."
] | [
404,
481
] | [
null,
null
] | [
26,
26
] | [
32,
32
] | |
2024-11-19T02:31:44.875046+00:00 | 1,583,497,951,000 | b0263302732681d579f968702d1a3f7e7b918cd7 | 4 | {
"blob_id": "b0263302732681d579f968702d1a3f7e7b918cd7",
"branch_name": "refs/heads/master",
"committer_date": 1583497951000,
"content_id": "1702eae0ed2e1ffe7191e5e017436941e38d2b09",
"detected_licenses": [
"Unlicense"
],
"directory_id": "c19df6279c5d759f7126c6f20c58196250d39402",
"extension": "py",... | 4.34375 | stackv2 | # 5. Запросите у пользователя значения выручки и издержек фирмы. Определите, с каким финансовым результатом работает
# фирма (прибыль — выручка больше издержек, или убыток — издержки больше выручки). Выведите соответствующее
# сообщение. Если фирма отработала с прибылью, вычислите рентабельность выручки (соотношение пр... | 28 | 47.07 | 116 | 16 | 373 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1738c7dda4f63442_261fcf26", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
28
] | [
null
] | [
68
] | [
87
] | |
2024-11-19T02:32:06.503341+00:00 | 1,443,374,589,000 | 82609fafda7684305a4481205a7db2a8bae3261b | 2 | {
"blob_id": "82609fafda7684305a4481205a7db2a8bae3261b",
"branch_name": "refs/heads/master",
"committer_date": 1443374589000,
"content_id": "ec6f0cebd77d8f6fb33e11671a496d25ea3470f8",
"detected_licenses": [
"MIT"
],
"directory_id": "094c2cacc21d591f7decf0e70d693a24ab4fbc51",
"extension": "py",
"fi... | 2.484375 | stackv2 | import argparse
import os
import subprocess
import sys
import tempfile
from Crypto.PublicKey import RSA
from jinja2 import Template
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--github-user', help='The GitHub user whose keys will'
' be preloaded for the pi user. If absent authentica... | 172 | 33.38 | 112 | 15 | 1,493 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_848dfae921b53807_83aa9ebd", "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."
] | [
162
] | [
null
] | [
20
] | [
39
] | |
2024-11-19T02:32:52.406153+00:00 | 1,575,475,833,000 | 8a937263b23a4db953c42f091f2b33bd2ce501fd | 2 | {
"blob_id": "8a937263b23a4db953c42f091f2b33bd2ce501fd",
"branch_name": "refs/heads/master",
"committer_date": 1575475833000,
"content_id": "302aab98c2b6ae8df444aeb819787aa22a6f05b7",
"detected_licenses": [
"MIT"
],
"directory_id": "c93c6caf2ed295c3642ac1d546723dcd5eea45ec",
"extension": "py",
"fi... | 2.390625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
from flask import Flask, send_file, request,render_template, make_response
from woaiso.image import XImage
app = Flask(__name__)
work_dir = os.getcwd()
ALLOWED_EXTENSIONS = set(['jpg','png','gif'])
UPLOAD_FOLDER = work_dir + '/temp'
app.config['UPLO... | 72 | 37.5 | 155 | 19 | 675 | python | [{"finding_id": "codeql_py/reflective-xss_93a9860f9bf8bb12_69d661b8", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 3 | true | [
"CWE-079",
"CWE-079",
"CWE-022"
] | [
"py/reflective-xss",
"py/reflective-xss",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
40,
68,
39
] | [
null,
null,
null
] | [
20,
16,
23
] | [
28,
124,
74
] | |
2024-11-19T02:32:53.018239+00:00 | 1,610,249,920,000 | a13c2b77ffea0785d48eebae5a8de2372e14da9f | 3 | {
"blob_id": "a13c2b77ffea0785d48eebae5a8de2372e14da9f",
"branch_name": "refs/heads/master",
"committer_date": 1610249920000,
"content_id": "d8246b4bfba6a28ba4dcd36131db0a7d3d32e786",
"detected_licenses": [
"MIT"
],
"directory_id": "9cda5b84b682370e3713c9e8a6d20643195f486a",
"extension": "py",
"fi... | 2.828125 | stackv2 | import requests
import os
import threading
import urllib3
from bs4 import BeautifulSoup
from concurrent.futures import ThreadPoolExecutor
from selenium import webdriver
from selenium.common import exceptions
urllib3.disable_warnings()
divide_line = "———————————— {} ————————————"
def cjg_crawl(info, index="", downloa... | 195 | 30.2 | 100 | 17 | 1,474 | python | [{"finding_id": "codeql_py/request-without-cert-validation_a6f92d0c0ce49401_188f2261", "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)."
] | [
24,
73,
119
] | [
null,
null,
null
] | [
16,
22,
22
] | [
60,
66,
71
] | |
2024-11-19T02:43:32.967515+00:00 | 1,531,679,167,000 | 29d7b296f37cf8b73a31a66195339a0b30a60e84 | 3 | {
"blob_id": "29d7b296f37cf8b73a31a66195339a0b30a60e84",
"branch_name": "refs/heads/master",
"committer_date": 1531679167000,
"content_id": "fa92b9d14c835b4f9ba9444d67510b22203ed890",
"detected_licenses": [
"MIT"
],
"directory_id": "34aa0402d7215d487c61950e90fccefcf830accc",
"extension": "py",
"fi... | 2.734375 | stackv2 | from flask import Flask
from flask import request
from sklearn import datasets, svm
from PIL import Image
from numpy import array
import csv
from pprint import pformat
from io import BytesIO
from urllib.request import urlopen
mine = True
train = False
if mine:
digits = []
with open('numbers.csv', newline=''... | 62 | 25.23 | 75 | 13 | 466 | python | [{"finding_id": "codeql_py/flask-debug_b9ec7cab63e4b26d_85d508a8", "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-918"
] | [
"py/flask-debug",
"py/full-ssrf"
] | [
"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.",
"The full URL of this request depends on a [user-provided value](1)."
] | [
62,
46
] | [
null,
null
] | [
5,
22
] | [
40,
39
] | |
2024-11-19T02:54:50.363721+00:00 | 1,505,487,216,000 | e493ea3032e1051ad60fa7c44027e35dbaecaf29 | 3 | {
"blob_id": "e493ea3032e1051ad60fa7c44027e35dbaecaf29",
"branch_name": "refs/heads/master",
"committer_date": 1505487216000,
"content_id": "9b4ac54da7ee63c2f98ca490c53a793668bd6e0f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f537166c2daa186eab63eb89742d848cfb83ac89",
"extension": "py"... | 3.078125 | stackv2 | import sublime, sublime_plugin
import re
from sys import platform
from os import startfile
from subprocess import Popen
__version__ = "1.0.0"
zeroPad = lambda txt: txt[::-1]+"0"*(2-len(txt))
def getFmt(txt):
"""Determines the format of the color
Arguments:
txt {str} -- The text to determine
"""
... | 69 | 24.36 | 100 | 15 | 553 | python | [{"finding_id": "codeql_py/overly-large-range_4fae19aa553e5b2b_a588c04e", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_`a-f\\].", "remediation... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_`a-f\\].",
"Suspicious character range that is equivalent to \\[0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_`a-f\\]."
] | [
17,
18
] | [
null,
null
] | [
32,
52
] | [
35,
55
] | |
2024-11-19T02:55:11.590927+00:00 | 1,586,853,113,000 | 4d08dc60ca5d49d05e73e1a7786320ed0767f1ed | 3 | {
"blob_id": "4d08dc60ca5d49d05e73e1a7786320ed0767f1ed",
"branch_name": "refs/heads/master",
"committer_date": 1586853113000,
"content_id": "c3fe8cd1bce9cbdc2813762b90c642f74d85b5fc",
"detected_licenses": [
"MIT"
],
"directory_id": "0f0ffd74bf18976bbea7990fad4090ab406341e7",
"extension": "py",
"fi... | 2.84375 | stackv2 | #! /usr/bin/env python -u
# coding=utf-8
__author__ = 'Sayed Hadi Hashemi'
import json
import urllib
import urllib2
import hashlib
import email
import email.message
import email.encoders
class CourseraSubmission(object):
def __init__(self, **kwargs):
self.email = ""
self.password = ""
se... | 168 | 34.37 | 120 | 18 | 1,342 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_c0ace3c0c10bc6ba_f1ff7b95", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
55
] | [
null
] | [
21
] | [
56
] | |
2024-11-19T02:55:13.199882+00:00 | 1,593,008,629,000 | 69664c791f3507103829f64a4f1b91a775a7696e | 2 | {
"blob_id": "69664c791f3507103829f64a4f1b91a775a7696e",
"branch_name": "refs/heads/master",
"committer_date": 1593008629000,
"content_id": "c1d4ea4f229c2f4ebf4dc389394b6fd72f349dfb",
"detected_licenses": [
"MIT"
],
"directory_id": "d1b59c8aacad5ff93f25ccfcce306a4f3d570230",
"extension": "py",
"fi... | 2.453125 | stackv2 | from fastapi import Body, FastAPI
from pydantic import BaseModel, Field
from typing import Optional, Union
import io
from starlette.responses import StreamingResponse
app = FastAPI()
class Pyscript(BaseModel):
pyscript: str
a: Optional[Union[list, str]] = None
b: Optional[Union[list, str]] = None
c: O... | 166 | 27.96 | 150 | 24 | 1,225 | python | [{"finding_id": "codeql_py/stack-trace-exposure_7a8dc1a6a2d310ab_07a92450", "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-094"
] | [
"py/stack-trace-exposure",
"py/code-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"This code execution depends on a [user-provided value](1).\nThis code execution depends on a [user-provided value](2)."
] | [
114,
88
] | [
null,
null
] | [
12,
10
] | [
56,
23
] | |
2024-11-19T02:55:33.390695+00:00 | 1,442,427,698,000 | a8140185e9403dc208134802a57f178e750a37cc | 3 | {
"blob_id": "a8140185e9403dc208134802a57f178e750a37cc",
"branch_name": "refs/heads/master",
"committer_date": 1442427698000,
"content_id": "54fdd184ff74d23dc9573c3c458810b8fbf68876",
"detected_licenses": [
"MIT"
],
"directory_id": "b6aa28c5c357e211c193e204185fc2e87c0ae978",
"extension": "py",
"fi... | 2.71875 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Convenience functions for doing web things."""
import re
import requests
import urlparse
import traceback
import json
from lxml.cssselect import CSSSelector as cs
from lxml.html import document_fromstring
from daneel import utils
ua = "Mozilla/5.0 (Macintosh; Intel M... | 86 | 30.97 | 126 | 19 | 693 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_20168190b08a7e55_94a11501", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [yelp.com](1) may be at an arbitrary position in the sa... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [yelp.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [twitter.com](1) may be at an arbitrary position in the sanitized URL."
] | [
35,
52
] | [
null,
null
] | [
8,
12
] | [
25,
49
] | |
2024-11-19T02:55:36.301467+00:00 | 1,481,690,941,000 | e3f81f125dce2eb7a5dbce017037ed977c343e3b | 3 | {
"blob_id": "e3f81f125dce2eb7a5dbce017037ed977c343e3b",
"branch_name": "refs/heads/master",
"committer_date": 1481690941000,
"content_id": "61d95913f7c62bc8424748b8481beb8fccd1667d",
"detected_licenses": [
"MIT"
],
"directory_id": "ad754a698145c876c590c8b2311a43c468ba93fd",
"extension": "py",
"fi... | 3.046875 | stackv2 | from jinja2 import Template
template = Template('Hello {{ name }}!')
p = template.render(name='John Doe')
print p
answers = [{
'url':'google.com',
'question':'Url for google'
},{
'url':'google.com/q=',
'question':'qQuery Url for google'
}]
template2 = Template('''
<ul>
{% for answer in answers %}
<li><a hr... | 27 | 15.63 | 64 | 8 | 124 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4f7d81f404f47b0b_78edb8ff", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
3,
17
] | [
null,
23
] | [
12,
13
] | [
41,
6
] | |
2024-11-19T02:55:36.571290+00:00 | 1,448,068,719,000 | 86950e307a26e7aef59ea965310a8f6efa662b2e | 2 | {
"blob_id": "86950e307a26e7aef59ea965310a8f6efa662b2e",
"branch_name": "refs/heads/master",
"committer_date": 1448068719000,
"content_id": "83ef0e274bb7d55d37e663f4c2a3a4beee3ebb9b",
"detected_licenses": [
"MIT"
],
"directory_id": "de67014997d88b080ffcf67df16f75fff5a5839d",
"extension": "py",
"fi... | 2.375 | stackv2 | import os
import paramiko
def get_private_key():
# or choose the location and the private key file on your client
private_key_file = os.path.expanduser("/home/ubuntu/.ssh/id_rsa")
return paramiko.RSAKey.from_private_key_file(private_key_file, password='')
def get_ssh(myusername, myhostname, myport):
... | 66 | 32.86 | 144 | 10 | 664 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_d3297dce3ce40618_a3f6544a", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
14
] | [
null
] | [
5
] | [
62
] | |
2024-11-19T02:55:56.776626+00:00 | 1,549,643,337,000 | 8ddad9b564a79826776d784940aff7ac11f67132 | 2 | {
"blob_id": "8ddad9b564a79826776d784940aff7ac11f67132",
"branch_name": "refs/heads/master",
"committer_date": 1549643337000,
"content_id": "eecad18f47015bacbc401f50a3ec8451ed7d7372",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e7123fc931022bc2ec1e6b852b5ee9426bdf8d93",
"extension": "py"... | 2.390625 | stackv2 | # Video content range logic taken from https://github.com/go2starr/py-flask-video-stream
import logging
import mimetypes
import os
import re
from flask import (
Blueprint, render_template, request, Response, flash, redirect, current_app,
jsonify)
from moviefriday.repositories import Movie, MovieRepository
fr... | 150 | 26.08 | 88 | 12 | 1,040 | python | [{"finding_id": "codeql_py/url-redirection_04539d8ec27c5c04_cbee8d4e", "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_... | 4 | true | [
"CWE-601",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/url-redirection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
33,
39,
39,
76
] | [
null,
null,
null,
null
] | [
25,
35,
42,
31
] | [
36,
40,
45,
44
] | |
2024-11-19T02:55:58.559987+00:00 | 1,495,097,449,000 | b0a2835a40ce00cfffe2e04bbd0975dc333698d4 | 3 | {
"blob_id": "b0a2835a40ce00cfffe2e04bbd0975dc333698d4",
"branch_name": "refs/heads/master",
"committer_date": 1495097449000,
"content_id": "167cd5e273bd2f3711336b3330ec095a78d5364d",
"detected_licenses": [
"MIT"
],
"directory_id": "45e45dc034831e97fd62cd4edbef0b1e38f4fa24",
"extension": "py",
"fi... | 3.0625 | stackv2 | """
Utility functions to parse web page on konachan.com
"""
import re
from bs4 import BeautifulSoup
def parse_query_page(text):
"""
Parses query page.
It will parse all pictures on the page, and return their info in a dict. It
is a alternative method compatible with new design of crawler.
"""
... | 73 | 29.75 | 79 | 15 | 540 | python | [{"finding_id": "codeql_py/overly-large-range_bac1f3820121d006_163dc14e", "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\\]."
] | [
31
] | [
null
] | [
33
] | [
37
] | |
2024-11-19T02:55:58.778273+00:00 | 1,550,024,849,000 | 75d108255cb7d0083fe596b42b01b7f5981a84f1 | 2 | {
"blob_id": "75d108255cb7d0083fe596b42b01b7f5981a84f1",
"branch_name": "refs/heads/master",
"committer_date": 1550024849000,
"content_id": "1538a30966729421dcbe0a2d8ff7a93d5a62ced0",
"detected_licenses": [
"MIT"
],
"directory_id": "e3bc1e4aae95ac6eea2c3e3f90fa2bb58f895e29",
"extension": "py",
"fi... | 2.390625 | stackv2 | import json
import sqlite3
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
from unidecode import unidecode
import time
import re
from textblob import TextBlob
#sentiment analyzer
import praw
import datetime
reddit = praw.Reddit(client_id='',
client_secret="",
us... | 84 | 38.56 | 111 | 16 | 732 | python | [{"finding_id": "codeql_py/overly-large-range_7f6f6c65d9644574_de59c6ae", "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\\]."
] | [
22
] | [
null
] | [
41
] | [
44
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.