added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-18T19:58:20.636762+00:00 | 1,470,843,890,000 | 8fb7f2a31fb2407170acf9b6c952914410e62583 | 2 | {
"blob_id": "8fb7f2a31fb2407170acf9b6c952914410e62583",
"branch_name": "refs/heads/master",
"committer_date": 1470843890000,
"content_id": "3df0c46c9730ec460f041684c825449564efb374",
"detected_licenses": [
"MIT"
],
"directory_id": "4923d98d821145339ccaa49e25107bc34616ca85",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Hiicart Utils"""
import logging
import traceback
import sys
from pprint import pformat
from django.http import HttpResponse, QueryDict
from hiicart.models import CART_TYPES
try:
import newrelic.agent
except ImportError, e:
pass
logger = logging.getLogger("hiic... | 88 | 26.38 | 76 | 17 | 512 | python | [{"finding_id": "codeql_py/stack-trace-exposure_07bcdc22c77dcc71_072ceef5", "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."
] | [
40
] | [
null
] | [
37
] | [
40
] | |
2024-11-18T19:58:23.187417+00:00 | 1,583,132,942,000 | bab0bb552c7b2d12a70bd4c9f64f89f208f1f57c | 3 | {
"blob_id": "bab0bb552c7b2d12a70bd4c9f64f89f208f1f57c",
"branch_name": "refs/heads/master",
"committer_date": 1583132942000,
"content_id": "382e30355d3e9d95d0b26278e4bb7623f7b826a9",
"detected_licenses": [
"MIT"
],
"directory_id": "d0549ea2c65c63a168c8a4b64ff2bf4fbd267217",
"extension": "py",
"fi... | 2.625 | stackv2 | import os
import jinja2
from orgassist import log
from orgassist.config import ConfigError
def get_default_template(filename, module_file):
"""
Compute template path and check existance.
Default templates are located within modules in a "templates" subdirectory.
"""
base_path = os.path.dirname(os.... | 40 | 27.65 | 79 | 14 | 237 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_e5fcb13636b8eb0a_37a2c360", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
37
] | [
39
] | [
16
] | [
51
] | |
2024-11-18T19:58:25.658644+00:00 | 1,246,591,327,000 | 681e585db28617810ac3555400756b536e2e4cd5 | 3 | {
"blob_id": "681e585db28617810ac3555400756b536e2e4cd5",
"branch_name": "refs/heads/master",
"committer_date": 1246592535000,
"content_id": "529fb83a7e0e9a2a355630537f229f401ccfec8b",
"detected_licenses": [
"MIT"
],
"directory_id": "b2e59e84653398cc52baeb0e3b9976481fef46d5",
"extension": "py",
"fi... | 3 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Created on Apr 17, 2009
@author: Sergey Chikuyonok (http://chikuyonok.ru)
'''
from zencoding.settings import zen_settings
import re
newline = '\n'
"Символ перевода строки"
insertion_point = '|'
"Символ, указывающий, куда нужно поставить курсор"
sub_insertion_point... | 419 | 25.32 | 125 | 20 | 3,371 | python | [{"finding_id": "codeql_py/redos_65100912b470482e_17bd07b0", "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 repeti... | 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 '\"\" -='."
] | [
25
] | [
null
] | [
56
] | [
59
] | |
2024-11-18T19:58:25.831283+00:00 | 1,641,664,097,000 | 9975375a8bbc04ed8038b1f5bcf7a0a27fc27da0 | 3 | {
"blob_id": "9975375a8bbc04ed8038b1f5bcf7a0a27fc27da0",
"branch_name": "refs/heads/master",
"committer_date": 1641664097000,
"content_id": "d29f74e8f9a222e75347185c690c91d4fded3edf",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a71c0132a8ecebacf86916a848f6629c38e50f0d",
"extension": "p... | 2.53125 | stackv2 | from flask import Flask, send_file
import os
app = Flask(__name__)
@app.route("/")
def home():
return "Backend 2 is working"
@app.route("/image-cluster/<string:folder_name>", methods=['GET'])
def hello(folder_name):
if (os.path.isdir("../data/"+folder_name)):
os.system("python example_api_minimal.py... | 21 | 22.9 | 67 | 12 | 117 | python | [{"finding_id": "codeql_py/command-line-injection_efc0bf500490bfd2_2fdb15ae", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 2 | true | [
"CWE-078",
"CWE-022"
] | [
"py/command-line-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
14,
13
] | [
null,
null
] | [
19,
23
] | [
63,
45
] | |
2024-11-18T20:10:12.816565+00:00 | 1,546,882,737,000 | 8f0c1069564b11b01103a913a2b39e4741236153 | 3 | {
"blob_id": "8f0c1069564b11b01103a913a2b39e4741236153",
"branch_name": "refs/heads/master",
"committer_date": 1546882737000,
"content_id": "e006ab6e0156314afecb8e9d5eb4f4e74c0a3d6e",
"detected_licenses": [
"MIT"
],
"directory_id": "766fe84f096f7eb4ecafb18eff1a7a116f656a7b",
"extension": "py",
"fi... | 2.640625 | stackv2 | """The Jinja2 coverage plugin."""
import os.path
import pathlib
import coverage.plugin
from jinja2 import Environment
from jinja2.loaders import FileSystemLoader
class JinjaPlugin(coverage.plugin.CoveragePlugin):
def __init__(self, options):
self.template_directory = pathlib.Path(options.get("template_d... | 79 | 30.14 | 83 | 16 | 493 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_806a518a31e4e567_f4e6aaaf", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
14
] | [
17
] | [
28
] | [
10
] | |
2024-11-18T20:10:14.106420+00:00 | 1,467,649,059,000 | c306ba6e7de4ee05b5c31dd1156a1ee5a98fa139 | 3 | {
"blob_id": "c306ba6e7de4ee05b5c31dd1156a1ee5a98fa139",
"branch_name": "refs/heads/master",
"committer_date": 1467649059000,
"content_id": "46fb11bcbf3a54db7b56231acf948fe86a4ddbdf",
"detected_licenses": [
"MIT"
],
"directory_id": "9be66f4682d3c2c95ecd6c5e78c08ca872fad57c",
"extension": "py",
"fi... | 2.5625 | stackv2 | import logging
import requests
import jwt
import datetime
import boto3
from auth_backend.http import format_response
logger = logging.getLogger("auth_backend")
class JWTAuthentication(object):
def __init__(self, lambda_event):
for prop in ["payload",
"jwt_signing_secret",
... | 170 | 38.67 | 113 | 17 | 1,428 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0883131039f9c339_51498e9c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 5 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensi... | [
92,
103,
112,
124,
125
] | [
93,
null,
null,
null,
null
] | [
25,
25,
22,
26,
26
] | [
38,
34,
67,
51,
49
] | |
2024-11-18T20:23:14.764196+00:00 | 1,509,427,394,000 | 6b6b5deb3ee12407b71ea4f1275f4ad650835565 | 2 | {
"blob_id": "6b6b5deb3ee12407b71ea4f1275f4ad650835565",
"branch_name": "refs/heads/master",
"committer_date": 1509427394000,
"content_id": "101696ea86b3558059423da32c7b01f43f5c0948",
"detected_licenses": [
"MIT"
],
"directory_id": "76604f4c7cf0a397067662dcbbd7a4e29d255efe",
"extension": "py",
"fi... | 2.34375 | stackv2 | import os
import json
import subprocess
from flask import Flask, request, render_template, jsonify, redirect, url_for
# conda install -c conda-forge flask-httpauth
from flask_httpauth import HTTPBasicAuth
app = Flask(__name__)
app.debug = True
auth = HTTPBasicAuth()
users = {
"hayabusa" : "hayabusa"
}
result_fi... | 120 | 26.41 | 138 | 20 | 777 | python | [{"finding_id": "codeql_py/command-line-injection_7e937ebb46c64253_4b42f9cd", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 2 | true | [
"CWE-078",
"CWE-215"
] | [
"py/command-line-injection",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1).",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
111,
120
] | [
null,
null
] | [
25,
5
] | [
28,
40
] | |
2024-11-18T20:23:19.627072+00:00 | 1,420,342,102,000 | 4a5fd495f00f7dd419968220e069098474a35ad6 | 2 | {
"blob_id": "4a5fd495f00f7dd419968220e069098474a35ad6",
"branch_name": "refs/heads/master",
"committer_date": 1420342102000,
"content_id": "6cff2019da8b9071aa784e56a429c660d7992338",
"detected_licenses": [
"MIT"
],
"directory_id": "2188080dc9fdfa54f9d54fb07c25a77d64947d29",
"extension": "py",
"fi... | 2.46875 | stackv2 | from jinja2 import Template
import shutil
import yaml
import markdown
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('.'),
extensions=['jinja2.ext.with_'])
env.filters.update({
'markdown': lambda text: markdown.markdown(text)
})
class File... | 79 | 20.41 | 86 | 21 | 381 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_1313171b19150795_fde9c472", "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."
] | [
10
] | [
11
] | [
7
] | [
51
] | |
2024-11-18T20:23:21.596188+00:00 | 1,585,723,208,000 | 82cacdf1757934b2e5378828dff40ae641b320f8 | 2 | {
"blob_id": "82cacdf1757934b2e5378828dff40ae641b320f8",
"branch_name": "refs/heads/master",
"committer_date": 1585723208000,
"content_id": "c498160d96b92a79e3de150cf3845284f48f3ea7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d4044bd9c5cf70c491df3b1da5bd2d16063717bf",
"extension": "py"... | 2.375 | stackv2 | import requests
from pprint import pprint
from urllib3.exceptions import InsecureRequestWarning
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
# Constants
BASE_URL = "https://netbox.lasthop.io/api/"
if __name__ == "__main__":
print()
http_headers = {}
http_headers["accept"] ... | 25 | 21.08 | 79 | 10 | 130 | python | [{"finding_id": "codeql_py/request-without-cert-validation_3cff709656f15737_854ba799", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
16
] | [
null
] | [
12
] | [
80
] | |
2024-11-18T20:23:30.208595+00:00 | 1,612,713,083,000 | 2334867f49c19bc775ff97d9ac4af99fb989dfb8 | 3 | {
"blob_id": "2334867f49c19bc775ff97d9ac4af99fb989dfb8",
"branch_name": "refs/heads/master",
"committer_date": 1612713083000,
"content_id": "3812bcd0e8c0ac9652e22749a6bc7055a0c2be04",
"detected_licenses": [
"MIT"
],
"directory_id": "379d0e809f679c7344318441261d8c9632e0beda",
"extension": "py",
"fi... | 2.921875 | stackv2 | import requests
import re
from flask import Flask, jsonify, request
app = Flask(__name__)
MULTIPLICATIVE = re.compile(r"(?P<left>.*?)(?P<operator>\*|\/)(?P<right>.*)")
ADDIDITIVE = re.compile(r"(?P<left>.*?)(?P<operator>\+|\-)(?P<right>.*)")
NUM = re.compile(r"\s*(\d+(?:\.\d+)?)\s*")
URLS = {
... | 60 | 23.45 | 77 | 13 | 388 | python | [{"finding_id": "codeql_py/polynomial-redos_697c8d26772af168_76620c67", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/polynomial-redos",
"py/polynomial-redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of 'a'.",
"This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of 'a'."
] | [
30,
32
] | [
null,
null
] | [
34,
42
] | [
44,
52
] | |
2024-11-18T20:48:57.497945+00:00 | 1,620,915,390,000 | caa45c704a3269593651c95af20577db0c84f37b | 3 | {
"blob_id": "caa45c704a3269593651c95af20577db0c84f37b",
"branch_name": "refs/heads/master",
"committer_date": 1620915390000,
"content_id": "f1dd4260e095447d6010987ca49018a91eb453f6",
"detected_licenses": [
"BSD-2-Clause-Views"
],
"directory_id": "95d7adb62692ccbd8ca122997ad35c6b47ed7b0f",
"extensio... | 2.71875 | stackv2 | #!/usr/bin/env python
# Final Orientation Calculation File
import stdb
import pickle
import os.path
import numpy as np
from orientpy import utils, plotting
from pathlib import Path
from argparse import ArgumentParser
from os.path import exists as exist
from obspy import UTCDateTime
from numpy import nan
def get_dl... | 202 | 29.42 | 82 | 18 | 1,455 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_59bcb5044f5d7186_8738be00", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
142
] | [
143
] | [
19
] | [
45
] | |
2024-11-18T20:49:16.328401+00:00 | 1,425,968,218,000 | 68d98ae20a0ff22d2f5b765723d8755712cd232f | 2 | {
"blob_id": "68d98ae20a0ff22d2f5b765723d8755712cd232f",
"branch_name": "refs/heads/master",
"committer_date": 1425968218000,
"content_id": "549c1deecb215177a91a3475d4aeaff8d8d9d5e5",
"detected_licenses": [
"MIT"
],
"directory_id": "e6ed355ecfa2037aeb1e054d2260203d08876993",
"extension": "py",
"fi... | 2.484375 | stackv2 | from jinja2 import Template
from jinja2 import Environment, PackageLoader, FileSystemLoader
import boto
from boto.s3.connection import S3Connection
from boto.s3.key import Key
from boto.s3.connection import S3Connection
from boto.s3.key import Key
import StringIO
import json
import sys
def write_html(aws_storage_buc... | 109 | 26.48 | 90 | 12 | 726 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_88aba4954ea5ef47_1143e238", "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."
] | [
15
] | [
null
] | [
11
] | [
60
] | |
2024-11-18T20:49:21.111613+00:00 | 1,567,416,659,000 | 5ea95b74545c2cae161477a1bd33456e60615cc8 | 4 | {
"blob_id": "5ea95b74545c2cae161477a1bd33456e60615cc8",
"branch_name": "refs/heads/master",
"committer_date": 1567416659000,
"content_id": "5172050ea17b004e6dbacc2f94d0b22f04aa943a",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f041e08677d2afdfe0dedb5566a1ece3b0717f68",
"extension": "p... | 3.65625 | stackv2 | import os
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import math
# Set Directory
print(os.getcwd())
#Read dataset
original_df = pd.read_csv("Titanic.csv")
print("# of passengers in original data:" + str(len(original_df.index)))
print(original_df.head())
# Data Wrangling
# Finding Null V... | 209 | 32.12 | 119 | 12 | 1,848 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_90e9e6fdc197a220_cb7f4edc", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
36,
48,
53,
55
] | [
null,
null,
null,
null
] | [
7,
7,
7,
7
] | [
81,
18,
25,
25
] | |
2024-11-18T20:49:21.653778+00:00 | 1,680,282,783,000 | 56cd98b047e182f822424f8d4ff74fc900b0e7e0 | 2 | {
"blob_id": "56cd98b047e182f822424f8d4ff74fc900b0e7e0",
"branch_name": "refs/heads/master",
"committer_date": 1680282783000,
"content_id": "07b1e945f20cc91c7d299902edeebf8468b2ecb0",
"detected_licenses": [
"MIT"
],
"directory_id": "fbf6eda82899299890b75d36b0a0a77ae11aaec1",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/python
"""
Description:
Adds decrypted Windows Administrator passwords for Windows EC2 Instances
to SSM parameter store.
The list of instances to get and store the passwords for are selected
by a tag key=value pair.
If the instance doesn't have a Windows Administ... | 333 | 40.89 | 87 | 24 | 2,859 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5287cfd494206fce_97c7b271", "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."
] | [
215,
226
] | [
null,
null
] | [
56,
30
] | [
68,
54
] | |
2024-11-18T20:49:24.838180+00:00 | 1,627,518,047,000 | 1ec40653f703d5de08fe0b6e1924d3841d6f4f9e | 2 | {
"blob_id": "1ec40653f703d5de08fe0b6e1924d3841d6f4f9e",
"branch_name": "refs/heads/main",
"committer_date": 1627518047000,
"content_id": "ca58f53d552be8a8ecd7f0a7819d5230a4a731d7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7053f6b4ef67dc0f35f746351ce1c4dd3b67d84b",
"extension": "py",
... | 2.4375 | stackv2 | import flask
from flask import render_template, request
app = flask.Flask(__name__)
def write(key):
with open('/Users/kaantekiner/Desktop/keys.txt', 'a') as the_file:
the_file.write(key)
@app.route('/')
def index_page():
return "test"
@app.route('/keylog')
def keylog():
gelen = request.args.get('... | 23 | 21.09 | 70 | 12 | 142 | python | [{"finding_id": "codeql_py/flask-debug_2d1b3ec6ef2ce09f_d7831340", "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)."
] | [
23,
20
] | [
null,
null
] | [
5,
12
] | [
51,
22
] | |
2024-11-18T20:49:26.788089+00:00 | 1,324,900,408,000 | 6596faefb8c63631646040cf491a76a5d0b0f3ed | 3 | {
"blob_id": "6596faefb8c63631646040cf491a76a5d0b0f3ed",
"branch_name": "refs/heads/master",
"committer_date": 1324900408000,
"content_id": "35091f23d037155da52e56478df49e64f310b6e8",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "2aefdab2b0d75c06bc2f9ad14c4c1a13fa8166fd",
"extension": "p... | 2.6875 | stackv2 | import ssl, socket, urlparse
from mimetools import Message
from StringIO import StringIO
from threading import Thread
FRAME_START = "\x00"
FRAME_END = "\xff"
class WebSocketError(Exception):
def __init__(self, value):
self.value = value
def __str__(self): return str(self.value)
class WebSocket(Thre... | 138 | 27.54 | 77 | 21 | 915 | python | [{"finding_id": "codeql_py/insecure-default-protocol_d617bdb3bf2d9e82_605fee5b", "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."
] | [
38
] | [
40
] | [
25
] | [
14
] | |
2024-11-18T20:49:33.122831+00:00 | 1,517,484,338,000 | 0c6842668bb8bfa4e7d46fd6a7326ae1e5df87b2 | 3 | {
"blob_id": "0c6842668bb8bfa4e7d46fd6a7326ae1e5df87b2",
"branch_name": "refs/heads/master",
"committer_date": 1517484338000,
"content_id": "e312fe71feac44ffba3ac9ba18f5d8378c111319",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1d1178449a18c74e52eef75ce0bbca17495149b2",
"extension": "py"... | 2.609375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2018/1/31 上午11:41
# @Author : wook
# @File : hello.py
"""
test
"""
import tornado.httpserver
import tornado.ioloop
import tornado.web
class IndexHandler(tornado.web.RequestHandler):
def data_received(self, chunk):
pass
def get(self):
... | 28 | 22.32 | 66 | 12 | 179 | python | [{"finding_id": "codeql_py/reflective-xss_310f7dc8827875da_3986f7c9", "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)."
] | [
21
] | [
null
] | [
20
] | [
54
] | |
2024-11-18T20:51:13.687567+00:00 | 1,438,769,022,000 | 7a8f1a171adc00fbe73fccdaca627d432db08171 | 3 | {
"blob_id": "7a8f1a171adc00fbe73fccdaca627d432db08171",
"branch_name": "refs/heads/master",
"committer_date": 1438769022000,
"content_id": "b74effec0c3296a3feea42987390e453a371b20f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "30c97cdc419fd2ae100422c92b4a785c0e381037",
"extension": "py"... | 2.6875 | stackv2 | """
Copyright 2015 Zalando SE
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distrib... | 130 | 34.19 | 120 | 19 | 976 | python | [{"finding_id": "codeql_py/log-injection_1318daeb56993d73_2f9993fa", "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... | 9 | true | [
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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).",
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log entry depen... | [
46,
54,
84,
84,
86,
111,
111,
114,
117
] | [
null,
56,
null,
null,
null,
null,
null,
null,
null
] | [
60,
74,
42,
53,
74,
42,
53,
74,
81
] | [
111,
86,
45,
92,
113,
45,
92,
113,
120
] | |
2024-11-18T21:13:52.839785+00:00 | 1,644,290,650,000 | ec221a565c91227681e5929c8b4a1767d1a12241 | 2 | {
"blob_id": "ec221a565c91227681e5929c8b4a1767d1a12241",
"branch_name": "refs/heads/master",
"committer_date": 1644290650000,
"content_id": "9d81672cd660a17cd36afc29ff2b3c5f8af3c06a",
"detected_licenses": [
"MIT"
],
"directory_id": "635927988fcf5d1f1b919d35fa3be173a785aa22",
"extension": "py",
"fi... | 2.484375 | stackv2 | import json
import requests
from bottle import route, run, request
# Yoisho client credentials
client_id="7b6fc8ed5127b0b2f076d"
client_secret="724e6890757b0ae624684b70e111b705fe6b050c"
# Client app run details
port=8050
app_url="http://localhost:8050"
# The Yoisho OAuth server
oauth_url="http://backend.yoisho.dob.j... | 51 | 29.24 | 147 | 17 | 446 | python | [{"finding_id": "codeql_py/partial-ssrf_e8937725a9b4a41e_b84667e3", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
31
] | [
null
] | [
15
] | [
49
] | |
2024-11-18T21:13:56.883926+00:00 | 1,606,071,314,000 | 01a6480cfe7d49818382d9be066f3decd2ead2a8 | 2 | {
"blob_id": "01a6480cfe7d49818382d9be066f3decd2ead2a8",
"branch_name": "refs/heads/master",
"committer_date": 1606071314000,
"content_id": "f9261215f736afe487db0acea32723d93e931284",
"detected_licenses": [
"MIT"
],
"directory_id": "7240da977b9898cd7d203e7b424c2debaa57ed60",
"extension": "py",
"fi... | 2.328125 | stackv2 | from flask import Flask, flash, render_template, request, url_for, redirect
import jinja2
import os,sys
import matplotlib.pyplot as plt
import pandas as pd
pd.set_option('mode.chained_assignment', None)
import numpy as np
import sqlite3 as sql
from dbconnect import create_users_table,create_login_table,create_feedback_... | 229 | 32.16 | 135 | 24 | 1,766 | python | [{"finding_id": "codeql_py/flask-debug_80d40073934ba79e_5a5bfcc8", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 4 | true | [
"CWE-215",
"CWE-918",
"CWE-918",
"CWE-079"
] | [
"py/flask-debug",
"py/full-ssrf",
"py/full-ssrf",
"py/jinja2/autoescape-false"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"The full URL of this request depends on a [user-provided value](1).",
"The full URL of this request depends on a [user-provided value](1).",
"Using jinja2 templates with autoescape=False can... | [
229,
61,
65,
30
] | [
null,
null,
null,
null
] | [
5,
14,
18,
15
] | [
24,
37,
41,
56
] | |
2024-11-18T21:13:59.103401+00:00 | 1,519,604,875,000 | 17f783f454cf27a14959e975b836dea9f3882cb8 | 2 | {
"blob_id": "17f783f454cf27a14959e975b836dea9f3882cb8",
"branch_name": "refs/heads/master",
"committer_date": 1519604875000,
"content_id": "d2966c7bc8947b608278bd4a4c3ab98b067dfe25",
"detected_licenses": [
"MIT"
],
"directory_id": "5f95e73e4b272e98d714caee79800cf60267bef7",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/env python
import os
import paramiko
import sys
import time
import getpass
#TODO use config file with hosts if available
idracs = [{'idrac': '192.168.100.93', 'host': '192.168.100.30'},
{'idrac': '192.168.100.94', 'host': '192.168.100.40'},
{'idrac': '192.168.100.95', 'host': '192.168.1... | 46 | 30.5 | 74 | 19 | 455 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_968c27f066a9b6f2_dbbccfca", "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."
] | [
29
] | [
null
] | [
9
] | [
66
] | |
2024-11-18T21:14:20.807522+00:00 | 1,607,614,979,000 | 0b52ce9730d0370313d2fc4a03dd3ff16ff86b49 | 3 | {
"blob_id": "0b52ce9730d0370313d2fc4a03dd3ff16ff86b49",
"branch_name": "refs/heads/main",
"committer_date": 1607614979000,
"content_id": "3b474eea7f45092f53db5d2f068e93536b9f6388",
"detected_licenses": [
"MIT"
],
"directory_id": "cbe8791b177182daffab40052c21c57c2e988bbc",
"extension": "py",
"file... | 3.40625 | stackv2 | def finding_valid_passwords_old_policy(passwords):
num_valid = 0
for password in passwords:
policy = password.split(":")[0]
cur_pass = password.split(":")[1].strip()
let = policy[-1]
min_policy, max_policy = list(map(int, policy.split()[0].split("-")))
let_count = cur_pas... | 33 | 35.67 | 80 | 17 | 299 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_20dd7466f5ba285e_e059cc27", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
32,
33
] | [
null,
null
] | [
11,
11
] | [
56,
56
] | |
2024-11-18T21:14:23.525772+00:00 | 1,605,334,672,000 | f93b1599a92cb3000016b22c533ad93f93b5f47b | 2 | {
"blob_id": "f93b1599a92cb3000016b22c533ad93f93b5f47b",
"branch_name": "refs/heads/main",
"committer_date": 1605334672000,
"content_id": "2af04526f09e6d90cc552e175c8bdb21219a536d",
"detected_licenses": [
"MIT"
],
"directory_id": "cc4927bc500e2e40c53dfe1d956e49472f13d5dc",
"extension": "py",
"file... | 2.40625 | stackv2 | from datetime import datetime
from flask import Flask, render_template, request
import recommendation_code
app = Flask(__name__, template_folder='templates')
@app.after_request
def set_response_headers(r):
r.headers['Cache-Control'] = 'no-cache, no-store, must-revalidate'
r.headers['Pragma'] = 'no-cache'
... | 108 | 39.4 | 94 | 15 | 1,244 | python | [{"finding_id": "codeql_py/reflective-xss_3821b1cfa16d49ea_01a6c0f6", "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)."
] | [
33
] | [
null
] | [
12
] | [
25
] | |
2024-11-18T21:14:28.452078+00:00 | 1,610,374,986,000 | b5ae36a0406d9119da7c032a482197ff030aecae | 3 | {
"blob_id": "b5ae36a0406d9119da7c032a482197ff030aecae",
"branch_name": "refs/heads/master",
"committer_date": 1610374986000,
"content_id": "58f0156b14bc8785f43ae29280c289def2760f0d",
"detected_licenses": [
"MIT"
],
"directory_id": "5027db85e3ad745ec3d17c411c9bdd8a6896f44c",
"extension": "py",
"fi... | 2.6875 | stackv2 | import re
import os
from jinja2 import Template
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
class BaseGenerator:
def __init__(self, name, options):
self.name = name
self.options = options
self.python = 'python3'
self.pip = 'pip3'
self.templates_p... | 195 | 29.1 | 117 | 16 | 1,202 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5d685bbe9575ec0f_c30e8cf5", "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."
] | [
66
] | [
null
] | [
20
] | [
47
] | |
2024-11-18T21:14:39.936833+00:00 | 1,608,043,448,000 | f6398de72d4ee0d275fff61fa679b49a96e5ae90 | 2 | {
"blob_id": "f6398de72d4ee0d275fff61fa679b49a96e5ae90",
"branch_name": "refs/heads/master",
"committer_date": 1608043448000,
"content_id": "977d1e5b5113d44705e2ab9c3ae40a031200d0b5",
"detected_licenses": [
"MIT"
],
"directory_id": "4c273e5e598f932558724ca1e1478baf212b625e",
"extension": "py",
"fi... | 2.359375 | stackv2 | import requests
import json
from flask import request, Response
from tranql.backplane.api.standard_api import StandardAPIResource
from tranql.config import config
import string
import logging
logger = logging.getLogger(__name__)
#######################################################
##
## ICEES - Wrapping ICEES Clin... | 347 | 43.13 | 138 | 22 | 2,959 | python | [{"finding_id": "codeql_py/request-without-cert-validation_f50f53efeecbf4c3_e9e94274", "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]... | 5 | true | [
"CWE-295",
"CWE-295",
"CWE-918",
"CWE-117",
"CWE-117"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/partial-ssrf",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"Part of the URL of this request depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1).",
"This log... | [
88,
198,
267,
197,
213
] | [
90,
200,
null,
null,
null
] | [
20,
20,
21,
22,
25
] | [
26,
48,
43,
95,
70
] | |
2024-11-18T21:14:40.260466+00:00 | 1,592,941,704,000 | 352567c9a41be7b78b299c12a63138e36bde5348 | 3 | {
"blob_id": "352567c9a41be7b78b299c12a63138e36bde5348",
"branch_name": "refs/heads/master",
"committer_date": 1592941762000,
"content_id": "b9b306243ea6d1885f07370799bd548d4f5727db",
"detected_licenses": [
"Unlicense"
],
"directory_id": "45d191901136dc10e8365dbb6931402249aac3a7",
"extension": "py",... | 2.578125 | stackv2 | # -*- coding: utf-8 -*-
# dependencies
# lxml
# fritzconnection
# Call-Types
# 1-2 incoming?
# 3 out
# 10 blocked
# 11 call running at the moment
import html
import urllib.request
from lxml import etree
from typing import List
from random import randint, choice # only for mock
from datetime import datetime # ... | 264 | 42.46 | 136 | 23 | 2,681 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fa4e239741e3ce96_5dab2367", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text."
] | [
117
] | [
null
] | [
31
] | [
107
] | |
2024-11-18T20:10:38.543416+00:00 | 1,605,750,617,000 | b7967f153e7ae49168bd9fd9674610a3f3965f15 | 2 | {
"blob_id": "b7967f153e7ae49168bd9fd9674610a3f3965f15",
"branch_name": "refs/heads/main",
"committer_date": 1605750617000,
"content_id": "fdd90597eb45d7acad31f908d4e748995d5d945d",
"detected_licenses": [
"MIT"
],
"directory_id": "1e69b3fec8f5da58f68077e244fa83216306340d",
"extension": "py",
"file... | 2.46875 | stackv2 | from __future__ import print_function
import json
import base64
import boto3
import random
import uuid
import os
from datetime import datetime
print(os.listdir("/opt"))
print(os.listdir("/opt"))
import cv2
def sendSMS(faceId, phone, otp):
sns = boto3.client('sns',region_name= 'us-east-1')
url = "https://sm... | 279 | 31.33 | 112 | 21 | 2,136 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3386e863096bd358_254ecf03", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
19,
247
] | [
null,
null
] | [
11,
23
] | [
18,
44
] | |
2024-11-18T20:10:47.915696+00:00 | 1,671,091,896,000 | 44776ae98e6f4e7500b2950889f5b10b4f63ee87 | 3 | {
"blob_id": "44776ae98e6f4e7500b2950889f5b10b4f63ee87",
"branch_name": "refs/heads/master",
"committer_date": 1671091896000,
"content_id": "81c9a6de019c3ba3d46efe5fad2b888db87d93cb",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "ca26093ff9442f6273633cc81bac71bc3c39ca4e",
"extension": "p... | 3.421875 | stackv2 | import sys
def get_double_digits(value):
found = False
doubles = []
for pos in range(len(value) - 1):
if value[pos] == value[pos + 1]:
doubles.append(value[pos])
return set(doubles)
def get_triple_digits(value):
found = False
triplets = []
for pos in range(len(value) - ... | 49 | 28.78 | 74 | 14 | 359 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0f706bb2c058e186_f354f7b2", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text."
] | [
49
] | [
null
] | [
11
] | [
28
] | |
2024-11-18T20:10:49.132231+00:00 | 1,510,245,349,000 | a5e830d256302c122149b82d8b7e2264e8737002 | 3 | {
"blob_id": "a5e830d256302c122149b82d8b7e2264e8737002",
"branch_name": "refs/heads/master",
"committer_date": 1510245349000,
"content_id": "f15e7d065f36a531cb2043fc1bfa713b8257fc0e",
"detected_licenses": [
"MIT"
],
"directory_id": "73b6499858342edd56da39859948a70227a0467f",
"extension": "py",
"fi... | 2.671875 | stackv2 | import urllib.request
import requests
import json
from hashlib import md5
import configparser
import os
from time import gmtime, strftime
config = configparser.ConfigParser()
config.read("../halite.ini")
API_KEY = config.get("hce", "apiKey")
MANAGER_URL = config.get("hce", "managerURL")
def getTask():
"""Gets eit... | 99 | 35.78 | 159 | 15 | 910 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_64e71c270b645173_0cbda4b1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
43
] | [
null
] | [
15
] | [
40
] | |
2024-11-18T20:10:52.181183+00:00 | 1,544,668,881,000 | 27c8990ccf42b486bd8b6abd03099cc3821023be | 3 | {
"blob_id": "27c8990ccf42b486bd8b6abd03099cc3821023be",
"branch_name": "refs/heads/master",
"committer_date": 1544668881000,
"content_id": "c9fc0b5781dbbbe51662fb5d323a222091e1f13c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "93fded53e02d65a4b03497a5b2228e6e74d0a5b1",
"extension": "py"... | 2.90625 | stackv2 | import re
phoneNumber = """
park 010-9999-9988
kim 010-9909-7789
lee 010-8789-7768
"""
pnbr = re.compile("(\w{3})[-](\w{4})[-](\w{4})")
print(pnbr.sub("\g<1>-\g<2>-####",phoneNumber))
data = """
park@naver.com
kim@daum.net
lee@myhome.co.kr
"""
dat = re.compile(".*[@].*[.](?:com$|net$).*$",re.MULTILINE)
for i in dat.... | 31 | 17.32 | 59 | 9 | 245 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f705f10b3f64defa_eba8188c", "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."
] | [
9
] | [
null
] | [
7
] | [
47
] | |
2024-11-18T20:10:55.850111+00:00 | 1,629,742,400,000 | 14bd0576295b3de1a5d21e25903551edd26895a2 | 2 | {
"blob_id": "14bd0576295b3de1a5d21e25903551edd26895a2",
"branch_name": "refs/heads/main",
"committer_date": 1629742400000,
"content_id": "342ddab1f5d3861329f4968ad9fb5f1e15749ffb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "75146fd01510cb07cc3accc9d30cc19ed4a3ec49",
"extension": "py",
... | 2.375 | stackv2 | import os
import random
from flask import Flask, request, make_response
from slack import WebClient
from slackeventsapi import SlackEventAdapter
app = Flask(__name__)
SLACKBOT_TOKEN = os.environ['SLACKBOT_TOKEN']
SLACK_EVENTS_TOKEN = os.environ['SLACK_EVENTS_TOKEN']
slack_web_client = WebClient(SLACKBOT_TOKEN)
slack... | 65 | 23.26 | 62 | 13 | 380 | python | [{"finding_id": "codeql_py/reflective-xss_43d9e02d2d12a579_4e351375", "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)."
] | [
30
] | [
null
] | [
13
] | [
37
] | |
2024-11-18T20:48:06.882708+00:00 | 1,624,983,918,000 | 91aaba9643a44f538080f9f499dd5d43c2b907ba | 2 | {
"blob_id": "91aaba9643a44f538080f9f499dd5d43c2b907ba",
"branch_name": "refs/heads/master",
"committer_date": 1624983918000,
"content_id": "c1bb536588a46b6acc80c596121769d5d81b649f",
"detected_licenses": [
"Unlicense"
],
"directory_id": "e0beeb9c0fbcca34f09cec90591a13b648cb83ff",
"extension": "py",... | 2.390625 | stackv2 | from . import base
import io, os, shutil, subprocess, tarfile, tempfile
def run(cmd, cwd):
p = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = p.communicate()
stdout = stdout.decode('utf-8', 'replace')
stderr = stderr.decode('utf-8', 'replace')
... | 124 | 36.54 | 80 | 22 | 890 | python | [{"finding_id": "codeql_py/tarslip_9d707c11a002b32d_86d62028", "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)."
] | [
49
] | [
null
] | [
21
] | [
22
] | |
2024-11-18T20:48:19.957151+00:00 | 1,535,756,457,000 | 6b6fc88704efd38ea2ae4f80e08c30c4115f83a0 | 3 | {
"blob_id": "6b6fc88704efd38ea2ae4f80e08c30c4115f83a0",
"branch_name": "refs/heads/master",
"committer_date": 1535756457000,
"content_id": "5df91c0f09c12f54c6763f2bce3cbe15a6cec0c6",
"detected_licenses": [
"MIT",
"Python-2.0"
],
"directory_id": "3fb8f01a310706e5f31b6074c1769ec3d594c29a",
"exten... | 2.6875 | stackv2 | # -*- coding: utf-8 -*-
import re
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.header import Header
def send_email(server, port, ssl, user, password, to, subject, body):
"""Send html or text email.
Args:
server (str): SMTP server.
... | 39 | 30.67 | 90 | 11 | 334 | python | [{"finding_id": "codeql_py/redos_804d0a66dfdc3e30_3a7a6b3f", "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 '<a a=\"' and containing many repe... | 2 | true | [
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<a a=\"' and containing many repetitions of '\" a=\"'.",
"This part of the regular expression may cause exponential backtracking on strings starting with '<a a='' and containing many repetitions of '' a=''."
] | [
32,
32
] | [
null,
null
] | [
50,
56
] | [
53,
59
] | |
2024-11-18T21:11:26.051706+00:00 | 1,497,666,211,000 | c919da047350226da877904fb85a19aa867906e2 | 3 | {
"blob_id": "c919da047350226da877904fb85a19aa867906e2",
"branch_name": "refs/heads/master",
"committer_date": 1497666211000,
"content_id": "30df3124f982518f56b980208e71c6353f00fb22",
"detected_licenses": [
"MIT"
],
"directory_id": "c90ea78a9df85ee2a0e1951a8cace77d9f27f2bb",
"extension": "py",
"fi... | 2.921875 | stackv2 | from ConfigParser import SafeConfigParser
import os, sys
from Crypto.Protocol.KDF import PBKDF2
from Crypto.Hash import SHA256
__doc__ = """Key manager module"""
def make(pwd):
password = pwd
for i in range(565432):
hash = SHA256.new()
hash.update(password)
password = hash.digest()
... | 64 | 27.12 | 127 | 15 | 441 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_904fe337654374ce_e0704833", "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.\... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-327"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"[Sensitive data (password)]... | [
50,
58,
13
] | [
null,
null,
null
] | [
31,
31,
21
] | [
43,
39,
29
] | |
2024-11-18T21:11:33.081660+00:00 | 1,610,787,215,000 | 6ed3241d0ca2109557c6fcabfce65d0ff3786c34 | 3 | {
"blob_id": "6ed3241d0ca2109557c6fcabfce65d0ff3786c34",
"branch_name": "refs/heads/master",
"committer_date": 1610787215000,
"content_id": "7ef12a2a9f5cf9a9662816000452d8f2cc96a5ed",
"detected_licenses": [
"MIT"
],
"directory_id": "49c77512be78175fa7ba0716d86988b3c2c14b55",
"extension": "py",
"fi... | 2.9375 | stackv2 | import sqlite3
import hashlib
def validate(username, password):
con = sqlite3.connect('../news.db')
completion = None
with con:
cur = con.cursor()
cur.execute("SELECT * FROM user")
rows = cur.fetchall()
for row in rows:
if row is not None:
dbUser... | 26 | 26.46 | 65 | 16 | 144 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e654b3b04ca92757_e9076c79", "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... | [
24
] | [
null
] | [
28
] | [
45
] | |
2024-11-18T21:11:44.374932+00:00 | 1,532,261,078,000 | b586545ee84ff260b97c51abb258b0a4edab5061 | 2 | {
"blob_id": "b586545ee84ff260b97c51abb258b0a4edab5061",
"branch_name": "refs/heads/master",
"committer_date": 1532261078000,
"content_id": "358b6674ecaed25b6f83f2ac5bd5ca6e9b61f13c",
"detected_licenses": [
"MIT"
],
"directory_id": "80004bb3168eae83c1fd2c8269fbfb274728ad41",
"extension": "py",
"fi... | 2.5 | stackv2 | from typing import Optional
import email
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.asymmetric import rsa, padding
from cryptography.hazmat.primitives.ciphers.algorithms import TripleDES, AES
from cryptography.hazmat.primitives.ciphers import Cipher, modes
from email.me... | 73 | 41.59 | 117 | 11 | 704 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_9a57c5bfcc852cea_04f61b87", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm TRIPLEDES](1) is broken or weak, and should not be used... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The cryptographic algorithm TRIPLEDES](1) is broken or weak, and should not be used."
] | [
70
] | [
null
] | [
22
] | [
63
] | |
2024-11-18T21:25:55.942477+00:00 | 1,608,554,390,000 | 9042a4873168d78ee89cc9b81f4879e13f3b37e7 | 3 | {
"blob_id": "9042a4873168d78ee89cc9b81f4879e13f3b37e7",
"branch_name": "refs/heads/main",
"committer_date": 1608554390000,
"content_id": "e04db03fc580031f61e09c98929cc18a2c4c119f",
"detected_licenses": [
"MIT"
],
"directory_id": "5d9706522823afd1bed97da9026a2ade622edd13",
"extension": "py",
"file... | 2.703125 | stackv2 | #!/usr/bin/python3
import os
import random
import time
from pamfax import PamFax
# Either configure it manually or by using an external config.py file
if os.path.isfile('./config.py'):
from config import HOST, USERNAME, PASSWORD, APIKEY, APISECRET
else:
HOST = 'api.pamfax.biz' # Either (testing) sandbox-api... | 60 | 31.3 | 112 | 13 | 507 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4667e47c4d798b0c_d158acb8", "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."
] | [
29
] | [
null
] | [
11
] | [
31
] | |
2024-11-18T21:25:59.766238+00:00 | 1,609,507,952,000 | 0f3d6727bf2cbf7a490b6f3f3ac0d1576bb2c599 | 2 | {
"blob_id": "0f3d6727bf2cbf7a490b6f3f3ac0d1576bb2c599",
"branch_name": "refs/heads/master",
"committer_date": 1609507952000,
"content_id": "ab148b11ae6617a04fe4b13e3b22ec3301e73c5f",
"detected_licenses": [
"MIT"
],
"directory_id": "a9cfd50610832ca326f331a1f929dbea57d496c3",
"extension": "py",
"fi... | 2.375 | stackv2 | import locale
from datetime import date
import requests
from bs4 import BeautifulSoup
def get_client_type_history(symbol_id):
raw = requests.get(f'http://www.tsetmc.com/tsev2/data/clienttype.aspx?i={symbol_id}',
timeout=20, verify=False).text
raw_client_type_history = raw.split(';')
... | 72 | 28.44 | 107 | 19 | 555 | python | [{"finding_id": "codeql_py/request-without-cert-validation_323058ac51aaf387_47bee039", "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)."
] | [
9,
21,
47
] | [
10,
22,
48
] | [
11,
11,
11
] | [
49,
37,
49
] | |
2024-11-18T21:52:24.972801+00:00 | 1,495,457,975,000 | b99b0cbe35af0ec6cdc7039eedec2c7993e6dfaa | 3 | {
"blob_id": "b99b0cbe35af0ec6cdc7039eedec2c7993e6dfaa",
"branch_name": "refs/heads/master",
"committer_date": 1495457975000,
"content_id": "219ebc1fcb0b33ac139e6e6918bdeb2f7b3dcec3",
"detected_licenses": [
"MIT"
],
"directory_id": "7fd29712ff3c9ee778c0694af98d45d3a3dbcebc",
"extension": "py",
"fi... | 3.203125 | stackv2 | """
:mod:`zsl.utils.string_helper`
------------------------------
.. moduleauthor:: Martin Babka
"""
from __future__ import unicode_literals
from builtins import str
from builtins import range
import re
import random
import string
_html_tag_re = re.compile(r'''</?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s... | 153 | 23.67 | 117 | 15 | 1,046 | python | [{"finding_id": "codeql_py/redos_cdd2085669de349c_43634341", "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 '<a a=\"' and containing many repe... | 4 | true | [
"CWE-1333",
"CWE-1333",
"CWE-1333",
"CWE-1333"
] | [
"py/redos",
"py/redos",
"py/redos",
"py/redos"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '<a a=\"' and containing many repetitions of '\" a=\"'.",
"This part of the regular expression may cause exponential backtracking on strings starting with '<a a='' and containing many repetitions of '' a=''.",
"This... | [
14,
14,
16,
16
] | [
null,
null,
null,
null
] | [
57,
63,
35,
41
] | [
60,
66,
38,
44
] | |
2024-11-18T21:52:31.005782+00:00 | 1,571,797,090,000 | 8f6bbe0044bd513445d4bc8c81873f44d43aa7cf | 4 | {
"blob_id": "8f6bbe0044bd513445d4bc8c81873f44d43aa7cf",
"branch_name": "refs/heads/master",
"committer_date": 1571797090000,
"content_id": "b623e66a238dc5ef3e7967b4b7d55f5c841bf3f6",
"detected_licenses": [
"MIT"
],
"directory_id": "18783303fec404a4386c8ed0a8b8737c1424eadd",
"extension": "py",
"fi... | 3.890625 | stackv2 | # -*- coding: utf-8 -*-
"""
Created on Tue Nov 21 20:24:14 2017
@author: User
"""
import gc #kind of brute force implementation to list all instances of a class
# look into weak references as well
class SchoolMember:
Population = 0
@classmethod # added this to keep a count of how many members in total
... | 87 | 26.61 | 101 | 14 | 574 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_63f8a8618a3d9b35_b63f463b", "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."
] | [
44
] | [
null
] | [
15
] | [
47
] | |
2024-11-18T20:31:31.006831+00:00 | 1,581,061,405,000 | f5ea9c26f721415df0ee56c2d215edc56cb45c0e | 3 | {
"blob_id": "f5ea9c26f721415df0ee56c2d215edc56cb45c0e",
"branch_name": "refs/heads/master",
"committer_date": 1581061405000,
"content_id": "e8842c54639a21703e8f6f813f25649e6c0b135e",
"detected_licenses": [
"MIT"
],
"directory_id": "3657b4ad34df7990f8b27ddbfd3a52856b61751f",
"extension": "py",
"fi... | 2.640625 | stackv2 | """Wrapper commands for Windows netsh wlan utility
Copyright (c) 2020 Alex Puffer. All rights reserved.
This work is licensed under the terms of the MIT license.
For a copy, see <https://opensource.org/licenses/MIT>.
"""
import logging
import os
import re
import subprocess
from typing import List, NamedTuple, Union
... | 251 | 30.36 | 107 | 17 | 1,705 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f9e57b608e8afd20_422ad8ab", "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."
] | [
92
] | [
null
] | [
27
] | [
33
] | |
2024-11-18T20:59:47.464156+00:00 | 1,386,745,423,000 | 61d3f869a369a1e846bbd62152882a69c4c362ea | 2 | {
"blob_id": "61d3f869a369a1e846bbd62152882a69c4c362ea",
"branch_name": "refs/heads/master",
"committer_date": 1386745423000,
"content_id": "edcc5607e8a54e24a684f9f8117e785684734cd4",
"detected_licenses": [
"MIT"
],
"directory_id": "9d71a0268724c37aa691463a0e253190bd487240",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import render_template, flash, request, session, redirect, g, abort
from routes import app
class User(object):
def __init__(self, username): # load
matches = app.db.execute('SELECT * FROM APP_USER WHERE Username=%s', username)
self.name, self.id, self.description, self.latitude, self.... | 91 | 31.87 | 116 | 15 | 658 | python | [{"finding_id": "codeql_py/url-redirection_f0d1ea2775cdc187_531f62e8", "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)."
] | [
54
] | [
null
] | [
21
] | [
41
] | |
2024-11-18T21:10:40.085127+00:00 | 1,619,639,213,000 | 4721bb5b6ea4828497f23dde0d3b9f7a5cc795f8 | 4 | {
"blob_id": "4721bb5b6ea4828497f23dde0d3b9f7a5cc795f8",
"branch_name": "refs/heads/main",
"committer_date": 1619639213000,
"content_id": "54098b8e9551fb936a4a5eed5333e8b477eeee7b",
"detected_licenses": [
"Unlicense"
],
"directory_id": "e12f70d26258a8c48048f6adf467dce11139fedc",
"extension": "py",
... | 4.34375 | stackv2 | def input_gender():
while True:
gender = str(input("\nAre you MALE or FEMALE? ")).lower()
if gender == "male":
return gender
elif gender == "female":
return gender
else:
print(f"Invalid input {gender}. ")
continue
def input_stats()... | 100 | 28.2 | 149 | 16 | 749 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_24a68feaf41e7bef_aa62deb6", "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."
] | [
12
] | [
null
] | [
19
] | [
46
] | |
2024-11-18T21:10:50.613718+00:00 | 1,607,803,712,000 | 2e41ecbbc564d10a509175e2909723bdd08261aa | 2 | {
"blob_id": "2e41ecbbc564d10a509175e2909723bdd08261aa",
"branch_name": "refs/heads/main",
"committer_date": 1607803712000,
"content_id": "17c8a2c4cecfe7ef37f0c61424b95e5166242993",
"detected_licenses": [
"MIT"
],
"directory_id": "6f1a48da3820bd5251f64c4cab7416ae69a5a05a",
"extension": "py",
"file... | 2.40625 | stackv2 | import json
import locale
import logging
import pathlib
import random
from bs4 import BeautifulSoup
class ScrapeResult:
def __init__(self, r):
self.alert_subject = None
self.alert_content = None
self.price = None
self.soup = BeautifulSoup(r.text, 'lxml')
self.content = sel... | 183 | 27.8 | 158 | 17 | 1,245 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_1b57fead217ca2a1_3b42cc58", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [bol.com](1) may be at an arbitrary position in the san... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [bol.com](1) may be at an arbitrary position in the sanitized URL."
] | [
141
] | [
null
] | [
10
] | [
33
] | |
2024-11-18T21:10:55.469534+00:00 | 1,540,790,314,000 | 6a4f07637454b24d5d3b2f08c982098fdbbf75e0 | 2 | {
"blob_id": "6a4f07637454b24d5d3b2f08c982098fdbbf75e0",
"branch_name": "refs/heads/master",
"committer_date": 1540790314000,
"content_id": "3b733322c650b7c326d22a363a9e9df64c36c864",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "16631ca34b52392770b8facefe7f1c06e90a1cc1",
"extension": "py"... | 2.359375 | stackv2 | def insertCell(table_id, userid, appid, ymd, column_family_id, col, val):
import os
import sys
import pip
import site
reload(site)
import settings
reload(settings)
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = settings.credentials
from google.cloud import bigtable
project_id = s... | 71 | 31.83 | 141 | 21 | 568 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_3a65d0412e5dcab8_28e9d0bd", "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.",... | 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.",
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
26,
64
] | [
null,
null
] | [
31,
31
] | [
98,
98
] | |
2024-11-18T21:23:47.199566+00:00 | 1,536,815,201,000 | 9684a2f003bbbb2469e471f3b1fa5512ada07b90 | 3 | {
"blob_id": "9684a2f003bbbb2469e471f3b1fa5512ada07b90",
"branch_name": "refs/heads/master",
"committer_date": 1536815201000,
"content_id": "96be9b56575636c3009d9a1d0f54ebc42aef4cb3",
"detected_licenses": [
"MIT"
],
"directory_id": "f87d6d078e5571cf8c630ef62eb88b5f5dac37f7",
"extension": "py",
"fi... | 2.8125 | stackv2 | """
remotes.py
The client and web server needed to control a car remotely.
"""
import time
from datetime import datetime
import json
import io
import os
import copy
import math
from threading import Thread
import numpy as np
import requests
import tornado.ioloop
import tornado.web
import tornado.gen
from PIL impor... | 559 | 28.62 | 140 | 20 | 3,667 | python | [{"finding_id": "codeql_py/path-injection_7a1988ac8a08d11e_f1279f8b", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 3 | true | [
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
494,
528,
543
] | [
null,
null,
null
] | [
119,
27,
19
] | [
123,
48,
27
] | |
2024-11-18T21:23:49.771267+00:00 | 1,622,403,569,000 | ecdb3487349b156acd68a39cf95cf01f914d7d1c | 3 | {
"blob_id": "ecdb3487349b156acd68a39cf95cf01f914d7d1c",
"branch_name": "refs/heads/master",
"committer_date": 1622403569000,
"content_id": "2381c410ab2632dea82f24c6ccb2fbe513255e8b",
"detected_licenses": [
"MIT"
],
"directory_id": "cfb0f9d95e58a63f2bac45db5da8361e92b46295",
"extension": "py",
"fi... | 2.703125 | stackv2 | import psycopg2
import json
import logging
import hashlib
import datetime
from base64 import b64encode
class YourFactoryDB:
def __init__(self, host=None, database_url=None, database=None, user=None,
password=None, port=5432):
self.host = host
self.database_url = database_url
... | 154 | 31.71 | 80 | 19 | 1,033 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_6baba395ba2d81e6_e286f40c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
48,
78
] | [
null,
null
] | [
13,
17
] | [
46,
50
] | |
2024-11-18T21:37:19.765772+00:00 | 1,555,733,269,000 | eb5523f988af9e4a405fa72d056b4e772dd4fa54 | 2 | {
"blob_id": "eb5523f988af9e4a405fa72d056b4e772dd4fa54",
"branch_name": "refs/heads/master",
"committer_date": 1555733294000,
"content_id": "7ef131e518973cae06da85166135c5159be8eef6",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7410c96bbc3414ac7c42c0b7c6847f54fdadbc28",
"extension": "py"... | 2.421875 | stackv2 | from flask import jsonify, request, Response
from app import app
@app.route("/api/v1/validate/pod/readiness", methods=["POST"])
def pod_readiness():
"""
:return: (http) response
"""
allowed = True
result = ""
data = request.json # K8s spec sent in url body by admission controller
try:
... | 36 | 25.36 | 76 | 15 | 205 | python | [{"finding_id": "codeql_py/stack-trace-exposure_858831eeea7cfb16_3e83aede", "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."
] | [
22
] | [
29
] | [
20
] | [
6
] | |
2024-11-18T21:59:20.374501+00:00 | 1,675,067,409,000 | b84c8f8ec6ec2728f2f70c343d56f1c105960dca | 2 | {
"blob_id": "b84c8f8ec6ec2728f2f70c343d56f1c105960dca",
"branch_name": "refs/heads/master",
"committer_date": 1675067409000,
"content_id": "d42b672b3c938a43396e2d39aa7b3723d2a7ecac",
"detected_licenses": [
"MIT"
],
"directory_id": "3a17c6c71a11546ec376832a2dcd32d8a87abeff",
"extension": "py",
"fi... | 2.40625 | stackv2 | from urllib import request
from django import forms
from django.core.files.base import ContentFile
from django.utils.text import slugify
from .models import Image
class ImageCreateForm(forms.ModelForm):
class Meta:
model = Image
fields = ('title', 'url', 'description')
widgets = {
... | 41 | 31.78 | 72 | 14 | 262 | python | [{"finding_id": "codeql_py/full-ssrf_1047750e4c959628_3f169cc1", "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)."
] | [
35
] | [
null
] | [
20
] | [
46
] | |
2024-11-18T22:11:52.987663+00:00 | 1,523,911,451,000 | e74fcb39c3a4e7ccf3ea84650302c1fda80c2968 | 3 | {
"blob_id": "e74fcb39c3a4e7ccf3ea84650302c1fda80c2968",
"branch_name": "refs/heads/master",
"committer_date": 1523911451000,
"content_id": "a3bd6b17707831b096b6909941d765dd2575f4c6",
"detected_licenses": [
"Zlib"
],
"directory_id": "4f89f8a0ce11a3c8c210aa4d95b727c9f9890be4",
"extension": "py",
"f... | 2.75 | stackv2 | # -*- coding: utf-8 -*-
import os
from hashlib import blake2b
from functools import wraps, partial
from datetime import datetime, timedelta
from urllib.parse import urlparse, parse_qs, urljoin
from tornado.web import RequestHandler, HTTPError
from pymongo.errors import DuplicateKeyError
class BaseHandler(RequestHa... | 224 | 32.1 | 76 | 16 | 1,633 | python | [{"finding_id": "codeql_py/reflective-xss_93c57043a4506b4c_69e012e7", "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)."
] | [
215
] | [
null
] | [
20
] | [
44
] | |
2024-11-18T22:24:02.959784+00:00 | 1,597,353,601,000 | f5837984a250ed1d2867f18d0b908dd35d946caa | 4 | {
"blob_id": "f5837984a250ed1d2867f18d0b908dd35d946caa",
"branch_name": "refs/heads/master",
"committer_date": 1597353601000,
"content_id": "7cffc6c26be036bd300ca28f57e0c969daf83e31",
"detected_licenses": [
"MIT"
],
"directory_id": "648f5af4f4e95b0f7ad4943254abcacfe520c685",
"extension": "py",
"fi... | 4.375 | stackv2 | # Write a function called generate_password that selects three random words from the list of words
# word_list and concatenates them into a single string. Your function should not accept any
# arguments and should reference the global variable word_list to build the password.
# Use an import statement at the top
im... | 53 | 25.89 | 99 | 12 | 302 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a6a05c7f5d746e88_1478de04", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text."
] | [
53
] | [
null
] | [
7
] | [
26
] | |
2024-11-18T22:24:09.913234+00:00 | 1,629,016,623,000 | 2fa7113c9a3006553fae24cfbc53194472c60d44 | 3 | {
"blob_id": "2fa7113c9a3006553fae24cfbc53194472c60d44",
"branch_name": "refs/heads/main",
"committer_date": 1629016623000,
"content_id": "0bf55e7c458f0558d5da1712e4db0c6454406298",
"detected_licenses": [
"MIT"
],
"directory_id": "1641ac5df84939fb84e75b0a764b93099c42d34b",
"extension": "py",
"file... | 2.71875 | stackv2 | from jinja2 import Environment, FileSystemLoader
import jinja2_stringcase
import stringcase
import csv
import openpyxl
from gencode.internal import default
import gencode.text_helpers as text_helpers
import os
# Config Loading
class SourceConfig:
def __init__(self) -> None:
self.tables = []
self.... | 146 | 28.4 | 119 | 16 | 984 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_35372c4523361125_b0ed89d2", "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."
] | [
30
] | [
31
] | [
15
] | [
54
] | |
2024-11-18T22:24:24.664173+00:00 | 1,608,218,984,000 | 7b3584a4d77beb74e7f7d5d261cb8209bef57ffc | 3 | {
"blob_id": "7b3584a4d77beb74e7f7d5d261cb8209bef57ffc",
"branch_name": "refs/heads/main",
"committer_date": 1608218984000,
"content_id": "16393c97132ce41b524c40c88e269cfe39a79d08",
"detected_licenses": [
"MIT"
],
"directory_id": "680a45eed9c6686dfa40c881af50359050531568",
"extension": "py",
"file... | 2.78125 | stackv2 | import hashlib
import os
import platform
import mysql.connector as db
# TODO: Add an exit method for closing connection of db when it's called.
class Database:
def __init__(self):
try:
self.connection = db.connect(host='ENTER YOUR HOST IP',
user='ENTER... | 129 | 33.43 | 113 | 16 | 936 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_852bf2efd701cda0_52d10745", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e... | [
22
] | [
null
] | [
36
] | [
53
] | |
2024-11-18T22:24:25.250463+00:00 | 1,512,413,303,000 | da379f32efefaf2d34ee8f8e4bd9156bd0931c2c | 2 | {
"blob_id": "da379f32efefaf2d34ee8f8e4bd9156bd0931c2c",
"branch_name": "refs/heads/master",
"committer_date": 1512413303000,
"content_id": "ba540ee258962f71d0c8a278a47c167ebf66d3b2",
"detected_licenses": [
"MIT"
],
"directory_id": "826bc4f5dd57899f188dc14f478b76286a42ae1a",
"extension": "py",
"fi... | 2.328125 | stackv2 | import xml.etree.ElementTree as ET
class HistoryFinder(object):
def __init__(self, number):
self.number = number
self.indices = []
with open("../found-bad-people/{0}-common-people".format(str(number))) as f:
for line in f:
self.indices.append(int((line.strip('\n').split(' ')[-1])))
self.root = ET.parse... | 23 | 27.7 | 85 | 23 | 194 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_530d382e62fbb5b4_bda138d0", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression stores [sensitive data (private)](1) as clear text."
] | [
20
] | [
null
] | [
13
] | [
21
] | |
2024-11-18T22:24:25.549047+00:00 | 1,563,730,641,000 | f2dd44359f4d3acbc8f9e42120f0b3b4f5349031 | 3 | {
"blob_id": "f2dd44359f4d3acbc8f9e42120f0b3b4f5349031",
"branch_name": "refs/heads/master",
"committer_date": 1563730641000,
"content_id": "9c4b116aa87a149133566d0ea5e725ba9e977531",
"detected_licenses": [
"MIT"
],
"directory_id": "48f7c76f8aa2be9d1876e703503c237f10731085",
"extension": "py",
"fi... | 2.65625 | stackv2 | #!/usr/bin/env python3
import logging as log
import eventlet.wsgi
import socketio
from flask import Flask, render_template
from minesweeper import *
sio = socketio.Server()
app = Flask(__name__)
# Game instances (identifier is the sid)
games = {}
# Player names (identifier is the sid)
names = {}
@app.route('/')
de... | 179 | 32.45 | 118 | 17 | 1,394 | python | [{"finding_id": "codeql_py/log-injection_4254c16d8c09e955_474826ab", "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... | 4 | true | [
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"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).",
"This log entry depends on a [user-provided value](1)."
] | [
55,
82,
99,
117
] | [
null,
null,
null,
null
] | [
18,
22,
22,
22
] | [
93,
105,
107,
102
] | |
2024-11-18T22:24:26.852331+00:00 | 1,517,237,124,000 | 9a201520d9b3183f8739f3a46582fcea4f57f5bc | 2 | {
"blob_id": "9a201520d9b3183f8739f3a46582fcea4f57f5bc",
"branch_name": "refs/heads/master",
"committer_date": 1517237124000,
"content_id": "68a286bfc2ae46e58481f9844a4789fb5b0a248a",
"detected_licenses": [
"MIT"
],
"directory_id": "10d7509760678fd8aae8ad39f2088f78359412cf",
"extension": "py",
"fi... | 2.34375 | stackv2 | import json
from flask import (request, Response, abort, render_template,
flash, redirect, url_for, session)
import pyhtml2md
from github import Github
from hyde.app import app
import git
from git import Repo
def write_header(header):
s = ''
head_list = []
head_list.append('---\n')
... | 205 | 30.05 | 79 | 14 | 1,494 | python | [{"finding_id": "codeql_py/path-injection_10b61ffd83380d11_dbc90bee", "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)."
] | [
160
] | [
null
] | [
15
] | [
32
] | |
2024-11-18T22:24:28.327482+00:00 | 1,626,116,801,000 | f485974aa05ba791629433722de8fc32b8d1020f | 2 | {
"blob_id": "f485974aa05ba791629433722de8fc32b8d1020f",
"branch_name": "refs/heads/master",
"committer_date": 1626116801000,
"content_id": "7a77186afe7d534d4cc349d541f9905bb6eb1670",
"detected_licenses": [
"MIT"
],
"directory_id": "303d3a1b8c4effd231a1b0ea9038e1cff4611b23",
"extension": "py",
"fi... | 2.328125 | stackv2 | from flask import (
render_template, url_for, redirect, request, flash, session)
from flask_babel import get_locale, refresh, _
from flask_login import current_user, login_user, logout_user, login_required
from werkzeug.urls import url_parse
from web import app, db, login_manager
from web.forms import Registration... | 103 | 25.48 | 77 | 16 | 563 | python | [{"finding_id": "codeql_py/url-redirection_d4a3941f70fcd7a1_1fe3db0c", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
27,
40
] | [
null,
null
] | [
25,
25
] | [
34,
34
] | |
2024-11-18T22:36:36.343134+00:00 | 1,561,021,192,000 | 3ec782ec5732885134ae4ef163a1fe2628b7a5c9 | 3 | {
"blob_id": "3ec782ec5732885134ae4ef163a1fe2628b7a5c9",
"branch_name": "refs/heads/master",
"committer_date": 1561021192000,
"content_id": "5f8b076e028cc5027c4d74c0afb8b624e24bf096",
"detected_licenses": [
"MIT"
],
"directory_id": "f25ca5e5081c1d7579d1f597275177f01da0f98d",
"extension": "py",
"fi... | 2.796875 | stackv2 | #!/usr/bin/env python
import re
import subprocess
import sys
try:
from itertools import izip_longest as zip_longest
except ImportError:
from itertools import zip_longest
def cmd(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = proc.commu... | 94 | 24.27 | 97 | 15 | 642 | python | [{"finding_id": "codeql_py/overly-large-range_5193c081dfa3730b_bdabe14d", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
36
] | [
null
] | [
46
] | [
49
] | |
2024-11-18T22:36:47.864740+00:00 | 1,424,251,179,000 | 454fb5d07c9273760fca69799611ab810333b562 | 2 | {
"blob_id": "454fb5d07c9273760fca69799611ab810333b562",
"branch_name": "refs/heads/master",
"committer_date": 1424251762000,
"content_id": "6e76886a4fa211909ee46fbd04f12596babd15bb",
"detected_licenses": [
"MIT"
],
"directory_id": "607d7d73204787fa487c253be5e8b3e7e2697cc2",
"extension": "py",
"fi... | 2.46875 | stackv2 | from django.db import models
from django.conf import settings
import sys, re
def replace_newlines_string(string):
"""Replace all the newlines (\n) by <br/> in a string"""
text = ""
text_splitted = string.split("\n")
length = len(text_splitted)
i = 0
for line in text_splitted:
i += 1
line = line.replace... | 74 | 22.89 | 79 | 14 | 516 | python | [{"finding_id": "codeql_py/bad-tag-filter_8e10100269dfafcd_e72cbf94", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match script end tags like </script\\t\\n bar>.", "remediation": "", "location"... | 2 | true | [
"CWE-116",
"CWE-116"
] | [
"py/bad-tag-filter",
"py/bad-tag-filter"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This regular expression does not match script end tags like </script\\t\\n bar>.",
"This regular expression matches <script></script>, but not <script \\n></script>"
] | [
70,
71
] | [
null,
null
] | [
20,
20
] | [
67,
43
] | |
2024-11-18T20:23:35.674779+00:00 | 1,592,281,184,000 | d2e1755457ff2eb9bb808d2cbc285259dafc4765 | 2 | {
"blob_id": "d2e1755457ff2eb9bb808d2cbc285259dafc4765",
"branch_name": "refs/heads/master",
"committer_date": 1592281184000,
"content_id": "d0d4e853f98bdddf17851353446cbb598a7ad306",
"detected_licenses": [
"Unlicense"
],
"directory_id": "52d39f0fb4ea535ee6520d299b362273d9f9cc3a",
"extension": "py",... | 2.484375 | stackv2 | # This script updates the certificate for the ASRock Rack IPMI web interface. ASRock does not use the standard Redfish
# API schema so we can"t just run the redfish Python module.
import os
import sys
import argparse
import configparser
import logging
import requests
import json
from urllib.parse import urlparse
REQU... | 321 | 33.93 | 120 | 13 | 2,521 | python | [{"finding_id": "codeql_py/request-without-cert-validation_1e9371a2726044ae_3b8815e1", "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]... | 4 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
44,
69,
90,
130
] | [
null,
null,
null,
null
] | [
18,
18,
18,
18
] | [
92,
83,
83,
99
] | |
2024-11-18T20:23:41.664105+00:00 | 1,465,029,655,000 | 5df39caebbdd8c7058e3e11c45107415667e3bd3 | 3 | {
"blob_id": "5df39caebbdd8c7058e3e11c45107415667e3bd3",
"branch_name": "refs/heads/master",
"committer_date": 1465029655000,
"content_id": "e71088bb62184b72d1cefcad291e007a885372f8",
"detected_licenses": [
"MIT"
],
"directory_id": "ac5b24abd8afb2f9cded95f07d446a16f035690f",
"extension": "py",
"fi... | 2.84375 | stackv2 | import logging
import requests
import types
from optparse import OptionParser
from retrying import retry
from urlparse import urljoin
headers = {'session': None}
secret_message = []
def main():
"""Solve the shopcurbside.com challenge."""
global headers, secret_message
usage = 'usage: %prog [options]'
parser = Opt... | 86 | 35.06 | 130 | 18 | 719 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_762aac3d3882b505_88b64d97", "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."
] | [
65
] | [
null
] | [
17
] | [
79
] | |
2024-11-18T21:22:12.334964+00:00 | 1,612,811,473,000 | c3e00d40448ab00ee4fc6be13bfef5edc35eea74 | 3 | {
"blob_id": "c3e00d40448ab00ee4fc6be13bfef5edc35eea74",
"branch_name": "refs/heads/main",
"committer_date": 1612811473000,
"content_id": "678a580127c12eb96e140fcdf3a0fa4e977442ce",
"detected_licenses": [
"MIT"
],
"directory_id": "0dcba0cb5277820a1c126b14d8a277a67f21bae6",
"extension": "py",
"file... | 2.71875 | stackv2 | import discord
from discord.ext import commands
from discord import FFmpegPCMAudio
# from discord.utils import get
import os
import youtube_dl
from requests import get
class CommieDoggie(commands.Cog):
'''
A simple commie bot that does some cringe things :v
'''
def __init__(self, client):
self.... | 107 | 34.01 | 116 | 26 | 787 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_069d90542ad008c6_a7c8b8a8", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://youtube.com](1) may be at an arbitrary positio... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://youtube.com](1) may be at an arbitrary position in the sanitized URL."
] | [
68
] | [
null
] | [
24
] | [
61
] | |
2024-11-18T21:22:22.526311+00:00 | 1,636,388,337,000 | e89b1282af8aa90e9e0ad510f99efbcc93dc2a90 | 3 | {
"blob_id": "e89b1282af8aa90e9e0ad510f99efbcc93dc2a90",
"branch_name": "refs/heads/main",
"committer_date": 1636388337000,
"content_id": "217fbddf6ed32ac6ee46dfc4ad17548536755b17",
"detected_licenses": [
"MIT"
],
"directory_id": "c841706acfced30fa8af696b76e02d5c2efa2518",
"extension": "py",
"file... | 2.78125 | stackv2 | import requests
import json
# Make Strava auth API call with your
# client_code, client_secret and code
with open("creds.json") as creds_file:
creds = json.load(creds_file)
client_id = creds["Client ID"]
client_secret = creds["Client Secret"]
client_code = creds["Client Code"] #n.b. the code is a one shot that... | 34 | 32.74 | 113 | 10 | 242 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_13a2ee9f33fe9d4f_86a5ef54", "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."
] | [
15
] | [
null
] | [
7
] | [
20
] | |
2024-11-18T21:22:35.413643+00:00 | 1,493,976,282,000 | 4d0f11de940bbc5a67c34f9b88f54e7faadefd7d | 3 | {
"blob_id": "4d0f11de940bbc5a67c34f9b88f54e7faadefd7d",
"branch_name": "refs/heads/master",
"committer_date": 1493976282000,
"content_id": "493e153d1eb4849baccd788c318d9a63119cd6d0",
"detected_licenses": [
"MIT"
],
"directory_id": "83603a52fb93ce4ce9ee3f1ceed2a119ffcbed38",
"extension": "py",
"fi... | 2.578125 | stackv2 | """Handles everything related to the actual build process."""
import time
from os import chmod, path, unlink
from tempfile import NamedTemporaryFile
import berth.utils as utils
def build(config):
"""Run the build part of the configuration."""
utils.log('Building project.')
script_path = create_build_sc... | 83 | 37.4 | 129 | 21 | 696 | python | [{"finding_id": "codeql_py/overly-permissive-file_69ca1b3097b06a51_918c6e33", "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."
] | [
74
] | [
null
] | [
5
] | [
28
] | |
2024-11-18T21:22:45.154357+00:00 | 1,547,732,610,000 | d64c023fe8e53b8aab10715520243a819ed45f85 | 3 | {
"blob_id": "d64c023fe8e53b8aab10715520243a819ed45f85",
"branch_name": "refs/heads/master",
"committer_date": 1547733185000,
"content_id": "f5a6bc75a28a87cf4da01d00d44875c88e46406a",
"detected_licenses": [
"MIT"
],
"directory_id": "2bec37b08e0c39975904652b7af720d39ba16a84",
"extension": "py",
"fi... | 2.9375 | stackv2 | import main
import json
import datetime
import hashlib
auth_tokens=[]
def get_user_list(secure=True):
users=json.load(open(main.rootfolder+"users.json",encoding="utf-8"))["users"]
if secure:
for user in users:
user.pop("password")
return users
def create_user(name,displayname="",passwo... | 66 | 28.98 | 126 | 21 | 429 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_d8a35be360a517de_5b4c68cb", "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."
] | [
38
] | [
null
] | [
50
] | [
74
] | |
2024-11-18T21:51:40.080006+00:00 | 1,583,431,859,000 | b1f41354e768915b001be4551fc9a7be21d4dc63 | 3 | {
"blob_id": "b1f41354e768915b001be4551fc9a7be21d4dc63",
"branch_name": "refs/heads/master",
"committer_date": 1583431859000,
"content_id": "818c80d323abbf247e5b72293abaa6cc62e67508",
"detected_licenses": [
"MIT"
],
"directory_id": "cca315d60bd8f2c6ee35812280a0ff91ded9805a",
"extension": "py",
"fi... | 2.6875 | stackv2 | import os
import getpass
import base64
import time
CONFIG_FILE_PATH = "BingRewards/src/config.py"
CONFIG_FILE_TEMPLATE = """credentials = dict(
email = '{0}',
password = '{1}',
)
"""
# get hashed credentials
try:
email = base64.b64encode(raw_input(" *Email: ").encode()).decode()
except:
ema... | 44 | 28.43 | 80 | 16 | 307 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_0843ecb56be21e26_8dbf4ebb", "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.\... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.",
"This expression logs [sensi... | [
31,
39,
23
] | [
null,
null,
null
] | [
27,
36,
7
] | [
37,
46,
41
] | |
2024-11-18T21:52:03.001567+00:00 | 1,582,431,115,000 | 1bb5c6725b4eb7ad02e74025d01d7d1cb0862431 | 3 | {
"blob_id": "1bb5c6725b4eb7ad02e74025d01d7d1cb0862431",
"branch_name": "refs/heads/master",
"committer_date": 1582431115000,
"content_id": "949281e5cf44af1460fcbcdda9c7cd9c95a127f6",
"detected_licenses": [
"MIT"
],
"directory_id": "c5dc53ee1e23754a2f8e11119f6879b750be5209",
"extension": "py",
"fi... | 3.109375 | stackv2 | # --------------
##File path for the file
file_path
def read_file(path):
file=open(path,'r')
sentence=file.readline()
file.close()
return sentence
sample_message=read_file(file_path)
#Code starts here
# --------------
#Code starts here
message_1=read_file(file_path_1)
message_2=read_file(file_... | 98 | 21.11 | 70 | 12 | 573 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_12333602d7ae2077_a3bca0d4", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (secret)](2) as clear text.\nThis expression stores [sensitive data (secret)](3) as clear text.\nThis expression stores [sensitive data (secret)](4) as clear text.\nThis expression stores [sensitive data (sec... | [
87,
94
] | [
null,
null
] | [
14,
7
] | [
24,
17
] | |
2024-11-18T21:52:07.558466+00:00 | 1,530,529,263,000 | cb68ef302fb72da865addd5876b300f17bcb1c19 | 3 | {
"blob_id": "cb68ef302fb72da865addd5876b300f17bcb1c19",
"branch_name": "refs/heads/master",
"committer_date": 1530529263000,
"content_id": "61dcd39e568a43be43923fcfb96673497002a83a",
"detected_licenses": [
"MIT"
],
"directory_id": "bd84da1b7f43052050c3cd2957abc593d8364a5a",
"extension": "py",
"fi... | 2.84375 | stackv2 | # from app import app
import urllib.request,json
from .models import Source ,Article
# Source = source.Source
Article = Article
#Getting api key
api_key = None
#Getting the news base url
base_url = None
article_base_url = None
def configure_request(app):
global api_key,base_url,article_base_url
api_key = ... | 122 | 25.97 | 89 | 12 | 665 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e4074601a8cac09a_cc65fa69", "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."
] | [
28
] | [
null
] | [
11
] | [
25
] | |
2024-11-18T21:52:10.290531+00:00 | 1,646,120,245,000 | 11402c187750702b65d33a5851f3669df469d806 | 2 | {
"blob_id": "11402c187750702b65d33a5851f3669df469d806",
"branch_name": "refs/heads/master",
"committer_date": 1646120245000,
"content_id": "67a7d4a5250a68a264a0fa24e50a86b3d6c7b3cf",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "9d45c025a8fce775ef5f87da5a7cf900b710a9ed",
"extension": "p... | 2.328125 | stackv2 | # coding: utf-8
import requests
import os
import shutil
import tempfile
from hashlib import md5
from collections import defaultdict
from django.conf import settings
from twiggy_goodies.threading import log
from allmychanges.downloaders.utils import normalize_url
from allmychanges.utils import (
cd,
do,
fi... | 187 | 33.59 | 106 | 24 | 1,221 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_e197c1a618e35f85_0bf87873", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [github.com](1) may be at an arbitrary position in the sanitized URL."
] | [
139
] | [
null
] | [
12
] | [
34
] | |
2024-11-18T22:02:40.517327+00:00 | 1,515,442,430,000 | a1ce6fecf92da1956b81be2b80b6adb4a1ba17f6 | 3 | {
"blob_id": "a1ce6fecf92da1956b81be2b80b6adb4a1ba17f6",
"branch_name": "refs/heads/master",
"committer_date": 1515442430000,
"content_id": "f4aa4cc7fb50417639fdba581401f866a171a9c7",
"detected_licenses": [
"MIT"
],
"directory_id": "9b635e1364d0140ce6095f3680e60e19284d7ecc",
"extension": "py",
"fi... | 2.546875 | stackv2 | '''Module for connecting to a switch and pulling a configuration'''
import re
import paramiko
import telnetlib
from time import sleep
class Connection(object):
'''Connection class to hold settings'''
def __init__(self, hostname, port=None, username=None, password=None,
retries=3, **kwargs):
... | 224 | 28.43 | 76 | 19 | 1,633 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a2611b98e75bb045_82677133", "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
] | [
7
] | [
64
] | |
2024-11-18T22:27:52.566697+00:00 | 1,595,194,844,000 | 1d9001b319fc196a483bc6e8ccab2b91a0f4fa40 | 4 | {
"blob_id": "1d9001b319fc196a483bc6e8ccab2b91a0f4fa40",
"branch_name": "refs/heads/master",
"committer_date": 1595194844000,
"content_id": "1846f6ba1ed730511e21d48874cf55945c15e26e",
"detected_licenses": [
"MIT"
],
"directory_id": "e379c885f2403cebb5fe6832fb8f7acc322c49d1",
"extension": "py",
"fi... | 3.59375 | stackv2 | class GCalAppointment:
"""
A class that is a facade for Google Calendar appointments
"""
phone_number = ''
region = ''
start_time = ''
end_time = ''
message_text = ''
def __init__(self, phone_number, region, start_time, end_time, message_text=''):
"""
Initialises th... | 89 | 35.76 | 113 | 19 | 699 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4716a478d2d9b4e3_17b2a85f", "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... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (p... | [
47,
50,
53
] | [
null,
null,
null
] | [
27,
27,
27
] | [
43,
43,
43
] | |
2024-11-18T22:28:12.262556+00:00 | 1,538,412,364,000 | 8afaae81345a5daeed9c921e049edc8a32e3adb4 | 2 | {
"blob_id": "8afaae81345a5daeed9c921e049edc8a32e3adb4",
"branch_name": "refs/heads/master",
"committer_date": 1538412364000,
"content_id": "7a89970f4a5eb6dc52b0ae73e63f12b5b13f45d8",
"detected_licenses": [
"MIT"
],
"directory_id": "52941172a43d5437ce0ea5daa04b0cf412be211a",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Views
from flask import render_template, flash, redirect, url_for
from app import app
from app.forms import LoginForm, QAForm
from app.bayesTextClassifyTemplateDI import BayesText
from flask_login import current_user, login_user
from app.models import User
from flask_log... | 91 | 34.79 | 93 | 16 | 704 | python | [{"finding_id": "codeql_py/url-redirection_e329e009351737f3_96d5cfe3", "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
] | [
25
] | [
34
] | |
2024-11-18T22:44:04.730675+00:00 | 1,614,645,779,000 | 7ffd7fa5f7af789b43014f5e0450497cbdb8b8de | 3 | {
"blob_id": "7ffd7fa5f7af789b43014f5e0450497cbdb8b8de",
"branch_name": "refs/heads/main",
"committer_date": 1614645779000,
"content_id": "41b115165557927f4941221851a84e409e0698d9",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "2bc44f30def55365d73eeae81cb3543b2d52f657",
"extension": "py",
"... | 2.90625 | stackv2 | import json
from datetime import datetime
from flask import Blueprint, request, jsonify, make_response
with open("data.json", "r", encoding="utf8") as read_data:
channels = json.load(read_data)
api_channels = Blueprint('api_channels', __name__)
@api_channels.route("/channels/all")
def list_channels():
""" L... | 85 | 31.62 | 79 | 18 | 627 | python | [{"finding_id": "codeql_py/reflective-xss_86618e9a6c7747cf_003ac4d0", "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).\nCross-site scripting vulnerability d... | 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).\nCross-site scripting vulnerability due to a [user-provided value](2).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
48,
53
] | [
null,
null
] | [
20,
20
] | [
70,
41
] | |
2024-11-18T22:44:04.946548+00:00 | 1,572,014,162,000 | f47648767b7f41a29987b7cbc643129d95d636b2 | 3 | {
"blob_id": "f47648767b7f41a29987b7cbc643129d95d636b2",
"branch_name": "refs/heads/master",
"committer_date": 1572014162000,
"content_id": "d00a33e1fea106e9dbd719ac432298bb9aa8168a",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c1101fd74a55b9ab961dfab667ab6702b0521fa5",
"extension": "py"... | 2.578125 | stackv2 | #!/usr/bin/env python3
from __future__ import absolute_import, division, print_function
import codecs
import sys
import tarfile
import pandas
import re
import unicodedata
import threading
from multiprocessing.pool import ThreadPool
from six.moves import urllib
from glob import glob
from os import makedirs, path
from... | 195 | 41.39 | 108 | 22 | 1,890 | python | [{"finding_id": "codeql_py/tarslip_246280fdb41f4166_882cc887", "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)."
] | [
104
] | [
null
] | [
13
] | [
16
] | |
2024-11-18T22:44:16.464846+00:00 | 1,466,523,246,000 | dfb509fb4c9d034f290dc0ca1e262b43fb51e497 | 2 | {
"blob_id": "dfb509fb4c9d034f290dc0ca1e262b43fb51e497",
"branch_name": "refs/heads/master",
"committer_date": 1466523246000,
"content_id": "82bbd4833634c5b7f9c41c0d78942ba45493908e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ed133a033021aa4ce6701e118c12e80edda3fe2b",
"extension": "py"... | 2.34375 | stackv2 | #!/usr/bin/env python
from argparse import ArgumentParser
import requests
import json
import os.path, sys
#change path to allow import from parent directory
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir))
from apic import get_auth_token, create_url, wait_on_task
# get the policy b... | 59 | 34.07 | 85 | 12 | 469 | python | [{"finding_id": "codeql_py/request-without-cert-validation_7338a2e14bcbf60e_1225ded6", "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,
33
] | [
null,
null
] | [
20,
20
] | [
68,
71
] | |
2024-11-18T22:44:21.081942+00:00 | 1,566,163,795,000 | 360e76ce40233d60f988cb682158324807775adb | 2 | {
"blob_id": "360e76ce40233d60f988cb682158324807775adb",
"branch_name": "refs/heads/master",
"committer_date": 1566163795000,
"content_id": "a9c66384c627ef41ffa85c225c8ed83174d5a47d",
"detected_licenses": [
"MIT"
],
"directory_id": "fc790a0284679a5235cb01e46cf81965b2abe11d",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/env python3
"""bmarks, an aws bookmarking app"""
import os
from datetime import datetime
from uuid import uuid4
from flask import Blueprint, current_app, Flask, jsonify, redirect, render_template, request, session, url_for
from flask_dynamo import Dynamo
from flask_login import login_required, login_user, ... | 237 | 27.51 | 139 | 21 | 1,537 | python | [{"finding_id": "codeql_py/url-redirection_292a02d26bdcb941_9be7ba1b", "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)."
] | [
120
] | [
null
] | [
41
] | [
65
] | |
2024-11-18T22:44:24.298801+00:00 | 1,646,643,180,000 | 1ddcc6f9474f2908b18606acc11bb48ad456aa38 | 2 | {
"blob_id": "1ddcc6f9474f2908b18606acc11bb48ad456aa38",
"branch_name": "refs/heads/master",
"committer_date": 1646645271000,
"content_id": "bcd6ec73bae4a3a00840fd63c2846767728c6a63",
"detected_licenses": [
"MIT"
],
"directory_id": "500b91e6b5250e1b62342e29725349871a2483bb",
"extension": "py",
"fi... | 2.453125 | stackv2 | import urllib.parse as purl
import requests as r
def StartScopusSearch(key, params):
ssq = ScopusSearchQuery(key, params)
return ssq
class ScopusSearchQuery:
_defaultParams = {'count': 100,
'view': 'COMPLETE',
'httpAccept': 'application/json'}
_baseUrl = ... | 230 | 34.55 | 124 | 17 | 2,022 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_97c9346789d12c37_1f8eefd4", "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.",
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
52,
55,
173,
176
] | [
null,
null,
null,
null
] | [
15,
19,
15,
19
] | [
41,
44,
41,
44
] | |
2024-11-18T22:44:41.756601+00:00 | 1,690,098,275,000 | 2ff293d8b3c8cbc3ac89c0a8e6635bf59d7f6bd8 | 3 | {
"blob_id": "2ff293d8b3c8cbc3ac89c0a8e6635bf59d7f6bd8",
"branch_name": "refs/heads/master",
"committer_date": 1690100571000,
"content_id": "de109088c503fb2c8e17b1b25130d37168e09022",
"detected_licenses": [
"MIT"
],
"directory_id": "6fca4c8a2dff819b6198639df8dca7c34ee1c673",
"extension": "py",
"fi... | 3.09375 | stackv2 | import configparser
config_filename = "config.ini"
config_content = r"""
[DEFAULT]
name = techstay
age = 18
gender = male
[young]
name = lily
age = 16
nickname = ${name}
"""
config = configparser.ConfigParser(interpolation=configparser.ExtendedInterpolation())
config.read_string(config_content)
config["old"] = {"n... | 37 | 20.73 | 86 | 13 | 216 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f1a29327d88c44fb_51087515", "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."
] | [
35
] | [
null
] | [
7
] | [
46
] | |
2024-11-18T22:44:45.079557+00:00 | 1,439,040,952,000 | 56a5fa4a6fc84c7ec069fba3556298a420513d47 | 3 | {
"blob_id": "56a5fa4a6fc84c7ec069fba3556298a420513d47",
"branch_name": "refs/heads/master",
"committer_date": 1439040952000,
"content_id": "3677535bfb546fcbe948dd9ddb0662ae936025a6",
"detected_licenses": [
"Unlicense"
],
"directory_id": "57a8486f9bf8a28882c5b04cb75f359fd79673c4",
"extension": "py",... | 2.890625 | stackv2 | adminUser = raw_input('Enter the admin username, without the domain (e.g. dhay):')
adminPassword = raw_input('Enter the admin password: ')
print "\n" * 80 #clear screen
userToCheck = raw_input('Enter the email address of the user you want to check. ')
import time
import csv
import gdata.apps.client
#totalRows = sum(1... | 104 | 42.09 | 134 | 13 | 1,127 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7601c9ecb4c9c34d_b0847c1a", "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."
] | [
57
] | [
null
] | [
18
] | [
44
] | |
2024-11-18T21:00:04.996460+00:00 | 1,546,419,225,000 | 14bcd4f695b8b50aa80774cd169297fe39890551 | 2 | {
"blob_id": "14bcd4f695b8b50aa80774cd169297fe39890551",
"branch_name": "refs/heads/master",
"committer_date": 1546419264000,
"content_id": "7a0e5b1b9e99bb7bf32bff832a83e7bd1ad87732",
"detected_licenses": [
"MIT"
],
"directory_id": "15c0714fc29060937c4994d16d341d96be8bf58d",
"extension": "py",
"fi... | 2.390625 | stackv2 | import re
from bs4 import BeautifulSoup
import json
from datetime import datetime
class ParserHtml():
def parser_first(self,html_cont):
soup=BeautifulSoup(html_cont,'html.parser')
zhaopin_a = soup.find_all('a', href=re.compile(r'www.lagou.com/zhaopin/.*/'))
print(len(zhaopin_a)) #316
... | 169 | 40.12 | 118 | 18 | 1,631 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_17d187075a70cbd5_003d8fc5", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'lagou.com/zhaopin/', so it might ma... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'lagou.com/zhaopin/', so it might match more hosts than expected."
] | [
9
] | [
null
] | [
58
] | [
83
] | |
2024-11-18T21:00:31.060208+00:00 | 1,546,626,932,000 | 6648383a55ff02bd33ae3b23516429e9aaa52685 | 3 | {
"blob_id": "6648383a55ff02bd33ae3b23516429e9aaa52685",
"branch_name": "refs/heads/master",
"committer_date": 1546626932000,
"content_id": "13f864211f1bbd1338684564ac076048b8501eba",
"detected_licenses": [
"MIT"
],
"directory_id": "527d1c9fc1785c029a8824a1e4b4c132836e4472",
"extension": "py",
"fi... | 2.59375 | stackv2 | # vim:ts=4:sw=4:noexpandtab
# c-basic-indent: 4; tab-width: 4; indent-tabs-mode: true;
import socket
import re
import datetime
import logging
import functools
import feedparser
from tempora import timing
import pmxbot
from pmxbot import core
from pmxbot import storage
log = logging.getLogger(__name__)
class FeedH... | 176 | 23.12 | 73 | 18 | 1,125 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_ff7d04c116444678_a8b8db00", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [google.com](1) may be at an arbitrary position in the ... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [google.com](1) may be at an arbitrary position in the sanitized URL."
] | [
47
] | [
null
] | [
6
] | [
33
] | |
2024-11-18T21:00:34.199647+00:00 | 1,518,335,697,000 | a7ce33bb79b2a33a0dfd71ea2e32a05d9f7cf7f8 | 4 | {
"blob_id": "a7ce33bb79b2a33a0dfd71ea2e32a05d9f7cf7f8",
"branch_name": "refs/heads/master",
"committer_date": 1518335697000,
"content_id": "424673f1c20818563949f983605167048a116e0b",
"detected_licenses": [
"MIT"
],
"directory_id": "1f1c5ffab001852677030e1fd745d6ac426554ad",
"extension": "py",
"fi... | 3.75 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'正则表达式的练习'
__author__ = 'Jacklee'
# re模块
# 需要了解正则表达式字符规则
# 这里就不表了
# 使用re模块
import re
# 以3个数字开头,后跟-,以3-8个数字结尾
# 调用re.match方法,如果匹配,则返回一个match对象,否则返回None
if re.match(r'^\d{3}\-\d{3,8}$', '010-12345'):
print('OK')
else:
print('Failed')
# 切分字符串
# 可以识别多个连续空格
r = re.spli... | 81 | 17.23 | 66 | 10 | 626 | python | [{"finding_id": "codeql_py/overly-large-range_c03084e4b7d4f7c8_7fda6a10", "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... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
58,
58
] | [
null,
null
] | [
16,
29
] | [
19,
32
] | |
2024-11-18T21:01:07.828845+00:00 | 1,459,999,013,000 | 47df835914ab0ee6d4713957fcd6598cef609c08 | 2 | {
"blob_id": "47df835914ab0ee6d4713957fcd6598cef609c08",
"branch_name": "refs/heads/master",
"committer_date": 1459999013000,
"content_id": "1403aadb5368875d22fffd72fbf164f191e25d7e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f7b7098535764cb9a560e570905f9a0aef566c66",
"extension": "py"... | 2.328125 | stackv2 | #!/usr/bin/env python
import json
import logging
import os
import paramiko
import pika
import sys
import time
logging.basicConfig(filename='/src/handler.log', level=logging.INFO)
class GerritEventStream(object):
def __init__(self, *args, **kwargs):
logging.info('Connecting to gerrit stream using env var... | 125 | 29.69 | 79 | 18 | 815 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_8c1cb455758e1676_8037c4c0", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
18
] | [
null
] | [
9
] | [
71
] | |
2024-11-18T21:01:14.543145+00:00 | 1,532,684,116,000 | 09229d32e595f92e372c373645cdb53a93f6a75b | 2 | {
"blob_id": "09229d32e595f92e372c373645cdb53a93f6a75b",
"branch_name": "refs/heads/master",
"committer_date": 1532684116000,
"content_id": "0951215de104a440631a0f283300ea19deeea075",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "5db041a0160983404738bec191721c82b175702e",
"extension": "p... | 2.390625 | stackv2 | import os
from flask import (flash, request, redirect, url_for, Blueprint, current_app,render_template,
send_from_directory
)
from werkzeug.utils import secure_filename
from py_web.models import UploadFile
from datetime import datetime
from py_web.database import db
from py_web.ext... | 81 | 33.21 | 93 | 16 | 568 | python | [{"finding_id": "codeql_py/url-redirection_7f7e583a54baf135_1f5626f8", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_... | 2 | true | [
"CWE-601",
"CWE-601"
] | [
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
30,
36
] | [
null,
null
] | [
29,
29
] | [
40,
40
] | |
2024-11-18T21:01:24.346195+00:00 | 1,611,764,392,000 | 97f3a92beca7f1438b12f83536d5ce98732ad327 | 3 | {
"blob_id": "97f3a92beca7f1438b12f83536d5ce98732ad327",
"branch_name": "refs/heads/main",
"committer_date": 1611764392000,
"content_id": "5a27b903fcbbad8f7d08bdda9db246fa27877ca1",
"detected_licenses": [
"MIT"
],
"directory_id": "de3ef29c8d9f9dfb7a65eede4e6c10cd1bda1bd4",
"extension": "py",
"file... | 2.59375 | stackv2 | #!/usr/bin/env python3
from flask import Flask
import os
# setting logging to stdout
import sys
from logging.config import dictConfig
dictConfig({
'version': 1,
'formatters': {'default': {
'format': '[%(asctime)s] %(levelname)s in %(module)s: %(message)s',
}},
'handlers': {'wsgi': {
'c... | 50 | 20.36 | 75 | 12 | 289 | python | [{"finding_id": "codeql_py/flask-debug_ed894f1a3e21a080_2af56a76", "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)."
] | [
50,
45
] | [
null,
null
] | [
5,
12
] | [
51,
27
] | |
2024-11-18T21:01:26.311153+00:00 | 1,690,098,275,000 | 29f171c8304a583b41224bddf387aff559f1da6e | 4 | {
"blob_id": "29f171c8304a583b41224bddf387aff559f1da6e",
"branch_name": "refs/heads/master",
"committer_date": 1690100571000,
"content_id": "de6e2049b03614bd317a8b2901589ed7ae3c0c01",
"detected_licenses": [
"MIT"
],
"directory_id": "6fca4c8a2dff819b6198639df8dca7c34ee1c673",
"extension": "py",
"fi... | 3.75 | stackv2 | # Q1
from datetime import date
now = date.today()
now_string = now.isoformat()
with open('today.txt', 'w') as file:
print(now, file=file)
# Q2
today_string = None
with open('today.txt') as file:
today_string = file.read()
print(today_string)
# Q3
from datetime import datetime
format = '%Y-%m-%d\n'
print(d... | 66 | 17.14 | 85 | 13 | 345 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_20fbaf3a23ba33dd_d2493250", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
54,
66
] | [
null,
null
] | [
7,
7
] | [
18,
41
] | |
2024-11-18T21:25:27.953391+00:00 | 1,575,802,729,000 | 8bf3cab8209687f91f6328711d1b4d19aed2c862 | 4 | {
"blob_id": "8bf3cab8209687f91f6328711d1b4d19aed2c862",
"branch_name": "refs/heads/master",
"committer_date": 1575802729000,
"content_id": "6c9dad0c7e66ccc05d0b3d3acc226558b2504751",
"detected_licenses": [
"MIT"
],
"directory_id": "830279c046e1a02f6ab8f3b9db65524a915a0768",
"extension": "py",
"fi... | 3.765625 | stackv2 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
class Solver:
def __init__(self, start: int = 0, end: int = 0, password_length: int = 6):
self._start = start
self._end = end
self.password_length = password_length
@property
def end(self):
return self._end
@end.setter
d... | 63 | 25.7 | 86 | 14 | 402 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_74f6b02706e31dca_27d87704", "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."
] | [
63
] | [
null
] | [
11
] | [
54
] | |
2024-11-18T21:25:32.326816+00:00 | 1,342,714,212,000 | 29017d2474b0cd24a28dba6925061b7a67dc1c1d | 3 | {
"blob_id": "29017d2474b0cd24a28dba6925061b7a67dc1c1d",
"branch_name": "refs/heads/master",
"committer_date": 1342714212000,
"content_id": "6e84e9f8102d702f8367ed08438a62eda555e624",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "eb945e89731fbeb345cfaf02e65a2be879de3cf7",
"extension": "py",
... | 2.59375 | stackv2 | #!/usr/bin/env python
"""
Downloads the Kasabi dataset snapshots.
"""
import os
import sys
import boto
import gzip
import rdflib
import logging
import requests
from boto.s3.key import Key
class Dataset:
_ia_bucket = None
def __init__(self, name, license, url):
self.name = name
self.license ... | 166 | 26.78 | 90 | 19 | 1,054 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_858b22b2a38f1a8b_588d96b2", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://data.kasabi.com](1) may be at an arbitrary posi... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [http://data.kasabi.com](1) may be at an arbitrary position in the sanitized URL."
] | [
84
] | [
null
] | [
16
] | [
54
] | |
2024-11-18T21:51:34.591745+00:00 | 1,541,668,971,000 | 509e09869ea99df0e0193f75e39152aee2bd487d | 3 | {
"blob_id": "509e09869ea99df0e0193f75e39152aee2bd487d",
"branch_name": "refs/heads/master",
"committer_date": 1541668971000,
"content_id": "3f8ed04205366e888062192fc936229061652327",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ba16dd9db1d8f81beea3eb08fe4aa8e5ae15cc60",
"extension": "py"... | 2.625 | stackv2 | """
Uhost main module
"""
import _thread
import hashlib
import json
import logging
import queue
import time
import os
from .utilities import process_inbound_item, signature, srp, process_outbound_item, uhost_connection, keepalive_manager
from .utilities.database_connection import DataBaseConnection
from .utilities.con... | 301 | 27.4 | 119 | 17 | 1,792 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ccdb618857858ab3_8531d598", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text."
] | [
98,
188
] | [
null,
210
] | [
47,
15
] | [
68,
10
] | |
2024-11-18T22:00:21.316260+00:00 | 1,475,263,697,000 | f179432b40642f1bcf5a60bf70e1b34312ca621f | 2 | {
"blob_id": "f179432b40642f1bcf5a60bf70e1b34312ca621f",
"branch_name": "refs/heads/master",
"committer_date": 1475263697000,
"content_id": "4ccc78cfa09d4b0b45583228e7341ae40b5b87fc",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "f6aa54089f5108dd72d47cf6b13dc8469b486d20",
"extension": "p... | 2.5 | stackv2 | from flask import render_template
from inspectors.app import create_app
from inspectors.inspections.models import Feedback
from inspectors.surveys.util import send_email
from inspectors.inspections.queries import (
active_users_with_past_inspections
)
def print_inspection(i):
return "\n ".join([
... | 77 | 27.65 | 75 | 12 | 477 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bed6481a8e4b47d8_0207a610", "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."
] | [
53
] | [
null
] | [
23
] | [
40
] | |
2024-11-18T22:00:46.528692+00:00 | 1,560,497,005,000 | 7c7a5f869079865ce4c1faa6df0d5105cb4ce113 | 3 | {
"blob_id": "7c7a5f869079865ce4c1faa6df0d5105cb4ce113",
"branch_name": "refs/heads/master",
"committer_date": 1560497005000,
"content_id": "91674d7eaee95d74e4d9784f17827822ae3a44b3",
"detected_licenses": [
"MIT"
],
"directory_id": "32cb831b1f58286058da4bc01f39668111aca922",
"extension": "py",
"fi... | 3.078125 | stackv2 | """
The purpose of this python file is to use the cleaned data and to run the ML model.
"""
# import libraries
import nltk
nltk.download(['punkt', 'wordnet', 'averaged_perceptron_tagger'])
import re
import pickle
import pandas as pd
import numpy as np
from sqlalchemy import create_engine
from nltk.tokenize import wor... | 180 | 30.05 | 113 | 21 | 1,337 | python | [{"finding_id": "codeql_py/overly-large-range_5efc6c7f55d745ec_466ea268", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
62
] | [
null
] | [
48
] | [
51
] | |
2024-11-18T22:00:47.322676+00:00 | 1,562,355,162,000 | f0472faa53796a4221fedebc4e119b422eaaa4d2 | 3 | {
"blob_id": "f0472faa53796a4221fedebc4e119b422eaaa4d2",
"branch_name": "refs/heads/master",
"committer_date": 1562355162000,
"content_id": "f526154b5d7b8780e8cdf867ec5d0b73f4ae7943",
"detected_licenses": [
"MIT"
],
"directory_id": "e1e5cd45774dc1d041f004d0562df7f7a2405b05",
"extension": "py",
"fi... | 3.1875 | stackv2 | """
Takes lat lon item data and obtain US county FIP if it's in the US.
Usage:
obtain_county_from_latlon (-h|--help)
obtain_county_from_latlon <input> <state> <county> <output>
[--debug]
[--verbose]
Options:
-h, --help This help message is prin... | 133 | 27.55 | 111 | 22 | 933 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1963cb2f8a85e514_e710b3dd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
115,
115
] | [
null,
null
] | [
39,
44
] | [
42,
47
] | |
2024-11-18T22:01:02.018505+00:00 | 1,563,308,994,000 | 23af958f004fd58b2125f46c280a32d50819be6a | 4 | {
"blob_id": "23af958f004fd58b2125f46c280a32d50819be6a",
"branch_name": "refs/heads/master",
"committer_date": 1563308994000,
"content_id": "053a19b1965eec154947ef9a3afa0427e3168079",
"detected_licenses": [
"MIT"
],
"directory_id": "9bb559aa474632c9379523e515b60005534d9fbc",
"extension": "py",
"fi... | 3.546875 | stackv2 | import csv
import os
def main():
print_the_header()
filename = get_filename()
out_filename = filename + '.valid'
age_min, age_max = get_age_cutoff()
pat_sex = get_pat_sex()
inf_length_min, inf_length_max = get_inf_length()
pat_ther = get_pat_ther()
pat_coin = get_pat_coin()
... | 285 | 32.73 | 106 | 21 | 2,063 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4e2ca3e0655eb4b0_6d46ac11", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text.\nThis expression logs [sensitive data (private)]... | [
67
] | [
null
] | [
23
] | [
47
] | |
2024-11-18T22:01:05.360389+00:00 | 1,616,681,285,000 | 328e7adb1022df0b86be0b0e500b01397d40db41 | 2 | {
"blob_id": "328e7adb1022df0b86be0b0e500b01397d40db41",
"branch_name": "refs/heads/main",
"committer_date": 1616681285000,
"content_id": "c5809757267bcb05bb079b24b97ff752cea6cf04",
"detected_licenses": [
"MIT"
],
"directory_id": "fc83d3694af16cc5df7e1c78e6718e6d9cfa51e4",
"extension": "py",
"file... | 2.421875 | stackv2 | from flask import Blueprint
from flask import request, jsonify
import client
from apiauth import require_apikey
thingsroute = Blueprint('things', __name__)
things = client.db.collection('things')
@thingsroute.route('/things', methods=['POST'])
@require_apikey
def creatething():
try:
id = request.json['id']
th... | 65 | 21.55 | 57 | 15 | 394 | python | [{"finding_id": "codeql_py/stack-trace-exposure_6f404c7d3847a1f8_cc141e31", "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.", "... | 5 | true | [
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209",
"CWE-209"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/stack-trace-exposure"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information... | [
20,
31,
41,
53,
64
] | [
null,
null,
null,
null,
null
] | [
10,
10,
10,
10,
10
] | [
35,
35,
35,
35,
35
] | |
2024-11-18T22:15:00.573180+00:00 | 1,442,581,888,000 | 8a4114b5a4bdf8fb79e13f8a2ba2d5bee4fc06a2 | 3 | {
"blob_id": "8a4114b5a4bdf8fb79e13f8a2ba2d5bee4fc06a2",
"branch_name": "refs/heads/master",
"committer_date": 1442581888000,
"content_id": "e73400aaaed2f380063964ae598fd8a3f5db1a85",
"detected_licenses": [
"MIT"
],
"directory_id": "d766aa07057d5957d9212e8d7198a25162ab2761",
"extension": "py",
"fi... | 2.578125 | stackv2 | import logging
import socket
import time
import multiprocessing
import os
from util import utilities
# default carbon service configuration
_CARBON_HOST = '0.0.0.0'
_CARBON_PORT = 2003
"""
The retention rate which has been set in carbon's storage-schema.conf
for our schema: in this case 'i13mon.*'
after sending powe... | 158 | 33.57 | 93 | 18 | 1,352 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f5f3e27700175d0b_7d527f0b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 4 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
79,
83,
92,
104
] | [
null,
null,
null,
null
] | [
18,
17,
17,
18
] | [
78,
69,
71,
69
] | |
2024-11-18T22:15:06.800879+00:00 | 1,636,456,473,000 | c509ad376185b8e1ec81ee8d1daa5c2b5851f0fa | 2 | {
"blob_id": "c509ad376185b8e1ec81ee8d1daa5c2b5851f0fa",
"branch_name": "refs/heads/main",
"committer_date": 1636456473000,
"content_id": "095d6f44f4cda187c9ad53cdd51e360469d03391",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a9a7c436c6a6d312f1020b5c738017cf12caf4eb",
"extension": "py",
... | 2.421875 | stackv2 | from flask import Flask,session, url_for, request, redirect, abort, jsonify, render_template
from BookDao import bookDao
app = Flask(__name__, static_url_path='', static_folder='staticpages')
@app.route('/')
def home():
if not 'username' in session:
return redirect(url_for('login'))
return 'welcome ... | 157 | 22.75 | 164 | 14 | 993 | python | [{"finding_id": "codeql_py/flask-debug_4755a38e34373f71_cf0e87fd", "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)."
] | [
157,
101
] | [
null,
null
] | [
5,
12
] | [
24,
59
] | |
2024-11-18T22:26:03.515434+00:00 | 1,538,510,741,000 | a6e4465d20e3974b7d67c9b51571b9c4c548f166 | 3 | {
"blob_id": "a6e4465d20e3974b7d67c9b51571b9c4c548f166",
"branch_name": "refs/heads/master",
"committer_date": 1538510741000,
"content_id": "acdc93aed88b30b0def0f0c5db650bfe147fe3d6",
"detected_licenses": [
"MIT"
],
"directory_id": "9fc1553b8f41adc46236196bf3160129b46a6151",
"extension": "py",
"fi... | 2.53125 | stackv2 | from urllib.parse import parse_qs
import json
import os
import boto3
import hmac
import hashlib
import base64
from base64 import b64decode
from botocore.exceptions import ClientError
# Triggered by API Gateway
# It kicks off a particular CodePipeline project
def lambda_handler(event, context):
print(json.dumps(eve... | 133 | 40.7 | 103 | 16 | 1,193 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a21baf7e4fdb997b_d1cf7e5a", "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)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text.\nThis expression logs [sensitive data (secret)](5) a... | [
55
] | [
null
] | [
21
] | [
27
] | |
2024-11-18T22:26:08.369762+00:00 | 1,553,117,338,000 | 3d96eece5608a05ace67a04770ecfe35dcdcd14b | 3 | {
"blob_id": "3d96eece5608a05ace67a04770ecfe35dcdcd14b",
"branch_name": "refs/heads/master",
"committer_date": 1553117338000,
"content_id": "32ffb85ac96422b4075b643ba50cf1e6693c22ef",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "06f22a62b0d09c0631a646b7f7dc3dac2b4a215f",
"extension": "py"... | 2.625 | stackv2 | #!/usr/bin/python
import base64
import hmac
import hashlib
import sys
DEFAULT_RB_FILE = "../cookbooks/jenkins/attributes/default.rb"
if (len(sys.argv) != 2):
print("Error - Please provide secret key")
exit(1)
secret = sys.argv[1] # # replace with the secret key to be hashed
#get the aws Secret key
print "aw... | 50 | 26.92 | 75 | 13 | 366 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ec6238d270c32c65_dd26099b", "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."
] | [
44
] | [
null
] | [
18
] | [
22
] | |
2024-11-18T22:26:26.058656+00:00 | 1,609,415,291,000 | 2415c517ba53712911c3dd747e8010d9b05aa6bc | 3 | {
"blob_id": "2415c517ba53712911c3dd747e8010d9b05aa6bc",
"branch_name": "refs/heads/master",
"committer_date": 1609415291000,
"content_id": "a2b5e7ca43e5a31497e01ed73cb9603d279a097c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "bd6201cb3b1fc8973dae628998c9cf3b7b97c06b",
"extension": "py"... | 2.578125 | stackv2 | #!/usr/bin/env python3
"""
simple exercise for jinja rendering
"""
from jinja2 import Template
bgp_config = """
router bgp {{ bgp_as }}
bgp router-id {{ router_id }}
bgp log-neighbor-changes
neighbor {{ peer1 }} remote-as 44
"""
j2_template = Template(bgp_config)
output = j2_template.render(bgp_as=22, router_id="... | 18 | 19.28 | 79 | 8 | 114 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_b835d9e1792d2013_cb6ec92b", "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."
] | [
15
] | [
null
] | [
15
] | [
35
] | |
2024-11-18T20:39:41.251562+00:00 | 1,535,718,342,000 | dbcf9a2492c731c8982aa021aadd837efd3511aa | 3 | {
"blob_id": "dbcf9a2492c731c8982aa021aadd837efd3511aa",
"branch_name": "refs/heads/master",
"committer_date": 1535718342000,
"content_id": "86a2f55a9da661336119f8b3bd9d3e804b0edd45",
"detected_licenses": [
"MIT"
],
"directory_id": "f1de3c544851f267df9da99f22c696c8c7dfc2b7",
"extension": "py",
"fi... | 2.5625 | stackv2 | import requests
from lxml.html import fromstring
from fake_useragent import UserAgent
proxy_list_url = 'https://free-proxy-list.net/'
def get_proxies(verbose=False):
if verbose:
print("retriving updated proxy list...")
url = proxy_list_url
response = requests.get(url, verify=False)
pars... | 47 | 21.68 | 63 | 17 | 256 | python | [{"finding_id": "codeql_py/request-without-cert-validation_a03ab1399faaebee_2b3e1170", "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)."
] | [
13
] | [
null
] | [
16
] | [
47
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.