added stringlengths 32 32 | created int64 1,236B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.03 | source stringclasses 1
value | text stringlengths 330 19.3k | num_lines int64 16 648 | avg_line_length float64 15.5 59.3 | max_line_length int64 37 179 | ast_depth int64 8 38 | length int64 102 3.79k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.11k 276k | sast_codeql_findings_count int64 1 33 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 33 | rule_ids listlengths 1 33 | confidences listlengths 1 33 | severities listlengths 1 33 | messages listlengths 1 33 | line_starts listlengths 1 33 | line_ends listlengths 1 33 | column_starts listlengths 1 33 | column_ends listlengths 1 33 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T03:35:58.054575+00:00 | 1,621,961,259,000 | 6a0056c352902f9bb55b80426eecde1583b38046 | 2 | {
"blob_id": "6a0056c352902f9bb55b80426eecde1583b38046",
"branch_name": "refs/heads/main",
"committer_date": 1621961259000,
"content_id": "98757c0f350731ec957505c402e85f66cd730ab9",
"detected_licenses": [
"MIT"
],
"directory_id": "02c2853923d28addb0c662deb20c7ea31a8aa864",
"extension": "py",
"file... | 2.359375 | stackv2 | from django.shortcuts import render,redirect
from django.http import HttpResponse, request
# now for using login sys we import user model
from django.contrib.auth.models import User,auth
from django.contrib.auth import authenticate, login, logout
from home.models import Contact
from django.contrib import messages
fr... | 117 | 35.67 | 106 | 19 | 812 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2a203523eae9b7d0_01d2c272", "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."
] | [
73
] | [
null
] | [
24
] | [
32
] | |
2024-11-19T03:36:02.222127+00:00 | 1,661,845,580,000 | 9147fd22825e133f68d5407431506dfac4f991f5 | 2 | {
"blob_id": "9147fd22825e133f68d5407431506dfac4f991f5",
"branch_name": "refs/heads/master",
"committer_date": 1661845580000,
"content_id": "4eb1c1cfea74b1ab50de0cc2d53afcec236ec02f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "87417b09226b2aac2bcc8b33d5efaf22c643f2ab",
"extension": "py"... | 2.46875 | stackv2 | #!/usr/bin/python3
import os
import argparse
import tempfile
import datetime
import subprocess
import tarfile
import os.path
from common.utils import (
exit_if_no_permission,
is_cluster_locked,
is_ha_enabled,
snap_data,
)
def get_kine_endpoint():
"""
Return the default kine endpoint
"""
... | 159 | 30.42 | 98 | 19 | 1,133 | python | [{"finding_id": "codeql_py/tarslip_0b30d56b669940b3_799e5360", "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)."
] | [
110
] | [
null
] | [
13
] | [
16
] | |
2024-11-19T01:28:43.823777+00:00 | 1,589,611,022,000 | dc9184846117900a60865cfed97ea84d896d53ed | 4 | {
"blob_id": "dc9184846117900a60865cfed97ea84d896d53ed",
"branch_name": "refs/heads/master",
"committer_date": 1589611022000,
"content_id": "94885234bd99436743a45945dedf3dc1aeee161b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "e4fb3f8ac428cc968b4f06bf8a40a9c44447c764",
"extension": "py"... | 4.03125 | stackv2 | #类 class
#实例 实体 instance
"""
class Student:
pass
sanduo = Student()
sanduo.name = "SanDuo"
#print(sanduo.name)
"""
my_name = "sanduo"
name_list = ["yiduo","erduo","sanduo"]
#构造函数 constructor
#封装
class Person:
def __init__(self,name,age,sex): #self指向实例本身:
# 例如sanduo = Frined()... | 75 | 20.11 | 86 | 13 | 490 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6af0f4f687f07252_8243ee29", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
27,
60
] | [
null,
null
] | [
15,
15
] | [
57,
86
] | |
2024-11-19T01:28:54.255861+00:00 | 1,581,515,107,000 | 03d9e9060a8ac47483e607e2fab122ed126c5009 | 3 | {
"blob_id": "03d9e9060a8ac47483e607e2fab122ed126c5009",
"branch_name": "refs/heads/master",
"committer_date": 1581515107000,
"content_id": "d026372b77410faf2cd28e1948bb5f3686aab65f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "529794e08479475077713d1e383c6e94282480ad",
"extension": "py"... | 2.578125 | stackv2 | from flask import Flask, request, jsonify, Response, render_template
import json
import requests
import os
import sys
from sesamutils import VariablesConfig, sesam_logger
import urllib3
from itertools import groupby
from operator import itemgetter
import numpy as np
import urllib.request, json
from jsonpath_ng import j... | 163 | 26.67 | 157 | 24 | 1,073 | python | [{"finding_id": "codeql_py/flask-debug_381afd40e80f4706_fccbc498", "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.", ... | 5 | true | [
"CWE-215",
"CWE-918",
"CWE-918",
"CWE-295",
"CWE-295"
] | [
"py/flask-debug",
"py/full-ssrf",
"py/full-ssrf",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"The full URL of this request depends on a [user-provided value](1).",
"The full URL of this request depends on a [user-provided value](1).",
"This request may run without certificate validat... | [
163,
84,
133,
150,
154
] | [
null,
null,
null,
null,
null
] | [
5,
10,
14,
16,
22
] | [
66,
38,
42,
114,
158
] | |
2024-11-19T01:29:09.729846+00:00 | 1,495,214,898,000 | 1799d1307ef9efa6c465315e9b794f7612e31ec4 | 2 | {
"blob_id": "1799d1307ef9efa6c465315e9b794f7612e31ec4",
"branch_name": "refs/heads/master",
"committer_date": 1495214898000,
"content_id": "24032583972a6fc3fab22ccaa4bd346fba7ed981",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f17a6a4ef953e353da714c08ca96cc05c63fbe13",
"extension": "py"... | 2.359375 | stackv2 | # (C) Copyright 2015 Hewlett Packard Enterprise Development LP
#
# 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 applica... | 77 | 34.39 | 107 | 18 | 581 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_2e326a11d9d66f44_2ae280e4", "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."
] | [
46
] | [
null
] | [
30
] | [
59
] | |
2024-11-19T01:29:10.791006+00:00 | 1,569,573,539,000 | 9b95e7ca76492c15e514e692396ce7d1b2e5edfa | 2 | {
"blob_id": "9b95e7ca76492c15e514e692396ce7d1b2e5edfa",
"branch_name": "refs/heads/master",
"committer_date": 1569573539000,
"content_id": "479dc30368bd3ff16fc122b3f9fdd5600331593f",
"detected_licenses": [
"MIT"
],
"directory_id": "2c83edd177a73b004eaddeb2866bcfa928429b78",
"extension": "py",
"fi... | 2.3125 | stackv2 | from . import auth
from flask import render_template,redirect,url_for,flash,request
from ..models import User
from .. import db
from flask_login import login_user,login_required, logout_user
from ..models import User
from .forms import RegistrationForm,LoginForm
from ..email import mail_message
@auth.route('/login',me... | 48 | 30.6 | 96 | 16 | 327 | python | [{"finding_id": "codeql_py/url-redirection_6037d14788ea8cc4_ad75bc0e", "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)."
] | [
20
] | [
null
] | [
28
] | [
76
] | |
2024-11-19T01:29:37.229234+00:00 | 1,479,320,911,000 | a74d563b7313f75c9a89409c3942f841da1b4e9d | 3 | {
"blob_id": "a74d563b7313f75c9a89409c3942f841da1b4e9d",
"branch_name": "refs/heads/master",
"committer_date": 1479320911000,
"content_id": "3184f3721b637cb305830307099fce8d093a8395",
"detected_licenses": [
"MIT"
],
"directory_id": "6bb537e0eb6139c4eaddf305118236a9cd242f48",
"extension": "py",
"fi... | 2.6875 | stackv2 | import os
import hashlib
import shutil
from flask import request, Response, send_from_directory, jsonify, abort
from config import *
def sha1(stream):
"""
The function returns the md5 hash,
based on the parameters of the uploaded file.
"""
hash_sha1 = hashlib.sha1()
for chunk in iter(lambda: s... | 131 | 28.66 | 92 | 16 | 898 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_9d173a87d9b0c36c_507512eb", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (MD5) that is insecure."
] | [
44
] | [
null
] | [
24
] | [
29
] | |
2024-11-19T01:29:45.520352+00:00 | 1,626,346,539,000 | 7285d98526c6bb6661428d1d313677eb6b462a2d | 2 | {
"blob_id": "7285d98526c6bb6661428d1d313677eb6b462a2d",
"branch_name": "refs/heads/master",
"committer_date": 1626346539000,
"content_id": "fec142bcf2837f92d0ad07366485debf9fd8798e",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ad93ee5e1eaf90c89a1d09f82b839e520ed581ad",
"extension": "p... | 2.375 | stackv2 | """
Created on Feb 28, 2013
@author: jmht
"""
import logging
import multiprocessing
import os
import time
from ample.util import ample_util, clusterize, worker
KILL_FILE = 'KILL_ME_NOW'
logger = logging.getLogger()
class JobServer(object):
def __init__(self):
self.inqueue = None
self.outqueue ... | 214 | 34.1 | 120 | 20 | 1,626 | python | [{"finding_id": "codeql_py/overly-permissive-file_acfb43e37c1a1c21_54371274", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
176
] | [
null
] | [
13
] | [
36
] | |
2024-11-19T01:30:01.191462+00:00 | 1,688,666,053,000 | 425409f88920edc849291c1ce99de3186e978aab | 2 | {
"blob_id": "425409f88920edc849291c1ce99de3186e978aab",
"branch_name": "refs/heads/master",
"committer_date": 1688666053000,
"content_id": "8cea503095690ef398ec93414e570f5f3f76334b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "c073d53c7f1ca1bfd36bb46152ca282c85d6dc8f",
"extension": "py"... | 2.40625 | stackv2 | #!/usr/bin/python
# Copyright 2016 Google Inc. All Rights Reserved.
"""Stand-alone implementation of the Gradle Firebase plugin.
Converts the services json file to xml:
https://googleplex-android.googlesource.com/platform/tools/base/+/studio-master-dev/build-system/google-services/src/main/groovy/com/google/gms/goog... | 207 | 35.28 | 158 | 22 | 1,624 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_52d8627d027de502_0146fcb9", "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)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p... | [
128,
190
] | [
133,
null
] | [
24,
26
] | [
54,
40
] | |
2024-11-19T01:30:30.388960+00:00 | 1,652,369,813,000 | c239edec6d2bb95ab14d6aca0d3f3e1d3eda6af5 | 2 | {
"blob_id": "c239edec6d2bb95ab14d6aca0d3f3e1d3eda6af5",
"branch_name": "refs/heads/master",
"committer_date": 1652369813000,
"content_id": "a105ad9858fa568762ce1d0c7eb7ebe98d146f97",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6202b3ec5f37a957e58f0e0944c47d8b757f88b2",
"extension": "py"... | 2.4375 | stackv2 | # -*- coding: utf-8 -*-
# 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, softwar... | 66 | 35.98 | 78 | 17 | 522 | python | [{"finding_id": "codeql_py/tarslip_b74234ce4560e169_8027534e", "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)."
] | [
48
] | [
null
] | [
13
] | [
21
] | |
2024-11-19T01:30:38.149597+00:00 | 1,615,396,551,000 | da0d8d304f0c3b6bc79749286a2343752b9c83ce | 2 | {
"blob_id": "da0d8d304f0c3b6bc79749286a2343752b9c83ce",
"branch_name": "refs/heads/main",
"committer_date": 1615396551000,
"content_id": "05c6bb6efe03cd5aa96033d52e0da1d80d091544",
"detected_licenses": [
"MIT"
],
"directory_id": "1690dd2992665bc1f6fe8fd426f584b4b5745064",
"extension": "py",
"file... | 2.453125 | stackv2 | from datetime import datetime
import os
import json
import pytz
import requests
import requests_toolbelt.adapters.appengine
from urllib.request import urlopen
# Use the App Engine Requests adapter. This makes sure that Requests uses
# URLFetch.
requests_toolbelt.adapters.appengine.monkeypatch()
import math
API_KEY ... | 34 | 29.97 | 97 | 19 | 244 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c7067b3e4f41a8f8_2af4082b", "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."
] | [
22
] | [
null
] | [
15
] | [
44
] | |
2024-11-19T01:30:38.668312+00:00 | 1,541,341,244,000 | 393b49c4c1937a5ef77a0c3318bc07bd6ed30b11 | 3 | {
"blob_id": "393b49c4c1937a5ef77a0c3318bc07bd6ed30b11",
"branch_name": "refs/heads/master",
"committer_date": 1541341244000,
"content_id": "34c33dcccb264c1eb0f6e7d387e3d27723df7cab",
"detected_licenses": [
"MIT"
],
"directory_id": "1ce01d5604df6622d67ff796185c1762762de92c",
"extension": "py",
"fi... | 2.609375 | stackv2 | import pdb
import json
import requests
import os
from shutil import copy2
import datetime as dt
# from dt import date
# from dt import dt, timezone, timedelta
import logging
logger = logging.getLogger(__name__)
class Forecast:
def __init__(self, config):
self.api_key = config['wunderground']['a... | 294 | 39.16 | 143 | 16 | 2,593 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_60942fa181cfb1fd_b8e06ab7", "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.",
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
58,
72,
24
] | [
null,
null,
null
] | [
21,
21,
26
] | [
29,
29,
83
] | |
2024-11-19T01:54:49.970034+00:00 | 1,590,139,423,000 | 98c3ed26114596de347c3ca77a9a56d7d8cdf8f1 | 2 | {
"blob_id": "98c3ed26114596de347c3ca77a9a56d7d8cdf8f1",
"branch_name": "refs/heads/master",
"committer_date": 1590139423000,
"content_id": "c76009ee80d67960949e1a0ecf440d15971ec7a5",
"detected_licenses": [
"MIT"
],
"directory_id": "779b3055a8fe301ce7f941fd5e76edeedb1da620",
"extension": "py",
"fi... | 2.40625 | stackv2 | from flask import Flask, render_template, url_for, request, redirect, flash
from werkzeug.utils import secure_filename
from utils import classify_image
import os
from flask_wtf.csrf import CSRFProtect
from config import Config
app = Flask(__name__)
app.config.from_object(Config)
csrf = CSRFProtect(app)
# On IBM Clo... | 53 | 37.94 | 147 | 19 | 416 | python | [{"finding_id": "codeql_py/url-redirection_bc26dc1c82ab9580_9db15920", "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)."
] | [
25,
29
] | [
null,
null
] | [
33,
33
] | [
44,
44
] | |
2024-11-19T01:54:55.926725+00:00 | 1,557,853,406,000 | 6b453efecd21fcc15826c95daa5b865eca872c98 | 3 | {
"blob_id": "6b453efecd21fcc15826c95daa5b865eca872c98",
"branch_name": "refs/heads/master",
"committer_date": 1557853406000,
"content_id": "64b9ecf975edc44f414d9225bb570a15dc519d1b",
"detected_licenses": [
"MIT"
],
"directory_id": "470d05fd18074bb542f4192e2c1a6561c14b64fd",
"extension": "py",
"fi... | 2.5625 | stackv2 | """Master inteface to control and view all the Pi's
"""
from __future__ import print_function
import requests
import argparse
import dweepy
import webbrowser
import shutil
import os
import random
import time
from utils import get_name, get_thing, get_ip
from multiprocessing import current_process
from flask import F... | 303 | 19.83 | 79 | 19 | 1,510 | python | [{"finding_id": "codeql_py/full-ssrf_97f1acd3bd205bef_3e3a211e", "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)."
] | [
85
] | [
null
] | [
13
] | [
41
] | |
2024-11-19T01:55:00.757800+00:00 | 1,594,652,016,000 | 802df928706432ec1159c22bf3ce6634ef8aebbd | 2 | {
"blob_id": "802df928706432ec1159c22bf3ce6634ef8aebbd",
"branch_name": "refs/heads/master",
"committer_date": 1594652016000,
"content_id": "e4f9de079b09ff8ca85b7183fad96e3498d42d11",
"detected_licenses": [
"MIT"
],
"directory_id": "033082d72e32f2d670db9cd1ff40d13ecdff5827",
"extension": "py",
"fi... | 2.40625 | stackv2 | import os
import sys
import re
import json
import requests
from bs4 import BeautifulSoup
from pathlib import Path
from flask import Flask, render_template, request, session
from werkzeug.utils import secure_filename
import pywikibot
app = Flask(__name__)
def wikidataID(link):
site = pywikibot.Site("wikidata", "wi... | 239 | 28.73 | 122 | 31 | 1,855 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_2a0a05222aa06acf_18f3eb9f", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [wikipedia.org](1) may be at an arbitrary position in t... | 2 | true | [
"CWE-020",
"CWE-918"
] | [
"py/incomplete-url-substring-sanitization",
"py/full-ssrf"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [wikipedia.org](1) may be at an arbitrary position in the sanitized URL.",
"The full URL of this request depends on a [user-provided value](1)."
] | [
73,
78
] | [
null,
null
] | [
5,
19
] | [
32,
41
] | |
2024-11-19T01:55:13.450980+00:00 | 1,611,119,241,000 | e562b71e122f454b2caac3f28a490695acb255ea | 3 | {
"blob_id": "e562b71e122f454b2caac3f28a490695acb255ea",
"branch_name": "refs/heads/master",
"committer_date": 1611119241000,
"content_id": "f26c72cc8ca24ffcdca12bbf95fab49de362357e",
"detected_licenses": [
"MIT"
],
"directory_id": "88c160e89a38e976592f008edb2d3e6420bf5bf2",
"extension": "py",
"fi... | 2.546875 | stackv2 | #!/usr/bin/env python3
import ipaddress
import time
import json
import blockade
import logging
from datetime import datetime
from requests import get
# Set loop wait time between each check (in seconds)
WAIT_TIME = 30
"""Logging setup to ./logs folder"""
now = datetime.now()
stringDate = now.strftime("%Y_%m_%d")
log... | 53 | 31.92 | 94 | 14 | 395 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ecabedf5d9cc8b90_31292484", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-295"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/request-without-cert-validation"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.",
"This request may run without certificate validation because [it is disabled](1)."
] | [
44,
47,
31
] | [
null,
null,
null
] | [
23,
27,
42
] | [
57,
49,
84
] | |
2024-11-19T01:55:31.274916+00:00 | 1,623,315,938,000 | 44b268e1b5446b84e3121332dec69e9b19f4b9ce | 2 | {
"blob_id": "44b268e1b5446b84e3121332dec69e9b19f4b9ce",
"branch_name": "refs/heads/master",
"committer_date": 1623315938000,
"content_id": "f603569d51f0d98676f8562e49813b2c8c0df4b3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "422073413d016fd5f2d6c92a008ee730ad7f05f6",
"extension": "py"... | 2.3125 | stackv2 | # -*- coding: utf-8 -*-
import msgpack
import base64
from fastapi import FastAPI
from fastapi import Body
from starlette.requests import Request
import pprint
import traceback
import sys
import os
from os import listdir
from os.path import isfile, join
from typing import List
import requests
from fastapi import HTTPEx... | 245 | 41.87 | 121 | 19 | 2,515 | python | [{"finding_id": "codeql_py/path-injection_f134fdb829cd2860_c3b29610", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ... | 4 | true | [
"CWE-022",
"CWE-022",
"CWE-022",
"CWE-022"
] | [
"py/path-injection",
"py/path-injection",
"py/path-injection",
"py/path-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1).",
"This path depends on a [user-provided value](1)."
] | [
190,
191,
193,
194
] | [
null,
null,
null,
null
] | [
27,
23,
31,
27
] | [
31,
27,
45,
41
] | |
2024-11-19T02:06:52.860106+00:00 | 1,479,274,875,000 | 8ffe73f404e0974e6e5026fd5acf1c27ee52037b | 3 | {
"blob_id": "8ffe73f404e0974e6e5026fd5acf1c27ee52037b",
"branch_name": "refs/heads/master",
"committer_date": 1479274875000,
"content_id": "4e7cac19771cd54009015613a4418996e487e7da",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "9db04711e1f79f0957c454d65b70f7564d662c92",
"extension": "p... | 3.125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# rst2md.py
# =========
#
# A reStructuredText to Markdown conversion tool, using Python's docutils
# library.
#
# by Eron Hennessey
#
import os
import sys
from abstrys.docutils_ext.markdown_writer import MarkdownWriter
from abstrys.common import printerr
from docutils.... | 133 | 30.66 | 88 | 16 | 935 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_682f33fac711e2a5_2a922f27", "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."
] | [
84
] | [
85
] | [
17
] | [
30
] | |
2024-11-19T02:07:01.305322+00:00 | 1,572,234,631,000 | a5b5d9c5d0488e00a22dc6a85e7590f81ddf8652 | 2 | {
"blob_id": "a5b5d9c5d0488e00a22dc6a85e7590f81ddf8652",
"branch_name": "refs/heads/master",
"committer_date": 1572234631000,
"content_id": "f751833b38238610b97b6e86566fd334e0e8fa5a",
"detected_licenses": [
"MIT"
],
"directory_id": "ac53ed07a534db727e57714f5fdd07950d22c170",
"extension": "py",
"fi... | 2.46875 | stackv2 | import requests
# url = 'https://www.12306.cn'
url = 'https://www.12306.cn/mormhweb'
headers = {
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36'
}
# 12306是自己颁布的证书,所以显示https不安全
# 解决方法,忽略证书访问
response = requests.get(url=url,... | 17 | 24.82 | 141 | 9 | 172 | python | [{"finding_id": "codeql_py/request-without-cert-validation_44e16c110cc0a577_9a02c803", "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
] | [
12
] | [
64
] | |
2024-11-19T02:07:26.006377+00:00 | 1,683,273,408,000 | 63253c263a2b9a24c2a8f9e8f20611e0beda0b7a | 3 | {
"blob_id": "63253c263a2b9a24c2a8f9e8f20611e0beda0b7a",
"branch_name": "refs/heads/master",
"committer_date": 1683273408000,
"content_id": "7d9b0dc76a72f754fc8560b7c6fee4c1b8ce26e2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "aa444da78d06a793a4afae669cfbc9a44929f6c1",
"extension": "py"... | 2.625 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Simple HTTPS server.
Development only.
options:
--host - server IP address, default: 0.0.0.0 # listening all interfaces
--port - 4443, default: 4443 # 443 requires root privileges
example:
python server.py --host=0.0.0.0 --port=4443
"""
import ssl
import a... | 36 | 28.33 | 85 | 9 | 270 | python | [{"finding_id": "codeql_py/insecure-default-protocol_6294e404be5f6c94_17cf9459", "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."
] | [
31
] | [
32
] | [
16
] | [
77
] | |
2024-11-19T02:31:20.994886+00:00 | 1,602,604,311,000 | a80e9e979b9350613d8035413f421ffa2921e7b4 | 4 | {
"blob_id": "a80e9e979b9350613d8035413f421ffa2921e7b4",
"branch_name": "refs/heads/master",
"committer_date": 1602604311000,
"content_id": "f05831b732819e85dc6359019b95408a678a4bea",
"detected_licenses": [
"Unlicense"
],
"directory_id": "b4fbc2aa91027db96292e0c351305fc2746c6527",
"extension": "py",... | 4 | stackv2 | import datetime
birthdays = [
datetime.datetime(2012, 4, 29),
datetime.datetime(2006, 8, 9),
datetime.datetime(1978, 5, 16),
datetime.datetime(1981, 8, 15),
datetime.datetime(2001, 7, 4),
datetime.datetime(1999, 12, 30)
]
today = datetime.datetime.today()
# Create a function named is_over_13 ... | 31 | 33.19 | 88 | 14 | 304 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d12b8a88bbf29058_642df321", "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."
] | [
31
] | [
null
] | [
7
] | [
24
] | |
2024-11-19T02:31:39.053418+00:00 | 1,561,397,244,000 | 88bff2906492cbc99a6004af7aaf67e8c99697d1 | 3 | {
"blob_id": "88bff2906492cbc99a6004af7aaf67e8c99697d1",
"branch_name": "refs/heads/master",
"committer_date": 1561397244000,
"content_id": "570c2dcb46ebf0db7254b398b1a83218d7ab5dfa",
"detected_licenses": [
"MIT"
],
"directory_id": "e71a5e9cf7f4acc7aabc08971b07175f08bad7b5",
"extension": "py",
"fi... | 3 | stackv2 | # import de modulos/libs
import json
import csv
import requests
##########################################################################################
# Api-endpoint do JIRA
URL = "< your JIRA API endpoint - URL da API da sua instancia do JIRA >"
# Paramentros da Request / Request Params
PARAMS = {'jql':'project ... | 76 | 32.33 | 142 | 14 | 608 | python | [{"finding_id": "codeql_py/request-without-cert-validation_169da4ac79dc57d8_2ca71f83", "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
] | [
5
] | [
52
] | |
2024-11-19T02:31:42.037127+00:00 | 1,604,392,697,000 | 76de663d93a435205e00d1d83acdb702706e7800 | 3 | {
"blob_id": "76de663d93a435205e00d1d83acdb702706e7800",
"branch_name": "refs/heads/master",
"committer_date": 1604392697000,
"content_id": "f4126b345a17258ac31dbe2fe6174603f5200e0a",
"detected_licenses": [
"MIT"
],
"directory_id": "6a5478592743c63a17baa7dad0cff997c218da74",
"extension": "py",
"fi... | 2.796875 | stackv2 | __doc__ = """
Module to generate a skeleton of code from Experiment Description."""
import json
import logging
import os
from jinja2 import Environment, FileSystemLoader
def generate_worker_function(experiment_description_path):
"""
The method takes a path to an experiment description and appends sce... | 43 | 39.95 | 128 | 15 | 369 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_4bbfee05218159c9_41c0a3b7", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
18
] | [
null
] | [
15
] | [
46
] | |
2024-11-19T02:31:44.384927+00:00 | 1,384,624,035,000 | e5e4268fb5c3fed0c720cfbae5622a05ceeee6fc | 3 | {
"blob_id": "e5e4268fb5c3fed0c720cfbae5622a05ceeee6fc",
"branch_name": "refs/heads/master",
"committer_date": 1384624035000,
"content_id": "5e48f4b3c93d0623ab561d75f3f830dcc0cbf2db",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "660a8b081982d0e92f8fc16db53bbed19d72b1e8",
"extension": "p... | 2.703125 | stackv2 | import hashlib
from copy import deepcopy
from django import forms
from django.forms import widgets
from django.utils.http import urlunquote
from buysafe.exceptions import ChecksumError
from buysafe.fields import NumberStringField, SunTechChecksumField
from buysafe.widgets import HiddenIntegerInput
###########
# Gadge... | 365 | 29.39 | 79 | 16 | 2,551 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_4de147a68a354944_3d87f5a0", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expen... | [
16
] | [
null
] | [
25
] | [
56
] | |
2024-11-19T02:31:44.664588+00:00 | 1,511,967,611,000 | 36eabef19388b9f544eeb5746b8d62f1837af677 | 2 | {
"blob_id": "36eabef19388b9f544eeb5746b8d62f1837af677",
"branch_name": "refs/heads/master",
"committer_date": 1511967611000,
"content_id": "11289b7bbed9c249ef8e2bce5d597bfc75e169d4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "797a7534ecc046f3c8270864e3bba05c6e50a671",
"extension": "py"... | 2.40625 | stackv2 | #local lib
import config
#standard libs
from six import raise_from
import socket
import traceback
import sys
import struct
#pypi libs
import OpenSSL.crypto as crypto
from OpenSSL import SSL
class Error(Exception): pass
class eStreamerKeyError(Error): pass
class eStreamerCertError(Error): pass
class eStreamerVerifyEr... | 115 | 34.12 | 123 | 19 | 916 | python | [{"finding_id": "codeql_py/insecure-protocol_be96113060c28384_27eb4611", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to SSL.Context](1).", "remediation": "", "locat... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to SSL.Context](1)."
] | [
53
] | [
null
] | [
20
] | [
49
] | |
2024-11-19T02:31:50.498090+00:00 | 1,575,195,310,000 | be197bff2113e4c538e62e1fc46f0954d871ab70 | 2 | {
"blob_id": "be197bff2113e4c538e62e1fc46f0954d871ab70",
"branch_name": "refs/heads/master",
"committer_date": 1575195310000,
"content_id": "2e3c5326cf82a49454253d92c99c95499017d2d6",
"detected_licenses": [
"MIT"
],
"directory_id": "3cdd44cb817db6aeb0b7f77d6b883b0e382a7203",
"extension": "py",
"fi... | 2.5 | stackv2 | # minimal example from:
# http://flask.pocoo.org/docs/quickstart/
import project4 as prj4
from project5 import detect
import os
from flask import Flask, flash, request, redirect, url_for,render_template, send_from_directory
from werkzeug.utils import secure_filename
OUTPUT_FOLDER = os.path.join('static', 'output')
... | 91 | 31.47 | 96 | 16 | 642 | python | [{"finding_id": "codeql_py/url-redirection_b09442f55b734779_c8d77fc1", "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)."
] | [
62,
68
] | [
null,
null
] | [
29,
29
] | [
40,
40
] | |
2024-11-19T02:31:52.897798+00:00 | 1,683,202,571,000 | d4c74502738b6e23c626680af6c96ffd84f7ab56 | 2 | {
"blob_id": "d4c74502738b6e23c626680af6c96ffd84f7ab56",
"branch_name": "refs/heads/master",
"committer_date": 1683202571000,
"content_id": "e77dc929ee0388c0a530130e335dc56809a53ea5",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "169a0e9f82a8145a77632afed21d11ed53860217",
"extension": "py"... | 2.359375 | stackv2 | # Copyright 2017-2020 Mateusz Klos
#
# 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... | 98 | 31.13 | 79 | 12 | 769 | python | [{"finding_id": "codeql_py/overly-permissive-file_4ceb6db893cbcb9e_fb11d7a4", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ... | 2 | true | [
"CWE-732",
"CWE-732"
] | [
"py/overly-permissive-file",
"py/overly-permissive-file"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world readable.",
"Overly permissive mask in chmod sets file to world readable."
] | [
76,
77
] | [
null,
null
] | [
9,
9
] | [
65,
63
] | |
2024-11-19T02:32:08.427060+00:00 | 1,589,810,468,000 | 4dc137e24a5971e940a76cb1e1a9ea393d6bc4e0 | 3 | {
"blob_id": "4dc137e24a5971e940a76cb1e1a9ea393d6bc4e0",
"branch_name": "refs/heads/master",
"committer_date": 1589811763000,
"content_id": "81b850345bfde60d41f9236a1b0627fad3dfdeec",
"detected_licenses": [
"MIT"
],
"directory_id": "eed214cc2a77e4e669ce90d565654c4c316cb76d",
"extension": "py",
"fi... | 2.5625 | stackv2 | """
Minimal app for serving Livepeer verification
"""
import logging
# create formatter to add it to the logging handlers
FORMATTER = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S')
import bjoern
from flask import Flask, request, jsonify
from ... | 152 | 38.11 | 100 | 13 | 1,120 | python | [{"finding_id": "codeql_py/log-injection_0b4e40c75ada4a18_762c94a8", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
114,
115
] | [
null,
null
] | [
69,
66
] | [
78,
75
] | |
2024-11-19T02:32:08.758740+00:00 | 1,564,017,058,000 | b02e257bba65a4dcad2d6560cf39313e9d6fd722 | 2 | {
"blob_id": "b02e257bba65a4dcad2d6560cf39313e9d6fd722",
"branch_name": "refs/heads/master",
"committer_date": 1564017058000,
"content_id": "22926aa5241427e5b641927bc37a2abf9ed60634",
"detected_licenses": [
"MIT"
],
"directory_id": "207d783464836e9ba8acd55c92b43f039e79deed",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from http.server import BaseHTTPRequestHandler
import threading
import csv
import os
import gzip
import requests
import io
import re
import redis
import socket
# import logging
import coloredlogs, logging
from termcolor import colored
# logging.basicConfig(level=logging.I... | 390 | 38.26 | 150 | 28 | 3,123 | python | [{"finding_id": "codeql_py/http-response-splitting_9d0eb89fb8507f4f_a56fd965", "tool_name": "codeql", "rule_id": "py/http-response-splitting", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This HTTP header is constructed from a [user-provided value](1).\nThis HTTP header is con... | 8 | true | [
"CWE-113",
"CWE-113",
"CWE-918",
"CWE-918",
"CWE-117",
"CWE-117",
"CWE-117",
"CWE-117"
] | [
"py/http-response-splitting",
"py/http-response-splitting",
"py/full-ssrf",
"py/full-ssrf",
"py/log-injection",
"py/log-injection",
"py/log-injection",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This HTTP header is constructed from a [user-provided value](1).\nThis HTTP header is constructed from a [user-provided value](2).\nThis HTTP header is constructed from a [user-provided value](3).\nThis HTTP header is constructed from a [user-provided value](4).",
"This HTTP header is constructed from a [user-pr... | [
382,
382,
159,
349,
316,
326,
347,
354
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
34,
37,
20,
28,
30,
34,
30,
34
] | [
35,
38,
65,
90,
90,
94,
91,
95
] | |
2024-11-19T02:32:17.876888+00:00 | 1,535,849,514,000 | a6fca89ce3b85ccbb8f189b9967b96d810d6317f | 3 | {
"blob_id": "a6fca89ce3b85ccbb8f189b9967b96d810d6317f",
"branch_name": "refs/heads/master",
"committer_date": 1535849514000,
"content_id": "f9ca8bdeddacdd08f940e338318ea71ec05ad644",
"detected_licenses": [
"MIT"
],
"directory_id": "6f4ae67f900c305540b0f7580c9a5813d6c2332c",
"extension": "py",
"fi... | 2.703125 | stackv2 | import requests
import json
from secretvalues import api_key
#How toxic a message can be before alerting YangBot
#Float between 0 and 1
TOXIC_THRESHOLD = .83
header = {'Content-type': 'application/json'}
url = 'https://commentanalyzer.googleapis.com/v1alpha1/comments:analyze?key={}'.format(api_key)
def format_json(mess... | 23 | 36.3 | 122 | 13 | 228 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_98a1792f54bb9fe2_3bdb0533", "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."
] | [
19,
23
] | [
null,
null
] | [
9,
8
] | [
19,
46
] | |
2024-11-19T02:33:02.246625+00:00 | 1,669,023,884,000 | 5befcc15e61c458943f801c99e46239bf614d46c | 3 | {
"blob_id": "5befcc15e61c458943f801c99e46239bf614d46c",
"branch_name": "refs/heads/master",
"committer_date": 1669023884000,
"content_id": "b7e1a86c124092053eb17e87fef94f770dfd2634",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "7e3fc8f3f4746f5669d852e61b8e95dcf09d0c2f",
"extension": "py"... | 2.6875 | stackv2 | """
builder class for kvm backup
- gathers template data
- connects to the backup vm's server and builds the backup of the vm on the server
"""
# stdlib
import logging
import socket
from datetime import datetime
from typing import Any, Dict, Optional
# lib
import opentracing
from jaeger_client import Span
from netaddr... | 190 | 41.67 | 111 | 20 | 1,731 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_3707f2e75f4e04ec_4daf38ce", "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."
] | [
88
] | [
null
] | [
9
] | [
58
] | |
2024-11-19T02:33:04.661349+00:00 | 1,437,112,553,000 | 084055204e106836faf4e270308e1972b09486ee | 2 | {
"blob_id": "084055204e106836faf4e270308e1972b09486ee",
"branch_name": "refs/heads/master",
"committer_date": 1437112553000,
"content_id": "9e125fa3e4bdbcc1594694e4b96ba1639f123fc7",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "68362a9b45a87f41e062474f6829f1d5ef8fca29",
"extension": "py"... | 2.46875 | stackv2 | import asyncio
from asyncio import coroutine
from aiohttp import web
from aiohttp_session import get_session, session_middleware
from aiohttp_session.cookie_storage import EncryptedCookieStorage
import ujson as json
from authomatic import Authomatic
from utils import AioAdapter, login_user, login_required
import con... | 91 | 26.58 | 80 | 16 | 570 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ab65050e1fa4bb9c_99dcf1ac", "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."
] | [
56
] | [
null
] | [
35
] | [
41
] | |
2024-11-19T02:43:34.256897+00:00 | 1,622,771,786,000 | baa81beda9414ced6794a05c9b3e27758a1a73e4 | 3 | {
"blob_id": "baa81beda9414ced6794a05c9b3e27758a1a73e4",
"branch_name": "refs/heads/main",
"committer_date": 1622771786000,
"content_id": "fe437e71e79a112b7d2d3348ba5b96bd1a3374a9",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "de7b7e1835558b6e7a2a9f5baabed6168b2c5da1",
"extension": "py"... | 2.90625 | stackv2 | #!user/bin/python
import requests
import time
import urllib3
import env
import json
from urllib3.exceptions import InsecureRequestWarning
urllib3.disable_warnings(InsecureRequestWarning)
class Cml2:
"""
A class that imports and starts a new lab
after deleting all the labs running on CML2.
How to cal... | 261 | 31.86 | 80 | 15 | 1,896 | python | [{"finding_id": "codeql_py/request-without-cert-validation_3fc6f71588fcb3e4_81a98108", "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]... | 9 | true | [
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"... | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation becau... | [
52,
81,
106,
127,
151,
179,
202,
220,
237
] | [
53,
82,
null,
null,
null,
null,
203,
null,
null
] | [
26,
27,
25,
24,
28,
28,
31,
29,
25
] | [
76,
73,
72,
74,
74,
74,
64,
79,
72
] | |
2024-11-19T02:54:52.192032+00:00 | 1,461,548,448,000 | 449522b4445901be27c61d13d25b8a162c989dfa | 3 | {
"blob_id": "449522b4445901be27c61d13d25b8a162c989dfa",
"branch_name": "refs/heads/master",
"committer_date": 1461548448000,
"content_id": "2381e2abecac7cb24cfcda4da438ffb98b6f39fb",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "039d5938cc28c2492dbd58d3c77cd8d936ac7c1e",
"extension": "p... | 2.859375 | stackv2 | import os
import json
import uuid
import requests
from brawlbracket import user
from brawlbracket import db_wrapper
from brawlbracket import util
_users = []
_db = None
def createUser(steamId):
"""
Takes a steamId and turns it into a BrawlBracketUser.
Raises ValueError if a user already exists wit... | 204 | 23.9 | 78 | 14 | 1,367 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9649ca82fa1c7b63_2e25a3b4", "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."
] | [
111
] | [
null
] | [
15
] | [
62
] | |
2024-11-19T02:55:04.105806+00:00 | 1,616,540,402,000 | 59ee3e2aedfd1fdba44076c9b8763c9d042da6ad | 2 | {
"blob_id": "59ee3e2aedfd1fdba44076c9b8763c9d042da6ad",
"branch_name": "refs/heads/main",
"committer_date": 1616540402000,
"content_id": "38c81ea3bf1cafce1f5b03a8a4e070b31bfdd419",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "ac9dc98e12386e0a9e43cdbad4761e3aa1a68435",
"extension": "py"... | 2.46875 | stackv2 | """
****************************************************************************************************
:copyright (c) 2019-2021 URBANopt, Alliance for Sustainable Energy, LLC, and other contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
... | 193 | 46.92 | 115 | 18 | 1,940 | python | [{"finding_id": "codeql_py/overly-permissive-file_cf9f9afd7b3f5932_a6cef5ab", "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."
] | [
109
] | [
null
] | [
9
] | [
40
] | |
2024-11-19T02:55:12.454502+00:00 | 1,628,262,973,000 | aa9136261275c61de544a3eadea14bed19d74e2b | 3 | {
"blob_id": "aa9136261275c61de544a3eadea14bed19d74e2b",
"branch_name": "refs/heads/master",
"committer_date": 1628262973000,
"content_id": "0b6f236d4692a43bcb36e05acde4035f4cc4b1b7",
"detected_licenses": [
"MIT"
],
"directory_id": "78ce44dd768868406c9c5161f4910d16e2eedd03",
"extension": "py",
"fi... | 2.515625 | stackv2 | import functools
import hashlib
import time
from problem.models import Problem
from contest.models import Contest, ContestType, ContestStatus, ContestRuleType
from utils.api import JSONResponse, APIError
from utils.constants import CONTEST_PASSWORD_SESSION_KEY
from .models import ProblemPermission
class BasePermissi... | 149 | 34.41 | 145 | 20 | 1,069 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_b75a4861d9863313_20e681b1", "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... | [
76
] | [
null
] | [
38
] | [
77
] | |
2024-11-19T02:55:15.532801+00:00 | 1,551,245,345,000 | 34d409d4e7cc7b69508bac597f52f65acf00e319 | 2 | {
"blob_id": "34d409d4e7cc7b69508bac597f52f65acf00e319",
"branch_name": "refs/heads/master",
"committer_date": 1551245345000,
"content_id": "5c738420b3b2415d446f8f2227cf94944868c8eb",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "693e817268b6c64cdc6675e84c71f66d91756601",
"extension": "py"... | 2.484375 | stackv2 | import json
import requests
import configparser
from datetime import datetime
class Media(object):
"""docstring for Media"""
def __init__(self, app_id, secret, picture_path):
self.app_id = app_id
self.secret = secret
self.access_token_url = 'https://api.weixin.qq.com/cgi-bin/token?gran... | 46 | 37.59 | 132 | 15 | 441 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_371039fda5d0b697_f3af2b5d", "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... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](... | [
38,
40
] | [
null,
null
] | [
27,
23
] | [
42,
31
] | |
2024-11-19T02:55:35.097215+00:00 | 1,405,523,893,000 | 7e404e9ddf5fac20dd6430f4e75758f284275595 | 3 | {
"blob_id": "7e404e9ddf5fac20dd6430f4e75758f284275595",
"branch_name": "refs/heads/master",
"committer_date": 1405523893000,
"content_id": "f2d4790f5ed42966e5b2e74ad4a2813ce8c8ba38",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "39b5c62c54e8493feb801015db4689c171f149f3",
"extension": "py"... | 2.546875 | stackv2 | from flask import Flask, url_for, render_template, Markup
import httplib
import re
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.formatters import HtmlFormatter
app = Flask(__name__)
app.config.from_pyfile('application.cfg')
base_url = app.config['BASE_URL']
base_path = ap... | 64 | 33.44 | 138 | 16 | 597 | python | [{"finding_id": "codeql_py/partial-ssrf_8859bae7cb9284e5_cb140d63", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil... | 2 | true | [
"CWE-918",
"CWE-918"
] | [
"py/partial-ssrf",
"py/partial-ssrf"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).",
"Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depends on a [user-provided value](2)."
] | [
30,
50
] | [
null,
null
] | [
5,
5
] | [
38,
38
] | |
2024-11-19T02:55:37.006435+00:00 | 1,617,591,514,000 | 53a99fdf9430e8f7cce92ae607997ef88e28b328 | 3 | {
"blob_id": "53a99fdf9430e8f7cce92ae607997ef88e28b328",
"branch_name": "refs/heads/main",
"committer_date": 1617591514000,
"content_id": "3ee7c13af54bf150667cf40eecd6c922dbaa80a1",
"detected_licenses": [
"CC0-1.0"
],
"directory_id": "1397af1014b8d1ca89a66b58d8eb16a52d05ac17",
"extension": "py",
"... | 2.65625 | stackv2 | import os
import numpy as np
from datetime import datetime, timezone
from pyproj import CRS
from typing import Union
from HSTB.kluster import dms
class BaseSvp:
"""
Base class for sound velocity file reader. Currently only extended by CarisSvp, to read caris svp files.
"""
def __init__(self):
... | 331 | 40.87 | 131 | 26 | 3,688 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b25d22789a87e4d9_eafb92bd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text."
] | [
111,
125
] | [
112,
128
] | [
19,
15
] | [
109,
91
] | |
2024-11-19T02:55:43.682387+00:00 | 1,551,148,625,000 | 56be18b860d933015f61cb7a41c36ad4bf4023f0 | 3 | {
"blob_id": "56be18b860d933015f61cb7a41c36ad4bf4023f0",
"branch_name": "refs/heads/master",
"committer_date": 1551148625000,
"content_id": "d0af30339fb68f93737f6e2387599a6a6a159df6",
"detected_licenses": [
"MIT"
],
"directory_id": "75056461f57e565672c4b27e0737893e380fc067",
"extension": "py",
"fi... | 2.734375 | stackv2 | from __future__ import absolute_import
from lib.ofxparse import OfxParser
def import_ofx(file):
ofx = OfxParser.parse(file)
print ("Account: ", str(ofx.account))
account = ofx.account
print(account.account_id) # The account number
print(account.routing_number) # The bank routin... | 42 | 35.31 | 104 | 10 | 322 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_899adf62970f8747_8af54c9e", "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
] | [
11
] | [
33
] | |
2024-11-19T02:55:50.758608+00:00 | 1,582,663,540,000 | 2bfa9cf9689672d8362746fd295f230e43b46d70 | 2 | {
"blob_id": "2bfa9cf9689672d8362746fd295f230e43b46d70",
"branch_name": "refs/heads/master",
"committer_date": 1582663540000,
"content_id": "55877c9db8499a448c188bfc71836167e7255695",
"detected_licenses": [
"MIT"
],
"directory_id": "b33917eb57cb828a9f4c7e50b9ca462762067913",
"extension": "py",
"fi... | 2.375 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import requests
import json
from influxdb import InfluxDBClient
AIRLY_INSTALLATIONS = {
18: 'Halszki',
58: 'Dietla',
60: 'Racheli',
228: 'Obozowa',
1070: 'Geremka'
}
def get_airly(apikey, installation_id):
headers = {'Accept': 'application/json', 'api... | 63 | 32.17 | 145 | 17 | 686 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d73bc1fc3a5392e3_c6b5a24b", "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."
] | [
60
] | [
null
] | [
7
] | [
145
] | |
2024-11-19T02:55:51.640217+00:00 | 1,596,001,132,000 | 25446370539dade854ebaf312881d6e256bfe69d | 3 | {
"blob_id": "25446370539dade854ebaf312881d6e256bfe69d",
"branch_name": "refs/heads/master",
"committer_date": 1596001132000,
"content_id": "b1f0f1da58e0dcf6b3d51716027b4cdfe68e4d8e",
"detected_licenses": [
"MIT"
],
"directory_id": "50e447d390cc85ed20120ea6fa8dd3e466c9c472",
"extension": "py",
"fi... | 2.609375 | stackv2 | from __future__ import print_function
import os
from os import getenv
import sqlite3
import win32crypt
import sys
import subprocess
siteId = "Site: "
username1 = "Username: "
password_field = "Password: "
# fecha todo o google chrome ... isso é necessario devido a conflitos de acesso concorrente a base sqlLite. :)
os... | 71 | 42.63 | 152 | 21 | 777 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_17fbb72df0392334_99b018eb", "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
] | [
38
] | [
152
] | |
2024-11-19T02:55:56.695720+00:00 | 1,534,236,808,000 | 1bf36571e8c3e66a0614bef012683c19e6e24224 | 3 | {
"blob_id": "1bf36571e8c3e66a0614bef012683c19e6e24224",
"branch_name": "refs/heads/master",
"committer_date": 1534236808000,
"content_id": "60d2a7ffc567d69e748d759312b0d6efe5168292",
"detected_licenses": [
"MIT"
],
"directory_id": "033c991b1ccc49ab12eb3cc3dca45c8fb3714b83",
"extension": "py",
"fi... | 2.765625 | stackv2 | import csv
from hashlib import md5
from io import StringIO
from math import ceil
from sys import stderr
import zeep
DEBUG = True
class WebService():
"""SESS web-service"""
WSDL = 'https://sess.sku.ac.ir/sess/WebServices/%s.asmx?WSDL'
def __init__(self, username, password, web_service, delimiter='&'):
... | 111 | 36.28 | 110 | 20 | 944 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_01df491035b7c01e_59217d98", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\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... | [
18,
27
] | [
null,
null
] | [
29,
35
] | [
53,
79
] | |
2024-11-19T02:55:57.115253+00:00 | 1,616,259,606,000 | 81cd66ec634340d40ed06f388c98de1276315347 | 3 | {
"blob_id": "81cd66ec634340d40ed06f388c98de1276315347",
"branch_name": "refs/heads/master",
"committer_date": 1616259606000,
"content_id": "63beb0efc4a2e2db182a8748ae739a10854b71c6",
"detected_licenses": [
"MIT",
"Apache-2.0"
],
"directory_id": "da51eac2a70b9b590618a2f7b1dd9b3f47af3178",
"exten... | 2.8125 | stackv2 | #!/usr/bin/env python3
import os
import requests
from flask import jsonify
from dotenv import load_dotenv
def dekelvinize(temp):
return temp - 273.15
def get_owmapi_data():
load_dotenv()
OWMAPI_KEY = os.getenv('OWMAPI_KEY')
OWMAPI_LOCATION_ID = os.getenv('OWMAPI_LOCATION_ID')
try:
url = "... | 28 | 30.32 | 113 | 14 | 249 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9f4b746eec7f4d38_0ef03417", "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."
] | [
28
] | [
null
] | [
11
] | [
28
] | |
2024-11-19T02:55:58.464833+00:00 | 1,553,975,725,000 | c63025444bfbc1059aa7f197c90c345d180c8d8b | 2 | {
"blob_id": "c63025444bfbc1059aa7f197c90c345d180c8d8b",
"branch_name": "refs/heads/master",
"committer_date": 1553975725000,
"content_id": "6c1653150a6b943ea2dad4626c43d6131e2cfdb9",
"detected_licenses": [
"MIT"
],
"directory_id": "7d71c9e1f8a949f5542fa238a28e9fa867749d4b",
"extension": "py",
"fi... | 2.359375 | stackv2 | """
Backend of Narrator web app.
"""
import os
import sys
import shutil
import pandas as pd
import skimage.io as io
import PIL
from flask import render_template, request, redirect, url_for, send_from_directory, session
from app import app
sys.path.append(app.config['COCOAPI_PATH'] + 'PythonAPI')
from pycocotools.coco ... | 443 | 37.04 | 97 | 22 | 3,452 | python | [{"finding_id": "codeql_py/path-injection_0d9fa27e60782a8a_1fbd595b", "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)."
] | [
226
] | [
null
] | [
15
] | [
68
] | |
2024-11-19T02:56:06.446241+00:00 | 1,449,688,321,000 | 8a8ab43fba7fd8da49053e0127a344cc316e0995 | 2 | {
"blob_id": "8a8ab43fba7fd8da49053e0127a344cc316e0995",
"branch_name": "refs/heads/master",
"committer_date": 1449688321000,
"content_id": "d62936010f75e396ffb85d57153c2cf8a738b56f",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "ea232d74b063957e28e73f74162665e5e0e88b20",
"extension": "py"... | 2.453125 | stackv2 | from flask import render_template, request, Flask
#from app import app
import pymysql as mdb
import pandas as pd
import sys, re
import program_rankings as rank
import numpy as np
import copy
app = Flask(__name__)
@app.route('/contact')
def contact():
"""Page with contact information."""
return render_template... | 215 | 40.45 | 172 | 21 | 2,007 | python | [{"finding_id": "codeql_py/flask-debug_4a46ffb4813f1b8c_d27713fd", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-089",
"CWE-089"
] | [
"py/flask-debug",
"py/sql-injection",
"py/sql-injection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This SQL query depends on a [user-provided value](1).",
"This SQL query depends on a [user-provided value](1)."
] | [
215,
117,
130
] | [
null,
null,
null
] | [
5,
42,
42
] | [
49,
84,
114
] | |
2024-11-19T03:10:51.900769+00:00 | 1,595,597,877,000 | aad4678f80aa0be2e24699db1cb02c787fa8ffae | 2 | {
"blob_id": "aad4678f80aa0be2e24699db1cb02c787fa8ffae",
"branch_name": "refs/heads/master",
"committer_date": 1595597877000,
"content_id": "a6ae0d5e37cab8b42f1b5febcb3ec5a8c7b9c5d8",
"detected_licenses": [
"MIT"
],
"directory_id": "34181f7e5bd68a5a8734c96a72e6a391babd0aa8",
"extension": "py",
"fi... | 2.3125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File : package_service.py
# @Author: zaoshu
# @Date : 2020-06-19
# @Desc :
import os
import tarfile
import time
from jinja2 import Template
from pynpm import NPMPackage
from common.cmd_util import CmdUtil
from common.constant import BuildType
from common.exception i... | 131 | 33.9 | 90 | 21 | 1,038 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d2a409edc8a69fce_d19a46e2", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 2 | true | [
"CWE-079",
"CWE-079"
] | [
"py/jinja2/autoescape-false",
"py/jinja2/autoescape-false"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks.",
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
31,
47
] | [
null,
null
] | [
26,
31
] | [
52,
57
] | |
2024-11-19T03:21:54.590669+00:00 | 1,610,720,214,000 | 9608a62f7544341debbeafd23c6a6cefba185eee | 3 | {
"blob_id": "9608a62f7544341debbeafd23c6a6cefba185eee",
"branch_name": "refs/heads/main",
"committer_date": 1610720214000,
"content_id": "bb1ebae5ea984bf052df9ef2b20660e8f0028da1",
"detected_licenses": [
"MIT"
],
"directory_id": "0331072d9f78d64b07a8eb73d73f457bd018f18b",
"extension": "py",
"file... | 2.640625 | stackv2 | """ This module is responsible for managing the wallpaper. """
import platform
import os
import re
import subprocess
from PIL import Image
from pathlib import Path
from random import choice
from urllib.request import urlopen
from uuid import uuid4
from wallauto.reddit import RedditClient
from wallauto.yamlmanager impo... | 266 | 31.52 | 75 | 19 | 1,841 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a502332a55b524c3_4b8acbe5", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://i.redd.it/](1) may be at an arbitrary position... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://i.redd.it/](1) may be at an arbitrary position in the sanitized URL."
] | [
117
] | [
null
] | [
21
] | [
53
] | |
2024-11-19T03:43:53.575974+00:00 | 1,617,065,037,000 | 97fdec16b65456a7b501ed16e44189403fd7d921 | 3 | {
"blob_id": "97fdec16b65456a7b501ed16e44189403fd7d921",
"branch_name": "refs/heads/master",
"committer_date": 1617065037000,
"content_id": "3c34a5e74b501972e1dc9037fcd18b8c9bea6b71",
"detected_licenses": [
"MIT"
],
"directory_id": "b49745367f9a66d7771dcf1d1517da5c36ea59ca",
"extension": "py",
"fi... | 2.609375 | stackv2 | """
Useful commands for the runtime.
"""
import logging
import sys
from datetime import datetime
from typing import List, Optional, cast
from collections import defaultdict
import yaml
from jinja2 import Template
from tqdm import tqdm
from . import botox
from .experiment import ExperimentBatch
from .util import forc... | 426 | 37.12 | 136 | 17 | 3,672 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_6d316ac23690ec70_14dae096", "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."
] | [
97
] | [
null
] | [
20
] | [
38
] | |
2024-11-19T03:44:00.414816+00:00 | 1,612,434,557,000 | 09c525340918aa54ff5e5292db986b69192ebaae | 3 | {
"blob_id": "09c525340918aa54ff5e5292db986b69192ebaae",
"branch_name": "refs/heads/main",
"committer_date": 1612434557000,
"content_id": "a06b61cf910ce8ec5e8882ff85fdd11324ed3160",
"detected_licenses": [
"MIT"
],
"directory_id": "41cc992240a522854eeffbd10dd2a0e3f91874de",
"extension": "py",
"file... | 2.6875 | stackv2 | """
This is the main python module
"""
import time
import datetime
import sched
import logging
import json
import pyttsx3
from flask import Flask, render_template, request, redirect
from time_conversion import hhmm_to_seconds, current_time_hhmm
from notification import *
# setting up pyttsx3
engine = pyttsx3.init()
... | 190 | 33.03 | 122 | 16 | 1,388 | python | [{"finding_id": "codeql_py/log-injection_4de0600a306b9f79_e6d9d8f9", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 2 | true | [
"CWE-117",
"CWE-117"
] | [
"py/log-injection",
"py/log-injection"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1).",
"This log entry depends on a [user-provided value](1)."
] | [
120,
129
] | [
null,
null
] | [
81,
73
] | [
91,
83
] | |
2024-11-19T03:44:09.005278+00:00 | 1,581,229,141,000 | 35c449ce1fdc01a165fd7d61b1dd398b9f915200 | 3 | {
"blob_id": "35c449ce1fdc01a165fd7d61b1dd398b9f915200",
"branch_name": "refs/heads/master",
"committer_date": 1581229141000,
"content_id": "6a27aeb47ac37cef3441c98c2464e1e59c604f01",
"detected_licenses": [
"MIT"
],
"directory_id": "08e982b3aaf263edb4f880a3d74086ab78d06a76",
"extension": "py",
"fi... | 2.78125 | stackv2 | import argparse
import paramiko
import zipfile
import logging
import datetime
import random
import os
logging.basicConfig(filename='log/file_transfer.log', level=logging.DEBUG)
random.seed(24)
def get_random_number_str(random_size: int = 1) -> str:
random_num_str = ''
for i in range(random_size):
ra... | 85 | 31.06 | 87 | 14 | 743 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_3daf76be84708fc7_4ea97b84", "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."
] | [
50
] | [
null
] | [
9
] | [
69
] | |
2024-11-19T03:44:23.125569+00:00 | 1,552,117,300,000 | 387d2d3d26733b9e53a92418a1e42117466d2290 | 2 | {
"blob_id": "387d2d3d26733b9e53a92418a1e42117466d2290",
"branch_name": "refs/heads/master",
"committer_date": 1552117300000,
"content_id": "8f51ab3873156ece717008ea56334e750bafe33c",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6c96601d64a02c4050410c5e45efa6e1bd8253f6",
"extension": "py"... | 2.390625 | stackv2 | import os
import os.path
import re
import logging
import jinja2
from io import StringIO
from .utils import (
get_meta_name_and_modifiers, html_escape, split_page_url, get_url_tail)
RE_FILE_FORMAT = re.compile(r'\r\n?', re.MULTILINE)
RE_META_SINGLE_LINE = re.compile(
r'^\{\{(?P<name>(__|\+)?[a-zA-Z][a-zA-Z0-9... | 294 | 35.51 | 79 | 21 | 2,593 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_272051d1d19ab877_f006ee59", "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."
] | [
272
] | [
null
] | [
15
] | [
35
] | |
2024-11-19T03:44:35.286125+00:00 | 1,624,652,009,000 | 67643d14671852d7f9696a9db67264a66455c320 | 3 | {
"blob_id": "67643d14671852d7f9696a9db67264a66455c320",
"branch_name": "refs/heads/master",
"committer_date": 1624652009000,
"content_id": "918c5eb20f49db902dfcd617872c6fa5d44b2884",
"detected_licenses": [
"MIT"
],
"directory_id": "ef1ed26c9fb428c514bf16787eda02ce18f5ca22",
"extension": "py",
"fi... | 2.734375 | stackv2 | # -*- coding: UTF-8 -*-
'''
'''
import requests
import time
import threading
import urllib3
from fake_headers import Headers
import uuid
from geolite2 import geolite2
ips = []
# 爬数据的线程类
def getChinaIP(ip='127.0.0.1'):
reader = geolite2.reader()
ip_info = reader.get(ip)
geolite2.close()
print(ip_info)... | 95 | 29.35 | 140 | 20 | 826 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9ff012688482d6ec_7dff01fd", "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)."
] | [
49
] | [
50
] | [
16
] | [
124
] | |
2024-11-19T02:08:37.228246+00:00 | 1,690,560,805,000 | acbc408ba08e1a433152660cc6188558cdaed9de | 2 | {
"blob_id": "acbc408ba08e1a433152660cc6188558cdaed9de",
"branch_name": "refs/heads/master",
"committer_date": 1690560816000,
"content_id": "b9bda651c7ebc39f44f36b1aca09a1c84a7f13ca",
"detected_licenses": [
"MIT"
],
"directory_id": "c45969bc0b58c0170d722c0239ba7f25f7f9eca9",
"extension": "py",
"fi... | 2.375 | stackv2 | from .serializers import (
AQListSerializer, AQConfigSerializer,
AQDataSerializer)
from api import util, auth
import coreapi
import coreschema
from datetime import datetime
from rest_framework.response import Response
from rest_framework.schemas import AutoSchema
import logging
from rest_framework.exceptions im... | 121 | 31.88 | 83 | 16 | 890 | python | [{"finding_id": "codeql_py/stack-trace-exposure_78f12dcfa5dc6db5_f2365f75", "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."
] | [
69
] | [
null
] | [
28
] | [
62
] | |
2024-11-19T02:08:41.073012+00:00 | 1,632,034,824,000 | 1dae71aeec508dda6ac5200e3839a54ffd6793f7 | 3 | {
"blob_id": "1dae71aeec508dda6ac5200e3839a54ffd6793f7",
"branch_name": "refs/heads/main",
"committer_date": 1632034824000,
"content_id": "65c7200e8bb4e4cdb038f59b487b18ea1bfc759a",
"detected_licenses": [
"MIT"
],
"directory_id": "6f22ca82da867d57869bc72244e639f7675e6653",
"extension": "py",
"file... | 2.640625 | stackv2 | # wifi_enable.py/Open GoPro, Version 2.0 (C) Copyright 2021 GoPro, Inc. (http://gopro.com/OpenGoPro).
# This copyright was auto-generated on Wed, Sep 1, 2021 5:06:01 PM
import bleak
import time
import asyncio
import logging
import argparse
from binascii import hexlify
from typing import Tuple
from bleak import Blea... | 96 | 32.71 | 165 | 14 | 781 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fbc07b558bb00945_174f2bf6", "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."
] | [
67
] | [
null
] | [
17
] | [
42
] | |
2024-11-19T02:57:56.289402+00:00 | 1,456,453,126,000 | e20df3e546ceb410834e58d28918c49bee3ff181 | 2 | {
"blob_id": "e20df3e546ceb410834e58d28918c49bee3ff181",
"branch_name": "refs/heads/master",
"committer_date": 1456453126000,
"content_id": "7f9c8c05c6a7953dd02ff58b91a0a5b29adbcadc",
"detected_licenses": [
"BSD-3-Clause",
"MIT"
],
"directory_id": "5706a192e52a7f97d1b341fcb0894cb790883889",
"ext... | 2.46875 | stackv2 | #!c:/python33/python.exe
# -*- coding: utf-8 -*-
import os
import cgi
import time
print('Content-type: text/html\n\n')
if os.environ['REMOTE_ADDR']!='127.0.0.1':
print('forbidden access')
else:
fs = cgi.FieldStorage()
src = fs['src'].value
t0 = time.perf_counter()
exec(src)
print('CPython: %6... | 17 | 20.71 | 70 | 15 | 124 | python | [{"finding_id": "codeql_py/code-injection_af196ec1a9260283_a06be42c", "tool_name": "codeql", "rule_id": "py/code-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This code execution depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "... | 1 | true | [
"CWE-094"
] | [
"py/code-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This code execution depends on a [user-provided value](1)."
] | [
16
] | [
null
] | [
10
] | [
13
] | |
2024-11-19T02:58:00.854655+00:00 | 1,690,405,640,000 | eb578cbed45796ea5fcf703c25bf985bd679235b | 3 | {
"blob_id": "eb578cbed45796ea5fcf703c25bf985bd679235b",
"branch_name": "refs/heads/master",
"committer_date": 1690405640000,
"content_id": "4721c787d0fd42d78a9d79185b2ebe2e9d4d97ff",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "013f02062c47524548a35706fc20f2918beb2a58",
"extension": "py"... | 3.09375 | stackv2 | import railroad
import pyparsing
from pkg_resources import resource_filename
import typing
from jinja2 import Template
from io import StringIO
with open(resource_filename(__name__, "template.jinja2"), encoding="utf-8") as fp:
template = Template(fp.read())
# Note: ideally this would be a dataclass, but we're supp... | 161 | 40.23 | 119 | 18 | 1,458 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_c87936cac0a6670f_9c1ddf73", "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."
] | [
9
] | [
null
] | [
16
] | [
35
] | |
2024-11-19T02:58:01.477540+00:00 | 1,549,074,735,000 | 0a793320bf08f9755d1f331004abed17c13800fc | 2 | {
"blob_id": "0a793320bf08f9755d1f331004abed17c13800fc",
"branch_name": "refs/heads/master",
"committer_date": 1549074735000,
"content_id": "28967b74d95398d16cb260be476f59c9f3fa4169",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8dd236ab6b486245170356760318f20bbd58d30f",
"extension": "py"... | 2.453125 | stackv2 | #coding:utf-8
import paramiko
import data
import common
import springboard
def login(host,user,pwd,port):
#建立ssh连接
ssh=paramiko.SSHClient()
ssh.load_system_host_keys()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(host,port=port,username=user,password=pwd,compress=Tr... | 106 | 26.44 | 91 | 15 | 744 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_51fb1cd86a8c4be6_2782f506", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r... | 1 | true | [
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
14
] | [
null
] | [
5
] | [
62
] | |
2024-11-19T03:10:03.316152+00:00 | 1,692,989,631,000 | 93e500ae00831923136178ad271e0fefa0f8e89b | 2 | {
"blob_id": "93e500ae00831923136178ad271e0fefa0f8e89b",
"branch_name": "refs/heads/main",
"committer_date": 1693220952000,
"content_id": "9ba5b8409fb099cf5b85d02fea6de0bbe535594a",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "8cec96940d87cdb09be2e4c8aa1277d1577fa662",
"extension": "py"... | 2.328125 | stackv2 | import re
from json import JSONDecodeError
from logging import getLogger
from typing import ByteString, Iterator
from urllib.parse import parse_qs, urlparse
from google.auth.transport.requests import AuthorizedSession
from google.oauth2.service_account import Credentials
from marshmallow import INCLUDE, Schema, Valida... | 203 | 33.65 | 82 | 16 | 1,497 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_5f6b89819f42d55d_89883e5a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://drive.google.com](1) may be at an arbitrary po... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [https://drive.google.com](1) may be at an arbitrary position in the sanitized URL."
] | [
140
] | [
null
] | [
16
] | [
65
] | |
2024-11-19T03:10:14.304093+00:00 | 1,629,099,688,000 | 2a49571bed0535ca7d011d56e165aac78261eff8 | 3 | {
"blob_id": "2a49571bed0535ca7d011d56e165aac78261eff8",
"branch_name": "refs/heads/master",
"committer_date": 1629099688000,
"content_id": "35d80e66d9bacdc1f5ec1f4f463b16c382207380",
"detected_licenses": [
"BSD-2-Clause",
"BSD-3-Clause"
],
"directory_id": "063e080f8dedeb4008e6453f3fdc9c3cd7368116... | 2.71875 | stackv2 | """
functions for implementing parts of the HSMs machinery in software
"""
# Copyright (c) 2012 Yubico AB
# See the file COPYING for licence statement.
import struct
import json
import os
__all__ = [
# constants
# functions
'aesCCM',
'crc16',
# classes
'SoftYHSM'
]
import pyhsm
import pyhsm.... | 217 | 29.55 | 105 | 17 | 1,763 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_c9577f9ab86df75a_146cd74a", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-cryptographic-algorithm",
"py/weak-cryptographic-algorithm"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used.",
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
69,
190
] | [
null,
null
] | [
20,
21
] | [
47,
41
] | |
2024-11-19T03:22:47.054842+00:00 | 1,637,477,487,000 | b1afd2ad1f2830e52b112253f625e2e824742814 | 3 | {
"blob_id": "b1afd2ad1f2830e52b112253f625e2e824742814",
"branch_name": "refs/heads/main",
"committer_date": 1637477487000,
"content_id": "fa976d556cad97f4f50ee091a91557ec0a59dc5a",
"detected_licenses": [
"MIT"
],
"directory_id": "5292b03998384c0d2bb5858058892d7e45c5365b",
"extension": "py",
"file... | 3.375 | stackv2 | import Crypto.Util.number as cun
import Crypto.Random.random as crr
import Crypto.Util.Padding as cup
from Crypto.Cipher import AES
import os
import hashlib
class DiffieHellman:
def __init__(self, p: int):
self.p = p
self.g = 8
self.private_key = crr.getrandbits(128)
def public_key(se... | 73 | 24.47 | 71 | 13 | 498 | python | [{"finding_id": "codeql_py/weak-cryptographic-algorithm_fdd42c54f61ea55d_a187b4c9", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ... | 1 | true | [
"CWE-327"
] | [
"py/weak-cryptographic-algorithm"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[The block mode ECB](1) is broken or weak, and should not be used."
] | [
58
] | [
null
] | [
18
] | [
63
] | |
2024-11-19T03:44:13.341025+00:00 | 1,680,510,475,000 | 6b484119535ee7268a87b2855d876cbedb697662 | 4 | {
"blob_id": "6b484119535ee7268a87b2855d876cbedb697662",
"branch_name": "refs/heads/master",
"committer_date": 1680510475000,
"content_id": "44d0232bac64a8d6cbc147a8ee98b980a5e4724b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "4d253d1116cb1d5436c5e6e9b150d422b073aa56",
"extension": "py"... | 3.8125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Yue-Wen FANG'
__maintainer__ = "Yue-Wen FANG"
__email__ = 'fyuewen@gmail.com'
__license__ = 'Apache License 2.0'
__creation_date__= 'Dec. 28, 2018'
"""
9-3. Users: Make a class called User . Create two attributes called first_name and last_name, and then cre... | 37 | 33.08 | 109 | 12 | 335 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_aeb89a7bcdb4a800_9fb30bc5", "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."
] | [
30
] | [
null
] | [
27
] | [
38
] | |
2024-11-19T03:44:14.626870+00:00 | 1,661,533,456,000 | 5ea707eaa94f1bfed6a8b65b9725c5d318d8703c | 2 | {
"blob_id": "5ea707eaa94f1bfed6a8b65b9725c5d318d8703c",
"branch_name": "refs/heads/master",
"committer_date": 1661533456000,
"content_id": "4d8adb699cd8497b50172c4e872909044d117bf9",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "83c395f0e630064cbcaaa0f8818898454581ddc8",
"extension": "py"... | 2.5 | stackv2 | '''
Les podcasts à dl :
e-dixit : https://www.radiokawa.com/episode/e-dixit-1/
Comics outcast : https://www.radiokawa.com/culture-et-arts/comics-outcast/
Morceaux choisis : https://www.radiokawa.com/musique/morceaux-choisis/
Faster Than Light : https://www.radiokawa.com/jeux-video/faster-than-light/
Les démons du Midi ... | 249 | 36.33 | 128 | 20 | 2,399 | python | [{"finding_id": "codeql_py/request-without-cert-validation_1cddb329665e13f4_ed006a5a", "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... | [
105,
115,
157,
175
] | [
null,
null,
null,
null
] | [
15,
19,
16,
23
] | [
50,
58,
54,
78
] | |
2024-11-19T01:34:54.142054+00:00 | 1,584,386,650,000 | 9477f52203d06164b8bb8a34277d7927e1d660e1 | 3 | {
"blob_id": "9477f52203d06164b8bb8a34277d7927e1d660e1",
"branch_name": "refs/heads/master",
"committer_date": 1584386650000,
"content_id": "89684c1f3e5126b363c26a9c83d3bc1a08e9a3bd",
"detected_licenses": [
"MIT"
],
"directory_id": "4f409e43166ed3232a85fa60e8c15535be5d46de",
"extension": "py",
"fi... | 3.0625 | stackv2 | """
Have a good time reading the source. You are an amazing person.
"""
import geoip2.database
import socket
database_path = "GeoLite2-City.mmdb"
def scan_ip(IP_ADDR):
try:
database = geoip2.database.Reader(database_path)
ip_info = database.city(IP_ADDR)
ISO_CODE = ip_info.country.iso_co... | 37 | 35.14 | 118 | 15 | 309 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d38a3959860aabdd_2eaab2bb", "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."
] | [
29
] | [
null
] | [
15
] | [
57
] | |
2024-11-19T01:35:06.670134+00:00 | 1,570,211,295,000 | d63c56003bfd89a1b347bed69998c22102e7ee47 | 3 | {
"blob_id": "d63c56003bfd89a1b347bed69998c22102e7ee47",
"branch_name": "refs/heads/master",
"committer_date": 1570211295000,
"content_id": "4a7ff359ec53da1e9d95c9fff0f690e9d068bd8c",
"detected_licenses": [
"MIT"
],
"directory_id": "f1bb21d473dc00c9080f9f0f6df1f4936c144beb",
"extension": "py",
"fi... | 2.984375 | stackv2 | """
Infrastructure for managing genetic maps.
"""
import pathlib
import tempfile
import tarfile
import logging
import contextlib
import warnings
import os
import urllib.request
import msprime
from . import cache
logger = logging.getLogger(__name__)
@contextlib.contextmanager
def cd(path):
"""
Convenience f... | 151 | 39.84 | 97 | 20 | 1,258 | python | [{"finding_id": "codeql_py/tarslip_157eb0b61de61ddb_31b2dd61", "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)."
] | [
113
] | [
null
] | [
21
] | [
23
] | |
2024-11-19T01:55:39.369231+00:00 | 1,485,247,740,000 | 27ad001974d2deffdb9ecc3963c0c6e43a69c21a | 2 | {
"blob_id": "27ad001974d2deffdb9ecc3963c0c6e43a69c21a",
"branch_name": "refs/heads/master",
"committer_date": 1485247740000,
"content_id": "0b31cfbddffe04e995b059ce6c0e7e56455a2712",
"detected_licenses": [
"MIT"
],
"directory_id": "935b5e5a4780429263570cb2d7adc1651b2259e4",
"extension": "py",
"fi... | 2.40625 | stackv2 | # -*- coding: utf-8 -*-
# Created by restran on 2016/10/10
from __future__ import unicode_literals, absolute_import
"""
# 加上gevent的monkey.patch_all(),不然会出现如下错误
# Paramiko fails to connect due to greenlet error 'This operation would block forever'
"""
from gevent import monkey
monkey.patch_all()
import logging
import... | 61 | 24.54 | 86 | 14 | 395 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a8c1b43e91b6e861_83994919", "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... | 4 | true | [
"CWE-295",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/paramiko-missing-host-key-validation",
"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"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe.",
"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."
] | [
38,
41,
45,
57
] | [
null,
null,
null,
null
] | [
13,
28,
25,
21
] | [
73,
69,
66,
44
] | |
2024-11-19T01:55:41.844488+00:00 | 1,468,068,367,000 | f441bfcea88e204e845f24dcf7954938361989c4 | 2 | {
"blob_id": "f441bfcea88e204e845f24dcf7954938361989c4",
"branch_name": "refs/heads/master",
"committer_date": 1468068379000,
"content_id": "d5f02c6d819c6469b761efbb72ee6c1b3950d459",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8a5d31fc5b8a34e79871728cc5f552b5f4bf3873",
"extension": "py"... | 2.3125 | stackv2 | from dashie_sampler import DashieSampler
import requests, json, time, collections, random
class ApicConn:
apic_ip = '10.126.216.230'
apic_uname = 'admin'
apic_passw = 'nbv_12345'
mo = ''
modata = ''
base_url = 'http://%s/api/' % apic_ip
inbounddata = {}
connected = False
auth_tok... | 153 | 29.88 | 133 | 20 | 1,145 | python | [{"finding_id": "codeql_py/request-without-cert-validation_2a707acf02841b31_30bbca9a", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
41
] | [
null
] | [
28
] | [
88
] | |
2024-11-19T02:07:56.905550+00:00 | 1,613,407,513,000 | cad6571974cea5443ff1681cecb24baa6af94c91 | 2 | {
"blob_id": "cad6571974cea5443ff1681cecb24baa6af94c91",
"branch_name": "refs/heads/main",
"committer_date": 1613407513000,
"content_id": "7f9f91cb6392784d15fac43040945e38b62e18c3",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "37e6e572cad35fac43a40b9f64b5a84c2ac57b12",
"extension": "py",
... | 2.4375 | stackv2 | import discord
from discord.ext.commands import Cog
from discord.ext.commands import command
from lib.bot.cheggapi import getLink
from lib.bot.firebaseauth import addUser, getUser, getUserMail, updateMail, deleteUser, addQuestion, updateQuestion, \
getQuestion, deleteQuestion, fetchAllUsers
from lib.bot.saveMail im... | 255 | 43.01 | 166 | 23 | 2,437 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_7cfaaa85760c8b4f_61c5af90", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [chegg.com](1) may be at an arbitrary position in the s... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [chegg.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [chegg.com](1) may be at an arbitrary position in the sanitized URL."
] | [
128,
152
] | [
null,
null
] | [
16,
24
] | [
35,
43
] | |
2024-11-19T02:17:16.491766+00:00 | 1,650,363,336,000 | 7802b9bb518dbef68dad49b8ccefd1ea5fe23b30 | 3 | {
"blob_id": "7802b9bb518dbef68dad49b8ccefd1ea5fe23b30",
"branch_name": "refs/heads/main",
"committer_date": 1650363336000,
"content_id": "ea1a8d57bba845308f30e890388a83c129fccdc4",
"detected_licenses": [
"MIT"
],
"directory_id": "6f76a0061a5398f048d0ed9f4f7f8ded67471556",
"extension": "py",
"file... | 2.515625 | stackv2 | import secrets
import dates
import os
import pandas as pd
from pathlib import Path
import os.path
import requests
from urllib.parse import urlparse
import json
import random
import time
import datetime
from dateutil import parser
DATA_PATH = Path.cwd()
keywordsDF = pd.read_csv(DATA_PATH / 'keywords.csv', delimite... | 149 | 37.91 | 150 | 23 | 1,355 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_79fe0c299ac38bcc_00299d2f", "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."
] | [
74,
88,
138,
130
] | [
null,
null,
null,
null
] | [
23,
19,
23,
31
] | [
30,
51,
36,
72
] | |
2024-11-19T02:17:19.222871+00:00 | 1,610,672,864,000 | ea13629d1335c2cde4f91ce3da0a2589cd6d147d | 3 | {
"blob_id": "ea13629d1335c2cde4f91ce3da0a2589cd6d147d",
"branch_name": "refs/heads/master",
"committer_date": 1610672864000,
"content_id": "87694a09cae5bc2fa8afa9f4a7fdc598d474935c",
"detected_licenses": [
"MIT"
],
"directory_id": "67b8bb8abdc079313d2236f69168ee25a8f196aa",
"extension": "py",
"fi... | 2.78125 | stackv2 | from .search import Scanner
import fire
from rich import print
from pathlib import Path
class CLI:
def __init__(self):
try:
self.scanner = Scanner()
except KeyError:
print("[red] API key not found")
print("Please set up first:")
self.setup()
def ... | 43 | 48.56 | 126 | 16 | 506 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_69186374670fc4fc_d253eefb", "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."... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-storage-sensitive-data",
"py/clear-text-storage-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.",
"This expression stores [sensitive data (password)](1) as clear text."
] | [
19,
20
] | [
null,
null
] | [
21,
21
] | [
57,
59
] | |
2024-11-19T02:17:46.808761+00:00 | 1,523,379,621,000 | a781c8807ffd189d9d7fccce7f3bf63f2d965aa1 | 3 | {
"blob_id": "a781c8807ffd189d9d7fccce7f3bf63f2d965aa1",
"branch_name": "refs/heads/master",
"committer_date": 1523379621000,
"content_id": "8481bcd87d2551d12d98d7314f92175e6bbd5fef",
"detected_licenses": [
"MIT"
],
"directory_id": "9ed368389e4978e9cd585b8c5cebad1295392001",
"extension": "py",
"fi... | 3.328125 | stackv2 | """Loading weather data (temp)
"""
import os
import csv
import logging
from collections import defaultdict
import numpy as np
def read_weather_station_script_data(path_to_csv):
"""Read in weather stations from script data
Arguments
---------
path_to_csv : str
Path
Returns
-------
... | 66 | 25.14 | 76 | 13 | 380 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3b40473b4d10751e_2677474f", "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."
] | [
39,
40
] | [
null,
null
] | [
17,
17
] | [
26,
25
] | |
2024-11-19T02:18:02.560294+00:00 | 1,618,982,841,000 | 9a99feb9df17d10ffb625ac29c2792356f772c75 | 2 | {
"blob_id": "9a99feb9df17d10ffb625ac29c2792356f772c75",
"branch_name": "refs/heads/master",
"committer_date": 1618982841000,
"content_id": "4caf9db4a1f7fb20ea2df07724b43d87a3c387ee",
"detected_licenses": [
"MIT"
],
"directory_id": "f93fc9cf0151f3a02541b92712e599814af58e2d",
"extension": "py",
"fi... | 2.375 | stackv2 | from app.auth import bp
from werkzeug.urls import url_parse
from flask import url_for, redirect, flash, request, render_template, session
from flask_login import current_user, login_user, logout_user
from app.auth.forms import LoginForm
from app.models import User
@bp.route('/login', methods=['GET', 'POST'])
def login... | 31 | 39.13 | 85 | 16 | 260 | python | [{"finding_id": "codeql_py/url-redirection_c1af11a3a06813ff_474b8026", "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)."
] | [
25
] | [
null
] | [
25
] | [
34
] | |
2024-11-19T02:18:12.659440+00:00 | 1,507,257,659,000 | 1fc3b6af53ce540022b482f21d27052bacda6d16 | 3 | {
"blob_id": "1fc3b6af53ce540022b482f21d27052bacda6d16",
"branch_name": "refs/heads/master",
"committer_date": 1507257659000,
"content_id": "a8e7613e4923237fee6540418cd430ef118294c3",
"detected_licenses": [
"MIT"
],
"directory_id": "101eb18d421c4fd558a805b980f0556570d3041b",
"extension": "py",
"fi... | 2.859375 | stackv2 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Album downloader for /r/CuteKorean subreddit
@author: You
Ver. 0.04
10/01/2017 - Need fix folder issue, and add try/except for TypeError
10/02/2017 - Fixed folder and TypeError, next create "a la carte" version
10/03/2017 - Need fix a-la-carte download issue.
10/04/2... | 55 | 30.75 | 76 | 16 | 441 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_48033d2eddf2b78e_dae96ae6", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [imgur.com](1) may be at an arbitrary position in the s... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [imgur.com](1) may be at an arbitrary position in the sanitized URL."
] | [
43
] | [
null
] | [
26
] | [
54
] | |
2024-11-19T02:18:14.950222+00:00 | 1,608,451,009,000 | c4cc9be5178f0cbb18394c7a8853053789732d2e | 3 | {
"blob_id": "c4cc9be5178f0cbb18394c7a8853053789732d2e",
"branch_name": "refs/heads/main",
"committer_date": 1608451009000,
"content_id": "00ffe77cac8df06fa432a700d2baf633af853497",
"detected_licenses": [
"MIT"
],
"directory_id": "6874d2c953c01acf775164f85c1b52615e03109b",
"extension": "py",
"file... | 2.640625 | stackv2 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# pip install pyyaml,uuid
import os, time, json, yaml, uuid, platform
class Management():
def __init__(self) -> None:
with open('config.yaml',encoding='utf-8') as f:
config = yaml.safe_load(f)
try:
pwdList = []
clash_ch... | 111 | 37.19 | 148 | 22 | 1,117 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_267c5756a2bd3bb4_9fd7d4b7", "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."
] | [
29
] | [
null
] | [
19
] | [
20
] | |
2024-11-19T02:18:16.923561+00:00 | 1,416,348,382,000 | 203cbcda3dc5fc83dd52cecfda26515a9601026b | 3 | {
"blob_id": "203cbcda3dc5fc83dd52cecfda26515a9601026b",
"branch_name": "refs/heads/master",
"committer_date": 1416348382000,
"content_id": "94c0ca9e9965f2a86e1fca686e497590751e0646",
"detected_licenses": [
"MIT"
],
"directory_id": "ef89649b5380fa691cfff508ea77d8c946d197e8",
"extension": "py",
"fi... | 2.578125 | stackv2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import itertools
import os
import sys
try:
from urllib import quote_plus, urlencode
from urlparse import parse_qsl, urlparse, urlunparse
except ImportError:
from urllib.parse import parse_qsl, quote_plus, urlencode, urlparse, urlunparse
ERR_INV... | 209 | 36.49 | 144 | 16 | 1,808 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b70e27ee1e802544_1b4f869f", "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."
] | [
204
] | [
null
] | [
26
] | [
42
] | |
2024-11-19T02:30:04.630591+00:00 | 1,426,553,651,000 | dc58157f6c82e53d9d1ffb133ca378eab718dbaf | 2 | {
"blob_id": "dc58157f6c82e53d9d1ffb133ca378eab718dbaf",
"branch_name": "refs/heads/master",
"committer_date": 1426553651000,
"content_id": "be7e3aa1fa2bad8cf40ecabc03b0f1b12b728f2b",
"detected_licenses": [
"MIT"
],
"directory_id": "c6e3fdae79621611defdcafddc504a899781fe8f",
"extension": "py",
"fi... | 2.484375 | stackv2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from MySQLdb import Error, IntegrityError
from util import connect_db, dump_response_and_exit
import cgi
import hashlib
import json
import re
import sys
print "Content-type:applicaion/json\r\n\r\n"
form = cgi.FieldStorage()
username = form.getvalue('username')
password = fo... | 42 | 26.26 | 75 | 14 | 297 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_51ec32cf97895098_cfd18442", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
32
] | [
null
] | [
45
] | [
53
] | |
2024-11-19T02:30:11.026117+00:00 | 1,490,689,657,000 | c010ff952943f24ad73e8a87bffae45f8b0b373c | 2 | {
"blob_id": "c010ff952943f24ad73e8a87bffae45f8b0b373c",
"branch_name": "refs/heads/master",
"committer_date": 1490689657000,
"content_id": "b9fa1ce7c58a886f965c372dd085fce0f6bf98aa",
"detected_licenses": [
"MIT"
],
"directory_id": "c14e70341a35ca4023d7f7b305f97c9b59d7d747",
"extension": "py",
"fi... | 2.40625 | stackv2 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from os import path
from flask import Flask, request, Response, abort
from fileoper import img_resize, file_getmime, file_read
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['RESOURCE_ROOT'] = 'img'
@app.route('/<path:uri>')
def index(uri):
filetypelist... | 48 | 25.15 | 82 | 15 | 311 | python | [{"finding_id": "codeql_py/path-injection_e842e82263de9a5e_20872feb", "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)."
] | [
20,
21,
27
] | [
null,
null,
null
] | [
20,
39,
24
] | [
28,
47,
32
] | |
2024-11-19T02:30:18.970547+00:00 | 1,605,055,750,000 | d7f5cb823bd0abd343a880cb1469fc06c1961994 | 3 | {
"blob_id": "d7f5cb823bd0abd343a880cb1469fc06c1961994",
"branch_name": "refs/heads/main",
"committer_date": 1605055750000,
"content_id": "1f2de7c6bc468945070075d83c2a2865a9351ce8",
"detected_licenses": [
"Python-2.0"
],
"directory_id": "bec5887ce083082808da3f14c1105901c0c356cc",
"extension": "py",
... | 2.625 | stackv2 | # downloads and untars model to saved_models directory given hub url
import wget
import tarfile
from absl import app, flags
import ssl
FLAGS = flags.FLAGS
flags.DEFINE_string('url', 'https://tfhub.dev/tensorflow/ssd_mobilenet_v2/2', 'hub url for model')
flags.DEFINE_string('directory', './saved_models/', 'directory t... | 22 | 33.5 | 98 | 12 | 187 | python | [{"finding_id": "codeql_py/tarslip_0bb1b4aae98c4143_6d80c5a7", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un... | 1 | true | [
"CWE-022"
] | [
"py/tarslip"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This file extraction depends on a [potentially untrusted source](1)."
] | [
19
] | [
null
] | [
5
] | [
13
] | |
2024-11-19T02:30:28.173233+00:00 | 1,630,850,307,000 | cc991207c97645df47390edf1ee41d152e95f02c | 3 | {
"blob_id": "cc991207c97645df47390edf1ee41d152e95f02c",
"branch_name": "refs/heads/main",
"committer_date": 1630850307000,
"content_id": "f366e1d6f152509fa32358696322baa7fd504c43",
"detected_licenses": [
"MIT"
],
"directory_id": "f7ff93fb9e159b81b33409eb9b968911f984d541",
"extension": "py",
"file... | 2.53125 | stackv2 | from flask import Flask,request,render_template
import json
import datetime
app = Flask(__name__)
# personal_datas = [
# {"id":1111,"status":"detected","date":"2021-09-02_17-32-30"},
# {"id":1112,"status":"non-detected","date":"2021-09-02_17-32-60"}
# ]
personal_datas = {}
personal_datas['1111'] = {"status":"... | 98 | 28.8 | 104 | 19 | 749 | python | [{"finding_id": "codeql_py/stack-trace-exposure_6ca51a64b1871baa_37cf3925", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 3 | true | [
"CWE-209",
"CWE-209",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/stack-trace-exposure",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
77,
86,
64
] | [
null,
null,
null
] | [
16,
16,
24
] | [
22,
22,
35
] | |
2024-11-19T02:30:31.787015+00:00 | 1,666,857,550,000 | 247e3c87d5dba4416fc1c0843a5ab77049178903 | 3 | {
"blob_id": "247e3c87d5dba4416fc1c0843a5ab77049178903",
"branch_name": "refs/heads/master",
"committer_date": 1666857550000,
"content_id": "72b9253d1ca83a90c016e7967173589d685ec1cb",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "4da6290aa529a5c2b3e606b8a4d3f977cfc90fe1",
"extension": "p... | 2.671875 | stackv2 | import json
from builtins import str as text
from past.builtins import basestring
from rest_framework import serializers
class JsonField(serializers.Field):
def to_representation(self, value):
if isinstance(value, basestring):
return json.loads(value)
return value
def to_internal... | 27 | 26.07 | 58 | 16 | 136 | python | [{"finding_id": "codeql_py/stack-trace-exposure_e7ec930552cccbc8_fb3d9275", "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."
] | [
20
] | [
null
] | [
51
] | [
58
] | |
2024-11-19T02:42:06.254635+00:00 | 1,657,222,977,000 | e45e44b99b8dcc50706756d307db486d8c699243 | 3 | {
"blob_id": "e45e44b99b8dcc50706756d307db486d8c699243",
"branch_name": "refs/heads/master",
"committer_date": 1657222977000,
"content_id": "dc5903eac14de9df40264ad329bb8a2f332a20f5",
"detected_licenses": [
"MIT"
],
"directory_id": "56494e64241d36bf36ef5c68e31aa8b55ff8884a",
"extension": "py",
"fi... | 2.5625 | stackv2 | import sys, os, io
import inspect
import pkgutil
import importlib
import operator
ARGPARSE_SIG = '(*ap_args)'
def format_docsting(docstring, additional_indent=0):
"""Adapted from pep 257"""
lines = docstring.expandtabs().splitlines()
indent = sys.maxsize
for line in lines[1:]:
stripped = lin... | 144 | 34.12 | 89 | 25 | 1,178 | python | [{"finding_id": "codeql_py/overly-permissive-file_d6f2de0ddf46f6c9_7b3513f0", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
144
] | [
null
] | [
13
] | [
36
] | |
2024-11-18T18:16:01.364366+00:00 | 1,501,751,490,000 | adc04b9b415b2f2f8a047205f951e30cd6625357 | 3 | {
"blob_id": "adc04b9b415b2f2f8a047205f951e30cd6625357",
"branch_name": "refs/heads/master",
"committer_date": 1501751490000,
"content_id": "1279e3fe2acd73db382bd0041c379df74fbe273a",
"detected_licenses": [
"MIT"
],
"directory_id": "9ffc02a2c88d451037e9d87946a0821f62f28f20",
"extension": "py",
"fi... | 3.015625 | stackv2 | # usr/bin/env python3
# -*- coding: utf-8 -*-
# demo3
# This is a _very simple_ example of a web service that recognizes faces in uploaded images.
import face_recognition
import json
from PIL import Image
from flask import Flask, jsonify, request, redirect, Response, make_response
from flask_cors import *
# You can c... | 114 | 31.46 | 126 | 16 | 835 | python | [{"finding_id": "codeql_py/flask-debug_211155cc3e5e0aed_8e765de2", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 3 | true | [
"CWE-215",
"CWE-601",
"CWE-601"
] | [
"py/flask-debug",
"py/url-redirection",
"py/url-redirection"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Untrusted URL redirection depends on a [user-provided value](1).",
"Untrusted URL redirection depends on a [user-provided value](1)."
] | [
114,
29,
34
] | [
null,
null,
null
] | [
5,
29,
29
] | [
40,
40,
40
] | |
2024-11-18T19:31:10.645731+00:00 | 1,467,312,822,000 | 3e1f933fe9799f665ce837c36932195f0fd258ab | 2 | {
"blob_id": "3e1f933fe9799f665ce837c36932195f0fd258ab",
"branch_name": "refs/heads/master",
"committer_date": 1467312822000,
"content_id": "bcfd9d682a8213af96f9f83556758b84df6ea331",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "3052542c12f55b6492dab7b8531cee0a7ee0185a",
"extension": "p... | 2.46875 | stackv2 | import os
import re
import cgi
import datetime
import wsgiref.handlers
import time
import hashlib
import logging
from django.utils import simplejson
from google.appengine.ext import db
from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
SECRE... | 122 | 29.26 | 89 | 17 | 835 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_5a80a9f6b7e538b7_05c5d7d7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
52
] | [
null
] | [
28
] | [
69
] | |
2024-11-18T19:11:51.488021+00:00 | 1,569,391,453,000 | 02021da8f3c0f827dbb25f3df6a395a32daf1b17 | 2 | {
"blob_id": "02021da8f3c0f827dbb25f3df6a395a32daf1b17",
"branch_name": "refs/heads/master",
"committer_date": 1569391453000,
"content_id": "f08659458566913cbc6048be6ad41c864617cad6",
"detected_licenses": [
"MIT"
],
"directory_id": "351a752f72a10c3bdf526f4db2d7eb0ae2149f20",
"extension": "py",
"fi... | 2.4375 | stackv2 | from . import auth
from .. import db, Bcrypt
from flask import Blueprint, render_template, redirect, url_for, request, flash, abort
from werkzeug.security import generate_password_hash, check_password_hash
from ..models import User
from .forms import SignupForm, LoginForm
from flask_login import login_user,current_user... | 71 | 27.79 | 100 | 16 | 435 | python | [{"finding_id": "codeql_py/url-redirection_0aaa12a871625780_6ae84ac0", "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)."
] | [
53
] | [
null
] | [
29
] | [
38
] | |
2024-11-18T18:39:50.179985+00:00 | 1,529,392,910,000 | 54b859d9470a5b4f1f401a75b33fc750c234b333 | 2 | {
"blob_id": "54b859d9470a5b4f1f401a75b33fc750c234b333",
"branch_name": "refs/heads/master",
"committer_date": 1529392910000,
"content_id": "9928afbad5754ee2619375b06d2ae30b8d577210",
"detected_licenses": [
"MIT"
],
"directory_id": "b8afda72b0bef3329c5c633310276b5377f1673e",
"extension": "py",
"fi... | 2.359375 | stackv2 | import os
import xarray as xr
import matplotlib.pyplot as plt
from lib.plots import plot_soln
import jinja2
def savefig(name):
plt.savefig(os.path.join(plots_dir, name))
def plot_columns(cols):
d = xr.open_dataset(cols)
d = d.isel(x=8, y=8)
plot_soln(d)
i = snakemake.input
o = snakemake.output
ro... | 44 | 16.93 | 53 | 10 | 233 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_c64063c6fdc3abca_a78e583c", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
42
] | [
null
] | [
5
] | [
30
] | |
2024-11-18T18:39:59.932355+00:00 | 1,556,101,759,000 | 66d6937896b45347a9c7c43683e32168b5eb2ab8 | 2 | {
"blob_id": "66d6937896b45347a9c7c43683e32168b5eb2ab8",
"branch_name": "refs/heads/master",
"committer_date": 1556101759000,
"content_id": "53c4301a37a9efa1ecb21610c3bfe78054d3a102",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "2e6062604822deae617839ba37b48342bef91858",
"extension": "py"... | 2.453125 | stackv2 | from flask import Flask, request, Response, abort, jsonify
import cherrypy
import json
import os
from jinja2 import Template
import uuid
import datetime
import requests
import sys
import logging
app = Flask(__name__)
logger = logging.getLogger()
format_string = '[%(asctime)s] %(levelname)s %(message)s'
log_handler = ... | 105 | 28.35 | 97 | 13 | 699 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_dd68505437e9f93d_96cb2eb9", "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."
] | [
69
] | [
null
] | [
16
] | [
44
] | |
2024-11-18T18:40:06.946576+00:00 | 1,602,159,047,000 | 88972d4e983a6d9640e7c359d1d12b51b72b0f7f | 3 | {
"blob_id": "88972d4e983a6d9640e7c359d1d12b51b72b0f7f",
"branch_name": "refs/heads/master",
"committer_date": 1602159047000,
"content_id": "8479da602e53f9f7ba0bd7a82f5e03bb3508a0ca",
"detected_licenses": [
"MIT"
],
"directory_id": "1aea621e89ad96e42c46fa127d3fb5b4967bc92e",
"extension": "py",
"fi... | 2.921875 | stackv2 | import hashlib,string,sys,random
def usage():
print('Must run with four arguments, one for the file from which to read')
print('passwords and counts, one for the number of elements in the table,')
print('one with the filename for the hashed table, and one for the filename')
print('for the plaintext solution.')... | 46 | 28.26 | 101 | 17 | 372 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_d7e56a1e3df1c420_8192b5f8", "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."... | 2 | true | [
"CWE-312",
"CWE-327"
] | [
"py/clear-text-storage-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression stores [sensitive data (password)](1) as clear text.",
"[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."
] | [
43,
45
] | [
null,
null
] | [
19,
14
] | [
34,
16
] | |
2024-11-18T20:52:23.443580+00:00 | 1,599,247,454,000 | a5b986bea37e13a36072debc938f3dda132de8d9 | 3 | {
"blob_id": "a5b986bea37e13a36072debc938f3dda132de8d9",
"branch_name": "refs/heads/master",
"committer_date": 1599247454000,
"content_id": "f33dabc396be1a776121af5ad1bba9cc0a6d4dbd",
"detected_licenses": [
"MIT"
],
"directory_id": "d7c4e031b6272a7674b8883c88a9815fbeef8ca4",
"extension": "py",
"fi... | 2.578125 | stackv2 | import time
import os
import base64
import requests
from requests.auth import HTTPProxyAuth
from requests.adapters import HTTPAdapter
from zipfile import ZipFile
#Code to download 1 hour of Logs
end_time=int(time.time())*1000
start_time=int(time.time())*1000 - 3600000
#As you won't be allowed to fetch logs directly, ... | 51 | 41.02 | 174 | 16 | 579 | python | [{"finding_id": "codeql_py/request-without-cert-validation_751535224e969d56_062a3fa6", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 1 | true | [
"CWE-295"
] | [
"py/request-without-cert-validation"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1)."
] | [
30
] | [
null
] | [
13
] | [
82
] | |
2024-11-18T20:52:25.599768+00:00 | 1,529,826,919,000 | b46c8afd919bbe19c4638e2147c7181739793c88 | 3 | {
"blob_id": "b46c8afd919bbe19c4638e2147c7181739793c88",
"branch_name": "refs/heads/master",
"committer_date": 1529826919000,
"content_id": "152c23399a901a4e709675bee4c4ba1bf588f812",
"detected_licenses": [
"MIT"
],
"directory_id": "b9db7cc9853ffaa2502661fa9d9486b7cf5a58d3",
"extension": "py",
"fi... | 2.984375 | stackv2 | import time
import fcntl
import os
import argparse
import sys
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
my_fname=""
cmd_monitor=None
class CmdMonitorParams (object):
def __init__( self ):
self.cmd_file = ""
self.my_file = None # File Handle
... | 107 | 28.99 | 141 | 17 | 705 | python | [{"finding_id": "codeql_py/overly-permissive-file_91b47b899d48d5c7_9673aa5b", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in chmod sets file to world writable."
] | [
30
] | [
null
] | [
9
] | [
37
] | |
2024-11-18T18:46:58.615235+00:00 | 1,625,677,341,000 | 578319367624126fcd7cb91df5d5abfe1fb485c7 | 3 | {
"blob_id": "578319367624126fcd7cb91df5d5abfe1fb485c7",
"branch_name": "refs/heads/main",
"committer_date": 1625677341000,
"content_id": "6e1d0f2dbdb6a1dc68465f29e5b8cb4960f5872e",
"detected_licenses": [
"MIT"
],
"directory_id": "3c4f63ef59c9f33daa8b17a38dcafb2837cc4419",
"extension": "py",
"file... | 3.109375 | stackv2 | """
This module contains code for PasswordGeneratorGUI main class.
It is used to generating and saving passwords with GUI.
"""
import random
import sys
from string import ascii_letters, digits, punctuation
from PyQt5.QtWidgets import QApplication, QFileDialog, QMainWindow
import password_generator.window as window
... | 46 | 31.22 | 77 | 17 | 301 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_59b4e68378b2c4b3_21886b29", "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."
] | [
39
] | [
null
] | [
25
] | [
33
] | |
2024-11-18T18:47:02.141999+00:00 | 1,566,422,038,000 | 7d4d12181145ea1e6e6a7a45e1eec685e84e9206 | 3 | {
"blob_id": "7d4d12181145ea1e6e6a7a45e1eec685e84e9206",
"branch_name": "refs/heads/master",
"committer_date": 1566422038000,
"content_id": "381967e25f68c6d096d9b139872063ac0593890f",
"detected_licenses": [
"BSD-3-Clause",
"BSD-2-Clause"
],
"directory_id": "635d093249afe06001393a11c6b8a2486374ddb1... | 2.765625 | stackv2 | #!/usr/bin/python
import xlrd,os,sys,re,json
from unidecode import unidecode
def sortBySplitLength(a,b):
a = len(a.split(';'))
b = len(b.split(';'))
if a > b:
return 1
elif a < b:
return -1
else:
return 0
class LRRFileMaker:
def __init__(self, fileName):
self.f... | 149 | 31.48 | 86 | 17 | 1,221 | python | [{"finding_id": "codeql_py/redos_1bf65e9bbcec6c44_ca446c04", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with ''(' and containing many repetitio... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with ''(' and containing many repetitions of 'Z)('."
] | [
55
] | [
null
] | [
38
] | [
44
] | |
2024-11-18T20:15:45.382839+00:00 | 1,464,442,909,000 | b5e8a005c147c4b414e07b0b6139670f3e9f9d3c | 3 | {
"blob_id": "b5e8a005c147c4b414e07b0b6139670f3e9f9d3c",
"branch_name": "refs/heads/master",
"committer_date": 1464442909000,
"content_id": "5fe5dea4ecd751f136f23eddcc9b219422f4c87a",
"detected_licenses": [
"MIT"
],
"directory_id": "389bf909e01ce0c9b509694792d0052dc11144b0",
"extension": "py",
"fi... | 2.78125 | stackv2 | # Cycles through servers with ssh to execute one command on each machine
# can be used to write a simple cluster shell oder similar
import paramiko
server = [
{'host': '','port':22,'user':'','password':''},
]
command = 'date +%s'
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy(... | 22 | 25 | 85 | 11 | 147 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_c9f3abc1d336c347_37493a6b", "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."
] | [
13
] | [
null
] | [
null
] | [
58
] | |
2024-11-18T20:16:11.059461+00:00 | 1,595,647,022,000 | a8da18ebd5bc91f9331c2638c1d4ef65c0b3e709 | 3 | {
"blob_id": "a8da18ebd5bc91f9331c2638c1d4ef65c0b3e709",
"branch_name": "refs/heads/master",
"committer_date": 1595647022000,
"content_id": "59c7f3ea7ca0a03f55e87b311addd731cc9a8e36",
"detected_licenses": [
"MIT"
],
"directory_id": "7adf17501cbe10c36a4f03b0ef85a754d95c876a",
"extension": "py",
"fi... | 2.609375 | stackv2 | module_array = [ ]
from os import system, name
try:
from ncclient import manager
except ImportError:
print("Module NCC Client not available.")
module_array.append("ncclient")
try:
from socket import gaierror
except ImportError:
print("Module socket not available.")
module_array.append("gaierror"... | 282 | 29.4 | 140 | 19 | 1,913 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_220454ddc0c02977_59e114e3", "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... | 8 | true | [
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging... | [
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text.",
"This expression logs [sensitive data (s... | [
93,
95,
91,
97,
78,
76,
74,
80
] | [
null,
null,
null,
null,
null,
null,
null,
null
] | [
23,
23,
23,
23,
19,
19,
19,
19
] | [
76,
76,
80,
72,
79,
79,
83,
75
] | |
2024-11-18T19:38:22.038452+00:00 | 1,468,944,175,000 | e647c843633c3e562f5415bc11addb09455fe46e | 2 | {
"blob_id": "e647c843633c3e562f5415bc11addb09455fe46e",
"branch_name": "refs/heads/master",
"committer_date": 1468944175000,
"content_id": "86fc290810203510d21c1ec7c4c2898fa9f0f2fa",
"detected_licenses": [
"MIT"
],
"directory_id": "bfe0c1849ad7dd22eeb929a9f127bb55d2870d1a",
"extension": "py",
"fi... | 2.46875 | stackv2 | """
Derek Merck <derek_merck@brown.edu>
Spring 2016
The Medical Image Informatics Platform Bootstrapper
Utility scripts for cleaning and setting up config for docker-compose defined MIIP services.
"""
import logging
import argparse
import yaml
from jinja2 import Environment, FileSystemLoader
import pprint
import sub... | 212 | 27.72 | 146 | 17 | 1,510 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_bfe5784c1183be62_bb57dcc1", "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."
] | [
58
] | [
null
] | [
13
] | [
54
] | |
2024-11-18T20:10:47.732113+00:00 | 1,655,387,953,000 | f9c17c9ff8a1b0b8c130e711cc9e1a3a79daea52 | 2 | {
"blob_id": "f9c17c9ff8a1b0b8c130e711cc9e1a3a79daea52",
"branch_name": "refs/heads/master",
"committer_date": 1655387953000,
"content_id": "58bc5958f215ac13c4ed25e765ad8fb87261f9f4",
"detected_licenses": [
"MIT"
],
"directory_id": "7740e7f8f02df805079c1c86f8486095b28da099",
"extension": "py",
"fi... | 2.5 | stackv2 | #!/usr/bin/env python
PROGRAM_NAME = "cg-csv-config-gen.py"
PROGRAM_DESCRIPTION = """
CloudGenix JINJA Template and CSV Parameters File Site creation tool
---------------------------------------
This script will receive a YML JINJA Template alongside a CSV Parameters file to create multiple
importable YML files which... | 156 | 38.17 | 139 | 13 | 1,430 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_d1d361ed86aed0f7_1bd6edc8", "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."
] | [
139
] | [
null
] | [
7
] | [
73
] | |
2024-11-18T20:11:04.096541+00:00 | 1,622,358,444,000 | 3fc874e2a30fb777e17c10eef39ba96542460231 | 3 | {
"blob_id": "3fc874e2a30fb777e17c10eef39ba96542460231",
"branch_name": "refs/heads/master",
"committer_date": 1622358444000,
"content_id": "3d90e48642c26da9dd7bd01d48d90f876374c76e",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "288b7a4c03f393c9b3cf9fb4100192c1990e14f1",
"extension": "py"... | 2.5625 | stackv2 | import requests
API_KEY = 'YUOR_API_KEY'
BASE_URL = 'https://api.etherscan.io/api?module=account'
def get_balance(address):
url = BASE_URL + '&action=balance&address=' + address + '&tag=latest&apikey=' + API_KEY
print(url)
r = requests.get(url)
print(r.text)
def run():
address = '0xddbd2b932c763ba5b1b7ae3b362ea... | 18 | 20.89 | 88 | 11 | 132 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a55775a34d5804e1_decb0e44", "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."
] | [
8,
10
] | [
null,
null
] | [
8,
8
] | [
11,
14
] | |
2024-11-18T20:11:09.148597+00:00 | 1,583,933,355,000 | fe028619f97165fdccabd25797f5d5335d12f78c | 3 | {
"blob_id": "fe028619f97165fdccabd25797f5d5335d12f78c",
"branch_name": "refs/heads/master",
"committer_date": 1583933355000,
"content_id": "83d6cea75356c2cd7c860f197c089893c5a8c6fe",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "26917dee61a00dd3ee96cdb6b7fd1003f7cca542",
"extension": "p... | 3.015625 | stackv2 | import json
from sys import stderr
from database import Database
dbg = True
def log(msg):
if dbg:
stderr.write("Handler: {}\n".format(msg))
def err(debug):
return {'status': 'ERROR', 'debug': debug}
def ok(data=None):
res = {'status': 'OK'}
if data is not None:
res['data'] = data
... | 162 | 27.85 | 91 | 22 | 1,035 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8c238ff335b16761_ab08f061", "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.\nThis expression logs [sensitive data (passw... | [
9
] | [
null
] | [
22
] | [
49
] | |
2024-11-18T20:26:28.451012+00:00 | 1,612,926,284,000 | f0d6fe9b3f4bb08efbbd71f3cdea9129dddb473c | 3 | {
"blob_id": "f0d6fe9b3f4bb08efbbd71f3cdea9129dddb473c",
"branch_name": "refs/heads/main",
"committer_date": 1612926284000,
"content_id": "0af3f10b1c571cf0a29d605ed8fa7e02fd2d4892",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "f8137b9248d4ff0f68c28b1e948b0616c6aa2215",
"extension": "py",
... | 2.515625 | stackv2 | import decimal
import flask.json
import sys
from flask import Flask, jsonify, request
from pathlib import Path
# Of course, you can use `os` instead of `pathlib`, but `pathlib` is good ;)
sys.path.append(str(Path(__file__).resolve().parent.parent)) # add project root to path
import apps.data_student as ds
from apps.... | 72 | 23.07 | 88 | 13 | 417 | python | [{"finding_id": "codeql_py/log-injection_3a99e87c3df67c28_5e60cc6c", "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)."
] | [
35,
42,
51,
60
] | [
null,
null,
null,
null
] | [
21,
21,
21,
21
] | [
28,
28,
28,
28
] | |
2024-11-18T20:26:33.503620+00:00 | 1,632,236,428,000 | 518bb0709a8dfbf129069e490603892ee4e29aca | 3 | {
"blob_id": "518bb0709a8dfbf129069e490603892ee4e29aca",
"branch_name": "refs/heads/main",
"committer_date": 1632236428000,
"content_id": "3d2d981f04dd64ed1f2723b44c3dc0ff5b4c5352",
"detected_licenses": [
"MIT"
],
"directory_id": "e93c6e93f612bca7f192adf539b4f489ad114ab5",
"extension": "py",
"file... | 2.765625 | stackv2 | import socket
from datetime import datetime
import requests
import scapy.all as scapy
def get_hosts():
print("\n\n----> Retrieving hosts ...", end="")
response = requests.get("http://127.0.0.1:5001/hosts")
if response.status_code != 200:
print(f" !!! Failed to retrieve hosts from server: {respo... | 62 | 31.05 | 110 | 16 | 509 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a55df58c1ed4e222_7273e18c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-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.",
"This expression logs [sensitive data (private)](1) as clear text.",
"This expression logs [sensitive data (private)](1) as clear text."
] | [
53,
59,
62
] | [
null,
null,
null
] | [
11,
15,
15
] | [
73,
99,
84
] | |
2024-11-18T20:26:50.099371+00:00 | 1,591,187,817,000 | 008276c7c80478d257f5aaa163161a3c5310c5ad | 3 | {
"blob_id": "008276c7c80478d257f5aaa163161a3c5310c5ad",
"branch_name": "refs/heads/master",
"committer_date": 1591187817000,
"content_id": "01b8946db630ec552a726db677f07f60cdcd9faf",
"detected_licenses": [
"Unlicense"
],
"directory_id": "5cb59e488d71371aac8b6c23b27058f5fe3024c8",
"extension": "py",... | 3.109375 | stackv2 | # Test script
#
#
#
#
import sys
task = input('Which task do you wish to perform (1 or 2) ? ')
if task == '1': # First Task
# Bad practice to fragment the import statements, but I think it is easier to read as an exercise.
import ssl # Used to get the PEM certificate
from cryptography import x509 # Used to read ... | 72 | 36.07 | 148 | 15 | 657 | python | [{"finding_id": "codeql_py/insecure-protocol_eeaa16d576665d07_2cf2312a", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.SSLContext](1)."
] | [
26
] | [
null
] | [
11
] | [
18
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.