added stringlengths 32 32 | created int64 1,244B 1,694B | id stringlengths 40 40 | int_score int64 2 5 | metadata dict | score float64 2.31 5.25 | source stringclasses 1
value | text stringlengths 324 20.1k | num_lines int64 16 598 | avg_line_length float64 15.1 58.3 | max_line_length int64 33 179 | ast_depth int64 8 39 | length int64 101 3.8k | lang stringclasses 1
value | sast_codeql_findings stringlengths 1.1k 265k | sast_codeql_findings_count int64 1 45 | sast_codeql_success bool 1
class | sast_codeql_error stringclasses 1
value | cwe_ids listlengths 1 45 | rule_ids listlengths 1 45 | confidences listlengths 1 45 | severities listlengths 1 45 | messages listlengths 1 45 | line_starts listlengths 1 45 | line_ends listlengths 1 45 | column_starts listlengths 1 45 | column_ends listlengths 1 45 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2024-11-19T01:02:48.672352+00:00 | 1,609,642,871,000 | c6c354fb23b7c0d6479d451523590cd3b23d74a0 | 3 | {
"blob_id": "c6c354fb23b7c0d6479d451523590cd3b23d74a0",
"branch_name": "refs/heads/main",
"committer_date": 1609642871000,
"content_id": "55cf0c7b8407112767d96cf9ec87467e405fe90f",
"detected_licenses": [
"MIT"
],
"directory_id": "d024c97ea155bbe2a4060217f4aa2c6f98fc57ef",
"extension": "py",
"file... | 3.234375 | stackv2 | # This is a client
import blowfish
import random
import ecdsa
import hashlib
class Client():
def __init__(self, server, ec):
"""
This function initializes the client and its processes,
including login and proceeding to order the cookies.
"""
print("\n", "-"*24, "\n")
... | 156 | 35.28 | 100 | 16 | 1,232 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8e62f87a2d06c136_6f55d1df", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text."
] | [
132
] | [
null
] | [
45
] | [
56
] | |
2024-11-19T01:02:54.994359+00:00 | 1,633,365,573,000 | 6b26be4551ae49980d9aa158029adbb0478ec93c | 4 | {
"blob_id": "6b26be4551ae49980d9aa158029adbb0478ec93c",
"branch_name": "refs/heads/main",
"committer_date": 1633365573000,
"content_id": "ed3d45b4e5fde86a78d9da50e0f50d068b795fc5",
"detected_licenses": [
"MIT"
],
"directory_id": "9d2a58f599730ce2b48b35d83b00446682a0acf1",
"extension": "py",
"file... | 4.03125 | stackv2 | #strong password generator of given length
import random
import string
import time
def passgen(len):
time.sleep(1.5)
print("Generating a strong password...")
lower = string.ascii_lowercase
time.sleep(1.5)
print("Adding lowercase characters...")
upper = string.ascii_uppercase
time.sleep(1.5)
print("A... | 31 | 24.52 | 60 | 9 | 201 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_56e99682d8ea5c1c_cec27375", "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."
] | [
31
] | [
null
] | [
7
] | [
50
] | |
2024-11-19T01:55:00.423511+00:00 | 1,622,221,493,000 | f07bc9209f0df0ff4f55a26d36a004be71033667 | 3 | {
"blob_id": "f07bc9209f0df0ff4f55a26d36a004be71033667",
"branch_name": "refs/heads/main",
"committer_date": 1622221493000,
"content_id": "08801eb821416bbdeb0a645325639913d9f0e50d",
"detected_licenses": [
"MIT"
],
"directory_id": "2b18205d1c5c89efbccdf02a8a94f73397518a3e",
"extension": "py",
"file... | 2.5625 | stackv2 | import re
from django import http
from django.shortcuts import render, redirect
from django.urls import reverse
from django.views import View
# Create your views here.
from apps.users.models import User
class RegisterView(View):
def get(self, request):
return render(request, template_name='register.html... | 63 | 28.86 | 96 | 13 | 498 | python | [{"finding_id": "codeql_py/overly-large-range_cbe5e8e38b9b1497_fa781a40", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].",
"Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]."
] | [
37,
41
] | [
null,
null
] | [
34,
34
] | [
37,
37
] | |
2024-11-19T00:53:38.362390+00:00 | 1,614,181,199,000 | b0e7fde12d935dad2e422a39a9da54325b81ea4d | 3 | {
"blob_id": "b0e7fde12d935dad2e422a39a9da54325b81ea4d",
"branch_name": "refs/heads/master",
"committer_date": 1614181199000,
"content_id": "0dcc8ead714df56bc94af5aaecc5e70c417a8ea9",
"detected_licenses": [
"MIT"
],
"directory_id": "50008b3b7fb7e14f793e92f5b27bf302112a3cb4",
"extension": "py",
"fi... | 2.734375 | stackv2 | import os
import sys
import tarfile
ERROR = False
TABLE = ''.join(map(chr, range(256)))
DELETECHARS = ''.join(c for c in TABLE if len(repr(c)) != 6)
def main():
try:
arguments = sys.argv[1:]
assert arguments
for path in arguments:
assert os.path.isdir(path)
for function... | 48 | 25.75 | 78 | 20 | 320 | python | [{"finding_id": "codeql_py/tarslip_9a3af21dde9b1dd5_1f65b755", "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)."
] | [
34
] | [
null
] | [
10
] | [
28
] | |
2024-11-19T00:27:25.011230+00:00 | 1,571,264,553,000 | d42a46f90eabe980c158636485c06445b30cea28 | 3 | {
"blob_id": "d42a46f90eabe980c158636485c06445b30cea28",
"branch_name": "refs/heads/master",
"committer_date": 1571264553000,
"content_id": "6c1c30fa70f9e9bf99f8755dc3ac1b049477c669",
"detected_licenses": [
"BSD-2-Clause"
],
"directory_id": "5d0a956acd40aecff1bbea2692f4d8cc916f0f6d",
"extension": "p... | 2.578125 | stackv2 | """
Checks that TFO actually works. Based on the following line in the RFC:
If the FastOpened flag is set, the packet acknowledges the SYN and data sequence.
The script checks for this for a given IP. Note that this script does not test for the TFO option to be set.
This script uses the kernel to handle details of TFO... | 124 | 29.79 | 117 | 16 | 955 | python | [{"finding_id": "codeql_py/overly-permissive-file_0b3fbde3cd7381f1_e0430fbb", "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."
] | [
119
] | [
null
] | [
5
] | [
33
] | |
2024-11-19T01:06:06.918384+00:00 | 1,567,149,916,000 | 8619164aa0dfc9a4dd1533b476f1f7344ea7d295 | 2 | {
"blob_id": "8619164aa0dfc9a4dd1533b476f1f7344ea7d295",
"branch_name": "refs/heads/master",
"committer_date": 1567149916000,
"content_id": "a97ba6f907e9b9386fb72fbd431bf1333b9d56e0",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "11e9d070cc3243b971dc0dcb1c40c10894b6e56b",
"extension": "py"... | 2.359375 | stackv2 | import paramiko
import re
import time
import sys
import json
from flask import make_response
from flask import Flask
from flask import request
#from flask import abort
from flask import jsonify
from flask import Response
from flask_cors import *
app = Flask(__name__)
CORS(app, resources=r'/*')
# the information of h... | 287 | 34.63 | 120 | 19 | 2,496 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_b667ce0d82f5188f_b8c7ec7a", "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... | 2 | true | [
"CWE-295",
"CWE-215"
] | [
"py/paramiko-missing-host-key-validation",
"py/flask-debug"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger."
] | [
25,
287
] | [
null,
null
] | [
null,
3
] | [
63,
47
] | |
2024-11-19T01:06:15.652504+00:00 | 1,528,734,006,000 | a2a73752acd6f04ec1d92a530cd6336921c2edf2 | 3 | {
"blob_id": "a2a73752acd6f04ec1d92a530cd6336921c2edf2",
"branch_name": "refs/heads/master",
"committer_date": 1528734006000,
"content_id": "4a91fd427b5c801324742edcf6695773a4ba9edd",
"detected_licenses": [
"MIT"
],
"directory_id": "10c03e2efd691767eaf40a1121961193b17cbea1",
"extension": "py",
"fi... | 2.921875 | stackv2 | from Crypto.PublicKey import RSA
from Crypto import Random
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA256
import getpass
import hashlib
# Generating New KeyPair
random_generator = Random.new().read
key = RSA.generate(1024, random_generator)
digest = SHA256.new()
# Hasing the Password
digest.upd... | 25 | 28.92 | 84 | 11 | 208 | python | [{"finding_id": "codeql_py/weak-crypto-key_fe07a789c53f2e2c_1f45d31e", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable.", "remediation": "",... | 2 | true | [
"CWE-326",
"CWE-327"
] | [
"py/weak-crypto-key",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable.",
"[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."
] | [
9,
13
] | [
null,
null
] | [
7,
15
] | [
43,
84
] | |
2024-11-19T01:17:28.325558+00:00 | 1,659,247,076,000 | d26a08680a1ddca1fe77c8d595bc29ca1f56492a | 3 | {
"blob_id": "d26a08680a1ddca1fe77c8d595bc29ca1f56492a",
"branch_name": "refs/heads/master",
"committer_date": 1659247076000,
"content_id": "06650d3889e671d810993b9658418a6510d1e499",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "067e00e2d4ba3b4f28af23d29fd6cb8f2bcd3f86",
"extension": "py"... | 2.78125 | stackv2 | """Folium markercluster Plot."""
import json
import folium
from folium import Marker
from jinja2 import Template
from folium.plugins import MarkerCluster
from .utils import _get_lat_lon, _folium_map
class MarkerWithProps(Marker):
"""Custom markerclusters."""
_template = Template(
u"""
{% ma... | 168 | 30.82 | 88 | 20 | 1,201 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_665f2f4febda64b2_a1d4b421", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
15
] | [
34
] | [
17
] | [
6
] | |
2024-11-19T01:17:33.118629+00:00 | 1,468,264,581,000 | c60d0bfa26f5a153ad088961a212ad8c9cb5fb84 | 2 | {
"blob_id": "c60d0bfa26f5a153ad088961a212ad8c9cb5fb84",
"branch_name": "refs/heads/master",
"committer_date": 1468264581000,
"content_id": "a0320043d0715e73e8618c43edf1926548163d2d",
"detected_licenses": [
"MIT"
],
"directory_id": "b5fa082a373f34d9d17d94d30b3c99c6e4b3b65e",
"extension": "py",
"fi... | 2.453125 | stackv2 | import os
import time
import glob
import logging
import contextlib
import shutil
import tempfile
import boto3
from utils import MySQLDump
from subprocess import check_output
from subprocess import check_call
from subprocess import CalledProcessError
log = logging.getLogger(__name__)
MYSQL_REGISTRY_IMAGE = "" # TODO -... | 126 | 34.86 | 132 | 19 | 1,024 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8cfc59f4d827bbe3_cd574e5e", "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."
] | [
117
] | [
null
] | [
11
] | [
24
] | |
2024-11-19T01:17:53.306918+00:00 | 1,512,760,708,000 | f2846b6d0f37542d0c22159b5d7daf78f41e1e0c | 2 | {
"blob_id": "f2846b6d0f37542d0c22159b5d7daf78f41e1e0c",
"branch_name": "refs/heads/master",
"committer_date": 1512760708000,
"content_id": "c02afa748a9eed606a9efaaff392ca75be643d31",
"detected_licenses": [
"MIT"
],
"directory_id": "0577d27d6cc6646019c9bd43cc447c82e6b0f70f",
"extension": "py",
"fi... | 2.359375 | stackv2 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys
import json
import urllib2
from datetime import datetime, timedelta
import requests
from pytz import timezone
import mrrapi
# #############################################################################
#############################################################... | 292 | 38.76 | 132 | 34 | 3,076 | python | [{"finding_id": "codeql_py/request-without-cert-validation_405c34cd750e463a_25cca03c", "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)."
] | [
64
] | [
null
] | [
11
] | [
42
] | |
2024-11-19T01:17:55.187034+00:00 | 1,689,505,436,000 | 2d994db14f56c1f218149cc13d64e8c2fa52b300 | 3 | {
"blob_id": "2d994db14f56c1f218149cc13d64e8c2fa52b300",
"branch_name": "refs/heads/master",
"committer_date": 1689505436000,
"content_id": "9b60dcf810f74b3ef16912f825a72e3fb94d00c3",
"detected_licenses": [
"MIT",
"Apache-2.0",
"BSD-2-Clause"
],
"directory_id": "6115600f62091b769a124dba8730573... | 2.609375 | stackv2 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------
# Copyright © 2016 Martin de la Gorce <martin[dot]delagorce[hat]gmail[dot]com>
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "... | 103 | 37.71 | 88 | 13 | 981 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_1754248972f40917_06dfd1e1", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://rawgithub.com](1) may be at an arbitrary posit... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [https://rawgithub.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [https://raw.githack.com](1) may be at an arbitrary position in the sanitized URL."
] | [
75,
75
] | [
null,
77
] | [
8,
52
] | [
48,
6
] | |
2024-11-19T01:15:15.447889+00:00 | 1,598,286,420,000 | c6a737fecaee25a9e3bd9d8a09900a60bbd22b92 | 3 | {
"blob_id": "c6a737fecaee25a9e3bd9d8a09900a60bbd22b92",
"branch_name": "refs/heads/master",
"committer_date": 1598286420000,
"content_id": "ac37c33b1e41421efc253f4dc55c1b7b127d3429",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "9c7962d8bf05af11b038871811cfd95c70084bea",
"extension": "py"... | 2.71875 | stackv2 | from flask import Flask
app=Flask(__name__)
# @app.route('/')
# @app.route('/page')
# def intro():
# return "hi there:"
# @app.route('/page/<int:name>')#yahan int ki jaga string bi lesakty hain
# def intro(name):
# return "hi there: "+str(name)
@app.route('/page/<string:name>/page1/<int:id>')#yahan int ki j... | 26 | 26.19 | 118 | 10 | 219 | python | [{"finding_id": "codeql_py/flask-debug_b1c2d2e268ad5fce_24c2b5d3", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2)."
] | [
26,
16
] | [
null,
null
] | [
5,
12
] | [
24,
56
] | |
2024-11-19T00:43:56.909217+00:00 | 1,685,314,626,000 | ebfeeb5259de7b6c4f7aa2ba6b4e55aee4f6f6b4 | 2 | {
"blob_id": "ebfeeb5259de7b6c4f7aa2ba6b4e55aee4f6f6b4",
"branch_name": "refs/heads/master",
"committer_date": 1685314626000,
"content_id": "589721e20f53019493d00057e08c2e1bab19318f",
"detected_licenses": [
"MIT"
],
"directory_id": "434a598df2497940b12da1271372d9752622b6c6",
"extension": "py",
"fi... | 2.421875 | stackv2 | import sys
import os
import time
import json
import dialogflowBackend as dfb
import flask
from flask import Blueprint
blueprint = flask.Blueprint('wassengerBackend', __name__)
def sendWassengerMessage(phoneNumber, message):
print(phoneNumber)
print(message)
print("-------------------")
import req... | 60 | 35.37 | 136 | 20 | 545 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6f92a7ac839e0fab_5d5fe1a9", "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-079"
] | [
"py/clear-text-logging-sensitive-data",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
17,
58
] | [
null,
null
] | [
11,
20
] | [
22,
119
] | |
2024-11-19T01:31:58.413451+00:00 | 1,578,216,803,000 | 5896154bb6ad835d471fd178838637d5de20e2e2 | 3 | {
"blob_id": "5896154bb6ad835d471fd178838637d5de20e2e2",
"branch_name": "refs/heads/master",
"committer_date": 1578216803000,
"content_id": "1fc6667886b1fd4dd1a97fa2ed091079416a29fa",
"detected_licenses": [
"MIT"
],
"directory_id": "2f1b852983896dc5227b8e0629eafa36f2626a2b",
"extension": "py",
"fi... | 2.515625 | stackv2 | import datetime
import hashlib
import config
import psycopg2
def syncpg_connect(database):
database = config.get_database_config()
try:
conn = psycopg2.connect(dbname = database["dbname"],
user = database["user"],
password = database["pass... | 124 | 31.45 | 65 | 14 | 791 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_b4cfa4d02943c656_6dd62a03", "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."
] | [
88
] | [
null
] | [
19
] | [
41
] | |
2024-11-19T01:31:58.940322+00:00 | 1,629,977,290,000 | f6568b9de7d3dc5e66458ba0cd9906851c424053 | 3 | {
"blob_id": "f6568b9de7d3dc5e66458ba0cd9906851c424053",
"branch_name": "refs/heads/master",
"committer_date": 1629977290000,
"content_id": "5c3a72216450857e16d4c822a3a610da8f8ade1b",
"detected_licenses": [
"MIT"
],
"directory_id": "ef209f9f280e7f459b28577dc7a7f530744a1453",
"extension": "py",
"fi... | 2.9375 | stackv2 | # import necessary libraries
from flask import Flask, request, render_template, jsonify
import pandas as pd
import joblib
from sklearn import tree
from sklearn import datasets
from sklearn.tree import DecisionTreeClassifier, export_graphviz
# create instance of Flask app
app = Flask(__name__)
# create route that re... | 135 | 29.25 | 152 | 15 | 1,119 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fcbe8db0ab6888fb_ef38f01e", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh... | 3 | true | [
"CWE-312",
"CWE-312",
"CWE-215"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data",
"py/flask-debug"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.\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.",
"A Flask app appears to be run in debug ... | [
81,
119,
135
] | [
null,
null,
null
] | [
15,
15,
5
] | [
28,
21,
24
] | |
2024-11-19T01:32:02.138346+00:00 | 1,335,023,695,000 | 8018d6520ec71c4681a03aa9401c2f1c2cabe829 | 3 | {
"blob_id": "8018d6520ec71c4681a03aa9401c2f1c2cabe829",
"branch_name": "refs/heads/master",
"committer_date": 1335023695000,
"content_id": "9bb30f613c5df6aab9d44fd731468db46ca3e2d3",
"detected_licenses": [
"MIT"
],
"directory_id": "b0cdfa6e6d1ca44b7b9bb57c5e58efb1570f9c47",
"extension": "py",
"fi... | 2.8125 | stackv2 | # -*- coding: utf-8 -*-
import re
from settings import RECAPTCHA_PUB_KEY, RECAPTCHA_PRIV_KEY
from wtforms import Form, BooleanField, TextField, TextAreaField, validators, \
ValidationError
from wtfrecaptcha.fields import RecaptchaField
def validate_entry(form, field):
if not re.match(ur"^[a-zA-Z0-9\s_-áé... | 43 | 34.65 | 84 | 13 | 305 | python | [{"finding_id": "codeql_py/overly-large-range_7a1e49d0c7c457b5_65e5c713", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class.", "remediation": "", "loc... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class."
] | [
11
] | [
null
] | [
37
] | [
40
] | |
2024-11-19T01:44:03.037017+00:00 | 1,610,468,122,000 | a740fd11c2d88234dfd7edf7a69780b69ccabe5e | 3 | {
"blob_id": "a740fd11c2d88234dfd7edf7a69780b69ccabe5e",
"branch_name": "refs/heads/main",
"committer_date": 1610468122000,
"content_id": "dab4dd38d2a6336da8e2ae9ee7fa451dbf8b00b2",
"detected_licenses": [
"MIT"
],
"directory_id": "0a07b3ab877e98c17c68c2499ec4e248c4caf21c",
"extension": "py",
"file... | 3.03125 | stackv2 | # import dill as pickle
import pickle
import re
import sys
from collections import defaultdict
import nltk
import pandas as pd
from nltk.corpus import stopwords
from nltk.stem import WordNetLemmatizer
from nltk.tokenize import sent_tokenize, word_tokenize
from sklearn.ensemble import RandomForestClassifier
from sklear... | 227 | 33.85 | 81 | 21 | 1,763 | python | [{"finding_id": "codeql_py/overly-large-range_ba9af31f28bb9d0c_69484248", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
66
] | [
null
] | [
48
] | [
51
] | |
2024-11-19T01:44:11.212619+00:00 | 1,680,195,838,000 | 4be954f1cb99a045bdf65a461d61582ed6fd98e4 | 3 | {
"blob_id": "4be954f1cb99a045bdf65a461d61582ed6fd98e4",
"branch_name": "refs/heads/master",
"committer_date": 1680195838000,
"content_id": "359c92be50ee3c97aafbc8d31c16e5fbf2e6d022",
"detected_licenses": [
"MIT"
],
"directory_id": "3ef70fe63acaa665e2b163f30f1abd0a592231c1",
"extension": "py",
"fi... | 2.90625 | stackv2 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys
import os
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll, winapi_test
winterm = None
if windll is not None:
winterm = WinTerm()
clas... | 257 | 39.71 | 103 | 18 | 2,457 | python | [{"finding_id": "codeql_py/redos_bbc41aa9da92ff16_12fcc644", "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 '\\u001b\\]' and containing many r... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '\\u001b\\]' and containing many repetitions of ';'."
] | [
71
] | [
null
] | [
37
] | [
46
] | |
2024-11-19T02:19:56.490728+00:00 | 1,588,208,180,000 | f22c62add84cd1227ed4ba4d52b434b9f22498b7 | 3 | {
"blob_id": "f22c62add84cd1227ed4ba4d52b434b9f22498b7",
"branch_name": "refs/heads/master",
"committer_date": 1588208180000,
"content_id": "ddc125d4d6cfcd5dca3a858ea4e547a0c8561f5e",
"detected_licenses": [
"MIT"
],
"directory_id": "40a913adf209697be7911690ca601cef8f41b236",
"extension": "py",
"fi... | 2.875 | stackv2 | import re
import sys
import requests
import datetime
from PyQt5 import QtWidgets as qtw
from PyQt5 import QtGui as qtg
from PyQt5 import QtCore as qtc
class MainWindow(qtw.QWidget):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# Define window attributes
self.titl... | 163 | 32.61 | 97 | 15 | 1,262 | python | [{"finding_id": "codeql_py/overly-large-range_727143a987e40822_ce6af867", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
65
] | [
null
] | [
49
] | [
52
] | |
2024-11-19T02:20:04.225115+00:00 | 1,690,982,718,000 | e81b89a56721ffc01d2931763318d0e5bb6a05cb | 2 | {
"blob_id": "e81b89a56721ffc01d2931763318d0e5bb6a05cb",
"branch_name": "refs/heads/master",
"committer_date": 1690982718000,
"content_id": "44ef2fdcefc8c1eb2b7d005b961c1e82757f32da",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "5d5fe3df88f53f589196ffbc548807676015e077",
"extension": "py"... | 2.375 | stackv2 | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 a... | 195 | 28.06 | 81 | 16 | 1,209 | python | [{"finding_id": "codeql_py/overly-large-range_5fc39ee302dae1e1_593d8f44", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[.\\/0-9:;<=>?@\\].", "remediation": "", "location": ... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[.\\/0-9:;<=>?@\\].",
"Suspicious character range that overlaps with \\s in the same character class."
] | [
133,
133
] | [
null,
null
] | [
29,
36
] | [
32,
39
] | |
2024-11-19T00:59:45.239182+00:00 | 1,382,395,538,000 | 5345e93811d480bdc086737dd71dc4c606980e73 | 2 | {
"blob_id": "5345e93811d480bdc086737dd71dc4c606980e73",
"branch_name": "refs/heads/master",
"committer_date": 1382395538000,
"content_id": "53fda1f17d60e0675fb4e509121d3301000d8820",
"detected_licenses": [
"MIT"
],
"directory_id": "b17b9c95a7b6604bb7223f104a77186a589d1d0a",
"extension": "py",
"fi... | 2.4375 | stackv2 | from extra_views.formsets import InlineFormSetMixin
from django.http import HttpResponseRedirect
from django.forms.formsets import all_valid
from vanilla import GenericModelView
class BaseInlinesView(GenericModelView):
"""
A base view class that provides a way to multiple inline formsets in a request.
Us... | 122 | 35.25 | 90 | 15 | 920 | python | [{"finding_id": "codeql_py/url-redirection_1d372661cbf2c784_f63351d5", "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)."
] | [
49
] | [
null
] | [
37
] | [
59
] | |
2024-11-19T00:59:47.729256+00:00 | 1,624,472,733,000 | dd06dbff162f9a0c1cb7331fef971708b06d10a3 | 2 | {
"blob_id": "dd06dbff162f9a0c1cb7331fef971708b06d10a3",
"branch_name": "refs/heads/master",
"committer_date": 1624472733000,
"content_id": "0d6e67f64774c94d7a6826af8f9045d7f69fc802",
"detected_licenses": [
"MIT"
],
"directory_id": "eeaa8b6e081ed0f6e9e8eda5e44a717615bb6232",
"extension": "py",
"fi... | 2.4375 | stackv2 | import re
import requests
from . import core, exceptions, const
from .utils import misc as misc_utils
from .utils import soap as soap_utils
def magic(domain: str = None, username: str = None, password: str = None, security_token: str = None,
password_and_security_token: str = None, client_id: str = None, cl... | 109 | 44.1 | 146 | 15 | 1,023 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_1057a7443f594dcf_9dcd6d1a", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'salesforce\\.com/', so it might mat... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'salesforce\\.com/', so it might match more hosts than expected."
] | [
101
] | [
null
] | [
32
] | [
61
] | |
2024-11-19T01:00:05.873201+00:00 | 1,579,545,453,000 | ee8c5c75ab9ba73018717df28bdbb83b766b264d | 3 | {
"blob_id": "ee8c5c75ab9ba73018717df28bdbb83b766b264d",
"branch_name": "refs/heads/master",
"committer_date": 1579545453000,
"content_id": "d83bd9fc37b37cad9c4e6a5ed3a243794d1240da",
"detected_licenses": [
"MIT"
],
"directory_id": "34f43834edf8b8b781db9272319efeccf2baaa40",
"extension": "py",
"fi... | 2.859375 | stackv2 | import http.server
import json
import logging
import socketserver
logger = logging.getLogger(__name__)
class Server:
notifier = None
routes = {}
def __init__(self, host='', port=90, notifier=None):
logger.info(f'start server at {host}:{port}')
self.server = socketserver.TCPServer((host,... | 49 | 27.18 | 94 | 17 | 291 | python | [{"finding_id": "codeql_py/log-injection_80098c881cfa6eff_2ab622c5", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
39
] | [
null
] | [
30
] | [
65
] | |
2024-11-19T01:21:44.600642+00:00 | 1,633,388,813,000 | 74ed71b76454d6c02b81c3ed77f2bc131addeeb7 | 3 | {
"blob_id": "74ed71b76454d6c02b81c3ed77f2bc131addeeb7",
"branch_name": "refs/heads/main",
"committer_date": 1633388813000,
"content_id": "0b8e2659434bd6cd586575d5dd509d5e08abc603",
"detected_licenses": [
"Unlicense"
],
"directory_id": "b9a1788c668c79e7861ddcf9ef0171148be984fe",
"extension": "py",
... | 2.78125 | stackv2 | import datetime
import time
import requests
import argparse
from requests.auth import HTTPDigestAuth
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
#getting the necessary items to query a meter: meter name, username, password
parser = argparse.ArgumentParser(description='Read and st... | 64 | 45.31 | 136 | 21 | 727 | python | [{"finding_id": "codeql_py/request-without-cert-validation_67919e6366efe68e_0b60166b", "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)."
] | [
26
] | [
null
] | [
18
] | [
115
] | |
2024-11-19T01:21:44.881103+00:00 | 1,595,554,183,000 | ae2cc3681196d3d5c685c909a80feb2ae4182bb7 | 3 | {
"blob_id": "ae2cc3681196d3d5c685c909a80feb2ae4182bb7",
"branch_name": "refs/heads/master",
"committer_date": 1595554183000,
"content_id": "e390fc73a12545856eae4b130b1e3ee99985a842",
"detected_licenses": [
"MIT"
],
"directory_id": "255b1516df3dcff00d61d7f508d289c815772ce3",
"extension": "py",
"fi... | 2.640625 | stackv2 | from netmiko import Netmiko
from getpass import getpass
import time, datetime
import os
from netmiko.ssh_exception import NetMikoTimeoutException
from paramiko.ssh_exception import SSHException
from netmiko.ssh_exception import AuthenticationException
from netmiko import ConnectHandler
os.system('cls')
print("$$$$$$$... | 80 | 34.41 | 89 | 14 | 630 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c1bfae8d8ad5622f_935fffc1", "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... | 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 (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive dat... | [
65,
77,
78
] | [
null,
null,
null
] | [
11,
11,
11
] | [
33,
47,
89
] | |
2024-11-19T01:56:43.009560+00:00 | 1,568,872,162,000 | 43205403f04d3c05da328e8433d2e8c37fb76564 | 3 | {
"blob_id": "43205403f04d3c05da328e8433d2e8c37fb76564",
"branch_name": "refs/heads/master",
"committer_date": 1568872162000,
"content_id": "c775a7155bb8a7288a6d7710b2b909bd8bc8e38d",
"detected_licenses": [
"MIT"
],
"directory_id": "4dae8f1aafa82654e7fe41df1eae730a17969d97",
"extension": "py",
"fi... | 2.734375 | stackv2 | # import libraries
import sys
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)
from collections import defaultdict, Counter
#natural language processing
import nltk
nltk.download(['stopwords','punkt', 'wordnet'])
from nltk.corpus import brown
from nltk import wo... | 165 | 33.45 | 156 | 16 | 1,318 | python | [{"finding_id": "codeql_py/overly-large-range_ed4ddfc7c8d2fa80_d6cf270d", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ... | 1 | true | [
"CWE-020"
] | [
"py/overly-large-range"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]."
] | [
59
] | [
null
] | [
53
] | [
56
] | |
2024-11-19T02:10:25.753486+00:00 | 1,631,889,742,000 | a83c27ef16fd0fcb17fc657ec3b773da3dfb2bf9 | 3 | {
"blob_id": "a83c27ef16fd0fcb17fc657ec3b773da3dfb2bf9",
"branch_name": "refs/heads/main",
"committer_date": 1631889742000,
"content_id": "ee5d7a70f5ed26e428eba6667fa1ee84265d3253",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "8566f9905a831b05dd79c0cb0d1cf99bd258a917",
"extension": "py",
... | 2.53125 | stackv2 | import os
import glob
import tarfile
from tqdm import tqdm
import settings
def untar(fname, targetd_dir):
with tarfile.open(fname) as tar:
tar.extractall(path=targetd_dir)
def untar_all_files(dir_address):
files = glob.glob(os.path.join(dir_address, '*.tar'))
for f in tqdm(files):
cla... | 30 | 23.43 | 110 | 14 | 190 | python | [{"finding_id": "codeql_py/tarslip_7d17a49f091a5d26_bd586d9d", "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)."
] | [
12
] | [
null
] | [
9
] | [
12
] | |
2024-11-19T02:10:48.290989+00:00 | 1,462,011,775,000 | fa3b8c3d80f6d6945c05dba3ff6895c3eeab4161 | 2 | {
"blob_id": "fa3b8c3d80f6d6945c05dba3ff6895c3eeab4161",
"branch_name": "refs/heads/master",
"committer_date": 1462011775000,
"content_id": "a073e1b5f7c58b707b6b383fff09a6f20d1b76ad",
"detected_licenses": [
"MIT"
],
"directory_id": "fcd2cbca26f587fb7f143a78a11ba6e721c422b7",
"extension": "py",
"fi... | 2.484375 | stackv2 | # -*- coding: utf-8 -*-
import BaseHTTPServer
from jinja2 import Environment, PackageLoader
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
self.send_response(200)
self.send_header('Content-type','text/html')
self.end_headers()
env = Environment(loader=Pa... | 19 | 31.74 | 82 | 14 | 146 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5426506f0c1d0b24_63a8e081", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati... | 1 | true | [
"CWE-079"
] | [
"py/jinja2/autoescape-false"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Using jinja2 templates with autoescape=False can potentially allow XSS attacks."
] | [
12
] | [
null
] | [
15
] | [
68
] | |
2024-11-19T02:45:18.032794+00:00 | 1,553,612,252,000 | 842d8720cd4d99757701ad8063ffcd557ee14215 | 2 | {
"blob_id": "842d8720cd4d99757701ad8063ffcd557ee14215",
"branch_name": "refs/heads/master",
"committer_date": 1553612252000,
"content_id": "651df5b93291a6381b7debcb82694056edbca9c0",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "2a5bfd8d113dcc41caee8b80dc89b9544197626a",
"extension": "p... | 2.375 | stackv2 | __import__("pkg_resources").declare_namespace(__name__)
import shutil
import tarfile
import json
import os
import re
import errno
import contextlib
from six import BytesIO
from six.moves import urllib
import requests
from collections import defaultdict
from semantic_version import Version, Spec
import codecs
import z... | 328 | 37.96 | 119 | 21 | 2,746 | python | [{"finding_id": "codeql_py/tarslip_c9b3fd8e1dcfe6d1_e84aed1c", "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)."
] | [
184
] | [
null
] | [
13
] | [
16
] | |
2024-11-19T02:45:18.487482+00:00 | 1,501,048,731,000 | 19b7d985efa0478dff4576d2d1f35cf0bddef96c | 3 | {
"blob_id": "19b7d985efa0478dff4576d2d1f35cf0bddef96c",
"branch_name": "refs/heads/master",
"committer_date": 1501048731000,
"content_id": "1e6a2983ce1a2f483186af4c5f930610fd9bc971",
"detected_licenses": [
"MIT"
],
"directory_id": "21ac2d25c01334a395c620b0929c0349e20d8f66",
"extension": "py",
"fi... | 2.796875 | stackv2 | #!/usr/bin/env python
import requests
import progressbar
import time
import sys
from pyVim.connect import SmartConnect, Disconnect
from pyVmomi import vim, vmodl
import ssl
class FailedToConnect(Exception):
"""
Failed to Connect Exception
"""
def __init__(self, msg="Failed to Connect Exception"):
... | 182 | 41.32 | 116 | 23 | 1,625 | python | [{"finding_id": "codeql_py/insecure-protocol_76efacaebadf3bc8_b450f784", "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.SSLContext](1).", "remediation": "", "lo... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)."
] | [
86
] | [
null
] | [
31
] | [
65
] | |
2024-11-19T02:45:23.833436+00:00 | 1,602,473,979,000 | 4a6d17c54d41e7b6d82dd52a85f6f23df3629f8d | 2 | {
"blob_id": "4a6d17c54d41e7b6d82dd52a85f6f23df3629f8d",
"branch_name": "refs/heads/main",
"committer_date": 1602473979000,
"content_id": "817dccec9d9f41c11c8298869d1753bc11c844e2",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "231cc1d382bde6532e6f86cb238c7bd6888678bf",
"extension": "py",
... | 2.34375 | stackv2 | from json import dumps, loads
import re
import ssl
import threading
import time
import traceback
from monitor.output.base import ConsoleOutputDevice
from monitor.output.oled import RpiOled
from monitor.util import console_log
import requests
from websocket import WebSocketApp
MESSAGE_SIZE_RE = re.compile("^([0-9]+)\n... | 206 | 32.23 | 85 | 19 | 1,573 | python | [{"finding_id": "codeql_py/request-without-cert-validation_d647e5aaebf9753d_2b93b46c", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
172,
180
] | [
177,
184
] | [
17,
17
] | [
14,
14
] | |
2024-11-19T02:45:31.403252+00:00 | 1,602,251,365,000 | ef9595d0a9a4e9a063ff26c9b71407d358ee619e | 3 | {
"blob_id": "ef9595d0a9a4e9a063ff26c9b71407d358ee619e",
"branch_name": "refs/heads/master",
"committer_date": 1602251365000,
"content_id": "acccb89c82597f2af49ff78705f756e82a2c39a7",
"detected_licenses": [
"MIT"
],
"directory_id": "e3e8e9ae7f73ccceedf4e9bec2aba12272393fd7",
"extension": "py",
"fi... | 2.625 | stackv2 |
import socket
from time import sleep
import sys
import pickle
from threading import Thread
import hashlib
import datetime
# Create a TCP/IP socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# Connect the socket to the port where the server is listening
server_address = ('localhost', 10000)
access_key =... | 71 | 28.7 | 105 | 17 | 477 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_2fde251475b2f099_bb16a8aa", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
26
] | [
null
] | [
55
] | [
72
] | |
2024-11-19T02:45:42.313366+00:00 | 1,554,495,286,000 | fb4400b7dac301f85007b371b457c5c19002f4b2 | 3 | {
"blob_id": "fb4400b7dac301f85007b371b457c5c19002f4b2",
"branch_name": "refs/heads/master",
"committer_date": 1554495286000,
"content_id": "29acbda764e1edfd5878167a1c23a822c4880b17",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0c039dc431c2060c1bd92f391c81fe92fdafc810",
"extension": "py"... | 2.75 | stackv2 | """\
Functions for grabbing a MercuryID
MercuryID or mercury_id meta and hash value
[meta] - 00 = hash generated by interface mac addresses
01 = hash generated by asset tag and serial number
"""
import hashlib
import logging
from mercury.common.exceptions import MercuryIdException
LOG = logging.getLogger(... | 102 | 30.84 | 95 | 14 | 724 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_f60708e6835cd78e_a76f0c49", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure."... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure."
] | [
24
] | [
null
] | [
27
] | [
33
] | |
2024-11-19T02:45:48.797941+00:00 | 1,578,574,079,000 | 60b0a72f4b26fb6a5420282e7befecd671777782 | 4 | {
"blob_id": "60b0a72f4b26fb6a5420282e7befecd671777782",
"branch_name": "refs/heads/master",
"committer_date": 1578574079000,
"content_id": "af051f5ebaf290f5a4e88ecbd80d4fa0ff45b811",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "edc748088844f905d11cfb801d46b39f12addd3c",
"extension": "py"... | 3.6875 | stackv2 | """This is the main code for the project Birthdays. The code is based on an
SQLite databse to check for user authentication and a python function with
the arparse module to return the desired information"""
import sqlite3
import argparse
import hashlib
import csv
conn = sqlite3.connect('script/pwd.db')
cursor = c... | 102 | 23.66 | 75 | 21 | 508 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_83e15a43a5f949d4_833ee567", "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-327"
] | [
"py/clear-text-logging-sensitive-data",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (private)](1) as clear text.",
"[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."
] | [
81,
54
] | [
82,
null
] | [
32,
29
] | [
59,
53
] | |
2024-11-19T02:45:56.257652+00:00 | 1,519,177,087,000 | f50546c8caee2ce3c25829c47e19169c960c8026 | 3 | {
"blob_id": "f50546c8caee2ce3c25829c47e19169c960c8026",
"branch_name": "refs/heads/master",
"committer_date": 1519177087000,
"content_id": "3c877ca0ab577070508ac905f850e1e4ac092b9e",
"detected_licenses": [
"MIT"
],
"directory_id": "5c6266dfb85cee6b074ec3e4168d3672c4c55463",
"extension": "py",
"fi... | 2.734375 | stackv2 | import json
import requests
import sys
import urllib
from base64 import b64encode
maj_ver = sys.version_info.major
if maj_ver == 2:
import urllib2
class DelightedClient():
'''
https://delighted.com/docs/api/
'''
API_ENDPOINT = 'https://api.delighted.com'
VERSION = 'v1'
def __init__(sel... | 96 | 31.55 | 112 | 18 | 681 | python | [{"finding_id": "codeql_py/request-without-cert-validation_705bab7219bf9ff4_fd537c6b", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1) by [this value](2).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2).",
"This request may run without certificate validation because [it is disabled](1) by [this value](2)."
] | [
64,
66,
87
] | [
null,
67,
88
] | [
17,
17,
28
] | [
85,
71,
82
] | |
2024-11-19T02:45:57.154001+00:00 | 1,606,694,813,000 | 87c54bb54a62019cdda785623e709c4dc71ae2a3 | 3 | {
"blob_id": "87c54bb54a62019cdda785623e709c4dc71ae2a3",
"branch_name": "refs/heads/master",
"committer_date": 1606694813000,
"content_id": "2cd4c43409bca9a448f85e9362bf86970cac8fcc",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "cdbf2ceda76cf4105a5119119a17070a4527b24d",
"extension": "py"... | 2.75 | stackv2 | ###########################################################################
# MAIN MODULE #
###########################################################################
if __name__ == '__main__':
# print("Reading reference image : ", refFilename) ... | 101 | 45.48 | 103 | 10 | 1,361 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b65491545dfeb120_e5c8058e", "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."
] | [
58
] | [
null
] | [
23
] | [
30
] | |
2024-11-19T03:12:26.173998+00:00 | 1,475,763,867,000 | 0ef5de5a934b5258cebdfb4000ca6a18445d1b07 | 4 | {
"blob_id": "0ef5de5a934b5258cebdfb4000ca6a18445d1b07",
"branch_name": "refs/heads/master",
"committer_date": 1475763867000,
"content_id": "3cb6707fd25e4a063b8ff3f5800abffaf52299ec",
"detected_licenses": [
"MIT"
],
"directory_id": "d490c6408851678b4346ca6ec8dc08d3547b88d3",
"extension": "py",
"fi... | 3.515625 | stackv2 | """
Sample Model File
A Model should be in charge of communicating with the Database.
Define specific model method that query the database for information.
Then call upon these model method in your controller.
Create a model using this template.
"""
from system.core.model import Model
import re
... | 78 | 37.03 | 153 | 14 | 671 | python | [{"finding_id": "codeql_py/overly-large-range_ec35b9d583751c0c_5d72e545", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class.", "remediation": "", "loc... | 3 | true | [
"CWE-020",
"CWE-020",
"CWE-020"
] | [
"py/overly-large-range",
"py/overly-large-range",
"py/overly-large-range"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Suspicious character range that overlaps with a-z in the same character class.",
"Suspicious character range that overlaps with a-z in the same character class.",
"Suspicious character range that overlaps with a-z in the same character class."
] | [
19,
19,
19
] | [
null,
null,
null
] | [
38,
57,
75
] | [
41,
60,
78
] | |
2024-11-19T01:33:39.404244+00:00 | 1,622,228,722,000 | a9118d4b5ba36c8366eb1da826609f3595ef7d65 | 3 | {
"blob_id": "a9118d4b5ba36c8366eb1da826609f3595ef7d65",
"branch_name": "refs/heads/main",
"committer_date": 1622228722000,
"content_id": "857441c7f443fcf809d3c74e06fed8d525943b46",
"detected_licenses": [
"MIT"
],
"directory_id": "d5500d243e0067413390ae7402be55a10f98bbbf",
"extension": "py",
"file... | 2.515625 | stackv2 | from flask import Blueprint, jsonify, request, make_response
from bson.objectid import ObjectId
from api.validators.job_post import validate_job
from api import mongo
import json
import boto3
job_post = Blueprint("job_post", __name__) # initialize blueprint
postings = mongo.db.postings
applications = mongo.db.applic... | 171 | 32.57 | 86 | 16 | 1,244 | python | [{"finding_id": "codeql_py/stack-trace-exposure_3151cff179be36c4_7c954133", "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.\n[S... | 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.\n[Stack trace information](2) flows to this location and may be exposed to an external user.\n[Stack trace information](3) flows to this location and may be exposed to an external user.\n[Stack trace information](4) flows t... | [
19
] | [
null
] | [
20
] | [
35
] | |
2024-11-19T01:57:14.674442+00:00 | 1,381,562,544,000 | b5d2687e4884e8d75ee6f298c2f045f7eae01e5f | 3 | {
"blob_id": "b5d2687e4884e8d75ee6f298c2f045f7eae01e5f",
"branch_name": "refs/heads/master",
"committer_date": 1381562544000,
"content_id": "8cd3c1d55703e90d07f0af5ad81735ee3969490b",
"detected_licenses": [
"MIT"
],
"directory_id": "b96634b7ebc9571279fe24731eb59e54cc7f35ed",
"extension": "py",
"fi... | 2.78125 | stackv2 | from flask import g, current_app, request, session, redirect
from flask.signals import Namespace
import cPickle as cP
import time
from datetime import datetime
import hashlib
import ImageFile, Image
import os
import bcrypt
import hashlib
import base64
from copy import copy
class Signals(object):
def __init__(... | 396 | 37.65 | 141 | 21 | 3,544 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_be965910ad960ccf_05e76590", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
89
] | [
null
] | [
46
] | [
54
] | |
2024-11-19T01:57:17.144827+00:00 | 1,536,159,587,000 | a2c379c4998629aaed6be72e28affed277bbb75f | 2 | {
"blob_id": "a2c379c4998629aaed6be72e28affed277bbb75f",
"branch_name": "refs/heads/master",
"committer_date": 1536159587000,
"content_id": "d915c3db7e1b0bb5a9d635f4132f2ea3a001be05",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "a82be6c64f958fd02949cfe28e802fd72c3b282e",
"extension": "p... | 2.40625 | stackv2 | # -*- coding: utf-8 -*-
from flask import render_template, redirect, request, url_for, flash
from flask_login import login_user, logout_user, login_required, current_user
from . import auth
from ..models import User, db
from .forms import LoginForm, RegistrationForm, ChangePasswordForm, ChangeEmailForm
@auth.route('/... | 75 | 36.84 | 85 | 16 | 556 | python | [{"finding_id": "codeql_py/url-redirection_e022c5c151eaf87a_5de22e97", "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)."
] | [
16
] | [
null
] | [
29
] | [
85
] | |
2024-11-19T01:57:17.864184+00:00 | 1,487,248,024,000 | cbc4860c0989d4c72df03b45b270763144c48d76 | 3 | {
"blob_id": "cbc4860c0989d4c72df03b45b270763144c48d76",
"branch_name": "refs/heads/master",
"committer_date": 1487248024000,
"content_id": "f2c8169ff42d5886ccf9d7441ccaa7edcfbc2d72",
"detected_licenses": [
"MIT"
],
"directory_id": "cf9ea8aafb1b5c3b22654b5e01b209703137f243",
"extension": "py",
"fi... | 2.75 | stackv2 | import re
from functionrefactor.header import *
from functionrefactor.header_components import *
from functionrefactor.string_utilities import *
class Regex():
''' contains all the regular expressions used by the parser and some methods that operate on them.
In most cases however the parsers access the re... | 386 | 40.37 | 133 | 19 | 3,449 | python | [{"finding_id": "codeql_py/redos_46d1aab58936146f_9f04c422", "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 repetition... | 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 ','."
] | [
29
] | [
null
] | [
48
] | [
50
] | |
2024-11-19T01:57:21.682503+00:00 | 1,611,510,490,000 | a4006bb72796a46b0826b5788c8c56ad4ec5e81f | 3 | {
"blob_id": "a4006bb72796a46b0826b5788c8c56ad4ec5e81f",
"branch_name": "refs/heads/main",
"committer_date": 1611510490000,
"content_id": "1e1566e7e1b35ad8b065ceade83a0ce0c3d7dd80",
"detected_licenses": [
"MIT"
],
"directory_id": "c13aa155ddd80dda7b9c9b256768cc665ae157e5",
"extension": "py",
"file... | 3.03125 | stackv2 | '''
Created on 23.01.2021
@author: michael
'''
from optparse import OptionParser
from PIL import Image
from OCRService import OCRService
from ImageTools import load
from injector import inject, singleton, Injector, Module, BoundKey, provider
import re
PREPROCESSORS = BoundKey("key_preprocessors")
POSTPROCESSORS = Bou... | 114 | 26.25 | 76 | 13 | 711 | python | [{"finding_id": "codeql_py/redos_7b0ada9d4f741ff9_c7c64111", "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 '-\\n' and containing many repetit... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with '-\\n' and containing many repetitions of '\\n'."
] | [
60
] | [
null
] | [
32
] | [
35
] | |
2024-11-19T02:11:11.481646+00:00 | 1,691,842,282,000 | 59ca52a7493659ca4c65ef62f5fa94fbed3b717b | 3 | {
"blob_id": "59ca52a7493659ca4c65ef62f5fa94fbed3b717b",
"branch_name": "refs/heads/master",
"committer_date": 1691842401000,
"content_id": "a5ea11fc2a63300d26dac28cf5a00c61d92afe72",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "530b180c3aade8e67cc61ad2baddff018f7d59a8",
"extension": "py"... | 2.984375 | stackv2 | """
Every issue is reported as ``robocop.rules.Message`` object. It can be later printed or used by
post-run reports.
Output message format
---------------------
Output message of rules can be defined with ``-f`` / ``--format`` argument. Default value::
"{source}:{line}:{col} [{severity}] {rule_id} {desc} ({name... | 431 | 33.07 | 125 | 16 | 3,246 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_3b6ccf5286cafe20_f6c3015e", "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."
] | [
312
] | [
null
] | [
20
] | [
33
] | |
2024-11-19T02:11:40.816726+00:00 | 1,549,216,005,000 | d1d6e26d4e6ed88976427221fa8aa99734f94eb2 | 3 | {
"blob_id": "d1d6e26d4e6ed88976427221fa8aa99734f94eb2",
"branch_name": "refs/heads/master",
"committer_date": 1549216005000,
"content_id": "281f46bf932b746e75effae3aee292e71a052aff",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "d238c23005c982fafb7aa101b1b1fd6f1593b1ed",
"extension": "py"... | 2.71875 | stackv2 | # coding=utf-8
from flask import Flask, request
from flask_restful import Resource
from bson.objectid import ObjectId
from database import getDB
import hashlib
import bcrypt
import json
def _serialize(obj):
new_obj = obj
for field, value in new_obj.items():
if field == '_id':
new_obj['_id'... | 388 | 36.84 | 118 | 23 | 3,299 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_e3d24a743925022d_827c567c", "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... | 3 | true | [
"CWE-327",
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
42,
90,
136
] | [
null,
null,
null
] | [
39,
29,
39
] | [
62,
44,
74
] | |
2024-11-19T02:32:47.992628+00:00 | 1,621,002,226,000 | 0ef9a1fb2700b471dbb38b0de36acc7976387a5a | 2 | {
"blob_id": "0ef9a1fb2700b471dbb38b0de36acc7976387a5a",
"branch_name": "refs/heads/main",
"committer_date": 1621002226000,
"content_id": "e6108c791c7c5850ff6b9155b94e441388516681",
"detected_licenses": [
"MIT"
],
"directory_id": "1f20e4812c77045ead48e230355a91f895ba0f3f",
"extension": "py",
"file... | 2.4375 | stackv2 | import simplejson as json
from flask import Flask, request, Response, redirect, flash
from flask import render_template, url_for, session
from flaskext.mysql import MySQL
from random import randint
from pymysql.cursors import DictCursor
from flask_mail import Mail, Message
from werkzeug.security import check_password_h... | 241 | 33.65 | 108 | 15 | 2,049 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_df069785f8d313d6_ca78a1d1", "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.", ... | 3 | true | [
"CWE-312",
"CWE-215",
"CWE-117"
] | [
"py/clear-text-logging-sensitive-data",
"py/flask-debug",
"py/log-injection"
] | [
"HIGH",
"HIGH",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.",
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This log entry depends on a [user-provided value](1)."
] | [
40,
241,
164
] | [
null,
null,
null
] | [
32,
5,
21
] | [
40,
40,
30
] | |
2024-11-19T02:33:02.374629+00:00 | 1,632,034,627,000 | c549f3c2f7fe15a20384394b855f8ed5cc6df2e5 | 3 | {
"blob_id": "c549f3c2f7fe15a20384394b855f8ed5cc6df2e5",
"branch_name": "refs/heads/main",
"committer_date": 1632034627000,
"content_id": "341346c64e56d2e45a55e3a9221f4d0ff9560b4b",
"detected_licenses": [
"MIT"
],
"directory_id": "0676abf070ae9e914a74d4d0d17351cdf1eb0aaa",
"extension": "py",
"file... | 2.515625 | stackv2 | import base64
from datetime import datetime
import pyotp
from django.core.exceptions import ObjectDoesNotExist
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework import status
import requests
from django.urls import reverse
from rest_framework_simplejwt.views im... | 157 | 37.87 | 148 | 22 | 1,169 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b99b3bc455d424ab_55b47f41", "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."
] | [
48
] | [
null
] | [
19
] | [
60
] | |
2024-11-19T02:33:19.256700+00:00 | 1,585,453,832,000 | b60f9806a1f9c010a3edf71014acde5512b1295a | 3 | {
"blob_id": "b60f9806a1f9c010a3edf71014acde5512b1295a",
"branch_name": "refs/heads/master",
"committer_date": 1585453832000,
"content_id": "0075ba2d53f549e8da14f8c6eee4219b60ac7604",
"detected_licenses": [
"MIT"
],
"directory_id": "fd8c4551a0168ad13cbb7e3fc9739fa3268f1035",
"extension": "py",
"fi... | 2.5625 | stackv2 | import paramiko
import time
from . import check_function, config
# DEFAULTS
ssh_config = {
'timeout': 10,
}
# /DEFAULTS
# CONFIG
if 'ssh' in config['checks']:
ssh_config.update(config['checks']['ssh'])
# /CONFIG
@check_function('Establish an SSH connection and execute a basic command')
def check_connect(c... | 80 | 33.41 | 92 | 15 | 594 | python | [{"finding_id": "codeql_py/paramiko-missing-host-key-validation_b939925f9b2c5125_cb797a6d", "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... | 2 | true | [
"CWE-295",
"CWE-295"
] | [
"py/paramiko-missing-host-key-validation",
"py/paramiko-missing-host-key-validation"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"Setting missing host key policy to AutoAddPolicy may be unsafe.",
"Setting missing host key policy to AutoAddPolicy may be unsafe."
] | [
23,
54
] | [
null,
null
] | [
9,
9
] | [
67,
67
] | |
2024-11-19T02:46:12.080197+00:00 | 1,670,669,428,000 | dbd4647f88816167c51fe86d5d24a803f6f7582d | 3 | {
"blob_id": "dbd4647f88816167c51fe86d5d24a803f6f7582d",
"branch_name": "refs/heads/master",
"committer_date": 1670669428000,
"content_id": "b791d96e8b906f8cad7de120677adfe0c11ab790",
"detected_licenses": [
"MIT"
],
"directory_id": "c8ee30313869c0e3ad83c19e2e9b8c5eba3040b8",
"extension": "py",
"fi... | 2.71875 | stackv2 | """Utility functions and classes used in RFC.py"""
import configparser
import functools
import logging
import os
import re
import shutil
import tarfile
import time
from datetime import datetime, timedelta
import click
import requests
from peewee import IntegrityError
from rfcpy.helpers.config import Config
from rfcp... | 348 | 28.99 | 88 | 17 | 2,319 | python | [{"finding_id": "codeql_py/tarslip_e7d8d397e6c71552_4e9cb4df", "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)."
] | [
290
] | [
null
] | [
9
] | [
10
] | |
2024-11-19T02:46:23.200081+00:00 | 1,651,192,017,000 | 22aca82e5e8b7c09fdbf37d46ca4e57ee96abc7a | 2 | {
"blob_id": "22aca82e5e8b7c09fdbf37d46ca4e57ee96abc7a",
"branch_name": "refs/heads/master",
"committer_date": 1651192017000,
"content_id": "7c21f4a0f7bc04979d7ca611bf0f975caa36e935",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "0f5e25e846e73d9ec203a210d175dac44d76d982",
"extension": "py"... | 2.453125 | stackv2 | import hashlib
import hmac
import json
import time
from decimal import Decimal
from typing import Dict, Any, Optional
from hummingbot.connector.derivative.bybit_perpetual import bybit_perpetual_constants as CONSTANTS
class BybitPerpetualAuth():
"""
Auth class required by Bybit Perpetual API
"""
def... | 64 | 36.02 | 121 | 18 | 522 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_c38dc711a4de1d48_56799e77", "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."
] | [
62
] | [
null
] | [
64
] | [
93
] | |
2024-11-19T02:59:51.218390+00:00 | 1,561,342,220,000 | bca402d02be5ce1bb102fa0c335f2760e7892818 | 2 | {
"blob_id": "bca402d02be5ce1bb102fa0c335f2760e7892818",
"branch_name": "refs/heads/master",
"committer_date": 1561342220000,
"content_id": "8409720ea969334027cd952df0e97ac6108689ff",
"detected_licenses": [
"MIT"
],
"directory_id": "e8d5d2e5d77dd9135d95eaf6f8bb9245f49dc4f9",
"extension": "py",
"fi... | 2.359375 | stackv2 | from flask import Flask, request, render_template
from flask_restful import Resource, Api
import requests
app = Flask(__name__)
api = Api(app)
@app.route('/', methods=['GET'])
def home():
return render_template('index.html')
class Forecast(Resource):
def get(self):
latitude = request.args.get('latitu... | 23 | 28.96 | 146 | 13 | 172 | python | [{"finding_id": "codeql_py/flask-debug_61b8b1624b10566d_dfd69146", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-918"
] | [
"py/flask-debug",
"py/partial-ssrf"
] | [
"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.",
"Part of the URL of this request depends on a [user-provided value](1)."
] | [
23,
17
] | [
null,
null
] | [
5,
20
] | [
24,
43
] | |
2024-11-19T03:12:11.756826+00:00 | 1,622,476,793,000 | dc61d843ac1357aad518676f4b53ced9b02315b7 | 2 | {
"blob_id": "dc61d843ac1357aad518676f4b53ced9b02315b7",
"branch_name": "refs/heads/master",
"committer_date": 1622476793000,
"content_id": "fbba58d3edf1e1f7887ea9e43c6f5fa0f1d10645",
"detected_licenses": [
"MIT"
],
"directory_id": "d874c325ccbd51e78852fc6d3418669e8b52b517",
"extension": "py",
"fi... | 2.46875 | stackv2 | # coding: utf-8
import requests
from bs4 import BeautifulSoup
import re
import json
import os
from xml.etree import ElementTree
import time
import io
import pandas as pd
import math
from gotoeat_map.module import getLatLng, checkRemovedMerchant
def main():
merchantFilePath = os.path.dirname(
os.path.abspa... | 77 | 30.77 | 118 | 16 | 554 | python | [{"finding_id": "codeql_py/bad-tag-filter_83e19dd67f6fbbea_f23fdcce", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat... | 1 | true | [
"CWE-116"
] | [
"py/bad-tag-filter"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression does not match comments containing newlines."
] | [
36
] | [
null
] | [
38
] | [
47
] | |
2024-11-19T03:12:15.804254+00:00 | 1,611,003,109,000 | 4046dfc1eeea982094287cb3892b25dae3ee34f6 | 3 | {
"blob_id": "4046dfc1eeea982094287cb3892b25dae3ee34f6",
"branch_name": "refs/heads/main",
"committer_date": 1611003109000,
"content_id": "4a9a5ca501592426f6cf1f80a68e6516e17fb030",
"detected_licenses": [
"MIT"
],
"directory_id": "462b1b9b573ceee7156e9cc75e96512da1d59eb9",
"extension": "py",
"file... | 2.71875 | stackv2 | import datetime
import hashlib
import users.connection as connection
conn = connection.conn()
db = conn[0]
cursor = conn[1]
class User:
def __init__(self, name, lastname, email, password):
self.name = name
self.lastname = lastname
self.email = email
self.password = password
... | 48 | 23.77 | 96 | 12 | 271 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_401e26082d05d7d0_70010cd1", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational... | [
21,
40
] | [
null,
null
] | [
23,
23
] | [
51,
51
] | |
2024-11-19T03:24:42.362757+00:00 | 1,605,702,975,000 | 09ef9d63cbd7109d2f045b3af4185af8181fc04d | 2 | {
"blob_id": "09ef9d63cbd7109d2f045b3af4185af8181fc04d",
"branch_name": "refs/heads/master",
"committer_date": 1605702975000,
"content_id": "a1e8401edcdf1eb2d9d2031c75e7039dedd64161",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "1652521afacc3996930c625b4d0e6969fe29ede7",
"extension": "py"... | 2.328125 | stackv2 | from flask import Flask, render_template, request, json
import subprocess
import os
import time
import logging
logging.basicConfig(filename='error.log', level=logging.DEBUG)
DUMPS_DIR = "DumpDir"
KEYFILE = "key-file.txt"
HOST = "localhost"
PORT = "5000"
def runCommand(command):
process = subprocess.Popen(
... | 175 | 40.74 | 149 | 30 | 1,707 | python | [{"finding_id": "codeql_py/command-line-injection_962644f9de70b558_403598c5", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {... | 1 | true | [
"CWE-078"
] | [
"py/command-line-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This command line depends on a [user-provided value](1)."
] | [
17
] | [
null
] | [
9
] | [
16
] | |
2024-11-19T03:24:46.650151+00:00 | 1,499,623,089,000 | 6453dc2102184303c8999f3e7b9f0c10cdde3ce8 | 3 | {
"blob_id": "6453dc2102184303c8999f3e7b9f0c10cdde3ce8",
"branch_name": "refs/heads/master",
"committer_date": 1499623089000,
"content_id": "faaa1bc9dff3308ad9565c1a5e45848610e32829",
"detected_licenses": [
"MIT"
],
"directory_id": "0cd3f5ad7053f30532b515f6899944b09e7f435b",
"extension": "py",
"fi... | 2.796875 | stackv2 | import ssl
import socket
import OpenSSL
from Crypto.Util import asn1
import threading
import argparse
import sys
from rsatool import *
modulusList = []
class requestThread(threading.Thread):
def __init__(self, threadID, name, counter, params):
threading.Thread.__init__(self)
self.threadID = threadID
self.name... | 259 | 26.96 | 131 | 16 | 2,161 | python | [{"finding_id": "codeql_py/insecure-protocol_99ada42436484cd5_8820286b", "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.create_default_context](1).\nInsecure SSL/... | 1 | true | [
"CWE-327"
] | [
"py/insecure-protocol"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.create_default_context](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.create_default_context](1)."
] | [
100
] | [
null
] | [
12
] | [
19
] | |
2024-11-19T01:37:55.286882+00:00 | 1,626,143,933,000 | ef52756da3803a8c179d0b1c5370e79f8f8c6fe8 | 2 | {
"blob_id": "ef52756da3803a8c179d0b1c5370e79f8f8c6fe8",
"branch_name": "refs/heads/master",
"committer_date": 1626143933000,
"content_id": "018cbe786d2fe84e3df401686bc144919d44f631",
"detected_licenses": [
"UPL-1.0"
],
"directory_id": "66ff5d7d8cd1df88a6752510c80d3fdb4ecb18da",
"extension": "py",
... | 2.359375 | stackv2 | import mitmproxy
from logger import Log
import checker
import time
from state import State
import serialize
import csrf
import os
log_file = "log/" + time.strftime('%m-%d %H:%M:%S ',time.localtime(time.time())) + str(os.getpid())
logger = Log(log_file)
logger.write_info("PID: " + str(os.getpid()))
cur_state = State("*... | 150 | 35.23 | 119 | 19 | 1,273 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_9b3f53b62f6508e1_aaf6dc7f", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [facebook.com](1) may be at an arbitrary position in th... | 2 | true | [
"CWE-020",
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization",
"py/incomplete-url-substring-sanitization"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"The string [facebook.com](1) may be at an arbitrary position in the sanitized URL.",
"The string [api.twitter.com](1) may be at an arbitrary position in the sanitized URL."
] | [
124,
134
] | [
null,
null
] | [
8,
8
] | [
49,
52
] | |
2024-11-19T01:37:55.473872+00:00 | 1,531,812,022,000 | 0e296355cf030d2513ebfe2587e22e847cd7d398 | 2 | {
"blob_id": "0e296355cf030d2513ebfe2587e22e847cd7d398",
"branch_name": "refs/heads/master",
"committer_date": 1531812022000,
"content_id": "aef19ed12df1648e723dda6fa425b53d71ba83b1",
"detected_licenses": [
"MIT"
],
"directory_id": "56ec359dc3d18649752dd14ab02e409546dbbe35",
"extension": "py",
"fi... | 2.34375 | stackv2 | from .apps import api
from . import forms, models
from .apps import error_response
from django.http import JsonResponse
import base64, logging, traceback, json
from django.contrib.auth import authenticate
from django.views.decorators.csrf import csrf_exempt
log = logging.getLogger(__name__)
@csrf_exempt
def log_in(r... | 165 | 40.42 | 153 | 28 | 1,363 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3b3ff9797ccf7e0f_92525719", "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."
] | [
20
] | [
null
] | [
61
] | [
102
] | |
2024-11-19T01:38:10.836333+00:00 | 1,620,527,244,000 | 2becb47e72d64cf56e6e9e252f144642ba59a4d1 | 3 | {
"blob_id": "2becb47e72d64cf56e6e9e252f144642ba59a4d1",
"branch_name": "refs/heads/master",
"committer_date": 1620527244000,
"content_id": "8cafed1417ec5c6b3c731636b76eedbbded0d0b4",
"detected_licenses": [
"MIT"
],
"directory_id": "9508bfd5f4066a9d9277831f2c6c34cc57d803f1",
"extension": "py",
"fi... | 2.65625 | stackv2 | import re
from api.core.anime import *
class Bimibimi(AnimeSearcher):
async def search(self, keyword: str):
api = "https://proxy.app.maoyuncloud.com/app/video/search"
headers = {"User-Agent": "Dart/2.7 (dart:io)", "appid": "4150439554430555"}
params = {"limit": "100", "key": keyword, "pa... | 82 | 37.15 | 86 | 16 | 849 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_da1622982b693f44_89ad9d02", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [quan.qq.com](1) may be at an arbitrary position in the... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [quan.qq.com](1) may be at an arbitrary position in the sanitized URL."
] | [
79
] | [
null
] | [
12
] | [
37
] | |
2024-11-19T01:38:12.182914+00:00 | 1,615,265,323,000 | a083c13fe53b562134f53666426dfb533824834b | 3 | {
"blob_id": "a083c13fe53b562134f53666426dfb533824834b",
"branch_name": "refs/heads/main",
"committer_date": 1615265323000,
"content_id": "4ccf63fdc6736b1212116e5ffc2a129da6ce4440",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "60b87752114291c4bb30db38e86de302777c2f3d",
"extension": "py"... | 2.640625 | stackv2 | from flask import Flask, json, jsonify, make_response, request
from flask_httpauth import HTTPBasicAuth
from hashlib import sha1
api = Flask(__name__)
auth = HTTPBasicAuth()
user_info = None
@auth.verify_password
def verify_password(username, password):
global user_info
with open('./db/users.json') as f:
users =... | 44 | 22 | 69 | 18 | 264 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_eab6a7ac9ecccf6f_6276f38b", "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."
] | [
17
] | [
null
] | [
12
] | [
36
] | |
2024-11-19T01:38:28.405359+00:00 | 1,465,894,025,000 | a6b79dee99334c07b6ac59f27c8e1f1974a361d4 | 3 | {
"blob_id": "a6b79dee99334c07b6ac59f27c8e1f1974a361d4",
"branch_name": "refs/heads/master",
"committer_date": 1465894025000,
"content_id": "71a2d7418496990c32ce75df89cf82184631e4ba",
"detected_licenses": [
"MIT"
],
"directory_id": "b0595e407cd46d19c1297b3b0587475ec556ebbd",
"extension": "py",
"fi... | 2.609375 | stackv2 | import datetime
import os
import tarfile
import re
import shutil
import click
from dockersible.volumes import list_volumes
def tar(source_dir, output_file):
with tarfile.open(output_file, "w:gz") as tar_file:
tar_file.add(source_dir, arcname=os.path.basename(source_dir))
def untar(archive_file, outpu... | 60 | 31.3 | 114 | 14 | 437 | python | [{"finding_id": "codeql_py/tarslip_08c732f85d40c2f1_18daf2ef", "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)."
] | [
20
] | [
null
] | [
9
] | [
17
] | |
2024-11-19T01:51:56.870293+00:00 | 1,684,478,623,000 | 50977e46c3f3135a3bcc02756c5b2e4ec3c04beb | 2 | {
"blob_id": "50977e46c3f3135a3bcc02756c5b2e4ec3c04beb",
"branch_name": "refs/heads/master",
"committer_date": 1684493267000,
"content_id": "93063a7dced5f276bf53aa1a8251d61e3a313136",
"detected_licenses": [
"MIT"
],
"directory_id": "03bd188ea98d361d0c6f524c5adb58246685f4e2",
"extension": "py",
"fi... | 2.375 | stackv2 | import requests
import uuid
from plant_connector.enums import SensorType, ControllerType
from datetime import datetime
# server = "https://localhost:5001"
server = "https://pib-server.azurewebsites.net"
boxId = "88b2f49e-1226-4964-9aa9-9b1f8442fd36"
def send_datapoint(sensors):
print("---------- Sending Update --... | 32 | 25.59 | 66 | 12 | 227 | python | [{"finding_id": "codeql_py/request-without-cert-validation_1632d979fea8236f_90c1857f", "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)."
] | [
27
] | [
30
] | [
16
] | [
22
] | |
2024-11-19T01:51:56.989567+00:00 | 1,468,085,836,000 | a19e267e75c39825693a9e861fc8bf7238e30990 | 3 | {
"blob_id": "a19e267e75c39825693a9e861fc8bf7238e30990",
"branch_name": "refs/heads/master",
"committer_date": 1468085836000,
"content_id": "afb08ae59d46e2d136feae2dd5941b1d74f6037c",
"detected_licenses": [
"MIT"
],
"directory_id": "dbc3067304d66e66213d4778498aa25b688189a9",
"extension": "py",
"fi... | 2.890625 | stackv2 | """Connection to Cisco APIC-EM - requires requests for REST calls
This class represents the data exchange between APIC-EM and defined objects like cNetDevice. It works best with APIC-EM version > 1.0
"""
__author__ = "dumplab"
__copyright__ = "2016 dumplab"
__license__ = "MIT"
__version__ = "0.5"
__status__ ... | 200 | 33.07 | 134 | 17 | 1,741 | python | [{"finding_id": "codeql_py/request-without-cert-validation_69f76351bf21f2f9_d97061c1", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]... | 3 | true | [
"CWE-295",
"CWE-295",
"CWE-295"
] | [
"py/request-without-cert-validation",
"py/request-without-cert-validation",
"py/request-without-cert-validation"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1).",
"This request may run without certificate validation because [it is disabled](1)."
] | [
54,
84,
86
] | [
null,
null,
null
] | [
13,
9,
9
] | [
86,
70,
71
] | |
2024-11-19T02:04:22.585174+00:00 | 1,525,387,382,000 | c2b7cc92973511bf12c49b6ad0f47f6ee43a1b11 | 2 | {
"blob_id": "c2b7cc92973511bf12c49b6ad0f47f6ee43a1b11",
"branch_name": "refs/heads/master",
"committer_date": 1525387382000,
"content_id": "eb2abf0f4c2ecff447163bd46ca5a5af8e826b78",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "98f7f15ae288bd395dbc04c6997e1d28254e4e52",
"extension": "py"... | 2.453125 | stackv2 | from airflow.utils.db import provide_session
from datetime import datetime, timedelta
from wtforms import DateTimeField
from flask import flash, Markup, redirect, request
from flask_admin import BaseView, expose
from flask_admin.form import DateTimePickerWidget
from flask_login import current_user, login_required
from... | 141 | 45 | 116 | 23 | 1,498 | python | [{"finding_id": "codeql_py/url-redirection_32b91ba0476b9e39_b7fa567a", "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)."
] | [
67
] | [
null
] | [
29
] | [
32
] | |
2024-11-19T02:04:22.996541+00:00 | 1,634,018,088,000 | 7d9894a816f6aa732b3a43a067d31e14fcf9277d | 3 | {
"blob_id": "7d9894a816f6aa732b3a43a067d31e14fcf9277d",
"branch_name": "refs/heads/main",
"committer_date": 1634018088000,
"content_id": "c3b2eaef5315845d9be689d5b45a2499ab8c488b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "7193bf0f40a620bd07cc16b596467970c0b23ece",
"extension": "py"... | 2.53125 | stackv2 | #!/usr/bin/python
import argparse
import json
import yaml
import subprocess
import time
import hashlib
import re
import netifaces
from getmac import get_mac_address
import requests
from termcolor import colored
from pathlib import Path
# Get the mesh_com config
print('> Loading yaml conf... ')
try:
yaml_conf = ... | 194 | 34.69 | 118 | 18 | 1,666 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_154bc66c08aae218_2455e5ae", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (certificate)](1) is used in a hashing algorithm (MD5) that is in... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (certificate)](1) is used in a hashing algorithm (MD5) that is insecure.",
"[Sensitive data (certificate)](1) is used in a hashing algorithm (MD5) that is insecure."
] | [
106,
107
] | [
null,
null
] | [
27,
27
] | [
50,
50
] | |
2024-11-19T02:04:45.991585+00:00 | 1,480,343,863,000 | 88fe888687a03fb550931eab79057734434e75ee | 3 | {
"blob_id": "88fe888687a03fb550931eab79057734434e75ee",
"branch_name": "refs/heads/master",
"committer_date": 1480343863000,
"content_id": "02fb9a844b37e61956440bf1d11ed9726498f520",
"detected_licenses": [
"MIT"
],
"directory_id": "7926fa95138db21c3a56a1ecd5921e092ef05e89",
"extension": "py",
"fi... | 2.65625 | stackv2 | import requests
from urlparse import urljoin
base_url = 'api.github.com'
version = 'v2.0'
api_key = 'NmQ5N2I1YWQtZWU4Zi00ZTJkLTgwZjAtYjM0OGZkOTc1ZDJk'
dir_file = 'list.txt'
number_of_songs = 0
number_of_results = 0
with open(dir_file) as open_file:
for line in open_file:
number_of_songs += 1
print('Processing tra... | 26 | 36.15 | 102 | 17 | 310 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e445bb3385704cdb_8df3bdb4", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text."
] | [
19
] | [
null
] | [
9
] | [
17
] | |
2024-11-19T02:04:48.145197+00:00 | 1,603,855,333,000 | 0f5be0cf440110221328879cf2dcc10203c8681f | 3 | {
"blob_id": "0f5be0cf440110221328879cf2dcc10203c8681f",
"branch_name": "refs/heads/main",
"committer_date": 1603855333000,
"content_id": "6bd325a4ffb9797304ccf6fb11adfe785a1a70de",
"detected_licenses": [
"MIT"
],
"directory_id": "0b75ff019f07962dc4407086bc008a1d822f307b",
"extension": "py",
"file... | 2.625 | stackv2 | import os
import streamlit as st
import PLQY
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
def PlotData(user_input, filelist, Index):
filelist[Index] = user_input
for fname in PLQY.measuredFilenameList:
if not os.path.isfile( os.path.join(user_input, fname) ):
st.w... | 132 | 45.3 | 168 | 18 | 1,729 | python | [{"finding_id": "codeql_py/path-injection_e9428d38b4046e5f_00716035", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).\nThis pa... | 1 | true | [
"CWE-022"
] | [
"py/path-injection"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).\nThis path depends on a [user-provided value](3).\nThis path depends on a [user-provided value](4).\nThis path depends on a [user-provided value](5).\nThis path depends on a [user-provided value](6)."
] | [
12
] | [
null
] | [
32
] | [
63
] | |
2024-11-19T02:04:52.177606+00:00 | 1,590,063,033,000 | 6406c5c198277c5bfeb2dbb3d6646cf36b98fa41 | 3 | {
"blob_id": "6406c5c198277c5bfeb2dbb3d6646cf36b98fa41",
"branch_name": "refs/heads/master",
"committer_date": 1590063033000,
"content_id": "ec96a452294db0acdc0280ca971568e3229230ab",
"detected_licenses": [
"Unlicense"
],
"directory_id": "66c72f972a129a568a19dd5577a6427ea3e48974",
"extension": "py",... | 2.609375 | stackv2 | """ Admin functions """
from hxl_proxy import app
from flask import flash, session
from hxl_proxy import dao, exceptions, util
import hashlib, json
########################################################################
# Authentication and authorisation
##########################################################... | 112 | 27.52 | 101 | 14 | 654 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_8ca31db911ebcb4c_b148e65a", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
30
] | [
null
] | [
35
] | [
59
] | |
2024-11-19T02:28:13.667020+00:00 | 1,537,752,795,000 | dd8c9a27de9614dda47e67a0cd0fbfe815f362e1 | 3 | {
"blob_id": "dd8c9a27de9614dda47e67a0cd0fbfe815f362e1",
"branch_name": "refs/heads/master",
"committer_date": 1537752795000,
"content_id": "9b18b6fcf24eed26fe2a8c0262df1d35dc8dfad2",
"detected_licenses": [
"MIT"
],
"directory_id": "fec89a5f6747701871de632827eca590f45b37bf",
"extension": "py",
"fi... | 2.796875 | stackv2 | # -*- coding: utf-8 -*-
import re
import string
import click
import requests
from click import Abort
from colorama import Fore, Back
from requests import RequestException
from ._compat import urlparse
SCHEMES = ['http', 'https']
DEFAULT_SCHEME = 'http'
def lrange(start, end):
return list(range(start, end))
... | 70 | 23.03 | 92 | 14 | 389 | python | [{"finding_id": "codeql_py/request-without-cert-validation_2301c7a3d1ba4075_1def1e34", "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)."
] | [
60
] | [
null
] | [
17
] | [
64
] | |
2024-11-19T02:28:16.486594+00:00 | 1,478,993,138,000 | ac12eb5422b76b62c50f0e57a4c70f8968965e6c | 2 | {
"blob_id": "ac12eb5422b76b62c50f0e57a4c70f8968965e6c",
"branch_name": "refs/heads/master",
"committer_date": 1478993196000,
"content_id": "03dd6930da1da71cbcfb92d779af04a0d0f9c6ca",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "15619391a76c598b57a40869ce0d0c93aa0eacce",
"extension": "py"... | 2.5 | stackv2 | #!/usr/bin/env python
"""This is an exploit template which includes some functions that should
make the process of writing exploits quicker and easier."""
import sys
import re
import socket
import requests
import pickle
import os
import hashlib
import base64
import random
import logging
# Recommended for HTTP related ... | 147 | 28.3 | 142 | 18 | 1,151 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_7ae357634f2a303f_827a958e", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (MD5) that is insecure."
] | [
80
] | [
null
] | [
16
] | [
32
] | |
2024-11-19T02:28:30.066302+00:00 | 1,686,753,347,000 | af48cf68d361d52101d0fe384151db3f8a97fb1f | 2 | {
"blob_id": "af48cf68d361d52101d0fe384151db3f8a97fb1f",
"branch_name": "refs/heads/master",
"committer_date": 1686754353000,
"content_id": "7e8427bb75ffe6320896e1099bc0f7d334aa2731",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "168f789f29d6e61e628c59b5f368ff4c0590664f",
"extension": "p... | 2.4375 | stackv2 | #!/usr/bin/env python3
"""
Entry point to launch a workflow for a given config, from a template directory.
Example usage:
After you specify your configuration options in my-samplepoints-job/workflow.yaml,
this command will launch the workflow with 8 workers:
$ launchflow -n 8 my-samplepoints-config-dir
Ti... | 256 | 38.9 | 130 | 16 | 2,195 | python | [{"finding_id": "codeql_py/overly-permissive-file_1d0d07a92b8114e6_d0c68dad", "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."
] | [
179
] | [
null
] | [
5
] | [
54
] | |
2024-11-19T02:36:44.199926+00:00 | 1,595,948,009,000 | a8ffa795291b41c6ae0e24b447d4b84d5ca71654 | 3 | {
"blob_id": "a8ffa795291b41c6ae0e24b447d4b84d5ca71654",
"branch_name": "refs/heads/master",
"committer_date": 1595948009000,
"content_id": "6345748b4b54fcb23ae299d05520e0d14dab793c",
"detected_licenses": [
"MIT"
],
"directory_id": "34f3b4d0b12464d0226e81c8db0b235d5d35281e",
"extension": "py",
"fi... | 2.90625 | stackv2 | # root$ apt install --no-install-recommends libpq-dev postgresql postgresql-contrib
# root$ pip --no-cache-dir install psycopg2-binary sqlalchemy
# root$ service postgresql start (restart)
# root$ su postgres
# postgres$ psql
# postgres=# CREATE USER root WITH PASSWORD 'password' superuser;
# postgres=# \q
# postgres$ ... | 192 | 23.42 | 84 | 17 | 1,296 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4f3a6a6a185d79ab_84ecf168", "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."
] | [
185
] | [
null
] | [
11
] | [
59
] | |
2024-11-19T02:36:44.726027+00:00 | 1,607,921,048,000 | b8dac0535dc42918bff4abb5bc873e31d9eacb74 | 4 | {
"blob_id": "b8dac0535dc42918bff4abb5bc873e31d9eacb74",
"branch_name": "refs/heads/master",
"committer_date": 1607921048000,
"content_id": "c9edf6a5bd6fc1ce52eed50e96cd205d87c19024",
"detected_licenses": [
"MIT"
],
"directory_id": "1f8f9fcb3471fa608e95442cb5acaa46f56d8a31",
"extension": "py",
"fi... | 3.546875 | stackv2 | import util
def first(input_path: str):
passwords = 0
with open(input_path) as file:
lines = file.read().splitlines()
for line in lines:
split = line.split()
(min_count_str, max_count_str) = split[0].split('-')
min_count = int(min_count_str)
max_count = int(max_coun... | 43 | 29.42 | 75 | 12 | 327 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4693dc15aaa987c4_c432cf24", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text."
] | [
18,
35
] | [
null,
null
] | [
11,
11
] | [
42,
42
] | |
2024-11-19T02:36:49.353669+00:00 | 1,569,250,304,000 | 788571d39939506117346a5ebedbbb4da9039afd | 2 | {
"blob_id": "788571d39939506117346a5ebedbbb4da9039afd",
"branch_name": "refs/heads/master",
"committer_date": 1569250304000,
"content_id": "4fdacdcd50043698fc9a81e9cb28532393cbcd2d",
"detected_licenses": [
"MIT"
],
"directory_id": "209eb87231026d2a03c5cdc832edd1c4dd5bcaca",
"extension": "py",
"fi... | 2.34375 | stackv2 | from app import app,db
import flask
from app.models import User,comment
import hashlib
# from models import User, Post, ROLE_USER, ROLE_ADMIN email
@app.route('/index/<username>', methods=['GET','post'])#博客主页
def index(username):
user = db.session.query(User).filter(User.db_username==username).one()
return fl... | 124 | 34.65 | 102 | 19 | 975 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_25d9c3e82883a4b8_294cf580", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 2 | true | [
"CWE-327",
"CWE-327"
] | [
"py/weak-sensitive-data-hashing",
"py/weak-sensitive-data-hashing"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.",
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally exp... | [
68,
99
] | [
null,
null
] | [
31,
31
] | [
55,
55
] | |
2024-11-19T02:37:05.551066+00:00 | 1,469,388,720,000 | 5558a10b96302a7ec301d4c48ac909202fdadc37 | 2 | {
"blob_id": "5558a10b96302a7ec301d4c48ac909202fdadc37",
"branch_name": "refs/heads/master",
"committer_date": 1469388720000,
"content_id": "7f19105f58f2c0bd3531b90fd03bec91c6c52a07",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "88df2298e903e3704d3885d720f5078100ff3722",
"extension": "py"... | 2.4375 | stackv2 | #!/usr/bin/python
import traceback, json, socket, struct, os, sys
import lambda_func # assume submitted .py file is called lambda_func
import rethinkdb
import flask
app = flask.Flask(__name__)
PROCESSES_DEFAULT = 10
PORT = 8080
initialized = False
config = None
db_conn = None
# run once per process
def init():
gl... | 66 | 30.29 | 74 | 16 | 543 | python | [{"finding_id": "codeql_py/stack-trace-exposure_ef2df0a7d3cc1f57_c79aacdb", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "... | 2 | true | [
"CWE-209",
"CWE-079"
] | [
"py/stack-trace-exposure",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"[Stack trace information](1) flows to this location and may be exposed to an external user.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
56,
53
] | [
null,
null
] | [
17,
21
] | [
44,
57
] | |
2024-11-19T02:49:10.062070+00:00 | 1,551,346,474,000 | bd197e83908bc478bd9585868db977872fe95ad5 | 3 | {
"blob_id": "bd197e83908bc478bd9585868db977872fe95ad5",
"branch_name": "refs/heads/master",
"committer_date": 1551346474000,
"content_id": "26de9d2660fd87979ffcfa3cd08dd71ea7f32c7a",
"detected_licenses": [
"MIT"
],
"directory_id": "3f3d13acadddc3c5186d714ab61dcb1ef648273e",
"extension": "py",
"fi... | 2.625 | stackv2 | # encoding=utf8
import requests
requests.packages.urllib3.disable_warnings()
"""
以下代码展示的是非sdk下的调用,只是为了方便用户测试而提供的样例代码,用户也可自行编写。
正式环境建议使用sdk进行调用以提高效率,sdk中包含了使用样例
代码中额外使用了Requests库
"""
def post_json(url, json):
response = requests.post(url, verify=False, json=json, timeout=5)
if response.status_code != 200:
... | 21 | 32.62 | 91 | 12 | 231 | python | [{"finding_id": "codeql_py/request-without-cert-validation_9a840fd08392d330_7f504576", "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)."
] | [
10
] | [
null
] | [
16
] | [
70
] | |
2024-11-19T02:49:26.421695+00:00 | 1,475,761,597,000 | 9030016af816dd9424e17223293aec4bcd6cd9b1 | 3 | {
"blob_id": "9030016af816dd9424e17223293aec4bcd6cd9b1",
"branch_name": "refs/heads/master",
"committer_date": 1475761597000,
"content_id": "49a57b2f9524463d7767fa4e7cdc3b5bb73b831b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "390a4f6e391f596e4b47f51409d9957651685ae4",
"extension": "p... | 2.515625 | stackv2 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import division
import argparse
import sys
import os
import math
import re
PAR_RE = re.compile(r"(\d+)\s+(-?\d+\.\d+)\s+(-?\d+\.\d+)")
def load_parameter(par_file):
global PAR
PAR = {}
for line in op... | 260 | 25.35 | 105 | 17 | 2,904 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5e55f3aacf54120c_038ed110", "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."
] | [
254,
254
] | [
null,
null
] | [
15,
20
] | [
18,
23
] | |
2024-11-19T03:11:32.753968+00:00 | 1,555,454,441,000 | 61a102b9565dafaf12020dcc57b53191625e6c38 | 2 | {
"blob_id": "61a102b9565dafaf12020dcc57b53191625e6c38",
"branch_name": "refs/heads/master",
"committer_date": 1555454441000,
"content_id": "cd7b761383f5c7d34a829e807b5573a48152650d",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "6794a5574c24156552fc2b7f3642a86ce50da210",
"extension": "py"... | 2.375 | stackv2 | import json
from decimal import Decimal
from typing import Dict, List, Optional, Text
import sqlalchemy as sa
from jinja2 import Template
from psycopg2.extensions import QuotedString, adapt
from sqlalchemy import Table
from sqlalchemy.ext.declarative import DeclarativeMeta
from sqlalchemy.orm import Mapper, Session
fr... | 307 | 28.82 | 101 | 20 | 2,012 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_f105ebb6b45973c7_51acb89f", "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."
] | [
219
] | [
null
] | [
12
] | [
47
] | |
2024-11-19T03:12:12.693442+00:00 | 1,529,405,935,000 | 97edd4c246effd168e295059237d584926c377f9 | 2 | {
"blob_id": "97edd4c246effd168e295059237d584926c377f9",
"branch_name": "refs/heads/master",
"committer_date": 1529405935000,
"content_id": "abfea7a3270c9d87713ca36aeec4a63ba192cb37",
"detected_licenses": [
"Apache-2.0",
"MIT",
"BSD-3-Clause"
],
"directory_id": "c9dab1ac78d7a980674574cc84a632a... | 2.34375 | stackv2 | # -*- coding:utf-8 -*-
from logging import getLogger
from logging import config
from logging import INFO
from logging import ERROR
from pathlib import Path
from flask import Flask
from flask import request
from flask import abort
from linebot import LineBotApi
from linebot import WebhookHandler
from linebot.exceptions... | 86 | 27.08 | 77 | 16 | 512 | python | [{"finding_id": "codeql_py/log-injection_fc612877f42d5f87_9d2a6f8a", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno... | 1 | true | [
"CWE-117"
] | [
"py/log-injection"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"This log entry depends on a [user-provided value](1)."
] | [
43
] | [
null
] | [
21
] | [
44
] | |
2024-11-19T03:12:27.714608+00:00 | 1,619,422,250,000 | 367bd35ccf2f1db21a2fa1708e39c13de6b59e80 | 3 | {
"blob_id": "367bd35ccf2f1db21a2fa1708e39c13de6b59e80",
"branch_name": "refs/heads/master",
"committer_date": 1619422250000,
"content_id": "0681814eca419f5fc30d0c2c18cb7fdbfdefca03",
"detected_licenses": [
"MIT"
],
"directory_id": "e021b812169f029b605e8c265e1e9823a60d1e9b",
"extension": "py",
"fi... | 2.5625 | stackv2 | import os
import subprocess
WIFI_CREDENTIALS = [('JioFi_207B1D0', 'q07abe03zn'), ('dobbyads', '9672345606')]
"""
@author adityang5@gmail.com
# To connect to a network :
>>> single_network('dobbyads', '96723456061')
>>> restart_wifi()
# To check if connection succeeded :
>>> is_connected()
True/False
"""
# Sets w... | 129 | 21.42 | 107 | 17 | 823 | python | [{"finding_id": "codeql_py/clear-text-storage-sensitive-data_4060e5b9b6587f1e_7aaabaa7", "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."
] | [
41,
79
] | [
null,
null
] | [
13,
17
] | [
14,
18
] | |
2024-11-19T03:12:30.840202+00:00 | 1,559,553,902,000 | fe05dd60d136e4915b2567cc94a834ff45fb0f30 | 2 | {
"blob_id": "fe05dd60d136e4915b2567cc94a834ff45fb0f30",
"branch_name": "refs/heads/master",
"committer_date": 1559553902000,
"content_id": "19aad67284d80c8b72c9ecc8045a44a0092f15f4",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "a5a2314a77e150ecb378dd812869a32cd2591b27",
"extension": "py"... | 2.34375 | stackv2 | # -*- coding: utf-8 -*-
# 语音听写 WebAPI 接口调用示例 接口文档(必看):https://doc.xfyun.cn/rest_api/%E8%AF%AD%E9%9F%B3%E5%90%AC%E5%86%99.html
# webapi 听写服务参考帖子(必看):http://bbs.xfyun.cn/forum.php?mod=viewthread&tid=38947&extra=
# 语音听写WebAPI 服务,热词使用方式:登陆开放平台https://www.xfyun.cn/后,找到控制台--我的应用---语音听写---服务管理--上传热词
#(Very Important)创建完webapi... | 69 | 37.45 | 129 | 13 | 1,121 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_b2b05cce563cdd46_009fc9b5", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec... | 1 | true | [
"CWE-327"
] | [
"py/weak-sensitive-data-hashing"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function."
] | [
31
] | [
null
] | [
15
] | [
64
] | |
2024-11-19T03:12:39.017769+00:00 | 1,471,359,824,000 | 9f845d8dce2d71106562b18b87becd40d29a370a | 3 | {
"blob_id": "9f845d8dce2d71106562b18b87becd40d29a370a",
"branch_name": "refs/heads/master",
"committer_date": 1471359824000,
"content_id": "f20cabea0d6538764fa9779dfda0fbecda77664b",
"detected_licenses": [
"MIT"
],
"directory_id": "764dba0f59f8c08f3c5fa60f356c4bdda5a8cf77",
"extension": "py",
"fi... | 2.734375 | stackv2 | # coding: utf-8
from flask import Flask
from flask import jsonify
import requests
app = Flask(__name__)
api_key = '19ffb04654b0f50d003e0a58abf2c50b'
@app.route('/<name>')
def user(name):
# flask.jsonify() 可以返回 JSON 字符串
return jsonify(code=200, message='Hello, {0}~'.format(name))
@app.route('/history-today/<... | 27 | 33.59 | 143 | 17 | 277 | python | [{"finding_id": "codeql_py/partial-ssrf_38f34f2b7ae453c0_bbf39101", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depen... | 1 | true | [
"CWE-918"
] | [
"py/partial-ssrf"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depends on a [user-provided value](2)."
] | [
20
] | [
null
] | [
9
] | [
43
] | |
2024-11-19T03:25:32.830004+00:00 | 1,530,115,090,000 | 319c9c014fc1071222a1246601f7b97beafac29e | 3 | {
"blob_id": "319c9c014fc1071222a1246601f7b97beafac29e",
"branch_name": "refs/heads/master",
"committer_date": 1530115090000,
"content_id": "0ec0ed054242395634296abec3d578a1284a80e1",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "663892ed1483a67c6c2be9cb6c8936484058aeb4",
"extension": "py"... | 2.890625 | stackv2 | """
This is an illustration how to get a bot running on Facebook.
Notice! This is development version, and is not recommended for production.
Keep in mind, a bot is not stateless, it has memory. Therefore we need to be able to store and restore bot's state.
Also, a bot should have a state per user.
We will use sqlite ... | 124 | 31.73 | 115 | 21 | 937 | python | [{"finding_id": "codeql_py/flask-debug_ecd352a55449ef6f_4e6f3103", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
124,
95
] | [
null,
null
] | [
5,
16
] | [
35,
44
] | |
2024-11-19T01:28:37.494043+00:00 | 1,621,927,784,000 | 05856d97c73f94f9da3357eafebd33efd32d1999 | 2 | {
"blob_id": "05856d97c73f94f9da3357eafebd33efd32d1999",
"branch_name": "refs/heads/main",
"committer_date": 1621927784000,
"content_id": "2186ac508b38c586f9c35d37d2dc755f6965d6c8",
"detected_licenses": [
"MIT"
],
"directory_id": "b181a0a9759325b0e9ba03b27c00d764dedb595e",
"extension": "py",
"file... | 2.390625 | stackv2 | import flask, os, json
from datetime import datetime
from flask_sqlalchemy import SQLAlchemy
app = flask.Flask(__name__)
app.config.from_object('config')
app.jinja_env.globals['GLOBAL_TITLE'] = "村里界圖查詢"
app.jinja_env.globals['GLOBAL_VERSION'] = datetime.now().timestamp()
db = SQLAlchemy(app)
@app.route('/')
def inde... | 53 | 33.62 | 103 | 15 | 516 | python | [{"finding_id": "codeql_py/flask-debug_0f71a5412dc85f8d_33372193", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-089"
] | [
"py/flask-debug",
"py/sql-injection"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2).\nThis SQL query depends on a [user-provided value](3).\nThis SQL query depends on a [... | [
53,
44
] | [
null,
null
] | [
5,
29
] | [
66,
33
] | |
2024-11-19T01:28:54.365086+00:00 | 1,535,729,511,000 | e8cb824a1af8f8287dc9c5658c0867dce9074da9 | 2 | {
"blob_id": "e8cb824a1af8f8287dc9c5658c0867dce9074da9",
"branch_name": "refs/heads/master",
"committer_date": 1535729511000,
"content_id": "39796718febbeedde14b9e8ecceab6b3c25457b7",
"detected_licenses": [
"MIT"
],
"directory_id": "bfa143ce656afde54a5318bdb1b6f89f4102fb5f",
"extension": "py",
"fi... | 2.5 | stackv2 | from flask import Flask, request
from kubernetes import client, config
from kubernetes.client.rest import ApiException
from os import path
from pprint import pprint
import kubernetes
import requests
import time
import yaml
app = Flask(__name__)
control_instance_number = 0
POD_YAML_FILE = "minecraft-server-pod.yaml"
S... | 70 | 30.36 | 94 | 14 | 527 | python | [{"finding_id": "codeql_py/flask-debug_58df6e8ca7689bdd_77858e07", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ... | 2 | true | [
"CWE-215",
"CWE-079"
] | [
"py/flask-debug",
"py/reflective-xss"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
70,
67
] | [
null,
null
] | [
5,
16
] | [
39,
42
] | |
2024-11-19T01:29:03.759737+00:00 | 1,570,626,284,000 | a6993a1c8f45508f4e4cf6538dd5f341c56d0cf2 | 3 | {
"blob_id": "a6993a1c8f45508f4e4cf6538dd5f341c56d0cf2",
"branch_name": "refs/heads/master",
"committer_date": 1570626284000,
"content_id": "6a99a204e4c354bea8d5d6eec9101abcd15ed9cd",
"detected_licenses": [
"MIT"
],
"directory_id": "c1d892d79758a42bc29ddf2438d7b13ce4d53d0f",
"extension": "py",
"fi... | 3.453125 | stackv2 | #!/usr/bin/env python3.6
from password_locker import User, Credentials
def create_user(firstname, password):
'''
Function to create a new user
'''
new_user = User(firstname, password)
return new_user
def user_save(user):
'''
Function to save a new user
'''
user.user_save()
def au... | 168 | 38.37 | 146 | 27 | 1,178 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5a94135b88b77059_3b5c4a66", "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.", ... | 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 (password)](1) as clear text.",
"This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (p... | [
89,
135,
143
] | [
null,
null,
null
] | [
18,
30,
38
] | [
107,
129,
146
] | |
2024-11-19T01:29:07.592922+00:00 | 1,270,325,149,000 | bc7276e97baf2b9a0ad9cdc1c9b2e8e8b4cd3ec4 | 3 | {
"blob_id": "bc7276e97baf2b9a0ad9cdc1c9b2e8e8b4cd3ec4",
"branch_name": "refs/heads/master",
"committer_date": 1270325149000,
"content_id": "6948d353443afd3c51fc19078363ce05758faf7e",
"detected_licenses": [
"MIT"
],
"directory_id": "3163af3e16b20e62677e1fcf6cd112dd616d7fb9",
"extension": "py",
"fi... | 3.125 | stackv2 | # -*- coding: utf-8 -*-
"""
glashammer.crypto
~~~~~~~~~~~~~~~~~
:copyright: 2007-2009-2008 by Armin Ronacher
:license: MIT
"""
import hashlib, string
from random import choice
SALT_CHARS = string.ascii_lowercase + string.digits
def gen_pwhash(password, method='sha1'):
"""Return a the password has... | 80 | 28.25 | 75 | 12 | 700 | python | [{"finding_id": "codeql_py/weak-sensitive-data-hashing_23a0b79d3804f6e6_dd8761ec", "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... | [
21
] | [
null
] | [
14
] | [
22
] | |
2024-11-19T01:29:18.907575+00:00 | 1,554,016,275,000 | 24859802341468fca9c5d03acf1d17a71e5a166d | 3 | {
"blob_id": "24859802341468fca9c5d03acf1d17a71e5a166d",
"branch_name": "refs/heads/master",
"committer_date": 1554016275000,
"content_id": "ca11f4279d41fe48b2e7b55c880662a063003f72",
"detected_licenses": [
"MIT"
],
"directory_id": "d200c876c86fdc793dac73e10da06ccf42c5bd48",
"extension": "py",
"fi... | 3.265625 | stackv2 | import pandas as pd
global_encoder_by_field = {}
count_quotes = 0
count_lowercase = 0
def remove_quotes(column):
global count_quotes
count = column.str.count("\'.*\'").sum()
# print (count)
if count_quotes != count:
count_quotes += count
return column.str.strip('\'')
def convert_lowerca... | 74 | 36.76 | 167 | 13 | 668 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f03bb64b2c2cbf2a_9af272ba", "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."
] | [
43
] | [
null
] | [
57
] | [
98
] | |
2024-11-19T01:29:21.766997+00:00 | 1,568,217,803,000 | d66d899e817d76d509281fd204ea7dceeb16ac5f | 3 | {
"blob_id": "d66d899e817d76d509281fd204ea7dceeb16ac5f",
"branch_name": "refs/heads/master",
"committer_date": 1568217803000,
"content_id": "e5832367aedee29af1035c7316cc762238539db6",
"detected_licenses": [
"MIT"
],
"directory_id": "85a6bf1c2985b4e5ea2db798951ed71ffb7a00ba",
"extension": "py",
"fi... | 2.765625 | stackv2 | # stdlib imports
import logging
logger = logging.getLogger(__name__)
def resolve_secrets(vault_client, rendered_template):
"""Parse a rendered template, extract any secret definitions, retrieve them
from vault and return them to the caller.
This is used in situations where direct Vault support is not a... | 27 | 29.56 | 79 | 15 | 173 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8ccce4301383a836_3f094db7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 1 | true | [
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
25
] | [
null
] | [
25
] | [
76
] | |
2024-11-19T01:29:25.028263+00:00 | 1,502,387,836,000 | 4fac0f1bf257faf2d9fc4590ffb4b44626b980b4 | 2 | {
"blob_id": "4fac0f1bf257faf2d9fc4590ffb4b44626b980b4",
"branch_name": "refs/heads/master",
"committer_date": 1502387850000,
"content_id": "03e03f490340739857d16ccc15b06671828f379b",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "fabef28c2a674280eb86632f9f65d920dfeebb72",
"extension": "p... | 2.40625 | stackv2 | import datetime
import logging
import os
import tornado.escape
import tornado.httpserver
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.set_status(404)
self.write_error(404)
class WebhookHandler(tornado.web.RequestHandler):
def po... | 59 | 31.17 | 95 | 19 | 412 | python | [{"finding_id": "codeql_py/reflective-xss_d68d0bfd0f16590a_e9319a22", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi... | 1 | true | [
"CWE-079"
] | [
"py/reflective-xss"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
43
] | [
null
] | [
24
] | [
61
] | |
2024-11-19T01:29:31.057576+00:00 | 1,546,509,352,000 | 6be00f751cff1803cf63149565a004cf7214d593 | 2 | {
"blob_id": "6be00f751cff1803cf63149565a004cf7214d593",
"branch_name": "refs/heads/master",
"committer_date": 1546509352000,
"content_id": "536dc687340b728cf691b2ef80a6e0b5b0c5765b",
"detected_licenses": [
"Apache-2.0"
],
"directory_id": "56f89b191c5143ee672b0a91b7dfe7f4580c16ed",
"extension": "py"... | 2.359375 | stackv2 | from flask import Flask, request, jsonify, redirect, url_for, abort, make_response, session
class Config(object):
DEBUG = True
app = Flask(__name__)
app.config.from_object(Config)
app.secret_key = 'sghsdfjkghsdkjghsjk'
@app.route("/demo1")
def demo1():
return "hello,word"
@app.route("/demo2",methods=["ge... | 63 | 18.02 | 91 | 11 | 336 | python | [{"finding_id": "codeql_py/insecure-cookie_9ce12120741184c2_b3379d2e", "tool_name": "codeql", "rule_id": "py/insecure-cookie", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Cookie is added to response without the 'secure' flag being set.", "remediation": "", "location": {"file_path"... | 4 | true | [
"CWE-614",
"CWE-1004",
"CWE-079",
"CWE-079"
] | [
"py/insecure-cookie",
"py/client-exposed-cookie",
"py/reflective-xss",
"py/reflective-xss"
] | [
"HIGH",
"HIGH",
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM",
"MEDIUM",
"MEDIUM"
] | [
"Cookie is added to response without the 'secure' flag being set.",
"Sensitive server cookie is set without HttpOnly flag.",
"Cross-site scripting vulnerability due to a [user-provided value](1).",
"Cross-site scripting vulnerability due to a [user-provided value](1)."
] | [
45,
45,
19,
51
] | [
null,
null,
null,
null
] | [
5,
5,
12,
12
] | [
51,
51,
26,
16
] | |
2024-11-19T01:29:36.154975+00:00 | 1,616,428,292,000 | 593d969a6197f98930f5df6812d38d40badb5bb5 | 3 | {
"blob_id": "593d969a6197f98930f5df6812d38d40badb5bb5",
"branch_name": "refs/heads/main",
"committer_date": 1616428292000,
"content_id": "03d6c1d6823055a56f681bfe9f3528f1d713fc4b",
"detected_licenses": [
"MIT"
],
"directory_id": "0d0960edc5003d747d3a77b0616f047f17baa81e",
"extension": "py",
"file... | 2.796875 | stackv2 | import os
import statistics
from itertools import count
import requests
import urllib3
from dotenv import load_dotenv
from terminaltables import SingleTable
def get_response(url, params=None, headers=None):
response = requests.get(url, params=params, headers=headers, verify=False)
response.raise_for_status()... | 224 | 26.4 | 78 | 12 | 1,411 | python | [{"finding_id": "codeql_py/request-without-cert-validation_fe967264ac1a146c_54169ab9", "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)."
] | [
12
] | [
null
] | [
16
] | [
79
] | |
2024-11-19T01:29:47.600181+00:00 | 1,494,401,208,000 | 851be61a58d8a69477698d898126cb47fc375721 | 2 | {
"blob_id": "851be61a58d8a69477698d898126cb47fc375721",
"branch_name": "refs/heads/master",
"committer_date": 1494401208000,
"content_id": "bbd3f8435b9433b9ebb98e394bee61d3e873b9c1",
"detected_licenses": [
"MIT"
],
"directory_id": "aea1c3c9684519dc836d6cb01538ebd06347dd1d",
"extension": "py",
"fi... | 2.5 | stackv2 |
import re
stmt_p = re.compile('(?:^|;)\s*([^;]+)')
block_comm_p = re.compile('/\*.*\*/', re.DOTALL)
line_comm_p = re.compile('%.*\n')
var_p = re.compile('\s*([\s\w,\.\(\)\[\]\{\}\+\-\*/]+?):\s*(\w+)\s*(?:=\s*(.+))?\s*')
type_p = re.compile('\s*(?:int|float|set\s+of\s+[\s\w\.]+|array\[[\s\w\.]+\]\s*of\s*[\s\w\.]+)\s*'... | 57 | 34.26 | 99 | 13 | 576 | python | [{"finding_id": "codeql_py/redos_e481dd7ca8b4f07b_8fb6cf24", "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 'array\\[\\t,' and containing many... | 1 | true | [
"CWE-1333"
] | [
"py/redos"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This part of the regular expression may cause exponential backtracking on strings starting with 'array\\[\\t,' and containing many repetitions of '\\t\\t,'."
] | [
10
] | [
null
] | [
58
] | [
67
] | |
2024-11-19T01:30:04.104665+00:00 | 1,673,335,935,000 | 64fd20bb202893bf663a6aecdd47feffdc7c155e | 2 | {
"blob_id": "64fd20bb202893bf663a6aecdd47feffdc7c155e",
"branch_name": "refs/heads/master",
"committer_date": 1673335935000,
"content_id": "17d3528605b4e883ec872561aead294dfd3f6d4f",
"detected_licenses": [
"MIT"
],
"directory_id": "fed53a83f014dedd79258ea16c2ec0ffffb522a6",
"extension": "py",
"fi... | 2.390625 | stackv2 | # -*- coding: utf-8 -*-
"""
:Authors: cykooz
:Date: 25.01.2019
"""
import dataclasses
import json
import logging
import os
import shutil
from pathlib import Path
from typing import Dict, List, Optional
from jinja2 import ChoiceLoader, Environment, PackageLoader
from pyramid.encode import urlencode
from sphinx.util.doc... | 363 | 37.5 | 109 | 18 | 2,855 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_5ed786e22eb250c1_28d9ad65", "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."
] | [
63
] | [
null
] | [
27
] | [
71
] | |
2024-11-19T01:30:04.231826+00:00 | 1,626,608,432,000 | 389bc40a9a501dc33ea5914b18781008da8fb1d1 | 3 | {
"blob_id": "389bc40a9a501dc33ea5914b18781008da8fb1d1",
"branch_name": "refs/heads/master",
"committer_date": 1626608432000,
"content_id": "39a5cdcc5db6132efaac399eabda0af231f3ef4e",
"detected_licenses": [
"MIT"
],
"directory_id": "873b66b05b6a2a44f8ef39ed98d5dfad4798f937",
"extension": "py",
"fi... | 2.5625 | stackv2 | # (c) 2020 - Akash Sarkar
# news_nix
import sys
sys.path.insert(0, 'E:/Projects/Python/myAssistant/nixAssistant/root/common/')
import requests, json
import speak_nix as nix
def givenews():
apiKey = "85d1024e0ceb4dae849c4783ad8753a4"
url = f"https://newsapi.org/v2/top-headlines?country=in&apiKey={apiKey}"
... | 30 | 24.43 | 78 | 13 | 236 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e451550e8bc12bb7_edcecf5d", "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."
] | [
23
] | [
null
] | [
15
] | [
29
] | |
2024-11-19T01:43:08.585433+00:00 | 1,605,609,755,000 | b3d63c72fc3463dbf058728d5cb35c0903968145 | 3 | {
"blob_id": "b3d63c72fc3463dbf058728d5cb35c0903968145",
"branch_name": "refs/heads/master",
"committer_date": 1605609755000,
"content_id": "709860949b639073d9d7a3b0fddad150ffd454ed",
"detected_licenses": [
"MIT"
],
"directory_id": "ef5839ac714adb96f0234a8680202fcb836d12f2",
"extension": "py",
"fi... | 3 | stackv2 | import csv
import sys
import fodselsnummer
from datetime import datetime
filename = "customer-values.csv"
with open(filename, 'r', newline='', encoding='utf-8') as csvfile:
cvs_reader = csv.DictReader(csvfile, delimiter=',')
try:
customer_list = list(cvs_reader)
print("Read", len(customer_list... | 36 | 38.25 | 91 | 20 | 330 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6773d5dde50281c9_467df3f2", "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."
] | [
30
] | [
null
] | [
27
] | [
91
] | |
2024-11-19T02:07:03.102499+00:00 | 1,489,108,447,000 | 1176a36ec5d79b89f7f89d7fb225e6706da4ae56 | 3 | {
"blob_id": "1176a36ec5d79b89f7f89d7fb225e6706da4ae56",
"branch_name": "refs/heads/master",
"committer_date": 1489108447000,
"content_id": "2581bc7b4f66cf030fb325979d935f403fcf9185",
"detected_licenses": [
"MIT"
],
"directory_id": "0dcbd1bd0ceaa807f289f67a28a1f7fcac55b31d",
"extension": "py",
"fi... | 2.640625 | stackv2 | from bs4 import BeautifulSoup
from redis import Redis
import requests as paw
import re
from pymongo import MongoClient
client = MongoClient()
db = client.douban
test='a'
def get(url):
mv=dict()
print(url)
response=paw.get(url)
if(response.status_code!=200):
print(response.status_code)
... | 55 | 27.65 | 108 | 14 | 421 | python | [{"finding_id": "codeql_py/incomplete-hostname-regexp_bd7a6a96949a32a8_63993d48", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'doubanio.com/', so it might match m... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-hostname-regexp"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"This regular expression has an unescaped '.' before 'doubanio.com/', so it might match more hosts than expected.\nThis regular expression has an unrestricted wildcard '.*' which may cause 'doubanio.com/' to be matched anywhere in the URL, outside the hostname."
] | [
25
] | [
null
] | [
51
] | [
76
] | |
2024-11-19T02:07:21.209605+00:00 | 1,606,860,350,000 | e1f08d6849a33b7e76bf2b1ab896c00ab07a7654 | 3 | {
"blob_id": "e1f08d6849a33b7e76bf2b1ab896c00ab07a7654",
"branch_name": "refs/heads/master",
"committer_date": 1606860350000,
"content_id": "bf3d3f60f1fcba1634cf1fd872126d19e9389a0a",
"detected_licenses": [
"MIT"
],
"directory_id": "688b8352f45eebff3f158d353c9b43db5c790a32",
"extension": "py",
"fi... | 2.734375 | stackv2 | #!/usr/bin/env python
import argparse
import binascii
import sys
from pycoin import ecdsa, encoding
from pycoin.serialize import b2h, h2b
from pycoin.ecdsa import secp256k1
def parse_as_number(s):
try:
return int(s)
except ValueError:
pass
try:
return int(s, 16)
except ValueEr... | 121 | 38.69 | 139 | 19 | 1,274 | python | [{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a77530550b0a0098_6588d347", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r... | 2 | true | [
"CWE-312",
"CWE-312"
] | [
"py/clear-text-logging-sensitive-data",
"py/clear-text-logging-sensitive-data"
] | [
"HIGH",
"HIGH"
] | [
"MEDIUM",
"MEDIUM"
] | [
"This expression logs [sensitive data (secret)](1) as clear text.",
"This expression logs [sensitive data (secret)](1) as clear text."
] | [
85,
86
] | [
null,
null
] | [
19,
19
] | [
58,
58
] | |
2024-11-19T02:31:38.931775+00:00 | 1,471,516,190,000 | 2b9bb89d71a4f8ce2839bc1e17c4e29c30ed3f79 | 2 | {
"blob_id": "2b9bb89d71a4f8ce2839bc1e17c4e29c30ed3f79",
"branch_name": "refs/heads/master",
"committer_date": 1471516190000,
"content_id": "c3d0463b7fc8bb5053812e202e1afbde5255f56f",
"detected_licenses": [
"MIT"
],
"directory_id": "a39adde99c75c2bf9b25b59fb0d6769196e74a63",
"extension": "py",
"fi... | 2.390625 | stackv2 | """
Scrapes the ambulance quality indicators at
http://www.england.nhs.uk/statistics/statistical-work-areas/ambulance-quality-indicators/
"""
import calendar
import datetime
import re
import ffs
from lxml.html import fromstring, tostring
import requests
import slugify
from publish.lib.helpers import to_markdown, anch... | 141 | 28.51 | 107 | 15 | 1,055 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_24227193851523f5_86858340", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [dh.gov.uk](1) may be at an arbitrary position in the s... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [dh.gov.uk](1) may be at an arbitrary position in the sanitized URL."
] | [
57
] | [
null
] | [
21
] | [
40
] | |
2024-11-19T02:31:57.059585+00:00 | 1,643,298,486,000 | 9d5eb91964d5c18a8d978585e4dc40239dfe54f9 | 2 | {
"blob_id": "9d5eb91964d5c18a8d978585e4dc40239dfe54f9",
"branch_name": "refs/heads/master",
"committer_date": 1643298486000,
"content_id": "ac154b115b4f309eb4aae243f0ea63818c1b9549",
"detected_licenses": [
"BSD-3-Clause"
],
"directory_id": "3ac3135b005d62add6a235e31b23ad33cafca36b",
"extension": "p... | 2.421875 | stackv2 | """
Module to facilitate writing actor containers for the abaco platform. See https://github.com/TACC/abaco
"""
import ast
import json
from concurrent.futures import TimeoutError
import cloudpickle
import getpass
import os
import socket
import time
from .agave import Agave, AgaveError, AttrDict
def reserved_environ... | 417 | 34.54 | 145 | 21 | 3,210 | python | [{"finding_id": "codeql_py/incomplete-url-substring-sanitization_65755602e22efcc4_4a8f40e8", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [agave.designsafe-ci.org](1) may be at an arbitrary pos... | 1 | true | [
"CWE-020"
] | [
"py/incomplete-url-substring-sanitization"
] | [
"HIGH"
] | [
"MEDIUM"
] | [
"The string [agave.designsafe-ci.org](1) may be at an arbitrary position in the sanitized URL."
] | [
185
] | [
null
] | [
8
] | [
45
] | |
2024-11-19T02:31:57.131706+00:00 | 1,393,949,391,000 | 5fab6d812c570cdf7e4f9f5f8cac5b860cd173d2 | 3 | {
"blob_id": "5fab6d812c570cdf7e4f9f5f8cac5b860cd173d2",
"branch_name": "refs/heads/master",
"committer_date": 1393949391000,
"content_id": "00b17aa627579ad55c00707ead89f8af40ec5a75",
"detected_licenses": [
"MIT"
],
"directory_id": "a6fc3d0a63bfa500bd1527a27148133d9e7797c7",
"extension": "py",
"fi... | 2.515625 | stackv2 | import os
import sys
import json
import time
import socket
import select
import logging
import threading
from twisted.internet import reactor
from twisted.internet.endpoints import UNIXServerEndpoint as ServerEndpoint
import path
import remote
import connection
import instance
import khome.fields
__all__ = ('path', '... | 234 | 30.95 | 79 | 18 | 1,618 | python | [{"finding_id": "codeql_py/overly-permissive-file_58be8e3fbc68d69a_e3f7d700", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world readable.", "remediation": "", "location": {... | 1 | true | [
"CWE-732"
] | [
"py/overly-permissive-file"
] | [
"MEDIUM"
] | [
"MEDIUM"
] | [
"Overly permissive mask in open sets file to world readable."
] | [
159
] | [
null
] | [
18
] | [
60
] | |
2024-11-19T02:31:57.180929+00:00 | 1,587,096,323,000 | bea2ef9b9b12beffab633f54d2e8481fe4401b39 | 2 | {
"blob_id": "bea2ef9b9b12beffab633f54d2e8481fe4401b39",
"branch_name": "refs/heads/master",
"committer_date": 1587096323000,
"content_id": "b4901910369329437207471018ece75e5cfb9b4f",
"detected_licenses": [
"MIT"
],
"directory_id": "5e2a15418a7281ff56fb9dc0d0059fdfb09a790a",
"extension": "py",
"fi... | 2.484375 | stackv2 | """Contains all templates used for generating the HTML profile report"""
import re
import jinja2
from jinja2 import Environment, PackageLoader
from pandas_profiling.report.formatters import get_fmt_mapping
# Initializing Jinja
package_loader = PackageLoader(
"pandas_profiling", "report/presentation/flavours/html... | 34 | 27.85 | 85 | 8 | 240 | python | [{"finding_id": "codeql_py/jinja2/autoescape-false_9dee8f88f5cb0a9b_01c99866", "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."
] | [
13
] | [
null
] | [
14
] | [
86
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.