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-18T20:23:36.233806+00:00
1,573,213,888,000
828a94eeccdd5a35414ccce206adf1fa94da3cad
3
{ "blob_id": "828a94eeccdd5a35414ccce206adf1fa94da3cad", "branch_name": "refs/heads/master", "committer_date": 1573213888000, "content_id": "315b2ed53a25ffe9922a7c6979670f6f74072199", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3a86c6a7a8abf89ba318fdee89bf549c4c91c78f", "extension": "py"...
2.53125
stackv2
# OSCAR - On-premises Serverless Container-aware ARchitectures # Copyright (C) GRyCAP - I3M - UPV # # 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....
177
29.88
86
16
1,270
python
[{"finding_id": "codeql_py/tarslip_e8b4fe60a1c81b93_1d688675", "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)." ]
[ 139 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T20:49:38.739271+00:00
1,684,777,709,000
b7c73708368bd811e8368d5215d0e8c6cebb4ef1
2
{ "blob_id": "b7c73708368bd811e8368d5215d0e8c6cebb4ef1", "branch_name": "refs/heads/main", "committer_date": 1684777709000, "content_id": "cf14e10cecdacda88db3785a760f4f23832af928", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fcc83583ed505381c7e1e2ca961a54e52552e8b4", "extension": "py", ...
2.328125
stackv2
import random import sys import socket import traceback from multiprocessing import Process from tornado import httpclient, web, ioloop, iostream from tornado.httpclient import HTTPResponse from scylla.config import get_config from scylla.database import ProxyIP from scylla.loggings import logger # Using CurlAsyncHT...
176
29.76
105
21
1,114
python
[{"finding_id": "codeql_py/stack-trace-exposure_55bdca52111d7b7c_e16b8b7c", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
2
true
[ "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user." ]
[ 113, 155 ]
[ 114, 156 ]
[ 24, 24 ]
[ 76, 76 ]
2024-11-18T20:49:41.076986+00:00
1,504,680,881,000
1d02f09e8eb83780c1f1456d81c0375e2d5d56fa
3
{ "blob_id": "1d02f09e8eb83780c1f1456d81c0375e2d5d56fa", "branch_name": "refs/heads/master", "committer_date": 1504680881000, "content_id": "a667d3c168fc0c2947b21ab9e82c1eccd0a565e0", "detected_licenses": [ "MIT" ], "directory_id": "8377cfd463e2d2361f1e9f347b0513ed8558eff4", "extension": "py", "fi...
2.640625
stackv2
# -*- coding:utf-8 -*- from flask import Flask,request app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello world!' # POST方法 @app.route('/user',methods=['POST']) def hello_user(): return 'hello user' # http://localhost:5000/user/12312421 @app.route('/user/<id>') def user_id(id): retu...
31
16.55
46
10
160
python
[{"finding_id": "codeql_py/reflective-xss_4e88a959d347d4b7_44f40f64", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 20, 28 ]
[ null, null ]
[ 12, 12 ]
[ 32, 32 ]
2024-11-18T20:49:51.853560+00:00
1,579,557,465,000
1473adf551b931d1ac7e8b18103a266d8957e22c
2
{ "blob_id": "1473adf551b931d1ac7e8b18103a266d8957e22c", "branch_name": "refs/heads/master", "committer_date": 1579557465000, "content_id": "b3c946b46cb7785b30f6a4242d9017568a6d82ab", "detected_licenses": [ "MIT" ], "directory_id": "e2f74bdd70294cd22f9815ae756b27693c06bd68", "extension": "py", "fi...
2.4375
stackv2
import asyncio from .protocols.real import RealProtocol async def main(port=8080, secret='1234567890abc1234567890abcef1234'): loop = asyncio.get_running_loop() print(f'MTProxy is starting on port {port}\nWith secret {secret}') server = await loop.create_server( lambda: RealProtocol(loop, secret),...
23
25.52
70
14
176
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8c58085ded315897_cf0c0336", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text." ]
[ 8 ]
[ null ]
[ 11 ]
[ 70 ]
2024-11-18T20:49:57.999080+00:00
1,417,553,895,000
c596ed6c6e57ea8adb7607b4b5a357a56fe127e0
2
{ "blob_id": "c596ed6c6e57ea8adb7607b4b5a357a56fe127e0", "branch_name": "refs/heads/master", "committer_date": 1417553895000, "content_id": "4c5d025151cba008691a61ea992edbc02c1e5f11", "detected_licenses": [ "MIT" ], "directory_id": "322e52385f34f84b782592e92e5a6e5f5b5393f9", "extension": "py", "fi...
2.484375
stackv2
#!/usr/bin/python from bottle import get, run, redirect import app @get('/') def index(): global bedroom, livingroom livingroom_status = livingroom.status() bedroom_status = bedroom.status() livingroom_color = "green" if livingroom_status else "red" color_conv = lambda x: 'red' if x == 0 else "#00{...
86
33.66
160
18
766
python
[{"finding_id": "codeql_py/overly-permissive-file_a6a03947c619dfb8_e45de9bb", "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." ]
[ 66 ]
[ 71 ]
[ 25 ]
[ 39 ]
2024-11-18T20:50:16.237450+00:00
1,404,565,213,000
12daebfc61433ac76cff004802d8f12a3c74f6cd
3
{ "blob_id": "12daebfc61433ac76cff004802d8f12a3c74f6cd", "branch_name": "refs/heads/master", "committer_date": 1404565250000, "content_id": "66283175f3a7074976c1135e32b27700f857cd75", "detected_licenses": [ "MIT" ], "directory_id": "11a1af8a568c5d2e0b21a5823afa4f14395f050b", "extension": "py", "fi...
3.0625
stackv2
# -*- coding: utf-8 -*- """asus_traffic.py Fetch traffic data from an Asus RT-N66U router web interface. Usage: asus_traffic.py [-i <ip>] [--tls] -u <username> -p <password> asus_traffic.py -h | --help asus_traffic.py -v | --version Options: -h --help Show this screen. -v --version Show ve...
130
22.59
87
16
865
python
[{"finding_id": "codeql_py/request-without-cert-validation_d9582d81ebe7ca70_ba72b53f", "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)." ]
[ 70, 73, 76 ]
[ null, null, null ]
[ 5, 9, 5 ]
[ 52, 56, 54 ]
2024-11-18T20:50:27.757932+00:00
1,658,530,842,000
69fadb10d1c0031624763e8fbc75e7e8919fc181
2
{ "blob_id": "69fadb10d1c0031624763e8fbc75e7e8919fc181", "branch_name": "refs/heads/master", "committer_date": 1658530842000, "content_id": "34e0d995dde6952b8d319c673d3e40e2035e21eb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "706052ccd851e3288933c3371cb214122a147c96", "extension": "py"...
2.484375
stackv2
#!/usr/bin/python2 import json import threading from time import sleep import sys import logging import logging.handlers import argparse import signal from track import Track from nettle import NetTle from location import Location parser = argparse.ArgumentParser(description='Satellite Antenna Tracker') parser.add_...
91
23.56
108
11
533
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_31fe5d9cd343bd1b_034ba453", "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." ]
[ 58, 58 ]
[ null, null ]
[ 48, 58 ]
[ 56, 67 ]
2024-11-18T20:50:54.079815+00:00
1,469,648,185,000
f30650a713046d8cb08d56dbaa35c4a10470b87a
2
{ "blob_id": "f30650a713046d8cb08d56dbaa35c4a10470b87a", "branch_name": "refs/heads/master", "committer_date": 1469648185000, "content_id": "6e768f3e97bfe671a7ebfa7eed3eafaef3ad6b7c", "detected_licenses": [ "MIT" ], "directory_id": "a4a2702a3f800b77485c7960a29241028b3e6a94", "extension": "py", "fi...
2.375
stackv2
import json from monkeylearn import MonkeyLearn from flask import Flask, jsonify, send_from_directory import requests from geopy.geocoders import GeoNames app = Flask('loc8r') entity_module_id = 'ex_isnnZRbS' with open('../.ml_apikey', 'r') as f: apikey = f.read().replace('\n','') ml = MonkeyLearn(apikey) geo...
67
23.25
74
15
409
python
[{"finding_id": "codeql_py/flask-debug_a4c9d83452569557_ec252817", "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)." ]
[ 63, 25 ]
[ 67, 28 ]
[ 5, 14 ]
[ 6, 6 ]
2024-11-18T20:51:07.039272+00:00
1,507,505,513,000
e404015f1dd4607bb1df16c85c0bee557eedd055
4
{ "blob_id": "e404015f1dd4607bb1df16c85c0bee557eedd055", "branch_name": "refs/heads/master", "committer_date": 1507505513000, "content_id": "447fcd579d31674382b05e4facf571394b95fad2", "detected_licenses": [ "MIT" ], "directory_id": "351e9b54c9d826c33d9786262fbd3dc72af52e76", "extension": "py", "fi...
3.71875
stackv2
"""A simple flask website that greets people""" from flask import Flask app = Flask(__name__) @app.route("/") def generic(): """Returns a simple greeting""" return "Hi there!" @app.route("/<name>") def specific(name): """Returns a more specific greeting, with a twist""" if name == "Ryan": re...
21
22.43
70
12
116
python
[{"finding_id": "codeql_py/reflective-xss_7571b69fee8cacee_0b7be70d", "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)." ]
[ 18 ]
[ null ]
[ 16 ]
[ 59 ]
2024-11-18T20:51:23.209055+00:00
1,492,706,248,000
316af5e6900096912508082dde58154e960521bf
3
{ "blob_id": "316af5e6900096912508082dde58154e960521bf", "branch_name": "refs/heads/master", "committer_date": 1492706248000, "content_id": "74896ee657724d88567b05e808320595db773266", "detected_licenses": [ "MIT" ], "directory_id": "835bc5e2002bae09c66d7e90302dec181f3859bf", "extension": "py", "fi...
2.78125
stackv2
import tarfile from urllib2 import urlopen import os import pickle import time trained_mnist_model_url = "http://www.cs.virginia.edu/~wx4ed/downloads/squeezing/mnist_trained_model.tar.gz" adv_trained_mnist_model_url = "http://www.cs.virginia.edu/~wx4ed/downloads/squeezing/mnist_clipped_adv_trained_model.tar.gz" def ...
43
35.23
124
13
394
python
[{"finding_id": "codeql_py/tarslip_a334de6f7fcdb23c_3cc6a518", "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)." ]
[ 16 ]
[ null ]
[ 9 ]
[ 14 ]
2024-11-18T20:51:30.728682+00:00
1,683,773,661,000
f18e632741869977fc185e0ae9bc3531677531b4
2
{ "blob_id": "f18e632741869977fc185e0ae9bc3531677531b4", "branch_name": "refs/heads/master", "committer_date": 1683773661000, "content_id": "4c5d5c02943727a6d6d6b6f6314cb463f8f59527", "detected_licenses": [ "MIT" ], "directory_id": "b07cbb4412635277e5c1ade84553e1e57ae6443e", "extension": "py", "fi...
2.5
stackv2
from bingo.bingosync import * import random def get_room(name=None): with open('bingo/bingo_cards.json', 'r') as f: data = f.read() # decide password with open('bingo/passphrases.txt', 'r') as f: passphrase = random.choice(f.readlines()).strip() # create room at bingosync room_ur...
16
27.25
78
14
114
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_08ae5e532baa0a8d_35bef3d0", "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." ]
[ 15 ]
[ null ]
[ 21 ]
[ 31 ]
2024-11-18T21:13:47.412568+00:00
1,680,444,164,000
2072cfd9c12cf8cc15c12fd8b7d87fa22f64ed6f
3
{ "blob_id": "2072cfd9c12cf8cc15c12fd8b7d87fa22f64ed6f", "branch_name": "refs/heads/master", "committer_date": 1680444164000, "content_id": "f2fcc7a48969cc60dfa99207270dca26bae7a371", "detected_licenses": [ "MIT" ], "directory_id": "33e4024eee93c9a587a462a91a084fa63c00275a", "extension": "py", "fi...
2.65625
stackv2
#!/usr/bin/env python #https://v0ids3curity.blogspot.ie/2013/06/boston-key-party-ctf-2013-crypto-200.html # sudo pip install pycrypto from Crypto.Cipher import AES import sys # ECB mode, each block of 16 bytes encrypted independently plain_text = "54686520666c616720686173206265656e20656e637279707465642074776963652075...
37
37.57
163
17
688
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_d02ae7b15172105a_4715c338", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ...
4
true
[ "CWE-327", "CWE-327", "CWE-327", "CWE-327" ]
[ "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used.", "[The block mode ECB](1) is broken or weak, and should not be used.", "[The block mode ECB](1) is broken or weak, and should not be used.", "[The block mode ECB](1) is broken or weak, and should not be used." ]
[ 22, 31, 35, 36 ]
[ null, null, null, null ]
[ 13, 13, 10, 11 ]
[ 70, 71, 58, 50 ]
2024-11-18T20:48:05.899318+00:00
1,559,281,146,000
2a3f4c37e2d76df8f18b43eb0185d999c2ce06b2
3
{ "blob_id": "2a3f4c37e2d76df8f18b43eb0185d999c2ce06b2", "branch_name": "refs/heads/master", "committer_date": 1559281146000, "content_id": "adeb5c012b86ffff7066e4fd388992d2292917eb", "detected_licenses": [ "MIT" ], "directory_id": "50f1cc40fa1721e8cf1d0b92a83b3f18458c91a5", "extension": "py", "fi...
2.859375
stackv2
import re import datetime from flask import jsonify, request, Blueprint from app.parcels import parcels user_print = Blueprint('user_print', __name__) users = [] @user_print.route('/api/v1/users', methods=['GET']) def getall_users(): '''' returns a list of all users ''' if len(users) == 0: r...
89
30.37
90
16
724
python
[{"finding_id": "codeql_py/polynomial-redos_b5cf35c3c1f337e3_edea2855", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma...
1
true
[ "CWE-1333" ]
[ "py/polynomial-redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of '?'." ]
[ 87 ]
[ null ]
[ 44 ]
[ 49 ]
2024-11-18T20:48:07.293563+00:00
1,431,421,375,000
a48bdbaba5c49332ada63df66b23f328d797bfd2
2
{ "blob_id": "a48bdbaba5c49332ada63df66b23f328d797bfd2", "branch_name": "refs/heads/master", "committer_date": 1431421375000, "content_id": "0d8fc6b5451de50e10a63def193bbeb660d9efd8", "detected_licenses": [ "MIT" ], "directory_id": "82782e61860ebda18387262f3a47f06fc01ceb46", "extension": "py", "fi...
2.375
stackv2
from google.appengine.ext import ndb import webapp2 import jinja2 import hashlib import random import urllib from datetime import timedelta, datetime class Secret(ndb.Model): secret = ndb.StringProperty(indexed=False) expired = ndb.DateTimeProperty() class User(ndb.Model): """ define a google api like...
156
27.48
79
16
934
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_3ec0a0f55a44edaa_6150f5b0", "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...
4
true
[ "CWE-327", "CWE-327", "CWE-079", "CWE-079" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing", "py/jinja2/autoescape-false", "py/jinja2/autoescape-false" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "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.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally e...
[ 65, 79, 106, 137 ]
[ null, null, null, null ]
[ 46, 35, 20, 20 ]
[ 54, 43, 72, 75 ]
2024-11-18T21:11:35.610284+00:00
1,365,738,854,000
74c0496a2e01d31b03a4d2c8a48b42fdf3202f1f
2
{ "blob_id": "74c0496a2e01d31b03a4d2c8a48b42fdf3202f1f", "branch_name": "refs/heads/master", "committer_date": 1365738854000, "content_id": "31b5b4fa5eccb870f8f5c8ebd4fb3dd3e120c2f7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5bd396c9f7e3448c38620369e172bb745a61f45a", "extension": "py"...
2.3125
stackv2
import requests from datetime import datetime from hashlib import sha1 from django.conf import settings def generate_code(seed): code_key = u"%s-%s-%s" \ % (settings.SECRET_KEY, datetime.now().isoformat(), seed) code = sha1(code_key).hexdigest() return code def create_player(seed=""): URL =...
69
26.07
72
12
425
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_e910f624ccc30fed_7e4c6ed0", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure." ]
[ 11 ]
[ null ]
[ 17 ]
[ 25 ]
2024-11-18T21:11:52.176708+00:00
1,621,456,661,000
b5cc577514f35b8c5f20a2930692c68551721319
4
{ "blob_id": "b5cc577514f35b8c5f20a2930692c68551721319", "branch_name": "refs/heads/main", "committer_date": 1621456661000, "content_id": "d14f322e09ac36c13656d92134b9aedda331b04b", "detected_licenses": [ "MIT" ], "directory_id": "30aaf8dbce7a1b0ee1f2843ff9927df6ddeb508d", "extension": "py", "file...
3.796875
stackv2
class Safe: counter = 0 def __init__(self, password): """ create new instance of safe increases safe counter by default state is set to Open (True) :type password: object """ self.password = password self.opened_state = True Safe.counter...
66
28.52
76
13
489
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_314470810d4c7046_f63a5b82", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 65, 66 ]
[ null, null ]
[ 11, 11 ]
[ 58, 58 ]
2024-11-18T21:11:52.581837+00:00
1,525,130,297,000
3ef8c337ea3a766424cf4a65e12d2d753036e45a
2
{ "blob_id": "3ef8c337ea3a766424cf4a65e12d2d753036e45a", "branch_name": "refs/heads/master", "committer_date": 1525130297000, "content_id": "56bc481b77243d8b9ebc789caca3b3c0250fba40", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e8abbd3420bcbd1d7de6babd5b7f429240bec2a8", "extension": "py"...
2.5
stackv2
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from .models import Pages from django.views.decorators.csrf import csrf_exempt from django.contrib.auth import authenticate, login, logout # Create your views here. def mainPage(request): list = Pages.objects.all() ...
80
39.95
144
16
800
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b450211bd202c509_0a63b38a", "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." ]
[ 44 ]
[ null ]
[ 12 ]
[ 30 ]
2024-11-18T21:25:52.721976+00:00
1,625,082,919,000
c5b7af7a1b7e20a08bff75e0ac3da80af0e030e7
3
{ "blob_id": "c5b7af7a1b7e20a08bff75e0ac3da80af0e030e7", "branch_name": "refs/heads/master", "committer_date": 1625082919000, "content_id": "f469c984169a96be0b18cb0ee8bfaa49dfe1ffea", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "e3a3637d98409a50e7d2fd9971ddb7de4d660f0e", "extension": "p...
3.015625
stackv2
"""Classes to help automate web tasks. """ import re import logging import urllib.parse import requests from ox_herd.core.plugins import base from ox_herd.core import ox_tasks class SimpleTaskResult: """Class to hold task result. Clairfying the expected return values for a task makes it easier to display and ...
310
33.65
79
16
2,348
python
[{"finding_id": "codeql_py/request-without-cert-validation_3bba0e0ce697f7e2_14a1df3b", "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)." ]
[ 203 ]
[ null ]
[ 21 ]
[ 61 ]
2024-11-18T21:25:55.242694+00:00
1,608,092,658,000
b73b4447d2d19ec7698ada90b2356806e00a6c87
3
{ "blob_id": "b73b4447d2d19ec7698ada90b2356806e00a6c87", "branch_name": "refs/heads/main", "committer_date": 1608092658000, "content_id": "6c3a365c63f8f6efc7777712588e381ff33b20e9", "detected_licenses": [ "MIT" ], "directory_id": "288f9b4b42c364808c6973b80151ddf50a074c70", "extension": "py", "file...
2.671875
stackv2
import xml.sax import gzip import io import re import time # 5.5 million abstracts ~ 10 minutes class AbstractHandler(xml.sax.ContentHandler): def __init__(self, output): self.inAbstract = False self.abstract = "" self.output = output self.counter = 0 def startElement(self, na...
42
32.45
140
17
348
python
[{"finding_id": "codeql_py/overly-large-range_58313b04ede13fb1_055751a8", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+,\\-.\\/0-9:\\]." ]
[ 23 ]
[ null ]
[ 45 ]
[ 48 ]
2024-11-18T21:52:15.230798+00:00
1,511,966,973,000
5f89a035d03a12b16a579b36fa132541ecdf6b70
3
{ "blob_id": "5f89a035d03a12b16a579b36fa132541ecdf6b70", "branch_name": "refs/heads/master", "committer_date": 1511966973000, "content_id": "e3e61679173fbf0c0c1694d5656b5b31d0f3c2b1", "detected_licenses": [ "MIT" ], "directory_id": "00b61bf5f305a89c6e4aea93aaabf0219cd8f954", "extension": "py", "fi...
2.53125
stackv2
from flask import render_template, request, jsonify from sklearn.decomposition import PCA import logging from utils import sim_to_matrix, sim_to_matrix_url, readDM, make_figure, readUrls from htmlparser import extract_from_url import mk_page_vector from openviz import app pca = PCA(n_components=2) target_word = "mean...
96
35.68
160
15
848
python
[{"finding_id": "codeql_py/log-injection_a14c5dc6f61e8bea_fe6e739f", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno...
2
true
[ "CWE-117", "CWE-117" ]
[ "py/log-injection", "py/log-injection" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 29, 63 ]
[ null, null ]
[ 23, 23 ]
[ 31, 31 ]
2024-11-18T21:52:23.270171+00:00
1,551,711,633,000
385d4cc1674640960eed1592f9d52027e31839cf
3
{ "blob_id": "385d4cc1674640960eed1592f9d52027e31839cf", "branch_name": "refs/heads/master", "committer_date": 1551711633000, "content_id": "766321f7be063b5b5e5d0ba568e6aaf0ccd4d1e6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "18f4c73225d0b736ef5101d9c3a7a7e6d5c53318", "extension": "py"...
2.609375
stackv2
#!/usr/bin/env python # **************************************************************************** # CAPSTONE G03, 2018-2019 # # License: # This software is available under the Apache-2.0 license. # # Repository: # Github: https://github.com/rahmant3/capstoneROS2018 # # Description: # The main controller applic...
296
34.63
90
18
1,962
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d812a8497049ee65_c614543d", "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." ]
[ 260 ]
[ null ]
[ 15 ]
[ 20 ]
2024-11-18T21:10:26.336594+00:00
1,686,919,876,000
712ac83c1de992e87643dbb8c915a75041b56644
3
{ "blob_id": "712ac83c1de992e87643dbb8c915a75041b56644", "branch_name": "refs/heads/master", "committer_date": 1686920835000, "content_id": "ba4df9129cc40104bbc8279246a5837625a9149d", "detected_licenses": [ "MIT" ], "directory_id": "5a09825ce30b58b75a04f0cfff355207991ffd1e", "extension": "py", "fi...
2.5625
stackv2
"""Download latest scanning scripts for Cyberwatch air gapped scans""" import argparse import os import shutil from configparser import ConfigParser import requests from cbw_api_toolbox.cbw_api import CBWApi def connect_api(): '''Connect to the API and test connection''' conf = ConfigParser() conf.read(os...
116
35.53
117
16
967
python
[{"finding_id": "codeql_py/request-without-cert-validation_8d9a27b8d8368f80_41b944de", "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)." ]
[ 66 ]
[ null ]
[ 18 ]
[ 71 ]
2024-11-18T21:10:33.848639+00:00
1,585,723,153,000
23cf9f7138f082e2c3df0a3b3da22e54aaec9915
3
{ "blob_id": "23cf9f7138f082e2c3df0a3b3da22e54aaec9915", "branch_name": "refs/heads/master", "committer_date": 1585723153000, "content_id": "8cdb87e19a3efbb87933d1147c9c2039347bc454", "detected_licenses": [ "MIT" ], "directory_id": "67a407b85969d923c3bf95b7fd89165640392cb3", "extension": "py", "fi...
2.734375
stackv2
import pinyin # 输入name def get_pinyin_first_alpha(name): return "".join([i[0] for i in pinyin.get(name, " ").split(" ")]) def guessWhat(sex,FullName): list_ln = get_last_name_data(list_last_name, list_last_name_pinyin) if sex=='boy': list_fn= girl_boy_data(name_boy, list_name_boy, list_boy_pinyin)...
104
34.05
163
18
1,276
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_04a71aa86cc55c92_4c723406", "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." ]
[ 97 ]
[ null ]
[ 11 ]
[ 57 ]
2024-11-18T21:10:37.695715+00:00
1,614,444,226,000
7fb5f54ab6a88c3ed1328f57f31becc2d2cd3394
2
{ "blob_id": "7fb5f54ab6a88c3ed1328f57f31becc2d2cd3394", "branch_name": "refs/heads/master", "committer_date": 1614444226000, "content_id": "69e143497c789465ff71c0dfe1a37d8b96f5f736", "detected_licenses": [ "MIT" ], "directory_id": "d417097ac4732c3040089049b13dc8f1f77f7ee3", "extension": "py", "fi...
2.5
stackv2
import ujson import inspect import re from datetime import datetime class ValidationError(Exception): def __init__(self, message): self.message = message def __str__(self): return self.message _str_name_pattern = re.compile("^([A-Za-z0-9_.-]+)+$") _str_tags_pattern = re.compile("^([A-Za-z0...
409
30.87
111
21
2,865
python
[{"finding_id": "codeql_py/redos_f3529c6ae0c78e7d_ea246d13", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '-'.", "remediati...
2
true
[ "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '-'.", "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ','." ]
[ 16, 17 ]
[ null, null ]
[ 35, 35 ]
[ 50, 51 ]
2024-11-18T21:10:50.382672+00:00
1,557,642,602,000
5f35366b379da0cefd839d03d2c81a9ef4eb579b
3
{ "blob_id": "5f35366b379da0cefd839d03d2c81a9ef4eb579b", "branch_name": "refs/heads/master", "committer_date": 1557642602000, "content_id": "7f29feebc331e87e67f7245a9cd9f1a76d7ee3f1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7c7e7b2c650536bfd0e011645c142cf53933983f", "extension": "py"...
2.625
stackv2
import os.path import codecs import zipfile import tempfile import re from shutil import copyfile from jinja2 import Environment, PackageLoader from docutils.core import publish_string, publish_doctree class ConvertTextToEPub: def convert_text_to_epub(self, destination, sources, story_info): zip_file = No...
84
37.54
132
18
687
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_8864843bda9c6cdf_9eed8025", "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." ]
[ 33 ]
[ null ]
[ 19 ]
[ 75 ]
2024-11-18T21:23:56.910399+00:00
1,520,401,688,000
8e624497e893e8ad5403bbbeefad7698f8c5926d
2
{ "blob_id": "8e624497e893e8ad5403bbbeefad7698f8c5926d", "branch_name": "refs/heads/master", "committer_date": 1520401688000, "content_id": "74302ce35c77677fc1db9ff5f53f1e8d6418a496", "detected_licenses": [ "MIT" ], "directory_id": "f44730fcf5767415124c2d2684d08e6c7bd794fd", "extension": "py", "fi...
2.453125
stackv2
#!/usr/bin/env python ## # Authored by Erik Babel and Travis Wyatt; modified by Chris Corea ## import json import re from macpath import split jsonString = open("build_json.txt").read() parsed = json.loads(jsonString) changeset = parsed['changeSet'] changes = changeset['items'] # RegEx pattern captures one or more ...
38
27.61
110
21
388
python
[{"finding_id": "codeql_py/redos_329e138de5b031b3_3ac2836c", "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 repetiti...
2
true
[ "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with '\\[' and containing many repetitions of 'jiraa-9'.", "This part of the regular expression may cause exponential backtracking on strings starting with '\\[a-' and containing many repetitions of '90a-'." ]
[ 27, 27 ]
[ null, null ]
[ 16, 38 ]
[ 53, 41 ]
2024-11-18T21:24:00.872169+00:00
1,550,654,070,000
c056d7891f7510029f1ae5f8b1449c7daf64a34c
2
{ "blob_id": "c056d7891f7510029f1ae5f8b1449c7daf64a34c", "branch_name": "refs/heads/master", "committer_date": 1550654070000, "content_id": "3c8698f1e341556e4975ef1593b50c688276a0ff", "detected_licenses": [ "MIT" ], "directory_id": "fd1fb1b9a41666b039edf16b03d85cad1d6f94af", "extension": "py", "fi...
2.484375
stackv2
import RPi.GPIO as GPIO from flask import Flask, render_template import datetime import subprocess app = Flask(__name__) def formatuj(line,title): now = datetime.datetime.now() timeString = now.strftime("%Y-%m-%d %H:%M") result_success = line.replace("b'", "") arr = result_success.split("\\n") ile = le...
81
26.91
71
12
590
python
[{"finding_id": "codeql_py/command-line-injection_5bfdfb495fda8604_4afddb58", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {...
2
true
[ "CWE-078", "CWE-215" ]
[ "py/command-line-injection", "py/flask-debug" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This command line depends on a [user-provided value](1).", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger." ]
[ 59, 80 ]
[ null, null ]
[ 50, 4 ]
[ 57, 50 ]
2024-11-18T21:37:34.933643+00:00
1,590,508,529,000
5923a22349713824c39c2c39f0b84b05b928cb7c
3
{ "blob_id": "5923a22349713824c39c2c39f0b84b05b928cb7c", "branch_name": "refs/heads/master", "committer_date": 1590508529000, "content_id": "d60b591cb83ca059520a27f0ceb85d7a92ed6f40", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "11510524cdb77baa4c9982be3f4a4801c902cca6", "extension": "p...
3.34375
stackv2
#!/usr/bin/env python3 ### IMPORTS ### import logging import math import os import jinja2 ### GLOBALS ### ### FUNCTIONS ### def load_template(name): path = os.path.join('./', name) with open(os.path.abspath(path), 'r') as tmp_file: return jinja2.Template(tmp_file.read()) ### CLASSES ### class SRCha...
82
20.61
84
15
468
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_d304bca62ad479d3_da08d80c", "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." ]
[ 16 ]
[ null ]
[ 16 ]
[ 48 ]
2024-11-18T21:37:41.016933+00:00
1,577,749,644,000
267bb8eaee35861070255f0d7e8176895bc3a66b
3
{ "blob_id": "267bb8eaee35861070255f0d7e8176895bc3a66b", "branch_name": "refs/heads/master", "committer_date": 1577749644000, "content_id": "b48b1fa9367b8ebbc3cfc7ef159c8ecdd0077898", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7ed51954167339abe1a109f67364df1305b4575a", "extension": "py"...
2.796875
stackv2
#!/usr/bin/env python3 from http.server import HTTPServer, SimpleHTTPRequestHandler from bs4 import BeautifulSoup from io import BytesIO from sys import argv import sys import ssl import urllib.parse # Simple python server for serving the exploit over HTTPS and # to recieve POST data with stolen information. class...
49
30.51
100
13
381
python
[{"finding_id": "codeql_py/insecure-default-protocol_5f76e53d3fc5b221_a6d97e9f", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 48 ]
[ null ]
[ 16 ]
[ 97 ]
2024-11-18T21:59:12.234986+00:00
1,628,326,795,000
30ee8a319b13f01e232bffb625e8a1bf46353f84
3
{ "blob_id": "30ee8a319b13f01e232bffb625e8a1bf46353f84", "branch_name": "refs/heads/master", "committer_date": 1628326795000, "content_id": "1b338318fea66c1850504884bf5990d4142d7d19", "detected_licenses": [ "MIT" ], "directory_id": "af7cc1544efb268e7f48c8ce4378a817e296550f", "extension": "py", "fi...
3.359375
stackv2
import pymongo from pymongo import MongoClient from User import User import hashlib import config as cfg #Use object id #https://stackoverflow.com/questions/16073865/search-by-objectid-in-mongodb-with-pymongo from bson.objectid import ObjectId #Customizing destructuring object #https://stackoverflow.com/questions/54785...
295
28.88
106
18
1,752
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_21ff08ae5f11a9d7_9ace6105", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e...
[ 250 ]
[ null ]
[ 46 ]
[ 63 ]
2024-11-18T22:11:25.827718+00:00
1,427,123,724,000
1ce5f71b9816751279a94d7a47d58ecff7b9ad6e
3
{ "blob_id": "1ce5f71b9816751279a94d7a47d58ecff7b9ad6e", "branch_name": "refs/heads/master", "committer_date": 1427123724000, "content_id": "bb650762103c0e8bf5944d3a6e07b88445947a21", "detected_licenses": [ "MIT" ], "directory_id": "6e3724298251e7580a3612a45d7555ffad7622a3", "extension": "py", "fi...
2.96875
stackv2
import re from collections import defaultdict, OrderedDict from difftools import chunkify_diff, ChangeType def sniff_diff(diff, sniffers): smells = defaultdict(list) for d_file, chunks in chunkify_diff(diff): for sniffer in sniffers: result = sniffer.sniff(d_file, chunks) if ...
213
34.9
80
15
1,637
python
[{"finding_id": "codeql_py/bad-tag-filter_9c64ce65ef710f2e_4c9f101c", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match script end tags like </script >.", "remediation": "", "location": {"file_...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression does not match script end tags like </script >." ]
[ 145 ]
[ null ]
[ 34 ]
[ 67 ]
2024-11-18T22:11:27.080732+00:00
1,544,448,772,000
fdcae8a43678a916e45778533e33e311947d46d5
3
{ "blob_id": "fdcae8a43678a916e45778533e33e311947d46d5", "branch_name": "refs/heads/master", "committer_date": 1544448772000, "content_id": "881110e8a5c85b54715e409d5f595e180542708e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "65a5f2179f1b1145873baebac5c3141ed8d4fb8d", "extension": "py"...
2.734375
stackv2
from selenium import webdriver from lxml import etree import re import time from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By class LagouSpider(object): def __init__(self): self.driver = webdr...
85
36.98
130
15
762
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6c1513f81a59b01c_a96860a9", "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." ]
[ 80 ]
[ null ]
[ 15 ]
[ 23 ]
2024-11-18T22:11:43.489717+00:00
1,522,397,898,000
9453b4a2398fb9a2a82b57f4df68e5621736c7a0
2
{ "blob_id": "9453b4a2398fb9a2a82b57f4df68e5621736c7a0", "branch_name": "refs/heads/master", "committer_date": 1522397898000, "content_id": "7da51033b401e611919de8c80497d6c2366b0379", "detected_licenses": [ "MIT" ], "directory_id": "5f23f180989821dc7b6246b2fcadc305099c6371", "extension": "py", "fi...
2.453125
stackv2
import os import datetime import jinja2 TEMPLATE_NAME = 'preview.template' TEMPLATE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), 'templates')) def generate(viewX_interpreter, output_dir, socket_port, model_name, view_model_name): """ Method that generates preview.html file with Cytoscape.js ...
44
42.32
116
13
376
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_27ea4c6acb467b2a_ef476fe0", "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." ]
[ 17 ]
[ 19 ]
[ 17 ]
[ 55 ]
2024-11-18T22:24:03.116426+00:00
1,522,222,935,000
e0684b6b3ee7f67b724eb2544ad700b20ba8b19e
2
{ "blob_id": "e0684b6b3ee7f67b724eb2544ad700b20ba8b19e", "branch_name": "refs/heads/master", "committer_date": 1522222935000, "content_id": "62877d74fc209975c3b7d4161fb5b50f08d78812", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e35342588398927b9687b5a02a0ad22e6095d7fb", "extension": "py"...
2.40625
stackv2
import paramiko import sys class ShellSender(): def __init__(self,filepath,filename): self.filepath=filepath self.filename=filename def run(self): #上传文件到linux服务器 client= paramiko.SSHClient() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(hostname='192.168.210.37', port=22, use...
29
26.97
88
13
245
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_813b534139d62852_5edeb833", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 10 ]
[ null ]
[ 3 ]
[ 63 ]
2024-11-18T22:24:19.121940+00:00
1,688,547,538,000
52c507c020339564e5c12887d0e81561e67c7120
2
{ "blob_id": "52c507c020339564e5c12887d0e81561e67c7120", "branch_name": "refs/heads/main", "committer_date": 1688547538000, "content_id": "3490a442a5913be582ac8f586ed53f772a57c4dc", "detected_licenses": [ "MIT" ], "directory_id": "735aa6cf5c1bbe85bd2984248457c55718614a6e", "extension": "py", "file...
2.390625
stackv2
import re, bs4 from project.server.main.parsers.strings import get_clean_text, get_orcid, get_doi # doi 10.1063 def parse_aip(soup, doi): res = {"doi": doi} res.update(parse_authors(soup)) res.update(parse_abstract(soup)) res.update(parse_references(soup)) return res def parse_authors(soup): ...
106
31.7
111
18
814
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_d694fca63742057a_8658e384", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [doi.org/](1) may be at an arbitrary position in the sa...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [doi.org/](1) may be at an arbitrary position in the sanitized URL." ]
[ 97 ]
[ null ]
[ 20 ]
[ 45 ]
2024-11-18T22:24:19.403177+00:00
1,443,162,252,000
f41bac76a5db6be768950a2ab18c7e216f34ec5a
2
{ "blob_id": "f41bac76a5db6be768950a2ab18c7e216f34ec5a", "branch_name": "refs/heads/master", "committer_date": 1443162252000, "content_id": "b6740f11b62aac20f027372f89f8cf6a2b314d27", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "7bf4d85808daf8ee3c36ea08ae989a24855cb900", "extension": "p...
2.390625
stackv2
import environ env = environ.Env() from yelpapi import YelpAPI API_HOST = 'api.yelp.com' # DEFAULT_TERMS = 'landmarks,parks,hiking,lakes,golf,boating' # DEFAULT_LOCATION = 'San Francisco, CA' SEARCH_LIMIT = 5 SEARCH_PATH = '/v2/search/' CONSUMER_KEY = env("CONSUMER_KEY", default="") CONSUMER_SECRET = env("CONSUMER_SE...
28
28.89
81
13
197
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_04cdc2ba2f075c06_19c1addd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 23, 23 ]
[ null, null ]
[ 15, 30 ]
[ 28, 44 ]
2024-11-18T22:36:40.121115+00:00
1,623,172,376,000
d322ce34211f8325e9ea379312f42f16256d3fa2
3
{ "blob_id": "d322ce34211f8325e9ea379312f42f16256d3fa2", "branch_name": "refs/heads/master", "committer_date": 1623172376000, "content_id": "417d54906761f79080a99e4b84db0ff383664588", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "729da81eb3f97454bb80272c1135bd670874f065", "extension": "p...
2.578125
stackv2
"""A sphinx extension to process jinja/rst template""" # https://www.ericholscher.com/blog/2016/jul/25/integrating-jinja-rst-sphinx/ from pathlib import Path import jinja2 cur_dir = Path(__file__).parent.resolve() def rstjinja(app, docname, source): """ Render our pages as a jinja template for fancy templ...
46
27.65
87
18
316
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_03033d4ffb01bb93_746df321", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 22 ]
[ 25 ]
[ 23 ]
[ 10 ]
2024-11-18T22:36:51.444638+00:00
1,590,816,246,000
1e502027425cb4e79a879c65822e5eb414baceef
3
{ "blob_id": "1e502027425cb4e79a879c65822e5eb414baceef", "branch_name": "refs/heads/master", "committer_date": 1590816246000, "content_id": "0fd4b528584001389302c0fa29e404023cb6e565", "detected_licenses": [ "MIT" ], "directory_id": "00bdaae48a83cb7fd3109f6c2639b186c2ec5bc5", "extension": "py", "fi...
2.53125
stackv2
####!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import print_function import os import sys import requests from bs4 import BeautifulSoup import random import string import urllib3 from time import sleep from collections import deque from queue import Queue from threading import Thread from urllib.parse...
256
32.49
157
20
2,399
python
[{"finding_id": "codeql_py/stack-trace-exposure_4919402140841702_daec8485", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
3
true
[ "CWE-209", "CWE-295", "CWE-295" ]
[ "py/stack-trace-exposure", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 100, 162, 174 ]
[ null, null, null ]
[ 16, 20, 20 ]
[ 79, 92, 92 ]
2024-11-18T20:23:22.965259+00:00
1,693,480,978,000
06ca13253981b558954fd532b9e985d442ab1ac9
3
{ "blob_id": "06ca13253981b558954fd532b9e985d442ab1ac9", "branch_name": "refs/heads/master", "committer_date": 1693480978000, "content_id": "560d6ce902e631e1d6767b8d8cd35a3e751f343d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "493af731b2dec4dedf755aec0206f610f0fd580d", "extension": "py"...
3.234375
stackv2
# requires jinja2 import copy import re import lena.core import lena.context import lena.flow _sentinel = object() class UpdateContext(): """Update context of passing values.""" def __init__(self, subcontext, update, value=False, default=_sentinel, skip_on_missing=False, raise_on_missing=...
224
38.92
79
22
1,876
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_7895b9c39ba8431e_c8e32dd5", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/jinja2/autoescape-false", "py/jinja2/autoescape-false" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 148, 153 ]
[ 150, 155 ]
[ 36, 36 ]
[ 22, 22 ]
2024-11-18T20:23:26.740904+00:00
1,595,492,753,000
e6f05839fef89368355f8bfdddf4af57e7d85844
3
{ "blob_id": "e6f05839fef89368355f8bfdddf4af57e7d85844", "branch_name": "refs/heads/master", "committer_date": 1595492753000, "content_id": "6ca2eebe4cc8332f16a68fa4e56f529d962b27a4", "detected_licenses": [ "MIT" ], "directory_id": "6cecf85da280ffbe617836efc4ad02d5723234f2", "extension": "py", "fi...
3.390625
stackv2
# -*- coding: utf-8 -*- import base64 import random from Crypto.Cipher import AES class AesCrypt(object): """ AES 加密/解密 """ def __init__(self): self.iv=self.get_key(16) self.key=self.get_key() self.mode=AES.MODE_CBC @staticmethod def get_key(key_len=32,begin_char=33,en...
94
22.3
116
20
625
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_a0846588b5ba2d36_dc004fbf", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.\n[The block mode ...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used.\n[The block mode ECB](2) is broken or weak, and should not be used.", "[The block mode ECB](1) is broken or weak, and should not be used.\n[The block mode ECB](2) is broken or weak, and should not be used." ]
[ 36, 57 ]
[ null, null ]
[ 21, 27 ]
[ 46, 50 ]
2024-11-18T21:22:22.113221+00:00
1,557,433,435,000
e8677a00e9a37855016516cacf985b9bd5ce6659
2
{ "blob_id": "e8677a00e9a37855016516cacf985b9bd5ce6659", "branch_name": "refs/heads/master", "committer_date": 1557433435000, "content_id": "17a1715b2b2af535dc4f2a80598dc7d94dc119b0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "98ed50e65efb9fa53885f63f5be030b412dcd8aa", "extension": "py"...
2.3125
stackv2
#!/usr/bin/python import datetime import logging import sys import json_logging import flask app = flask.Flask(__name__) json_logging.ENABLE_JSON_LOGGING = True json_logging.init(framework_name='flask') json_logging.init_request_instrument(app) # init the logger as usual logger = logging.getLogger("test-logger") log...
38
22.03
77
14
212
python
[{"finding_id": "codeql_py/reflective-xss_5520ea5773836e17_80a5b9df", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
4
true
[ "CWE-079", "CWE-079", "CWE-117", "CWE-117" ]
[ "py/reflective-xss", "py/reflective-xss", "py/log-injection", "py/log-injection" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 23, 29, 22, 28 ]
[ null, null, null, null ]
[ 12, 12, 43, 44 ]
[ 41, 42, 76, 77 ]
2024-11-18T21:22:24.933414+00:00
1,517,748,425,000
01d7bee9f32403b4ba47c2116d136a8f9bc16246
2
{ "blob_id": "01d7bee9f32403b4ba47c2116d136a8f9bc16246", "branch_name": "refs/heads/master", "committer_date": 1517748425000, "content_id": "f4389a3aa424d12677c0f2bd73a3a7921eed8efc", "detected_licenses": [ "MIT" ], "directory_id": "6747ec3d0f00ac335a912d4b07015ccce5a26036", "extension": "py", "fi...
2.5
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib.request from bs4 import BeautifulSoup import json import re from geopy.geocoders import Nominatim base_url = "https://online.aberdeencity.gov.uk/Services/CommemorativePlaque/PlaqueDetail.aspx?Id=" file_start = "<htmL><body>" file_end = "</body></html>" file_...
169
21.89
148
18
1,257
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_41ec91bebeec9ffa_b364f07a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 128 ]
[ null ]
[ 11 ]
[ 18 ]
2024-11-18T21:22:26.065456+00:00
1,614,876,824,000
d742ce92a9e5dac2a6eb99d713d6f7c5334f7552
3
{ "blob_id": "d742ce92a9e5dac2a6eb99d713d6f7c5334f7552", "branch_name": "refs/heads/master", "committer_date": 1614876824000, "content_id": "422fcc20ee21a5574f522df323edaa03c427cf73", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d5146db0a3b144a16a4c3c83d87baa000d7510d1", "extension": "py"...
2.796875
stackv2
import requests import sys import logging from html.parser import HTMLParser from html.entities import name2codepoint from re import compile, findall, split, sub, DOTALL, MULTILINE __author__ = "Manuel Escriche <mev@tid.es>" def removeHTML(html_text): def char_from_entity(match): code = name2codepoint.ge...
141
27.84
92
21
1,025
python
[{"finding_id": "codeql_py/bad-tag-filter_ee81f5f9ebaba406_7b6d7792", "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...
2
true
[ "CWE-116", "CWE-295" ]
[ "py/bad-tag-filter", "py/request-without-cert-validation" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This regular expression does not match comments containing newlines.", "This request may run without certificate validation because [it is disabled](1)." ]
[ 15, 112 ]
[ null, null ]
[ 18, 20 ]
[ 28, 54 ]
2024-11-18T21:22:28.119436+00:00
1,489,151,892,000
9843b4991c812312d4bba31d6161857d99ff49eb
3
{ "blob_id": "9843b4991c812312d4bba31d6161857d99ff49eb", "branch_name": "refs/heads/master", "committer_date": 1489151892000, "content_id": "11c4c4e11a6bb3caa9e71f776976161760dc0adf", "detected_licenses": [ "MIT" ], "directory_id": "8e8be3cbff8fa6f7e2972221a29f3d5ad781a835", "extension": "py", "fi...
2.734375
stackv2
#!/usr/bin/env pyhton import os import sys import jinja2 from string import rstrip # command line argument parse try: file_txt = str(sys.argv[1]) except IndexError: print "" print "usage: python nagios_object.py [txt_file]" print "" sys.exit(0) # jinja2 environment loader = jinja2.FileSystemLoade...
65
24.86
77
18
395
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_c13b54a6b4abe773_620e566d", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 19 ]
[ null ]
[ 8 ]
[ 41 ]
2024-11-18T21:22:39.944941+00:00
1,476,126,684,000
d54b3a9b59ad904ac82d01224218af31b20ccbf0
2
{ "blob_id": "d54b3a9b59ad904ac82d01224218af31b20ccbf0", "branch_name": "refs/heads/master", "committer_date": 1476126684000, "content_id": "15aa279729fc78eeb4bb5e88ddece416ddb63f80", "detected_licenses": [ "Apache-2.0" ], "directory_id": "94db28f6ecc02cfeb3ebbbcc7f331262d05d4c3c", "extension": "py"...
2.34375
stackv2
from __future__ import division from __future__ import print_function from __future__ import absolute_import # noinspection PyUnresolvedReferences from six.moves.urllib.request import urlopen # noinspection PyUnresolvedReferences from six.moves.urllib.error import URLError, HTTPError import os import sys import hashl...
234
31.19
113
18
1,657
python
[{"finding_id": "codeql_py/tarslip_d688eb334330c532_cf77ffe8", "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)." ]
[ 158 ]
[ null ]
[ 17 ]
[ 22 ]
2024-11-18T21:51:41.026644+00:00
1,507,663,184,000
ff9b8faf93690cccfb567736c8a638c5724eb334
2
{ "blob_id": "ff9b8faf93690cccfb567736c8a638c5724eb334", "branch_name": "refs/heads/master", "committer_date": 1507663184000, "content_id": "fabee47d7c8d9534a5da00d2deac6f220e73fdb2", "detected_licenses": [ "MIT" ], "directory_id": "2187ed3c4fb0ba07087f408b7b8ba567e976ead8", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/env python3 import json import os import shutil from flask import Flask, send_from_directory, abort, request, jsonify app = Flask(__name__) package_path = 'package' cache_path = 'package/_cache' shutil.rmtree(cache_path, ignore_errors=True) os.mkdir(cache_path) @app.route("/") def hello(): return j...
70
24.7
94
15
421
python
[{"finding_id": "codeql_py/path-injection_ca0e1ff8c7b31879_f656b9c0", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
2
true
[ "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 41, 47 ]
[ null, null ]
[ 27, 31 ]
[ 57, 39 ]
2024-11-18T21:51:42.471142+00:00
1,511,696,238,000
f0ef62b8048e468d9e2e96ed7911d84adeeaad31
2
{ "blob_id": "f0ef62b8048e468d9e2e96ed7911d84adeeaad31", "branch_name": "refs/heads/master", "committer_date": 1511696238000, "content_id": "14de5d426a4954525627182e1f624c6794604c54", "detected_licenses": [ "MIT" ], "directory_id": "25882bad7bce2e602d3dcbf6faec8f81eb96b6dc", "extension": "py", "fi...
2.484375
stackv2
from argparse import ArgumentParser import glob import os import sys import pandas as pd from bs4 import BeautifulSoup import shutil import tarfile import tensorflow as tf from urllib.parse import urlsplit import requests from logger import get_logger, get_name from utils import tokenise_text, make_dirs, PROJECT_DIR...
279
35.88
110
23
2,425
python
[{"finding_id": "codeql_py/tarslip_1d7b0c483abfe28b_c3790915", "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)." ]
[ 42 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T21:51:55.765918+00:00
1,649,342,740,000
a892ac1cb975a65dceadc2567ed323159d1b7415
3
{ "blob_id": "a892ac1cb975a65dceadc2567ed323159d1b7415", "branch_name": "refs/heads/master", "committer_date": 1649342740000, "content_id": "53b761a502a812f89adcd4a3e916120cf208df1f", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a0101990f10df791347e240b3a58db7fb0b78f56", "extension": "p...
3
stackv2
""" Copyright 2019 EUROCONTROL ========================================== Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions an...
89
38.71
121
15
772
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_713c10cfd4107dd0_3491cbe4", "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...
[ 65 ]
[ null ]
[ 34 ]
[ 58 ]
2024-11-18T21:51:56.527356+00:00
1,683,066,344,000
cf41b8dc3bd03c8a1aad1c8ee978605eeafc0ae7
3
{ "blob_id": "cf41b8dc3bd03c8a1aad1c8ee978605eeafc0ae7", "branch_name": "refs/heads/master", "committer_date": 1691079823000, "content_id": "b24c3599d4f4a6104fd83a80b78dc4816ee2e5ef", "detected_licenses": [ "MIT" ], "directory_id": "8ca1bd449bf0335fb10d5f4ef4e518532699920b", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/env python # # Paramiko Expect Tail Demo # # Written by Fotis Gimian # http://github.com/fgimian # # This script demonstrates the tail functionality in the SSHClientInteraction # class in the paramiko expect library # from __future__ import print_function import traceback import paramiko from paramiko_expec...
59
25.95
79
12
343
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a6f3f490ffba3003_7e1cbc71", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 32 ]
[ null ]
[ 9 ]
[ 69 ]
2024-11-18T21:51:57.028512+00:00
1,690,302,849,000
de5cc4f52339e3804af6c6d4c65d289cca7b2848
3
{ "blob_id": "de5cc4f52339e3804af6c6d4c65d289cca7b2848", "branch_name": "refs/heads/master", "committer_date": 1690302849000, "content_id": "010c212b44a2d40c19922c40fa04744e097087ac", "detected_licenses": [ "MIT" ], "directory_id": "911eb06616fba273482941ff729a55f61fd3404d", "extension": "py", "fi...
3.015625
stackv2
#!/usr/bin/python3 import pymysql import hashlib import warnings from AESCipher import AESCipher class Database: def __init__(self): self.db = pymysql.connect("localhost","python", "CuloMadonna19@__", "Passwords" ) cursor = self.db.cursor() with warnings.catch_warnings(): warni...
129
33.04
89
15
850
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_026c69ff27913556_52f09b65", "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." ]
[ 129 ]
[ null ]
[ 31 ]
[ 53 ]
2024-11-18T22:16:42.492638+00:00
1,580,357,610,000
33c970a5f1bee3620b8df118346cabc48c8bd483
3
{ "blob_id": "33c970a5f1bee3620b8df118346cabc48c8bd483", "branch_name": "refs/heads/master", "committer_date": 1580357610000, "content_id": "5364fcc5a1fa8b471649439dc95577e3703b2098", "detected_licenses": [ "MIT" ], "directory_id": "906e4a2a0b274d28a8ffd5c614ee3dae86393841", "extension": "py", "fi...
3.09375
stackv2
''' Note: to automatic reload flask when file change, run this command line at the terminal: $ FLASK_APP=ana.py FLASK_ENV=development flask run --port 8080 reference: https://flask.palletsprojects.com/en/1.1.x/quickstart/ ''' from flask import Flask, escape, request #The Flask class will allow us to instantiate our ...
40
31.85
133
10
375
python
[{"finding_id": "codeql_py/flask-debug_18b3a6248bc706e7_6e347650", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
3
true
[ "CWE-215", "CWE-079", "CWE-079" ]
[ "py/flask-debug", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 39, 16, 20 ]
[ null, null, null ]
[ 5, 12, 12 ]
[ 37, 30, 31 ]
2024-11-18T22:27:48.412498+00:00
1,498,455,621,000
08f4de2c77370e64ad0f8292ad9dc63c7fbb20b4
2
{ "blob_id": "08f4de2c77370e64ad0f8292ad9dc63c7fbb20b4", "branch_name": "refs/heads/master", "committer_date": 1498455621000, "content_id": "31748efa6eca7b12d3d80e13ee7c1ddcf106d455", "detected_licenses": [ "MIT" ], "directory_id": "80801dcaa046ee8f562dd4ebc4f3b62b4faf3e50", "extension": "py", "fi...
2.421875
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -* """ Send JSON-data to update Domoticz --------------------------------- This script takes JSON-data on STDIN and sends it to a Domoticz installation as sensor-data updates. Copyright (c) 2017 Anders Green <louie@louie.se> Permission is hereby gran...
72
41.82
92
20
645
python
[{"finding_id": "codeql_py/request-without-cert-validation_82a74dbfa66aad61_3c63f453", "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)." ]
[ 59 ]
[ 64 ]
[ 22 ]
[ 30 ]
2024-11-18T22:27:48.470588+00:00
1,552,296,588,000
a2657df94b2bfa9c8949de294964e2b3bfa6b836
3
{ "blob_id": "a2657df94b2bfa9c8949de294964e2b3bfa6b836", "branch_name": "refs/heads/master", "committer_date": 1552296588000, "content_id": "9e65c414c15b9ec80cea11f875731d20d3ec7c79", "detected_licenses": [ "MIT" ], "directory_id": "efd3207f813729aa7094119794c5c92a88f62a1b", "extension": "py", "fi...
2.5625
stackv2
import json from copy import deepcopy from jinja2 import BaseLoader, Environment from locust import HttpLocust, TaskSet, task class BaseTaskSet(TaskSet): """ - Getting token - Unpack data - compile resource url """ headers = { 'Content-Type': 'application/json' } token = None ...
309
26.55
79
20
1,753
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_852d91a94245adf2_d52cd53b", "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." ]
[ 51 ]
[ null ]
[ 21 ]
[ 51 ]
2024-11-18T22:28:13.385392+00:00
1,614,181,199,000
5d88979aa4da6963eb3c30362967d035911494e7
3
{ "blob_id": "5d88979aa4da6963eb3c30362967d035911494e7", "branch_name": "refs/heads/master", "committer_date": 1614181199000, "content_id": "8ab7b4087042c5fd61657d68db71cabf2c23bc99", "detected_licenses": [ "MIT", "Python-2.0" ], "directory_id": "50008b3b7fb7e14f793e92f5b27bf302112a3cb4", "exten...
2.5625
stackv2
#updated 8/27/2014 import win32com.client connection = win32com.client.Dispatch(r'ADODB.Connection') #Constants adStateOpen = 1 class Connection: def __init__(self, servername, username='', password='', db=''): self.connection = connection self.version = ''; self.servername = servername; ...
133
27.84
149
19
900
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1e296b810608f85a_92df55ac", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 104 ]
[ null ]
[ 11 ]
[ 43 ]
2024-11-18T22:44:20.675859+00:00
1,612,969,713,000
36c1cfbe971d6529804c6dc4f8fc86c598ac6348
4
{ "blob_id": "36c1cfbe971d6529804c6dc4f8fc86c598ac6348", "branch_name": "refs/heads/main", "committer_date": 1612969713000, "content_id": "5a430486209d98f74b516d6b98ed2eda74d3abbd", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6eb56f2e3f14f2373be07fe95b1c6fedf1e2d49f", "extension": "py", ...
4.25
stackv2
""" 使用封装数据的思想 创建员工类/部门类,修改实现下列功能. 1. 定义函数,打印所有员工信息,格式:xx的员工编号是xx,部门编号是xx,月薪xx元. 2. 定义函数,打印所有月薪大于2w的员工信息,格式:xx的员工编号是xx,部门编号是xx,月薪xx元. 3. 定义函数,打印所有员工的部门信息,格式:xx的部门是xx,月薪xx元. 4. 定义函数,查找薪资最少的员工 5. 定义函数,根据薪资对员工列表升序排列 # 员工列表 list_employees = [ {"eid": 1001, "did": 9002, "name": "师父", "...
98
26.6
115
16
961
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_acb8dd3b489c70f8_e3a91c1b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text." ]
[ 95 ]
[ null ]
[ 7 ]
[ 26 ]
2024-11-18T22:44:50.085016+00:00
1,380,101,393,000
fc444ac7e8919ad32370c76904432be64f6667f0
2
{ "blob_id": "fc444ac7e8919ad32370c76904432be64f6667f0", "branch_name": "refs/heads/master", "committer_date": 1380101393000, "content_id": "335b566d4b2df97e073484cd96f50890be84ecb3", "detected_licenses": [ "MIT" ], "directory_id": "28125c759799c1ebfe2b4eb4d235d8207d27e6b2", "extension": "py", "fi...
2.359375
stackv2
# vim: fileencoding=utf-8 from __future__ import unicode_literals from __future__ import print_function from datetime import timedelta import os from pprint import pformat import sys import platform import re import subprocess as sp from collections import namedtuple import logging from urllib import urlencode from u...
191
31.86
101
25
1,448
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a312ec220205d233_a6a48f96", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [youtube.com](1) may be at an arbitrary position in the...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [youtube.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 54 ]
[ null ]
[ 12 ]
[ 42 ]
2024-11-18T20:59:42.330891+00:00
1,624,239,504,000
0d2418be0412561975d19fa79bf3ff3ba3708602
4
{ "blob_id": "0d2418be0412561975d19fa79bf3ff3ba3708602", "branch_name": "refs/heads/main", "committer_date": 1624239504000, "content_id": "f2bc5e7094bb6c60b2b481e9e52e9862f1e4cfc7", "detected_licenses": [ "MIT" ], "directory_id": "17deb76479a63682ba72d8e141c45c98dff8407f", "extension": "py", "file...
4.1875
stackv2
from random_word import RandomWords import random def limit_length(): """ Return a word limit as an integer if it's a number over 0 and below 51, and the user doesn't want to quit. """ while True: word_limit = input('Enter number of words in passphrase' '\n(Limit...
82
29.07
80
16
551
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d4f0cc46f8651344_4d5abb57", "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.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 59, 62, 65 ]
[ null, null, null ]
[ 19, 19, 19 ]
[ 58, 50, 58 ]
2024-11-18T21:00:03.805521+00:00
1,495,380,533,000
c64023f8fbbe594842b991f4a5d18633f1ce9c7c
3
{ "blob_id": "c64023f8fbbe594842b991f4a5d18633f1ce9c7c", "branch_name": "refs/heads/master", "committer_date": 1495380533000, "content_id": "74e76aa1b0cb67d302462403082c9b7648fde23f", "detected_licenses": [ "MIT" ], "directory_id": "d510a24626b8ac7c39c4b14e9ba09e051aa50cda", "extension": "py", "fi...
2.796875
stackv2
__author__ = 'tusharmakkar08' try: from urllib.parse import urlparse, urlencode from urllib.request import urlopen, Request, urlretrieve from urllib.error import HTTPError except ImportError: from urllib.parse import urlparse from urllib.parse import urlencode from urllib.request import urlopen...
43
40.7
111
15
409
python
[{"finding_id": "codeql_py/overly-large-range_2de9131c842f0d81_e85ce45e", "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\\\\[\\\\\\\\]^_\\]." ]
[ 17 ]
[ null ]
[ 43 ]
[ 46 ]
2024-11-18T21:00:30.021522+00:00
1,544,121,844,000
2dec1ddf8fc3f3be010c19e8fc264449967962cb
3
{ "blob_id": "2dec1ddf8fc3f3be010c19e8fc264449967962cb", "branch_name": "refs/heads/master", "committer_date": 1544121844000, "content_id": "04ef3335b57ed8d6852640fb167cb8ce30c98453", "detected_licenses": [ "MIT" ], "directory_id": "7a11eba469a972fde341d05b319faaf5895b2977", "extension": "py", "fi...
2.59375
stackv2
import infobot.konstants as K from infobot.social.template import SocialPlugin class FakeSocialPluginConf(): def __init__(self, filedata): "Handles the configuation data for social plugin" self.userid = filedata[K.useridKey] self.password = filedata[K.passwdKey] self.socialAppName ...
55
31.13
71
12
396
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f255e7fb076a05ee_6decb61e", "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." ]
[ 36 ]
[ 37 ]
[ 15 ]
[ 51 ]
2024-11-18T21:00:47.466952+00:00
1,320,414,963,000
22cd0bf0c7b7b5bc15bc54a3b7d8a97a4dfab958
3
{ "blob_id": "22cd0bf0c7b7b5bc15bc54a3b7d8a97a4dfab958", "branch_name": "refs/heads/master", "committer_date": 1320414963000, "content_id": "db43c2f68dfa1821336c08725e00ca8a11b39b63", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "e7b483d88f80703c89553e1b9e2f5dd0322f7e38", "extension": "p...
3.078125
stackv2
import os import sys from struct import pack from base64 import b64encode, b64decode try: from Crypto.Hash import HMAC as hmac, SHA as sha1 from Crypto.Random.random import getrandbits, randint, choice except ImportError: import hmac from random import randint, choice try: from hashlib import sha1 exc...
98
27.48
133
18
865
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_1566412aede7fe16_f564faba", "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...
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 (SHA1) 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 (SHA1) that is insecure for password hashing, since it is not a computationally e...
[ 33, 44 ]
[ null, null ]
[ 12, 12 ]
[ 20, 27 ]
2024-11-18T21:00:48.316861+00:00
1,628,281,006,000
b8f072537fe8b958b913e7cfb434f64ac4bfb667
2
{ "blob_id": "b8f072537fe8b958b913e7cfb434f64ac4bfb667", "branch_name": "refs/heads/master", "committer_date": 1628317238000, "content_id": "a17a5d219ce63341bc385b3e1c182af5ddb2bcc0", "detected_licenses": [ "MIT" ], "directory_id": "c0613b519124979d1de12614a9a7a745f9c9a66f", "extension": "py", "fi...
2.359375
stackv2
import os from asyncio import sleep from jupyter_server.base.handlers import JupyterHandler import tornado class XarrayLeafletHandler(JupyterHandler): def set_default_headers(self): self.set_header('Content-Type', 'image/png') self.set_header('Cache-Control', 'no-store, no-cache, must-revalidate, ...
52
32.73
90
17
386
python
[{"finding_id": "codeql_py/path-injection_ff85e813180e6bf8_4611a41b", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
5
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 21, 52, 22, 51, 46 ]
[ null, null, null, null, null ]
[ 31, 23, 27, 23, 19 ]
[ 40, 27, 36, 32, 23 ]
2024-11-18T21:00:49.566965+00:00
1,490,544,847,000
5f7ba1190df80a715fdd6252252d4ef1f2de5f08
2
{ "blob_id": "5f7ba1190df80a715fdd6252252d4ef1f2de5f08", "branch_name": "refs/heads/master", "committer_date": 1490547412000, "content_id": "1faf49b6cdfa2b08904fc1d7c69995f5d432cf01", "detected_licenses": [ "MIT" ], "directory_id": "245ad2aebe8d89b460788a9b0c95cb52dbd965e9", "extension": "py", "fi...
2.40625
stackv2
"""JSON API.""" import os from flask import abort, Blueprint, jsonify, g, request from werkzeug.utils import secure_filename from beancount.core.data import Posting, Transaction from beancount.core.amount import Amount from beancount.core.number import D from beancount.scripts.format import align_beancount from fava...
129
31.64
78
17
892
python
[{"finding_id": "codeql_py/path-injection_3d24048786aa9c0a_0bb0e2be", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
4
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 90, 91, 93, 96 ]
[ null, null, null, null ]
[ 27, 21, 23, 15 ]
[ 36, 30, 31, 23 ]
2024-11-18T21:01:04.078179+00:00
1,567,883,036,000
cb5b5663a388908a87465de0f58512b1733baf91
3
{ "blob_id": "cb5b5663a388908a87465de0f58512b1733baf91", "branch_name": "refs/heads/master", "committer_date": 1567883036000, "content_id": "9b2f70bcfa4382bbfeb425effde5b006bf19d2d3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6bdab6f6b6515276d7573197c0ac72a1c5e276c9", "extension": "py"...
2.6875
stackv2
from typing import Optional import json import re import urllib def get_git_url(package: str) -> Optional[str]: """Retrieves GitHub page if specified for given PyPi package via PyPi API.""" # TODO: make sure this verifies HTTPS certs data = urllib.request.urlopen( 'https://pypi.python.org/pypi/%s/json' % ...
23
33.96
79
12
206
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_82bbd92f4eebc366_c46bf562", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://github.com](1) may be at an arbitrary position ...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [http://github.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 15 ]
[ null ]
[ 6 ]
[ 47 ]
2024-11-18T21:01:30.112878+00:00
1,608,043,448,000
8a704a2517c3f1aecdca5aa513e35347f1d889ec
3
{ "blob_id": "8a704a2517c3f1aecdca5aa513e35347f1d889ec", "branch_name": "refs/heads/master", "committer_date": 1608043448000, "content_id": "12fdca8cd05faeb32b6ca3eaf44884f44bfa6c43", "detected_licenses": [ "MIT" ], "directory_id": "4c273e5e598f932558724ca1e1478baf212b625e", "extension": "py", "fi...
2.515625
stackv2
import copy import json from flask import request, Response from tranql.backplane.api.standard_api import StandardAPIResource from tranql.concept import BiolinkModelWalker import logging logger = logging.getLogger(__name__) class BiolinkModelWalkerService(StandardAPIResource): """ Biolink Model Walk Resource. ""...
67
32.12
85
19
403
python
[{"finding_id": "codeql_py/log-injection_a060a50d2fa06063_83496b50", "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)." ]
[ 64 ]
[ null ]
[ 26 ]
[ 63 ]
2024-11-18T21:01:32.543264+00:00
1,463,367,988,000
2e51fc0e82256fa1a941214a4aa343593b1bff33
3
{ "blob_id": "2e51fc0e82256fa1a941214a4aa343593b1bff33", "branch_name": "refs/heads/master", "committer_date": 1463367988000, "content_id": "183fec4dddbf08dc3f474b7c5bbd1f667a7e2794", "detected_licenses": [ "MIT" ], "directory_id": "51e2c4983dc907ebe9b42616914aaaeec634d36e", "extension": "py", "fi...
2.5625
stackv2
# -*-coding:utf-8-*- from flask import render_template, request, url_for,flash,redirect from . import auth from .. import db from ..models import User from .forms import LoginForm, RegistrationForm, ChangePasswordForm,PasswordResetRequestForm, PasswordResetForm, ChangeEmailForm from flask.ext.login import logout_user, ...
152
41.51
137
16
1,681
python
[{"finding_id": "codeql_py/url-redirection_29b878dd7b15a79e_6644117f", "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)." ]
[ 17 ]
[ null ]
[ 29 ]
[ 78 ]
2024-11-18T21:25:35.893933+00:00
1,609,640,638,000
63ee548893dc4fef704350f8c39e71e7ebcde4c2
2
{ "blob_id": "63ee548893dc4fef704350f8c39e71e7ebcde4c2", "branch_name": "refs/heads/master", "committer_date": 1609640638000, "content_id": "bafff8496d792114403767dbac8ef90e1c231be0", "detected_licenses": [ "MIT" ], "directory_id": "7c6f648e0da8aebcb489dec06633134ff8e3400e", "extension": "py", "fi...
2.390625
stackv2
from peewee import * from flask_login import UserMixin from flask_bcrypt import generate_password_hash from flask import flash import datetime from itsdangerous import TimedJSONWebSignatureSerializer as Serializer import os import math from WebColourNames import web_colour_names_lower, web_colour_names_upper testing =...
393
33.16
169
21
3,121
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_eed444355ae68ebd_2f230768", "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." ]
[ 123 ]
[ null ]
[ 15 ]
[ 114 ]
2024-11-18T22:00:17.496204+00:00
1,630,942,139,000
dd725e8aac90d1953edc74c17e7566f0775bb4ab
3
{ "blob_id": "dd725e8aac90d1953edc74c17e7566f0775bb4ab", "branch_name": "refs/heads/main", "committer_date": 1630942139000, "content_id": "4783ac9bbf1d6d4bcba223bfc21a5d1ecab14fed", "detected_licenses": [ "MIT" ], "directory_id": "9b606a6c4afd0dbc1d695ac5a067c071cb46919b", "extension": "py", "file...
2.53125
stackv2
from itemadapter import ItemAdapter import hashlib import logging import tweepy logger = logging.getLogger(__name__) class TwitterRelevance: api_key = "TWITTER_API_KEY" api_secret = "TWITTER_API_SECRET" bearer_token = "TWITTER_BEARER_TOKEN" access_token = "TWITTER_ACCESS_TOKEN" access_token_secret...
52
35.12
75
15
428
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_6102de66bedd088a_44b45dc3", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://www.abc.net.au](1) may be at an arbitrary posi...
9
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitizatio...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The string [https://www.abc.net.au](1) may be at an arbitrary position in the sanitized URL.", "The string [https://www.theguardian.com](1) may be at an arbitrary position in the sanitized URL.", "The string [https://www.smh.com.au](1) may be at an arbitrary position in the sanitized URL.", "The string [http...
[ 35, 37, 39, 41, 43, 45, 47, 49, 51 ]
[ null, null, null, null, null, null, null, null, null ]
[ 12, 12, 12, 12, 12, 12, 12, 12, 12 ]
[ 52, 57, 52, 55, 55, 62, 51, 53, 56 ]
2024-11-18T22:00:22.441339+00:00
1,408,112,439,000
03b41b06bb7127b3c172fb95115803d7dba4bffb
3
{ "blob_id": "03b41b06bb7127b3c172fb95115803d7dba4bffb", "branch_name": "refs/heads/master", "committer_date": 1408112439000, "content_id": "b8a710fc313d6db6e95797c276b4494277ffd3f0", "detected_licenses": [], "directory_id": "d498df13264687907e07ab205ba4f8fc50b5ec79", "extension": "py", "filename": "fac...
2.671875
stackv2
import twitter import instagram import requests from dateutil.parser import parse as date_parse class SocialPost(object): """ Base class to represent a social post. Any derived classes should return all the attributes below """ content = None created_at = None post_url = None ...
197
24.25
87
20
1,046
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_997a245caa73337c_a6d704ad", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [pbs.twimg.com](1) may be at an arbitrary position in t...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [pbs.twimg.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 52 ]
[ null ]
[ 49 ]
[ 80 ]
2024-11-18T22:00:25.021442+00:00
1,582,668,352,000
b05fc421d8eb69c19305144ce61d264e11e2159a
3
{ "blob_id": "b05fc421d8eb69c19305144ce61d264e11e2159a", "branch_name": "refs/heads/master", "committer_date": 1582668352000, "content_id": "aecf6ffde4aac6eaa99d7402c6a2fcf8d89da93f", "detected_licenses": [ "MIT" ], "directory_id": "98447e9292ccf0c811e9dbc8d60a94904121e7e2", "extension": "py", "fi...
2.765625
stackv2
import csv import requests from urllib3.exceptions import InsecureRequestWarning from datetime import datetime from encode_user_credential import convertToUrlEncodedBase64 requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) import json from zipfile import ZipFile API_BASE_URL = "https://api.th...
145
35.68
121
31
1,095
python
[{"finding_id": "codeql_py/request-without-cert-validation_3fa67881abc1fdd8_50f2f666", "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)." ]
[ 40, 137 ]
[ null, null ]
[ 23, 16 ]
[ 110, 76 ]
2024-11-18T22:00:45.200499+00:00
1,592,495,613,000
54d35a25e442dc71f4e09fe8d40c510a74b094c8
2
{ "blob_id": "54d35a25e442dc71f4e09fe8d40c510a74b094c8", "branch_name": "refs/heads/master", "committer_date": 1592495613000, "content_id": "e8290970465a839602206b0e7fd68337c991fa2e", "detected_licenses": [ "MIT" ], "directory_id": "e5a12934664f81ce10db4358847dd1f63f6a82a4", "extension": "py", "fi...
2.4375
stackv2
import base64 import hashlib import hmac import time from websocket import create_connection from websocket._exceptions import WebSocketConnectionClosedException def start_exmo_client(url, init_messages): ws = create_connection(url, connection='Connection: Upgrade') try: for init_message in init_mes...
51
27.37
110
14
360
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_6cfbec268010ae1f_1b7681d7", "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 (SHA512) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 40 ]
[ null ]
[ 44 ]
[ 76 ]
2024-11-18T22:00:46.483374+00:00
1,507,056,124,000
524c3acbbac4b54303de423d9a4020d7c3a952a4
3
{ "blob_id": "524c3acbbac4b54303de423d9a4020d7c3a952a4", "branch_name": "refs/heads/master", "committer_date": 1507056124000, "content_id": "6661747aa2bc79cf6a32ee2cb513e5e8fd64b02a", "detected_licenses": [ "MIT" ], "directory_id": "c394eacd96a15eb48e3d635c6dff65a6b5035c59", "extension": "py", "fi...
2.609375
stackv2
# -*- coding: utf-8 -*- """ This is part of WebScout software Docs EN: http://hack4sec.pro/wiki/index.php/WebScout_en Docs RU: http://hack4sec.pro/wiki/index.php/WebScout License: MIT Copyright (c) Anton Kuzmin <http://anton-kuzmin.ru> (ru) <http://anton-kuzmin.pro> (en) Class for parse site content and extract link f...
177
35.69
117
20
1,405
python
[{"finding_id": "codeql_py/overly-large-range_84196caf2948b776_36f2556f", "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\\\\[\\\\\\\\]^_\\]." ]
[ 91 ]
[ null ]
[ 59 ]
[ 62 ]
2024-11-18T22:26:04.120185+00:00
1,443,567,350,000
4b495a5f21d7471de7cc7b846691b19d695a8e54
3
{ "blob_id": "4b495a5f21d7471de7cc7b846691b19d695a8e54", "branch_name": "refs/heads/master", "committer_date": 1443567350000, "content_id": "e27d312e83f82efe285e16f1ec70525added8a4b", "detected_licenses": [ "MIT" ], "directory_id": "b56765e317529b137ec1ba52cba3d564aa39cc3e", "extension": "py", "fi...
3.28125
stackv2
import os import hashlib class userController: """this class control users log-in activity""" def __init__(self): self.login = "" self.password = "" self.filePath = "../../pass.vkm" self.hashPassword = "" def __requestData(self): self.login = input("Hello, e...
41
29.61
75
15
270
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_91bbc48dfe44f912_04c55dde", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."...
3
true
[ "CWE-312", "CWE-312", "CWE-327" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 25, 19, 41 ]
[ null, null, null ]
[ 17, 15, 41 ]
[ 46, 62, 63 ]
2024-11-18T22:26:06.447130+00:00
1,580,758,462,000
0bbba3d2a04960531ec0d9c06daae81b628f5d42
3
{ "blob_id": "0bbba3d2a04960531ec0d9c06daae81b628f5d42", "branch_name": "refs/heads/master", "committer_date": 1580758462000, "content_id": "d823fe96cbb5888a308cc8ea90b3594275bb91fc", "detected_licenses": [ "MIT" ], "directory_id": "74e88276d1fd8ea8e184df60af6463802253bd44", "extension": "py", "fi...
2.953125
stackv2
from datetime import datetime import requests import json import math from config import GOOGLE_MAPS_API_KEY from linear_regression import predictPoint def findPerson(person_latitude, person_longitude, person_velocity, disaster_type, last_time): if (disaster_type == "wildfire"): if (inBuilding(person_latit...
110
43.8
161
15
1,141
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_52ae17cc4884e934_f92bee13", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.\nThis expression logs [sensitive data (private)](4) as clear text.\nThis expression logs [sensitive data (password)...
[ 99, 100 ]
[ null, null ]
[ 15, 15 ]
[ 26, 26 ]
2024-11-18T22:26:14.172283+00:00
1,506,069,877,000
3ac194d4c180b1728ece4a2f05916fa3f4f44fd0
2
{ "blob_id": "3ac194d4c180b1728ece4a2f05916fa3f4f44fd0", "branch_name": "refs/heads/master", "committer_date": 1506069877000, "content_id": "819fb1e83da5a2361ffa5e56cbc828b87bdbd9e4", "detected_licenses": [ "MIT" ], "directory_id": "e02a5df7eca2bc185bd8fde753f8fd02ca8867a6", "extension": "py", "fi...
2.359375
stackv2
import requests from django.contrib import admin from rq import Queue from worker import conn q = Queue(connection=conn) from crawlers.models import Player def get_user_info(user_id): user_detail_url = 'http://cgi.allinpokers.com:8080/api/customer/detail?user_id=%s&operator_id=%s&room_type=0' % ( user_...
134
33
117
15
1,179
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6fbdfc7034db77f6_31f14f8c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
3
true
[ "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text." ]
[ 66, 90, 114 ]
[ null, null, null ]
[ 19, 19, 19 ]
[ 52, 52, 52 ]
2024-11-18T22:26:16.996814+00:00
1,563,887,767,000
876e2d6564bf776f105c544d1bcd1978cd5d5d0b
3
{ "blob_id": "876e2d6564bf776f105c544d1bcd1978cd5d5d0b", "branch_name": "refs/heads/master", "committer_date": 1563887767000, "content_id": "61b182390e222ea826d44fe9bfda2934de4378aa", "detected_licenses": [ "MIT" ], "directory_id": "2e951d2efba54f7bd19e5e01c5adc326eb232ab3", "extension": "py", "fi...
2.546875
stackv2
from flask import Flask, Response, render_template, redirect, request import json import requests app = Flask(__name__) DEVICES = None with open("devices.json") as f: rawjson = f.read() DEVICES = json.loads(rawjson) def sendCommand(device, command, resp=0): d = DEVICES[device] host = d["host"] po...
63
29.32
102
15
482
python
[{"finding_id": "codeql_py/flask-debug_c36659a0b780b02b_6629c743", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
3
true
[ "CWE-215", "CWE-079", "CWE-918" ]
[ "py/flask-debug", "py/reflective-xss", "py/partial-ssrf" ]
[ "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Cross-site scripting vulnerability due to a [user-provided value](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 63, 52, 21 ]
[ null, null, null ]
[ 5, 29, 16 ]
[ 52, 38, 44 ]
2024-11-18T22:26:26.342891+00:00
1,617,825,959,000
54e654c47500e3276c15b12659353636384d2cc8
3
{ "blob_id": "54e654c47500e3276c15b12659353636384d2cc8", "branch_name": "refs/heads/master", "committer_date": 1617825959000, "content_id": "d37151eaeff4ea9fca9c3e020403a26d2ca4f027", "detected_licenses": [ "MIT" ], "directory_id": "20d05bd2a99df96641408f6c174bd7ae4df9c0c7", "extension": "py", "fi...
2.6875
stackv2
#!/usr/bin/env python3 import socket import os import logging class ControlSocket: def __init__(self,socket_path): # throws: FileNotFoundError, PermissionError self._socket_path = socket_path if os.path.exists(self._socket_path): logging.log(logging.DEBUG, "Removing leftover socket file from previous run") ...
34
25.35
103
12
215
python
[{"finding_id": "codeql_py/overly-permissive-file_4787d77748cbfbc1_4db1ca0e", "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 group writable.", "remediation": "", "location": ...
1
true
[ "CWE-732" ]
[ "py/overly-permissive-file" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Overly permissive mask in chmod sets file to group writable." ]
[ 21 ]
[ null ]
[ 3 ]
[ 37 ]
2024-11-18T20:52:20.702740+00:00
1,664,690,590,000
4fc980f50f709cf75b1c5ce4a1146c10dba05eb3
3
{ "blob_id": "4fc980f50f709cf75b1c5ce4a1146c10dba05eb3", "branch_name": "refs/heads/master", "committer_date": 1664690590000, "content_id": "6f78a106da1a244e9f9e370c619028ccc64507c7", "detected_licenses": [ "MIT" ], "directory_id": "ae3db7d15eef49521cc093434bc14a423669f7d3", "extension": "py", "fi...
2.546875
stackv2
#!/usr/bin/env pthon #coding=utf-8 # Author: Moro # blog: https://mrchens.github.io import csv import time import hmac import hashlib import random import string import sys import re import os def check_is_csv_file(): # .xlsx,.xlsm,.xltx,.xltm openpyxl 支持的格式 argLen = len(sys.argv) if argLen >= 3: ...
85
30.34
128
19
724
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_3c58b4876fd96eff_baa7f90f", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\...
2
true
[ "CWE-312", "CWE-327" ]
[ "py/clear-text-storage-sensitive-data", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.", "[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[Se...
[ 82, 36 ]
[ null, null ]
[ 21, 35 ]
[ 77, 46 ]
2024-11-18T20:52:21.867244+00:00
1,604,051,589,000
1cc39df717e50b336e9cd7f99561555c740d0f4c
3
{ "blob_id": "1cc39df717e50b336e9cd7f99561555c740d0f4c", "branch_name": "refs/heads/main", "committer_date": 1604051589000, "content_id": "832b550879a24b63d995579eb364b65827491a5e", "detected_licenses": [ "MIT" ], "directory_id": "7c5e00a3438ada14ef4b1dc2ef25610383fdc01f", "extension": "py", "file...
2.6875
stackv2
try: import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning import json import pprint except Exception as e: print("Module might be missing, See the message----> ", e) requests.packages.urllib3.disable_warnings(InsecureRequestWarning) class Api: def __init__(s...
49
29.67
113
13
349
python
[{"finding_id": "codeql_py/request-without-cert-validation_1ff9a519b1b5f9d6_512fcaf0", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
4
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation becau...
[ 21, 28, 35, 42 ]
[ null, null, null, null ]
[ 13, 13, 13, 13 ]
[ 87, 114, 113, 90 ]
2024-11-18T21:08:15.789710+00:00
1,634,242,360,000
5e14042e94448ab5a6353f864d3214b0fc7de0ba
2
{ "blob_id": "5e14042e94448ab5a6353f864d3214b0fc7de0ba", "branch_name": "refs/heads/main", "committer_date": 1634242360000, "content_id": "1e0eb2b9c3d95cd52e6e6e97179765b2d8411c61", "detected_licenses": [ "MIT" ], "directory_id": "e4aae6eb1458b8fc1d5c167ee6922d8391fca949", "extension": "py", "file...
2.5
stackv2
from flask import render_template, redirect, url_for, flash, request from werkzeug.urls import url_parse from flask_login import login_user, logout_user, current_user from flask_wtf import FlaskForm from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import ValidationError,...
75
36.48
76
15
569
python
[{"finding_id": "codeql_py/url-redirection_b0a5c0e165a4ac28_92693fe1", "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)." ]
[ 38 ]
[ null ]
[ 25 ]
[ 34 ]
2024-11-18T21:08:22.544738+00:00
1,693,377,859,000
3f1b1f63320e9c0de888d06db78dfed6f1c63399
2
{ "blob_id": "3f1b1f63320e9c0de888d06db78dfed6f1c63399", "branch_name": "refs/heads/master", "committer_date": 1693377859000, "content_id": "4b92ef12ebe49b54dcfa876281f74354a9b5f8ae", "detected_licenses": [ "Apache-2.0" ], "directory_id": "80861e99492590d314dde6f3f19103c6d36fd02f", "extension": "py"...
2.359375
stackv2
# Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
529
27.63
132
21
3,681
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_b0e0cf43ddb2cf66_5830873d", "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." ]
[ 411 ]
[ null ]
[ 24 ]
[ 36 ]
2024-11-18T21:31:26.640333+00:00
1,623,308,759,000
935cb1056a120b8a6634e00a0ffd9e730d7a30b5
2
{ "blob_id": "935cb1056a120b8a6634e00a0ffd9e730d7a30b5", "branch_name": "refs/heads/main", "committer_date": 1623308759000, "content_id": "871c3534f010a7add8b67b1e874aca05286fcd64", "detected_licenses": [ "MIT" ], "directory_id": "ea0c3f8d9cf92c73d94cd2754804ffd4a042567a", "extension": "py", "file...
2.484375
stackv2
import subprocess import re import requests command_output = subprocess.run(["netsh", "wlan", "show", "profiles"], capture_output = True).stdout.decode() profile_names = (re.findall("All User Profile : (.*)\r", command_output)) wifi_list = list() if len(profile_names) != 0: for name in profile_names: ...
36
35.42
142
18
323
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_057c2b05d00399b0_c018ae8b", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text." ]
[ 31 ]
[ null ]
[ 18 ]
[ 67 ]
2024-11-18T21:31:32.990102+00:00
1,497,193,213,000
c5c3c9f8dd5477dad27608865ab54967e8e9e8a0
3
{ "blob_id": "c5c3c9f8dd5477dad27608865ab54967e8e9e8a0", "branch_name": "refs/heads/master", "committer_date": 1497193213000, "content_id": "35c864f0d44c82db6e7abd41a98f5b195eaa5de0", "detected_licenses": [ "MIT" ], "directory_id": "4cf7eb98b5a59540db0f64b9e9e32dde58466f85", "extension": "py", "fi...
2.703125
stackv2
## # Cisco SocialMiner Bulk Chat Transcript Downloader # # This python script does the following: # # 0. Invokes a `/search` REST API request on a Cisco SocialMiner server for all handled chat contacts # 1. Processes the response from the server, and extracts chat transcript data # 2. Exports transcript for each ...
163
41.01
120
22
1,428
python
[{"finding_id": "codeql_py/request-without-cert-validation_0aaf9a33eb3f2b69_f95c4d52", "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)." ]
[ 59 ]
[ null ]
[ 16 ]
[ 70 ]
2024-11-18T21:31:52.997931+00:00
1,571,160,635,000
5b47902462f6fa03a41861e012551295df8206ea
3
{ "blob_id": "5b47902462f6fa03a41861e012551295df8206ea", "branch_name": "refs/heads/master", "committer_date": 1571160635000, "content_id": "952f4383a70a7d565b6dd603ddb2ef76baaa0bfb", "detected_licenses": [ "MIT" ], "directory_id": "d43230c43d01578107a97c4b0cdc4d0542ec5f14", "extension": "py", "fi...
3.40625
stackv2
import urllib.request import json import turtle #json file for people present in the satellite url = 'http://api.open-notify.org/astros.json' # url fetching of the data, response = urllib.request.urlopen(url) res = json.loads(response.read().decode('utf-8')) t = res['people'] print('total people in spacestation: ',res[...
54
31.44
111
10
462
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5f900b7dad5d6826_f11e6167", "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." ]
[ 48, 49 ]
[ null, null ]
[ 21, 20 ]
[ 30, 28 ]
2024-11-18T21:31:58.868125+00:00
1,479,307,388,000
906623da933138f14236653d9b832e5032246eb8
3
{ "blob_id": "906623da933138f14236653d9b832e5032246eb8", "branch_name": "refs/heads/master", "committer_date": 1479307388000, "content_id": "fa7419c518438f5416c7aab3f7a69f16837ab870", "detected_licenses": [ "Apache-2.0" ], "directory_id": "64b189ae0e01b5dbd7fadc3a7f8535684b74c3b0", "extension": "py"...
2.8125
stackv2
import logging import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) class DCOSAuth: """Used to acquire a DCOS authentication token to make requests to other DCOS components. Can also create and delete users a...
214
38.1
126
18
1,668
python
[{"finding_id": "codeql_py/request-without-cert-validation_9de8ef8b22cf3d0f_4b3712b7", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
4
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1) 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).", "...
[ 119, 121, 123, 125 ]
[ null, null, null, null ]
[ 17, 17, 17, 17 ]
[ 81, 82, 81, 84 ]
2024-11-18T21:32:19.023054+00:00
1,556,189,971,000
2535b3e2b4ad7025820b25b3c316c6e293cc3f7a
4
{ "blob_id": "2535b3e2b4ad7025820b25b3c316c6e293cc3f7a", "branch_name": "refs/heads/master", "committer_date": 1556189971000, "content_id": "81f1fc19ad5f822f3d78f97c4d21314b47fcaea4", "detected_licenses": [ "MIT" ], "directory_id": "cc73ebde94e293a24a75c355afa3886b8b212148", "extension": "py", "fi...
3.703125
stackv2
""" @author: Maneesh D @email: maneeshd77@gmail.com @date: 3/29/2017 """ from os import urandom from Advanced.OOP.Inheritance.Base import Student class MyClass(Student): secret_key = urandom(8) @classmethod def get_secret_key(cls): return cls.secret_key def __init__(self, name, age, sex, gra...
36
22.92
71
14
242
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dfd9ba77bb41e1bd_6871d67d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text." ]
[ 27 ]
[ null ]
[ 11 ]
[ 63 ]
2024-11-18T21:49:16.078400+00:00
1,606,335,568,000
861d1501ed21f271ae37d50147aa8b1a153a4f46
3
{ "blob_id": "861d1501ed21f271ae37d50147aa8b1a153a4f46", "branch_name": "refs/heads/master", "committer_date": 1606335568000, "content_id": "6443b7a5d0b53bea8175264cc9c58b681a69c82e", "detected_licenses": [ "MIT" ], "directory_id": "07ac408a6c0c64ebe4d41fe98fba69f6583d3fea", "extension": "py", "fi...
2.578125
stackv2
import pathlib import logging import aiohttp.web as web import importlib.machinery import importlib.util import asyncio import warnings import inspect import os from .errors import ServerWarning, ServerError log = logging.getLogger("spidertools.webserver.handler") BACKUP_ERROR = """ While attempting to handle HTT...
237
35.23
106
20
1,910
python
[{"finding_id": "codeql_py/stack-trace-exposure_0c680cd41cef89eb_7f05a125", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
1
true
[ "CWE-209" ]
[ "py/stack-trace-exposure" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user." ]
[ 155 ]
[ 156 ]
[ 18 ]
[ 87 ]
2024-11-18T22:26:06.148360+00:00
1,474,510,459,000
4950c171fb26157adfd188b6e94c0cfa4f230786
4
{ "blob_id": "4950c171fb26157adfd188b6e94c0cfa4f230786", "branch_name": "refs/heads/master", "committer_date": 1474510459000, "content_id": "6b3b6a6812c98771e127a3bfc27f2ef5a819eb06", "detected_licenses": [ "MIT" ], "directory_id": "80bd0319d08288c850e12dc9f2cf605eea7bde54", "extension": "py", "fi...
4.4375
stackv2
''' @author: Abhinav Kurada @date: 9/15/16 Program Description: User guesses a secret word that the programmer has selected. They guess it letter by letter. If they guess the right letter, that letter is revealed in the word. If they guess it wrong they get a strike. If they get 5 strikes they lose. ''' username = ...
90
26.72
104
18
588
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0a5293ba97bb1ada_a19decd8", "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." ]
[ 40, 78 ]
[ null, null ]
[ 15, 19 ]
[ 51, 55 ]
2024-11-18T22:26:07.120962+00:00
1,535,912,796,000
7b3b33b984b955f1703d765d9da4acba4e4fd4b0
4
{ "blob_id": "7b3b33b984b955f1703d765d9da4acba4e4fd4b0", "branch_name": "refs/heads/master", "committer_date": 1535912796000, "content_id": "0c5dd796a4da78563f884d66a386ec56bd8017be", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4ec239aba047d0ff36348bea2e59595b9fb845ac", "extension": "py"...
3.90625
stackv2
""" Symmetric Cryptography Exercise In this exercise you will use AES to encrypt and decrypt some messages. AES can be applied in a number of modes. These include Electronic Code Book (ECB), cipher block chaining (CBC) and counter mode (CTR). Tasks: 1) Use AES-CBC to encrypt then decrypt a single block of data 2) Use...
84
38.44
119
8
872
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_efcd285b48072e8a_231ad97b", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used.", "[The block mode ECB](1) is broken or weak, and should not be used." ]
[ 37, 41 ]
[ null, null ]
[ 14, 13 ]
[ 39, 41 ]
2024-11-18T22:42:05.525520+00:00
1,585,925,031,000
d0c6078eaae35904657c67097f6a7f87a910ddcd
2
{ "blob_id": "d0c6078eaae35904657c67097f6a7f87a910ddcd", "branch_name": "refs/heads/master", "committer_date": 1585925031000, "content_id": "db59e093c93068b20b0ad212eae97046232e1779", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b2fee3b968cecc138f17bf31751024e13b557d85", "extension": "py"...
2.328125
stackv2
import os from flask import Flask, request, jsonify, Response import requests import json from loguru import logger import yaml from public_cache import PublicCache from regularize import regularize from sheet_parser import SheetParser app = Flask(__name__) mimetypes = { '.html': 'text/html', '.xhtm...
268
29.84
120
16
2,218
python
[{"finding_id": "codeql_py/stack-trace-exposure_23f2d3ad4266e884_243b9984", "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.", "...
19
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-918", "CWE-079", "CWE-079", "CWE-079", "CWE-295" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure",...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information...
[ 79, 151, 160, 165, 174, 186, 198, 221, 224, 227, 242, 243, 256, 259, 40, 221, 242, 256, 40 ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
[ 16, 21, 30, 20, 30, 30, 30, 34, 25, 16, 30, 21, 30, 21, 16, 34, 30, 30, 16 ]
[ 28, 22, 45, 26, 45, 45, 45, 49, 32, 41, 45, 28, 45, 28, 47, 49, 45, 45, 47 ]
2024-11-18T22:42:11.940189+00:00
1,550,133,738,000
b7a6f06b605738fc00ebff7d350ef55a0f65c1c1
3
{ "blob_id": "b7a6f06b605738fc00ebff7d350ef55a0f65c1c1", "branch_name": "refs/heads/master", "committer_date": 1550133738000, "content_id": "fc35eee2f276ac92221bbcf1cc19635c3b69dab3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "337f69f2fefa5505ac40aeff70822fdcc5b2043d", "extension": "py"...
2.5625
stackv2
# coding=utf-8 from flask import Flask, render_template import json import time import os app = Flask(__name__) root_path = os.path.split(os.path.realpath(__file__))[0] __base_user_path = root_path + '/static/data/user_%s' __base_trip_path = root_path + '/static/data/user_%s/trip_%s' def load_user(user_id): use...
106
27.41
113
15
777
python
[{"finding_id": "codeql_py/path-injection_33a5fbe41232313d_4e94d840", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
3
true
[ "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).", "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2)." ]
[ 18, 35, 50 ]
[ null, null, null ]
[ 19, 19, 19 ]
[ 46, 46, 43 ]
2024-11-18T20:31:35.587253+00:00
1,616,227,400,000
7731d5c877415e7ce587b611f43937f91cab9978
3
{ "blob_id": "7731d5c877415e7ce587b611f43937f91cab9978", "branch_name": "refs/heads/master", "committer_date": 1616227400000, "content_id": "8b4cd5326cf973252a8857cae033be3d8ce1e91d", "detected_licenses": [ "MIT" ], "directory_id": "1d99fcbda0d2cb3615d08aa9afad9bbeca6b00de", "extension": "py", "fi...
2.78125
stackv2
from flask import Flask, jsonify, request import os import hmac import hashlib import datetime from xeger import Xeger app = Flask(__name__) def __generate_hmac_signature(timestamp, body): # Slack App - Basic Information - App Credentials に記載されている # Signing Secret secretkey = os.environ['SLACK_API_SIGNIN...
66
27.86
79
14
454
python
[{"finding_id": "codeql_py/stack-trace-exposure_56eefc9d7a36a54e_7fadb9a6", "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-117" ]
[ "py/stack-trace-exposure", "py/log-injection" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "This log entry depends on a [user-provided value](1)." ]
[ 64, 42 ]
[ null, null ]
[ 14, 22 ]
[ 27, 64 ]
2024-11-18T20:31:38.611112+00:00
1,626,088,974,000
956aa1d30020d5de471b84989b13096b38619308
3
{ "blob_id": "956aa1d30020d5de471b84989b13096b38619308", "branch_name": "refs/heads/main", "committer_date": 1626088974000, "content_id": "f1fb70deb0c0b1f699f3e7f304bdb1a51ae37b1e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a1210d5864760071ff1e10cdf37bfdd9d2397d53", "extension": "py", ...
2.546875
stackv2
import paramiko import multiprocessing as mp processes = [] """ Function that establishes the connection to the respective controller. Args: address: The IP address of the controller command: The specific python command used to run the controller status: The specific action that you want to run for instance start, ...
78
39.64
116
14
710
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_373adb088b4af2a2_5a1fabc8", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 20 ]
[ null ]
[ 5 ]
[ 62 ]
2024-11-18T20:31:42.070974+00:00
1,629,614,895,000
a1a6c808cbeeaf38c4b70ed895b4be9601a09c86
2
{ "blob_id": "a1a6c808cbeeaf38c4b70ed895b4be9601a09c86", "branch_name": "refs/heads/master", "committer_date": 1629614895000, "content_id": "2f0a2bc4e41ba07b44ce5fe5c076965219b10aed", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "dd337c5f7dd97b24aadbd1717aa7d306f9a60dfd", "extension": "p...
2.328125
stackv2
# -*- coding: utf-8 -*- """ Created on Sat Aug 21 11:10:50 2021 @author: roman """ from flask import Flask import os import threading from transformers import Wav2Vec2Tokenizer, Wav2Vec2ForCTC import torch import os import librosa import json import atexit import logging import requests # transcription daemon sho...
105
28.53
103
14
810
python
[{"finding_id": "codeql_py/path-injection_c70fdda1c602512a_776f6b61", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
3
true
[ "CWE-022", "CWE-022", "CWE-918" ]
[ "py/path-injection", "py/path-injection", "py/partial-ssrf" ]
[ "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 58, 75, 80 ]
[ null, null, null ]
[ 15, 15, 9 ]
[ 44, 44, 50 ]
2024-11-18T20:53:25.550304+00:00
1,389,861,027,000
67b27aca09cb061db271b00adee8c7f71a7dafc6
3
{ "blob_id": "67b27aca09cb061db271b00adee8c7f71a7dafc6", "branch_name": "refs/heads/master", "committer_date": 1389861027000, "content_id": "c15b53497b97d4fb8339a5c586c11c28f413e454", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5d7d118f3ac0650362d8905d9d91c41c9239ae0f", "extension": "py"...
2.890625
stackv2
import socket import select import ssl from binascii import b2a_hex, a2b_hex from Crypto.Cipher import DES def broadcast_data (sock,message): for socket in conn_list: if socket != server_socket and socket != sock : try : socket.write(message) except : ...
67
30.46
89
24
469
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_46b2ea5a8c0cbcb1_65e40197", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm DES](1) is broken or weak, and should not be used.", "r...
3
true
[ "CWE-327", "CWE-327", "CWE-200" ]
[ "py/weak-cryptographic-algorithm", "py/insecure-default-protocol", "py/bind-socket-all-network-interfaces" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[The cryptographic algorithm DES](1) is broken or weak, and should not be used.", "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used.", "'' binds a socket to all interfaces." ]
[ 20, 49, 37 ]
[ null, null, null ]
[ 13, 28, 5 ]
[ 33, 90, 35 ]
2024-11-18T20:53:31.287740+00:00
1,618,962,280,000
15ed279a15f69ae7147764ee164c429d2f69be1c
3
{ "blob_id": "15ed279a15f69ae7147764ee164c429d2f69be1c", "branch_name": "refs/heads/master", "committer_date": 1618962280000, "content_id": "8f9d8cd30dec9315bc724731017c26365eca0385", "detected_licenses": [ "MIT" ], "directory_id": "90a839aaf1b0af6c5fced4a10868236265dd3e65", "extension": "py", "fi...
3.40625
stackv2
import streamlit as st import matplotlib.pyplot as plt import requests from bs4 import BeautifulSoup from urllib.parse import urljoin from wordcloud import WordCloud from collections import Counter # http://amueller.github.io/word_cloud/auto_examples/colored_by_group.html class SimpleGroupedColorFunc(object): """...
150
35.36
110
20
1,311
python
[{"finding_id": "codeql_py/full-ssrf_b6a26435cc30f0dd_fab7ec40", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
1
true
[ "CWE-918" ]
[ "py/full-ssrf" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1)." ]
[ 81 ]
[ null ]
[ 17 ]
[ 34 ]
2024-11-18T20:53:41.663955+00:00
1,513,292,911,000
3576e5ffb7513fcc5d5654457d1ae7a9fb9f0fdf
3
{ "blob_id": "3576e5ffb7513fcc5d5654457d1ae7a9fb9f0fdf", "branch_name": "refs/heads/master", "committer_date": 1513292911000, "content_id": "356e29b02fee0384b43507e842b69c9e79ebe8c9", "detected_licenses": [ "MIT" ], "directory_id": "f0cfdedc941fc48ba0c57d9e96162e92341c11c7", "extension": "py", "fi...
2.546875
stackv2
#!/usr/bin/python3 import csv import os import re import subprocess import tqdm from math import sqrt, log2 EXPERIMENT_FOLDER = "experiment_results" # list of tuples (dataset, #attributes) DATASETS = [ ("audiology.standardized", 69), ("crx", 15), ("hepatitis", 19), ("house-votes-84"...
94
32.95
81
17
915
python
[{"finding_id": "codeql_py/redos_575fd089cf8d6f2e_534179f9", "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 'Accuracy: ' and containing many r...
4
true
[ "CWE-1333", "CWE-1333", "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos", "py/redos", "py/redos" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with 'Accuracy: ' and containing many repetitions of '0'.", "This part of the regular expression may cause exponential backtracking on strings starting with 'Accuracy: 0.' and containing many repetitions of '000.'.", "Th...
[ 34, 34, 36, 36 ]
[ null, null, null, null ]
[ 29, 40, 28, 39 ]
[ 35, 46, 34, 45 ]
2024-11-18T21:10:24.870786+00:00
1,635,347,270,000
3a60305a446674e92b1e4384d98a996f9502a824
3
{ "blob_id": "3a60305a446674e92b1e4384d98a996f9502a824", "branch_name": "refs/heads/main", "committer_date": 1635347270000, "content_id": "d080750b61b2a1e7d778f4cd87668fb27c7cf320", "detected_licenses": [ "MIT" ], "directory_id": "0c73246fa51b3faa01cc8b9cea5b8cd87e63a00b", "extension": "py", "file...
3.375
stackv2
#!/usr/bin/python import hashlib #hash library from urllib.request import urlopen #using url from website from termcolor import colored sha1hash = input("[+] Enter sha1 Hash value: ") passlist = str(urlopen('https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/Common-Credentials/10-million-pa...
25
30.84
175
16
202
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_3d60a39fbc6eb077_f1a13ef4", "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 ]
[ 27 ]
[ 51 ]
2024-11-18T21:11:06.832158+00:00
1,588,120,569,000
1982c4992dfdb7f8ca26387617e39fa42d998fa3
3
{ "blob_id": "1982c4992dfdb7f8ca26387617e39fa42d998fa3", "branch_name": "refs/heads/master", "committer_date": 1588120569000, "content_id": "5fa78d58bc64b22f0883984384668f64e4125211", "detected_licenses": [ "MIT" ], "directory_id": "6263eafbbd9a7868220828348e035acd5b485b27", "extension": "py", "fi...
3.046875
stackv2
import requests, json URL = "https://translate.yandex.net/api/v1.5/tr.json/translate" KEY = "trnsl.1.1.20190820T213023Z.7cb391ea0f4f1f98.025d65795179de3f0f0aaf55179e0eef247fc2fb" api_key = "6d52ee3afd200918244fad8611d15a2b" def translate_me(mytext): params = { "key": KEY, "text": mytext, ...
39
32.62
92
16
427
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a2b2598eedfd759d_3c4fd86c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text." ]
[ 30 ]
[ 37 ]
[ 11 ]
[ 47 ]
2024-11-18T21:47:30.076637+00:00
1,620,719,038,000
ea10860500e419302ab2fd959a7cda5f3ab67c80
2
{ "blob_id": "ea10860500e419302ab2fd959a7cda5f3ab67c80", "branch_name": "refs/heads/master", "committer_date": 1620719038000, "content_id": "3531b2ab35fc3fbdb04737d1fefcf9edb9d6e962", "detected_licenses": [ "MIT" ], "directory_id": "987d05454033ba04f4323c660ec6e8f6811075b6", "extension": "py", "fi...
2.34375
stackv2
import pandas as pd import requests import plotly.graph_objs as go import dash import dash_html_components as html import dash_core_components as dcc import dash_bootstrap_components as dbc from dash.dependencies import Input, Output from sidebar import * import extras import time from dash.exceptions import PreventUpd...
248
32.95
115
20
2,061
python
[{"finding_id": "codeql_py/request-without-cert-validation_32d4a542aee819d2_e61b4d70", "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 ]
[ 12 ]
[ 43 ]
2024-11-18T21:47:37.170382+00:00
1,636,799,431,000
d2c11cb68efe9e508d6bcddc0d5d17b10509e389
3
{ "blob_id": "d2c11cb68efe9e508d6bcddc0d5d17b10509e389", "branch_name": "refs/heads/main", "committer_date": 1636799753000, "content_id": "a3124f75681ffc6bb721212cc058bc13b759a2a9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9ded6314598c64a8aafd274f97a9b2718f2412a3", "extension": "py", ...
2.953125
stackv2
# flake8: NOQA from enum import Enum from typing import Any # See: https://docs.python.org/3.8/library/gettext.html#deferred-translations def N_(message: Any) -> Any: return message class StrEnum(str, Enum): pass class NinjaError(StrEnum): __slots__ = "_value_", "code" def __new__(cls, template, ...
61
21.51
81
13
348
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_56d066127a9240ca_878961ef", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 52 ]
[ null ]
[ 11 ]
[ 63 ]