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-18T21:11:16.491739+00:00
1,461,753,634,000
c21b4908daee4a038f4f94414dcea3246d2b45f2
3
{ "blob_id": "c21b4908daee4a038f4f94414dcea3246d2b45f2", "branch_name": "refs/heads/master", "committer_date": 1461753634000, "content_id": "9b58b1869c17cec9db18891a93470037a772ff83", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e5d067139c2cb65e2cf72bc90327a8a9d77f421a", "extension": "py"...
2.53125
stackv2
#!/usr/bin/python # Use Paramiko to change the 'logging buffered <size>' configuration on pynet-rtr2. # This will require that you enter into configuration mode. from getpass import getpass import time import paramiko def main(): ip_addr = '50.76.53.27' username = 'pyclass' password = getpass() ssh_po...
45
26.53
129
10
350
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_34b76d187624f56a_0adf9db8", "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." ]
[ 16 ]
[ null ]
[ 5 ]
[ 74 ]
2024-11-18T21:11:17.253031+00:00
1,507,991,961,000
58b3b83e1c9c99dfb0e7f9b583ddf5da254ccf33
3
{ "blob_id": "58b3b83e1c9c99dfb0e7f9b583ddf5da254ccf33", "branch_name": "refs/heads/master", "committer_date": 1507991961000, "content_id": "5ad9343e5ae2143ad9af21bfe3504ed17fe9584b", "detected_licenses": [ "MIT" ], "directory_id": "a9619a91cb73e964b0766e3551162ccf38e29bff", "extension": "py", "fi...
2.890625
stackv2
import os import cv2 import dlib import numpy as np import argparse from wide_resnet import WideResNet import glob def get_args(): parser = argparse.ArgumentParser(description="This script detects faces from web cam input, " "and estimates age and gender for the det...
82
38.65
138
21
949
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_13feef3f556d78f7_00ec6205", "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." ]
[ 75 ]
[ null ]
[ 19 ]
[ 138 ]
2024-11-18T19:03:29.381290+00:00
1,621,373,010,000
e3ded26b91075e334d4f48e1e694d51933f391a3
2
{ "blob_id": "e3ded26b91075e334d4f48e1e694d51933f391a3", "branch_name": "refs/heads/main", "committer_date": 1621373010000, "content_id": "ead39f8abab24846f668fe3e3f42638b8b332bc7", "detected_licenses": [ "MIT" ], "directory_id": "8f3ca23fe53b43297013048963df9d2bc650629e", "extension": "py", "file...
2.328125
stackv2
import sys, time, os, tempfile, pathlib, tarfile, hashlib, shutil, glob, random from stem.process import launch_tor_with_config from selenium.webdriver.common.utils import free_port from selenium.webdriver.common.proxy import Proxy, ProxyType from selenium import webdriver import Xlib.display from pyvirtualdisplay.smar...
134
45.69
154
19
1,373
python
[{"finding_id": "codeql_py/tarslip_4157f1b5d94f528c_5c47a544", "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)." ]
[ 123 ]
[ null ]
[ 13 ]
[ 16 ]
2024-11-18T19:03:37.859099+00:00
1,508,432,595,000
05009affda910e658d849dd055f0d60c9632d9e9
3
{ "blob_id": "05009affda910e658d849dd055f0d60c9632d9e9", "branch_name": "refs/heads/master", "committer_date": 1508432595000, "content_id": "c93c43f3ad4866b8790db2bb62140d28a3c049d9", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "0750285a7b4ccef389af29f4a32797b7be9d452d", "extension": "p...
2.703125
stackv2
#!/usr/bin/env python from __future__ import unicode_literals """ Faps web interface. The faps web interface is a tool to show all available faps options as an interactive webpage to help make fap files and submit jobs. To start the application just run: python fapweb.py You can also add the --help option to ...
312
32.74
79
18
2,290
python
[{"finding_id": "codeql_py/command-line-injection_c72783510417c73d_0518986a", "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": {...
6
true
[ "CWE-078", "CWE-215", "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/command-line-injection", "py/flask-debug", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "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.", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [...
[ 222, 287, 207, 209, 213, 217 ]
[ null, null, null, null, null, null ]
[ 22, 9, 20, 32, 19, 15 ]
[ 34, 62, 32, 69, 48, 44 ]
2024-11-18T19:28:40.041798+00:00
1,580,027,478,000
f96302e63e4d6144d95cfb99e930b848535e9cee
3
{ "blob_id": "f96302e63e4d6144d95cfb99e930b848535e9cee", "branch_name": "refs/heads/master", "committer_date": 1580027478000, "content_id": "731aee046b49bb88b02d448b50e0ad0b2d16e854", "detected_licenses": [ "MIT" ], "directory_id": "4c186c82305e82670ac670e647c45c144cc68b48", "extension": "py", "fi...
2.8125
stackv2
#!/usr/bin/env python3 import io import re import sys import hashlib import random from subprocess import Popen, PIPE, STDOUT from coefficients import coeffs init_bits = [0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0] file_header = """Galois ...
147
26.95
132
22
1,136
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_74ff87c8cbed1db4_8baa35c4", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure." ]
[ 112 ]
[ null ]
[ 23 ]
[ 46 ]
2024-11-18T19:28:44.132986+00:00
1,622,757,621,000
621c2cb44af3fad25d7f9e3823364f4851b439a7
2
{ "blob_id": "621c2cb44af3fad25d7f9e3823364f4851b439a7", "branch_name": "refs/heads/main", "committer_date": 1622757621000, "content_id": "b0d6059b89638c50e61bd0733c6e460946fadf95", "detected_licenses": [ "MIT" ], "directory_id": "ec65abaed7d4c721687ddc4b48ef95b70b4a0480", "extension": "py", "file...
2.453125
stackv2
from flask import Flask, render_template, request, redirect app = Flask(__name__) @app.route("/") def root(): return "Hello, World!" @app.route("/index.html") @app.route("/index.php") def home(): return redirect("/") @app.route("/user/<username>") def user_template(username): return render_template("user.h...
34
16.85
59
9
149
python
[{"finding_id": "codeql_py/reflective-xss_45d5f85fe92b5a7b_9de8f18a", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
1
true
[ "CWE-079" ]
[ "py/reflective-xss" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 33 ]
[ null ]
[ 12 ]
[ 24 ]
2024-11-18T19:28:44.792521+00:00
1,594,019,132,000
444ef36240a12409851ed848a208fd1726403ac8
2
{ "blob_id": "444ef36240a12409851ed848a208fd1726403ac8", "branch_name": "refs/heads/master", "committer_date": 1594019132000, "content_id": "5d7cc9954748cece30287f817afff79de69b5d61", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d438fb529b46034576fbd179441840a18d08ac4f", "extension": "py"...
2.3125
stackv2
""" Name: jupyter.py Purpose: Installs a jupyter notebook Author: PNDA team Created: 03/10/2016 Copyright (c) 2016 Cisco and/or its affiliates. This software is licensed to you under the terms of the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at http://www.apach...
110
46.61
139
19
1,118
python
[{"finding_id": "codeql_py/overly-permissive-file_cac62837080d3045_916c33ee", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ...
1
true
[ "CWE-732" ]
[ "py/overly-permissive-file" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Overly permissive mask in chmod sets file to world readable." ]
[ 75 ]
[ null ]
[ 13 ]
[ 64 ]
2024-11-18T19:28:54.760472+00:00
1,593,188,126,000
09a967252ff638012dc5acb9adb75c4c9cdf4ac7
3
{ "blob_id": "09a967252ff638012dc5acb9adb75c4c9cdf4ac7", "branch_name": "refs/heads/master", "committer_date": 1593188126000, "content_id": "41898257f62a3165e98990e63f7a8c40af51ea59", "detected_licenses": [ "MIT" ], "directory_id": "adbafadc53b2ee53e47039d31c36c99584544664", "extension": "py", "fi...
2.90625
stackv2
# DISCLAIMER: DO NOT USE FOR ILLEGAL PURPOSES import requests import bz2 # the .bz2 file of rockyou.txt can be found at https://wiki.skullsecurity.org/Passwords arg = bz2.open('../passwords/rockyou.txt.bz2', 'r') url = input("Enter the URL of the login page (include 'http(s)://'):\n") username = input("Enter the usern...
21
33.05
93
12
199
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_49877424c403a7f4_8ebddb83", "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." ]
[ 17, 21 ]
[ null, null ]
[ 15, 15 ]
[ 44, 46 ]
2024-11-18T19:28:56.182439+00:00
1,598,259,731,000
82fbe86898dcb3393dd74dd708177f3f770ab68d
2
{ "blob_id": "82fbe86898dcb3393dd74dd708177f3f770ab68d", "branch_name": "refs/heads/master", "committer_date": 1598259731000, "content_id": "907acff56250e086f112a24c90185a86bb5ece0e", "detected_licenses": [ "MIT" ], "directory_id": "3fe0caa6d2f0f142ee8edee22879147daffa6865", "extension": "py", "fi...
2.3125
stackv2
#!/usr/bin/env python3 from __future__ import unicode_literals # GET https://172.31.0.102:48366/raumfeldSetup/v1/device # IPs used for X-AuthKey: Server IP: 172.31.0.102 - Local IP: 172.31.0.100 # Request header: # "Content-Type": "application/json" # "X-AuthKey": "66a34279983ecbd09c22dc3ad84f58da63653f6eff8ce2058d97f...
283
31.92
97
22
2,151
python
[{"finding_id": "codeql_py/request-without-cert-validation_f8b55313ef740ab3_635eb9af", "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)." ]
[ 267 ]
[ null ]
[ 17 ]
[ 65 ]
2024-11-18T20:18:33.834637+00:00
1,535,446,048,000
b9faf72fe65622cb8ca65e11f8d60e0b54743bda
4
{ "blob_id": "b9faf72fe65622cb8ca65e11f8d60e0b54743bda", "branch_name": "refs/heads/master", "committer_date": 1535446048000, "content_id": "b3e3b89b46834ffe19f9979ced49d8e89cbf8db7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "83a6ef68ac3083adda1d60c22556e6935a5813c6", "extension": "py"...
3.59375
stackv2
import re import json import nltk from urllib import request from bs4 import BeautifulSoup from nltk import word_tokenize from nltk.corpus import gutenberg def print_wh_word_types(): """ Read in some text from a corpus, tokenize it, and print the list of all wh-word types that occur. (wh-words in English ...
97
31.67
114
13
791
python
[{"finding_id": "codeql_py/overly-large-range_c4be09904f455d43_cbe96850", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]." ]
[ 22 ]
[ null ]
[ 41 ]
[ 44 ]
2024-11-18T20:18:42.289295+00:00
1,613,707,762,000
0a3224c735987c40f9d0343834d95c97b50f7812
3
{ "blob_id": "0a3224c735987c40f9d0343834d95c97b50f7812", "branch_name": "refs/heads/master", "committer_date": 1613707762000, "content_id": "c2e46f3bc033635149e8ec2cbef69ac4a5be4a12", "detected_licenses": [ "MIT" ], "directory_id": "f730cc9e3420c003c9be01b9118e145c96db39bf", "extension": "py", "fi...
2.890625
stackv2
import requests url = 'None' password = 'None' def shell(password,url): while True: cmd = input('shell >') if cmd == 'back' or cmd == 'exit': print('[*]goodbye') break else: POST = "system(\'"+ cmd +" \');" payload={ pa...
56
25.2
76
15
335
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1aeb50661b2f4e35_44802036", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 30, 35 ]
[ null, null ]
[ 15, 15 ]
[ 76, 42 ]
2024-11-18T20:18:43.442970+00:00
1,636,081,218,000
5e29a79c772110dabc3b65f663cebf1780455ec6
3
{ "blob_id": "5e29a79c772110dabc3b65f663cebf1780455ec6", "branch_name": "refs/heads/main", "committer_date": 1636081218000, "content_id": "5a5d061922af32df951726fca3ca96616ecfb573", "detected_licenses": [ "MIT" ], "directory_id": "6612d8370cd4f01406599cb332982dbe35a36018", "extension": "py", "file...
2.671875
stackv2
from typing import NamedTuple from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager from webdriver_manager.firefox import GeckoDriverManager from .fetch_description.amazon import description_from_url_amazon from .fetch_description.ebay import description_from_url_ebay from .fetch_des...
262
31.43
168
13
1,971
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_63bdfad1bd7040d0_bda6ebf8", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [amazon.com](1) may be at an arbitrary position in the ...
5
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The string [amazon.com](1) may be at an arbitrary position in the sanitized URL.", "The string [ebay.com](1) may be at an arbitrary position in the sanitized URL.", "The string [walmart.com](1) may be at an arbitrary position in the sanitized URL.", "The string [costco.com](1) may be at an arbitrary position...
[ 187, 201, 214, 230, 246 ]
[ null, null, null, null, null ]
[ 8, 8, 8, 8, 8 ]
[ 28, 26, 29, 28, 25 ]
2024-11-18T20:18:45.350571+00:00
1,632,658,171,000
3f8d0e86d38ec18dacb3ef2202a3191a040b9b24
3
{ "blob_id": "3f8d0e86d38ec18dacb3ef2202a3191a040b9b24", "branch_name": "refs/heads/main", "committer_date": 1632658171000, "content_id": "1cddefe1beaeabd0772a8846ccbb7bcc5466d926", "detected_licenses": [ "MIT" ], "directory_id": "38303da19aa1dda861ec8a3e88a97167bca45783", "extension": "py", "file...
2.515625
stackv2
import json from flask import Flask from flask import jsonify from flask import request app = Flask(__name__) posts = dict() comments = dict() post_id_counter = 0 comment_id_counter = 0 @app.route("/") def homePage(): return "Welcome to the api for our BRH21 hack!" # your routes here @app.route("/api/cours...
69
27.64
97
16
506
python
[{"finding_id": "codeql_py/reflective-xss_b1bf2ff2d537c3bc_ea615cc9", "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)." ]
[ 65 ]
[ null ]
[ 12 ]
[ 37 ]
2024-11-18T20:18:54.537559+00:00
1,691,743,501,000
d4651c7666ab478095f5ac7dd9450ebf08705297
2
{ "blob_id": "d4651c7666ab478095f5ac7dd9450ebf08705297", "branch_name": "refs/heads/master", "committer_date": 1691743501000, "content_id": "4a5310c726375346a77d71596a52aa3faf6adc1b", "detected_licenses": [ "MIT", "BSD-2-Clause" ], "directory_id": "a2d29e0f324c15a81d3e1636ee7759489518e374", "ext...
2.375
stackv2
'''Saku Template Wrapper. ''' # # Copyright (c) 2007,2014 shinGETsu Project. # All rights reserved. # # 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 #...
92
32.16
76
14
662
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_332718ffe418c910_02aaf226", "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." ]
[ 57 ]
[ 60 ]
[ 20 ]
[ 10 ]
2024-11-18T20:29:55.786448+00:00
1,646,616,008,000
d7d0b3049da60498f988b0ed816c6ae858d1241e
3
{ "blob_id": "d7d0b3049da60498f988b0ed816c6ae858d1241e", "branch_name": "refs/heads/master", "committer_date": 1646616008000, "content_id": "9fddf6707fb0194481df09f946bfa26cf7dc22dd", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f33fff1f392d19c46a38c5a053bd206186a5c9d4", "extension": "py"...
2.640625
stackv2
import os import json import shutil import subprocess import tarfile from ..package_manager import constants class TsError(RuntimeError): pass class TsValidationError(TsError): def __init__(self, path, errors): self.path = path self.errors = errors super(TsValidationError, self).__...
219
32.02
127
17
1,604
python
[{"finding_id": "codeql_py/tarslip_e50e64c2fd8244e0_b74e05fe", "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)." ]
[ 193 ]
[ null ]
[ 17 ]
[ 19 ]
2024-11-18T20:30:01.605602+00:00
1,576,201,341,000
7f36349253fd289ece172b565fbf4216d3a5fb02
3
{ "blob_id": "7f36349253fd289ece172b565fbf4216d3a5fb02", "branch_name": "refs/heads/master", "committer_date": 1576201341000, "content_id": "3e532719b19344c3443029593f46aab32b730407", "detected_licenses": [ "MIT" ], "directory_id": "dff43582ebb72487022dd7043c4b5b57171236d2", "extension": "py", "fi...
2.5625
stackv2
''' Code from http://aosabook.org/en/500L/a-simple-web-server.html with some modification by dimz ''' from http.server import BaseHTTPRequestHandler from socketserver import TCPServer import os import ssl import cgi import base64 import json from urllib.parse import urlparse, parse_qs # -----------Class Cases-------...
373
27.42
80
16
2,325
python
[{"finding_id": "codeql_py/insecure-default-protocol_baa734f025b4dbef_ff9d41f0", "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." ]
[ 368 ]
[ 370 ]
[ 25 ]
[ 30 ]
2024-11-18T20:30:02.970906+00:00
1,525,465,848,000
3a5c2d05027ad0b4d276f391d8f18fc7563905d0
3
{ "blob_id": "3a5c2d05027ad0b4d276f391d8f18fc7563905d0", "branch_name": "refs/heads/master", "committer_date": 1525465848000, "content_id": "da9b4cb042c0fb5305c062073e04e91f29db71c1", "detected_licenses": [ "MIT" ], "directory_id": "ba0731b2dbc4c1529eaaa79811ec15754c19b4cd", "extension": "py", "fi...
2.640625
stackv2
"""HTTP routes for refextract API.""" import os from refextract import extract_references_from_file from flask.json import jsonify from flask import Blueprint, request, current_app from werkzeug.utils import secure_filename from werkzeug.datastructures import FileStorage import logging HTTP_200_OK = 200 HTTP_400_BAD_...
87
30.14
78
16
608
python
[{"finding_id": "codeql_py/stack-trace-exposure_b552e451536e01fc_79c3bb16", "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." ]
[ 87 ]
[ null ]
[ 20 ]
[ 33 ]
2024-11-18T20:51:29.999268+00:00
1,394,998,384,000
94e99427a56acdecbce60c0b711368d300448914
2
{ "blob_id": "94e99427a56acdecbce60c0b711368d300448914", "branch_name": "refs/heads/master", "committer_date": 1394998384000, "content_id": "51041a41de46fff1ab2c718ec26b8e823faeb7b5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5c8a8c7710cae163c5edef3f9d71368e9dc1dae5", "extension": "py"...
2.4375
stackv2
from subprocess import Popen, PIPE, STDOUT from hashlib import md5 from django.conf import settings import os class SecureFileStorage(object): """ Handler for storing SSH keys per environment """ def __init__(self, uid): self.files = { 'private_key': PrivateKey(uid), 'public_key': PublicKey(uid), 'known_h...
81
24.74
88
16
557
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_ffc0efaa85be232f_ad561fb0", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](4) is used in a hashing algorithm (MD5) that i...
[ 30 ]
[ null ]
[ 19 ]
[ 58 ]
2024-11-18T20:51:31.504844+00:00
1,522,229,113,000
9b5c496a5d39bb43d34102be818d7da0a90fc73c
3
{ "blob_id": "9b5c496a5d39bb43d34102be818d7da0a90fc73c", "branch_name": "refs/heads/master", "committer_date": 1522229113000, "content_id": "a9c45e36d0477d4ddb80aef7b00d612b0748adf9", "detected_licenses": [ "MIT" ], "directory_id": "a6cb592b15a19694027a72450798decbb2e3fa66", "extension": "py", "fi...
3.046875
stackv2
# -*- coding: utf-8 -*- """ Process the submitted url or arXiv ID and collect the associated information in a SubmittedPaper object. This module exports the following function: `get_paper`: returns a SubmittedPaper from a url/arXiv ID. :Example: .. code-block:: python url = 'https://arxiv.org/abs/1604.03939' ...
298
28.6
79
16
2,047
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_bfcfe0597e9af53d_310ce516", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [nature.com](1) may be at an arbitrary position in the ...
10
true
[ "CWE-020", "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", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The string [nature.com](1) may be at an arbitrary position in the sanitized URL.", "The string [adsabs.harvard.edu](1) may be at an arbitrary position in the sanitized URL.", "The string [arxiv.org](1) may be at an arbitrary position in the sanitized URL.", "The string [xxx.lanl.gov](1) may be at an arbitrar...
[ 42, 47, 49, 49, 52, 54, 56, 58, 62, 64 ]
[ null, null, null, null, null, null, null, null, null, null ]
[ 12, 14, 14, 42, 14, 14, 14, 14, 14, 14 ]
[ 37, 47, 38, 69, 38, 53, 51, 55, 42, 38 ]
2024-11-18T19:07:12.326369+00:00
1,547,191,541,000
5a725f27a6b9598a6527d6afa50b04d5b1761216
4
{ "blob_id": "5a725f27a6b9598a6527d6afa50b04d5b1761216", "branch_name": "refs/heads/master", "committer_date": 1547191541000, "content_id": "c4de683e839f517e5c0c4ebf05590cabb2803a61", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4a1a64880cee58b916225a46ac339b1cf6d39dc5", "extension": "py"...
3.671875
stackv2
# sqlite fetchall() 返回字典形式。 """ 原[(1, '小明'),(2, '小红')] 需求[{'id':1, 'name':'小明'},{'id':2, 'name':'小红'}] 百度后思路 1. 驱动方法https://www.jb51.net/article/94024.htm cursor.description() 2. sql语句 http://www.hangge.com/blog/cache/detail_1454.html PRAGMA table_info([employee]); """ import sqlite3 connect = sqlite3.connect('tes...
44
26
91
10
333
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2986e7c0ed18ef0a_91fb4f57", "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." ]
[ 16, 36, 41 ]
[ null, null, null ]
[ 7, 11, 7 ]
[ 16, 24, 13 ]
2024-11-18T19:07:17.898992+00:00
1,462,452,099,000
49425020c15e61eefd197c253bedfefbd17d4c1c
2
{ "blob_id": "49425020c15e61eefd197c253bedfefbd17d4c1c", "branch_name": "refs/heads/master", "committer_date": 1462452099000, "content_id": "b2a5c74b912bce073f2784711057dc5fe260d1ef", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8bae8b0f41520971c75e0ec14a560330f651ec28", "extension": "py"...
2.421875
stackv2
import GeoIP import os import gzip import humanize from flask import Flask, request from logparser import LogParser from maprender import render_map from jinja2 import Environment, FileSystemLoader gi = GeoIP.open("/usr/share/GeoIP/GeoIP.dat", GeoIP.GEOIP_MEMORY_CACHE) KEYWORDS = "Windows", "Mac OS X", "Android", "Li...
58
30.43
113
17
424
python
[{"finding_id": "codeql_py/flask-debug_3fce4eee1ee4daa9_c52bfb4d", "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-022", "CWE-079" ]
[ "py/flask-debug", "py/path-injection", "py/jinja2/autoescape-false" ]
[ "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.", "This path depends on a [user-provided value](1).", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 58, 40, 15 ]
[ null, null, 17 ]
[ 5, 76, 7 ]
[ 24, 80, 22 ]
2024-11-18T19:07:20.359782+00:00
1,607,418,395,000
644b0a9bfa0adc2c2bb59af9804b284a0e08628b
4
{ "blob_id": "644b0a9bfa0adc2c2bb59af9804b284a0e08628b", "branch_name": "refs/heads/master", "committer_date": 1607418395000, "content_id": "8f996878a6cd8fcc7073da32fd9eea44f7035199", "detected_licenses": [ "MIT" ], "directory_id": "02970d04acd9951f1152a8bd331196027f2978ad", "extension": "py", "fi...
3.625
stackv2
from operator import xor def is_valid_password(line): pt1, pt2, pt3 = line.split(' ') n_min, n_max = pt1.split('-') char_count = count_chars(pt3, pt2[0]) if char_count > int(n_max) or char_count < int(n_min): return False return True def is_valid_password_corrected(line): pt1, pt2, pt...
38
25.24
74
12
287
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d4b81c8c407717f8_fbbe0f38", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 36, 37 ]
[ null, null ]
[ 11, 11 ]
[ 47, 57 ]
2024-11-18T19:07:25.379108+00:00
1,390,419,183,000
ec2741251e776c5a8d7f983e8d16d2b9b920705b
3
{ "blob_id": "ec2741251e776c5a8d7f983e8d16d2b9b920705b", "branch_name": "refs/heads/master", "committer_date": 1390419183000, "content_id": "cfdc0e814f15e225050edff7f91431225374ffef", "detected_licenses": [ "Unlicense" ], "directory_id": "2de359c40136405ab0076eea0ba08ca5933bde97", "extension": "py",...
2.65625
stackv2
import json import urllib import urllib2 import hmac import hashlib import time def _map_order(o): return {'id': int(o['id']), 'type': str(o['type']), 'amount': float(o['amount']), 'price': float(o['price']), 'time': int(o['time'])/1000, # cex gives time in ms 'pend...
120
30.22
90
18
1,019
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_d118f781d802d68d_13a17474", "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." ]
[ 49 ]
[ null ]
[ 37 ]
[ 44 ]
2024-11-18T19:07:26.109337+00:00
1,433,024,746,000
f15613b933f28a9c681c4bf63dc86981160a485d
3
{ "blob_id": "f15613b933f28a9c681c4bf63dc86981160a485d", "branch_name": "refs/heads/master", "committer_date": 1433024746000, "content_id": "48d3fb76b5d70cc8536940983b59382b58c7c607", "detected_licenses": [ "MIT" ], "directory_id": "6c19340657303866e7a120551e852b172efdc618", "extension": "py", "fi...
2.53125
stackv2
import os import psycopg2 as psycopg2 import simplejson as json import urlparse # import urllib.parse for python 3+ from flask import Flask, jsonify, render_template, request, redirect, url_for, send_from_directory from psycopg2.extras import RealDictCursor # import pyodbc app = Flask(__name__, static_url_path = "") e...
103
27.84
98
17
723
python
[{"finding_id": "codeql_py/flask-debug_c37595a01fa4ecba_7f7432fa", "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)." ]
[ 101, 34, 39 ]
[ null, null, null ]
[ 9, 12, 12 ]
[ 28, 32, 31 ]
2024-11-18T19:07:41.871960+00:00
1,581,011,380,000
7c6e40875b06657eb1d45bd09163ee5a3b139d29
2
{ "blob_id": "7c6e40875b06657eb1d45bd09163ee5a3b139d29", "branch_name": "refs/heads/master", "committer_date": 1581011380000, "content_id": "be69480e351ef28f18f0aa4b42e42e51f135a378", "detected_licenses": [ "Apache-2.0", "MIT" ], "directory_id": "613d9b4259e63e6b5ee4f85131c93389569e3f17", "exten...
2.453125
stackv2
import pickle import traceback from http.server import SimpleHTTPRequestHandler, HTTPServer from socketserver import ThreadingMixIn from ray.rllib.utils.annotations import PublicAPI from ray.rllib.utils.policy_client import PolicyClient @PublicAPI class PolicyServer(ThreadingMixIn, HTTPServer): """REST server t...
87
38.13
76
17
645
python
[{"finding_id": "codeql_py/unsafe-deserialization_6e689d07c7fe8233_9b553353", "tool_name": "codeql", "rule_id": "py/unsafe-deserialization", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Unsafe deserialization depends on a [user-provided value](1).", "remediation": "", "locatio...
1
true
[ "CWE-502" ]
[ "py/unsafe-deserialization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Unsafe deserialization depends on a [user-provided value](1)." ]
[ 56 ]
[ null ]
[ 41 ]
[ 49 ]
2024-11-18T19:07:53.268904+00:00
1,590,851,741,000
c5dd6cf6aff4968940c7b6e95a42ffa12a338d91
3
{ "blob_id": "c5dd6cf6aff4968940c7b6e95a42ffa12a338d91", "branch_name": "refs/heads/master", "committer_date": 1590851741000, "content_id": "47dea48226190ff9f6d66fc509768e8ccd9fb659", "detected_licenses": [ "MIT" ], "directory_id": "d10d77519ae68857429a9ffd7924ee1d43e5a316", "extension": "py", "fi...
3.1875
stackv2
import random import string import hashlib from Crypto.Cipher import DES from Crypto import Random import codecs import base64 class Hasher(): def __init__(self): self.BASE62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" self.key = Random.get_random_bytes(8) def randomPas...
46
34.78
87
15
414
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_8c02878737bdbfae_3803ff09", "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 cryptograph...
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 cryptographic algorithm DES](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 cryptographic algorithm DES](2) is broken or weak, and should not be used." ]
[ 26, 46 ]
[ null, null ]
[ 22, 16 ]
[ 53, 49 ]
2024-11-18T19:07:54.224834+00:00
1,609,929,087,000
1ccadda32d843271f5c5d18fc7905eabc3a6ed7f
3
{ "blob_id": "1ccadda32d843271f5c5d18fc7905eabc3a6ed7f", "branch_name": "refs/heads/master", "committer_date": 1609929087000, "content_id": "73e37d95904559764d72b3c4e3426ebfa302eb24", "detected_licenses": [ "MIT" ], "directory_id": "f3646538e70fa52e55ebfcb85d9bf5e131cb158d", "extension": "py", "fi...
2.8125
stackv2
import random import binascii import set2_challenge9 as pkcs7 from Crypto.Cipher import AES key = bytes([random.randint(0,255) for i in range(16)]) # find block_size through code string_to_decrypt = b'Um9sbGluJyBpbiBteSA1LjAKV2l0aCBteSByYWctdG9wIGRvd24gc28gbXkg' \ b'aGFpciBjYW4gYmxvdwpUaGUgZ2lybGllcyB...
69
40.78
116
20
824
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_d6ba6c8682f5edcd_edd04ff5", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ...
1
true
[ "CWE-327" ]
[ "py/weak-cryptographic-algorithm" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used." ]
[ 13 ]
[ null ]
[ 12 ]
[ 117 ]
2024-11-18T19:18:26.385320+00:00
1,476,399,569,000
c4820b76ace72cc1bd6cb18849113e50a5d20d12
3
{ "blob_id": "c4820b76ace72cc1bd6cb18849113e50a5d20d12", "branch_name": "refs/heads/master", "committer_date": 1476399569000, "content_id": "1e1edbb488f940e47633023b31b19f3a59793b4b", "detected_licenses": [ "MIT" ], "directory_id": "036edaae4042effcafd0546012801a2e58411203", "extension": "py", "fi...
2.546875
stackv2
# -*- coding: utf-8 -*- import xmlrpclib from SimpleXMLRPCServer import SimpleXMLRPCServer import hashlib import string import random import json users = { # 'leiverandres': 'pass' } secret = { # 'leiverandres': 'string cifrado' } db = None def token_generator(size=6, chars=string.ascii_uppercase + string.d...
141
33.73
102
18
1,152
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_a9f78c4628a69e4c_87dc89f1", "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 (SHA224) that is in...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA224) 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 (SHA224) that is insecure for password hashing, since it is not a computational...
[ 103, 118 ]
[ null, null ]
[ 35, 42 ]
[ 53, 50 ]
2024-11-18T19:19:10.454232+00:00
1,552,947,563,000
a67c63a471be0e1867f9bbf8217c1a619c77ed70
3
{ "blob_id": "a67c63a471be0e1867f9bbf8217c1a619c77ed70", "branch_name": "refs/heads/master", "committer_date": 1552947563000, "content_id": "68bf0265e8d6a8638b45c3b33c2f5447ebda05db", "detected_licenses": [ "MIT" ], "directory_id": "651182a9297dbf55ee68a4986a00334724be23ff", "extension": "py", "fi...
2.71875
stackv2
from flask import Flask, request import random import pandas as pd from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.pipeline import Pipeline import pickle from flask import Flask, request, render_template, jsonify app = Flask(__name__) @app.route(...
49
29.86
87
12
359
python
[{"finding_id": "codeql_py/flask-debug_af31e2582ff4d69c_5f4767bc", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-079" ]
[ "py/flask-debug", "py/reflective-xss" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 48, 35 ]
[ null, null ]
[ 5, 12 ]
[ 51, 55 ]
2024-11-18T19:19:12.312319+00:00
1,624,543,334,000
1d939161748cd193495477c3a2d88faf63cc3218
3
{ "blob_id": "1d939161748cd193495477c3a2d88faf63cc3218", "branch_name": "refs/heads/main", "committer_date": 1624543334000, "content_id": "92d97da5c07288bd510bbcc546deca4437479e36", "detected_licenses": [ "MIT" ], "directory_id": "0c6d5bfd771c6106573d2571e7b50a55c6a7e2aa", "extension": "py", "file...
2.796875
stackv2
import sys import time import copy from functools import cmp_to_key import pandas as pd import os.path as osp from utils.user_config import save_data, DEFAULT_DATA_DIR sys.path.append('../') from base.base_algorithm import BaseAlgorithm from utils.user_config import save_data, mycmp1 class Samarati(BaseAlgorithm): ...
256
44.34
131
19
3,143
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9d1894b951ca7b19_640edc72", "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." ]
[ 118, 119 ]
[ null, null ]
[ 23, 23 ]
[ 77, 67 ]
2024-11-18T19:29:45.077650+00:00
1,632,931,097,000
9751e02bf1a585951bd4e680e4e39c8393ae1528
3
{ "blob_id": "9751e02bf1a585951bd4e680e4e39c8393ae1528", "branch_name": "refs/heads/main", "committer_date": 1632931097000, "content_id": "1eac1dc00db990204d74e0888e9bad0d602255ad", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d0674ccb843fb74b2d0f863bd21ad9603309e37c", "extension": "py", ...
2.65625
stackv2
import requests import re import json import io import subprocess from flask import Flask, request from google.cloud import storage from google.cloud.storage.blob import Blob from google.cloud import speech app = Flask(__name__) bucket_name = 'globalgame-assets' speech_client = speech.SpeechClient() def gcp_storage_...
119
39.13
133
20
1,029
python
[{"finding_id": "codeql_py/stack-trace-exposure_7a418ef54c25ee7e_0bb2d28e", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
5
true
[ "CWE-209", "CWE-215", "CWE-918", "CWE-079", "CWE-022" ]
[ "py/stack-trace-exposure", "py/flask-debug", "py/full-ssrf", "py/reflective-xss", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "The full URL of this request depends on a [user-provided value](1).", "Cross-site scripting vul...
[ 116, 119, 79, 114, 62 ]
[ null, null, null, null, null ]
[ 20, 5, 24, 24, 19 ]
[ 31, 51, 47, 49, 33 ]
2024-11-18T19:29:46.989812+00:00
1,617,119,029,000
5a399cba8ae2babd851caaf29fe385e410ee69d5
3
{ "blob_id": "5a399cba8ae2babd851caaf29fe385e410ee69d5", "branch_name": "refs/heads/master", "committer_date": 1617119029000, "content_id": "1955507c25c03f197c93c4c93d559b1ec8210ba8", "detected_licenses": [ "MIT" ], "directory_id": "866899757248cccb566c4c3788cd1310a143f12b", "extension": "py", "fi...
2.546875
stackv2
import configparser import logging import os import time import json import requests import pygame from logging.handlers import RotatingFileHandler from datetime import datetime import sys config = configparser.ConfigParser() config.read('config.ini') auth_key = config['general'].get('auth_key') device_uid = config['...
110
33.35
155
22
814
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_036c2d4309749877_d2c5f387", "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." ]
[ 27 ]
[ null ]
[ 15 ]
[ 23 ]
2024-11-18T19:29:51.920615+00:00
1,572,078,410,000
4018bae94d0f3bfb7dd22da00a5341ccfd69e3b2
3
{ "blob_id": "4018bae94d0f3bfb7dd22da00a5341ccfd69e3b2", "branch_name": "refs/heads/master", "committer_date": 1572078410000, "content_id": "0381c31a3973227a08916089902f3411bc861fd1", "detected_licenses": [ "MIT" ], "directory_id": "008fa2562f36ff13add96716b724f5c6535ee9ee", "extension": "py", "fi...
3.203125
stackv2
import requests import dataclasses from .apierror import ApiError from .environment import Environment from .models import Worker class WorkerCollection: """A Collection of Workers Attributes: env: Object of the Environment class url: base url for the Request on workers """ env: Env...
148
23.68
87
14
776
python
[{"finding_id": "codeql_py/request-without-cert-validation_43d1ba4c6de038f8_8c748ba5", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
5
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation becau...
[ 31, 58, 79, 107, 129 ]
[ null, null, null, null, null ]
[ 16, 16, 16, 16, 16 ]
[ 52, 70, 71, 88, 73 ]
2024-11-18T19:44:25.217842+00:00
1,622,057,624,000
ffa54ff0aa672aa550b68087cc7f4564929f779e
3
{ "blob_id": "ffa54ff0aa672aa550b68087cc7f4564929f779e", "branch_name": "refs/heads/main", "committer_date": 1622057624000, "content_id": "4b4dc00e49616d6091381a60c79f95c9d59d4491", "detected_licenses": [ "Apache-2.0" ], "directory_id": "640cb67fbbb82b1ba7b7be757ecb581758329555", "extension": "py", ...
3.109375
stackv2
import struct import numpy import cv2 import random from hashlib import sha256 """ OH YEAH! """ IMAGE_OVERRIDE = False # "test.png" # False MESSAGE_OVERRIDE = False # "The quick brown fox jumps over a lazy dog." ENCODE_OVERRIDE = False # True - forces encode. False - gives you an option. OUTPUT_OVERRIDE = False # yea...
130
29.18
97
16
1,121
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_dabd8a3b9745d576_4bb020b8", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\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...
[ 37, 59 ]
[ null, null ]
[ 14, 14 ]
[ 37, 37 ]
2024-11-18T19:44:31.110365+00:00
1,556,142,993,000
c3114b07f636b1feaee2d7d00e62c3e45fe6a29c
3
{ "blob_id": "c3114b07f636b1feaee2d7d00e62c3e45fe6a29c", "branch_name": "refs/heads/master", "committer_date": 1556142993000, "content_id": "45f73b6335edc086d0ab7bd5f0462f84e10f70ce", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5291307e3150fa2cd12626fea5aaa34e554e8078", "extension": "py"...
2.5625
stackv2
import time import json import ipaddr import requests import os from ioc_analyzer.utils import longint_to_str class Shodan: base_url = None api_key = None def __init__(self, base_url, access_key, secret_key, **kwargs): self.base_url = base_url self.api_key = access_key def test_con...
98
29.44
107
18
754
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8b2f0efe38f1ea4d_90d26ff3", "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." ]
[ 41, 43 ]
[ null, null ]
[ 23, 19 ]
[ 74, 70 ]
2024-11-18T19:44:36.649431+00:00
1,563,161,236,000
c8b002168b946e0feb23b50b0e45cd684a06e8d0
3
{ "blob_id": "c8b002168b946e0feb23b50b0e45cd684a06e8d0", "branch_name": "refs/heads/master", "committer_date": 1563161236000, "content_id": "d127337b799baaf50666edd2e39160289cb191f8", "detected_licenses": [ "MIT" ], "directory_id": "ce7274667b026ff52a9a882cdf54edc1050adebe", "extension": "py", "fi...
2.546875
stackv2
from flask import Flask, render_template, url_for, flash, redirect, request from flask_sqlalchemy import SQLAlchemy from datetime import datetime from forms import RoomForm, ItemForm, SettingsForm app = Flask(__name__) app.config['SECRET_KEY'] = '57e8728bb0b13ce0c676dfde280ba245' app.config['SQLALCHEMY_DATABASE_URI'] ...
142
34.65
178
14
1,238
python
[{"finding_id": "codeql_py/flask-debug_539d7db059397e00_46b354bb", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
3
true
[ "CWE-215", "CWE-601", "CWE-601" ]
[ "py/flask-debug", "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 142, 95, 103 ]
[ null, null, null ]
[ 5, 21, 21 ]
[ 40, 37, 37 ]
2024-11-18T19:44:37.273081+00:00
1,551,126,411,000
932807cbfbe0d976de183ee76edd6d36278dacf8
3
{ "blob_id": "932807cbfbe0d976de183ee76edd6d36278dacf8", "branch_name": "refs/heads/master", "committer_date": 1551126411000, "content_id": "fbb4f45a143200769fa5e865fea10e58234d7b92", "detected_licenses": [ "MIT" ], "directory_id": "9d9b066ed87d0d380cb541d198a6779eccdbfe77", "extension": "py", "fi...
2.515625
stackv2
#!/usr/local/bin/python # Author: Scott Chubb scott.chubb@netapp.com # Written for Python 3.4 and above # No warranty is offered, use at your own risk. While these scripts have been tested in lab situations, all use cases cannot be accounted for. # Date: 13-Feb-2018 # This scripts shows how to gather volume informatio...
116
41.27
143
38
1,390
python
[{"finding_id": "codeql_py/request-without-cert-validation_7390f77e8f457b67_15a52b7b", "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)." ]
[ 109 ]
[ null ]
[ 16 ]
[ 90 ]
2024-11-18T19:44:39.113827+00:00
1,283,292,134,000
b817da5e8f62c96bcf3ab7fd33c03a33195dc23a
3
{ "blob_id": "b817da5e8f62c96bcf3ab7fd33c03a33195dc23a", "branch_name": "refs/heads/master", "committer_date": 1283292134000, "content_id": "b92afe64743e077e49b9d8e2f06f4f08d18ef2d6", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "86e6dd57304a3234bc299cfbea12137aa37c0509", "extension": "p...
3.140625
stackv2
import hashlib def get_hexdigest(algo, salt, raw): h = hashlib.new(algo) h.update(salt + raw) return h.hexdigest() def check_password(raw_password, enc_password): algo, salt, hsh = enc_password.split('$') return hsh == get_hexdigest(algo, salt, raw_password) def encode_password(raw_password...
19
27.32
78
13
148
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_7755d6614f4c705b_6e8f8158", "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...
[ 6 ]
[ null ]
[ 14 ]
[ 24 ]
2024-11-18T19:58:12.587638+00:00
1,690,228,754,000
d69984e8d8454611a602344339694245fdedcaa4
3
{ "blob_id": "d69984e8d8454611a602344339694245fdedcaa4", "branch_name": "refs/heads/master", "committer_date": 1690228754000, "content_id": "4d5bf392974d348e9f2155a9c2027e394cbc5a03", "detected_licenses": [ "MIT" ], "directory_id": "3a19b6e752315f0dd9b7cf63de25383c025773b0", "extension": "py", "fi...
2.6875
stackv2
''' Implements the Flask API endpoints. ''' from expertise.service.expertise import ExpertiseService import openreview from openreview.openreview import OpenReviewException from .utils import get_user_id import flask from copy import deepcopy from flask_cors import CORS from multiprocessing import Value from csv import...
317
35.04
166
18
2,612
python
[{"finding_id": "codeql_py/stack-trace-exposure_97f81c10dc2b0b79_2ddc6bcd", "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.", "...
10
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "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" ]
[ "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...
[ 114, 119, 164, 169, 209, 214, 257, 262, 312, 317 ]
[ null, null, null, null, null, null, null, null, null, null ]
[ 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 ]
[ 62, 97, 62, 97, 62, 97, 62, 97, 62, 97 ]
2024-11-18T19:58:22.422015+00:00
1,526,995,642,000
0183b4e13a4d0d99ff5e06e625d37c1661dfbe1e
2
{ "blob_id": "0183b4e13a4d0d99ff5e06e625d37c1661dfbe1e", "branch_name": "refs/heads/master", "committer_date": 1526995642000, "content_id": "9884b1a3b705c0daad85b484478b982b92c4a388", "detected_licenses": [ "BSD-3-Clause", "MIT" ], "directory_id": "6c000c952b0cc592430b169b13fee013a9bf4d93", "ext...
2.453125
stackv2
import datetime import difflib import re import requests from lxml import html from data import database as db from data.database import Conference, Talk, Human, Organization, Topic # helpers paren_url_matcher = re.compile("\(\s*ht\w*://[\w.-_~#]+\s*\)") org_matcher = re.compile("(?<=\().+(?=\))") separators = re.c...
149
31.48
79
19
1,252
python
[{"finding_id": "codeql_py/overly-large-range_06adaa4a8a9190fb_d339943c", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\w 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 \\w in the same character class, and is equivalent to \\[.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]." ]
[ 12 ]
[ null ]
[ 49 ]
[ 52 ]
2024-11-18T19:58:23.187850+00:00
1,521,026,125,000
d38b2f155a205b864a83516b76ca7dceabbb03a9
2
{ "blob_id": "d38b2f155a205b864a83516b76ca7dceabbb03a9", "branch_name": "refs/heads/master", "committer_date": 1521026125000, "content_id": "2273972a9c58d036523f35f1de61db655173f437", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dfe2808684f08e1f1445009c35a2d9532ff55a67", "extension": "py"...
2.390625
stackv2
import os, sys from flask import Flask, render_template, request from werkzeug import secure_filename import shutil import MySQLdb from flask import jsonify from flask import json # running state code app = Flask(__name__) db = MySQLdb.connect("localhost", "root", "qwerty", "user") @app.route('/', methods=['GET'])...
121
30.96
108
20
847
python
[{"finding_id": "codeql_py/path-injection_bdaefc6a1a7017a6_e62c6ca1", "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-089", "CWE-089" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/sql-injection", "py/sql-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 SQL query depends on a [user-provided value](1).", "This SQL query depends on a [user-provided value](1)." ]
[ 89, 91, 92, 48, 50 ]
[ null, null, null, null, null ]
[ 19, 25, 25, 24, 24 ]
[ 70, 76, 108, 27, 28 ]
2024-11-18T19:58:23.560483+00:00
1,441,878,637,000
b5820a94fb6d0ce295b5d991dbcfa4c0043dec63
3
{ "blob_id": "b5820a94fb6d0ce295b5d991dbcfa4c0043dec63", "branch_name": "refs/heads/master", "committer_date": 1441878637000, "content_id": "aeef5aaca7582e609adddfd0ce96600ff20713df", "detected_licenses": [ "MIT" ], "directory_id": "3e7859604bfd8231ca2ba2d18d10a7903f575966", "extension": "py", "fi...
2.640625
stackv2
""" WsseAuth auth plugin for HTTPie. """ from httpie.plugins import AuthPlugin import base64, datetime, hashlib, string, random __version__ = '0.1.0' __author__ = 'Andras Barthazi' __licence__ = 'MIT' class WsseAuth: def __init__(self, access_id, secret_key): self.access_id = access_id self.secre...
36
31.58
151
13
308
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_b01556732562cabc_f85fba78", "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." ]
[ 23 ]
[ null ]
[ 29 ]
[ 35 ]
2024-11-18T20:10:12.722210+00:00
1,611,030,510,000
42f66b5b7c22c718fdfd3f7c84b33dda416666ce
3
{ "blob_id": "42f66b5b7c22c718fdfd3f7c84b33dda416666ce", "branch_name": "refs/heads/main", "committer_date": 1611030510000, "content_id": "15f919384954e786c8a773c57cb7f1ca2b5a674a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f8e2499ff4fa84e85b1915b1835fe38fa090ed47", "extension": "py", ...
3.34375
stackv2
import random from typing import List names = [ 'Spence', 'James', 'McEnany', 'Rick', 'Valentine', 'Tiffany' 'Rowling', 'Robert', 'Matthew', 'Donald', 'Nick', 'Jonas', 'Adam', 'Kayleigh', 'Stephen', 'Carolla' ] classes = [ 'class-1', 'class-2', 'class-3', 'class-4', 'class-5' ] sexes = ['mal...
36
22.5
107
12
254
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_d572d1e64312dcee_92a54f5a", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text." ]
[ 30 ]
[ null ]
[ 17 ]
[ 20 ]
2024-11-18T20:10:26.357372+00:00
1,635,475,927,000
f40690fc52cd285acc260f424a844fa0452aebe4
3
{ "blob_id": "f40690fc52cd285acc260f424a844fa0452aebe4", "branch_name": "refs/heads/main", "committer_date": 1635475927000, "content_id": "5afb8602557140bd58c50faa92a287c9d7375d39", "detected_licenses": [ "MIT" ], "directory_id": "0b99cd0d45393ad70c673a4c6e80eb57ccbaeda0", "extension": "py", "file...
2.640625
stackv2
import streamlit as st import numpy as np import pandas as pd import time from PIL import Image import json,requests verified = "True" data_dir = '/home/akashmdubey/CSYE/Assignment4/Assignment-Trial/inference-data/' data_dir2 = '/home/akashmdubey/CSYE/Assignment4/Assignment-Trial/fastAPIandStreamlit/awsdownload/' com...
146
28.51
118
13
1,064
python
[{"finding_id": "codeql_py/partial-ssrf_1c31c1b861bea9bf_0b2121b6", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil...
1
true
[ "CWE-918" ]
[ "py/partial-ssrf" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 32 ]
[ null ]
[ 24 ]
[ 88 ]
2024-11-18T20:10:28.140799+00:00
1,618,631,377,000
ba10b720bb95d333f97870c8c977b4847cd5092f
2
{ "blob_id": "ba10b720bb95d333f97870c8c977b4847cd5092f", "branch_name": "refs/heads/master", "committer_date": 1618631377000, "content_id": "3b42266b2e6ea6b22f6a5764905fa937fe5bb64d", "detected_licenses": [ "MIT" ], "directory_id": "a889956d22265dc69bd3b920071258c951643fb9", "extension": "py", "fi...
2.46875
stackv2
import os import tempfile import shutil import subprocess import socket from contextlib import closing import random import time random.seed() _DEBUG_SSH = False class SSHConfig: def __init__(self, config): self.config = config self.home_dir = None def line_to_key_value(self, line): ...
178
28.71
91
16
1,181
python
[{"finding_id": "codeql_py/overly-permissive-file_c86c9544c3f9b116_8a81c7b1", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ...
1
true
[ "CWE-732" ]
[ "py/overly-permissive-file" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Overly permissive mask in chmod sets file to world readable." ]
[ 89 ]
[ null ]
[ 9 ]
[ 41 ]
2024-11-18T20:23:12.578039+00:00
1,685,352,288,000
4509d2cfbb1322d5620bb98ba6785246b953d16f
3
{ "blob_id": "4509d2cfbb1322d5620bb98ba6785246b953d16f", "branch_name": "refs/heads/master", "committer_date": 1685352288000, "content_id": "57ef96e5ca0e07c2ffde354ba948fbec0ec126d0", "detected_licenses": [ "MIT" ], "directory_id": "66ca8f005d89257269aafcae8a26b75d530d59b2", "extension": "py", "fi...
2.59375
stackv2
""" REST setup using Flask """ from logging import getLogger from flask import Flask, jsonify, Response from flask_restful import Resource, Api from .resources import Resources, get_keys, json_streamer LOGGER = getLogger(__name__) ROOT = [None, ] class Keys(Resource): """ Return list of available keys ...
99
21.24
69
12
499
python
[{"finding_id": "codeql_py/log-injection_806c5ddedda2525f_73762343", "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)." ]
[ 38 ]
[ null ]
[ 43 ]
[ 55 ]
2024-11-18T20:23:31.439470+00:00
1,411,492,798,000
ad309e43d584ee255a1be60d12cbb7d597391d8c
3
{ "blob_id": "ad309e43d584ee255a1be60d12cbb7d597391d8c", "branch_name": "refs/heads/master", "committer_date": 1411492798000, "content_id": "02442f0126a4dab7387e9d4c626091a77051f810", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "0f289aa5dee3b211dd305d72a19cd3aa9865da51", "extension": "p...
2.609375
stackv2
# utility.py -- miscellaneous code -*- coding: us-ascii -*- # Copyright (C) 2014 Galois, Inc. # # 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 c...
259
29.76
79
17
1,872
python
[{"finding_id": "codeql_py/tarslip_4ed8b23c67b49c97_38cfa929", "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)." ]
[ 106 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T20:49:25.656767+00:00
1,552,878,873,000
5eadbb26a6f9419bb61ab92e6d80ef6b3e20488d
2
{ "blob_id": "5eadbb26a6f9419bb61ab92e6d80ef6b3e20488d", "branch_name": "refs/heads/master", "committer_date": 1552878873000, "content_id": "e8688d8910a6af8c93c7f7a3887719772c5a6f9c", "detected_licenses": [ "MIT", "BSD-3-Clause", "ISC" ], "directory_id": "d8e8e528b1942b3528c88b12729f0cbc7b7d60...
2.421875
stackv2
# -*- coding=utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import codecs import errno import os import sys import warnings from tempfile import mkdtemp import six from .backports.tempfile import NamedTemporaryFile as _NamedTemporaryFile __all__ = [ "Path", "get_terminal_...
306
26
103
23
1,892
python
[{"finding_id": "codeql_py/overly-permissive-file_b689d38cf94a7648_519e2fea", "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." ]
[ 182 ]
[ null ]
[ 25 ]
[ 62 ]
2024-11-18T20:49:34.006611+00:00
1,498,644,777,000
df039e81c9319f56521b7c566f3abcf4ec880db4
3
{ "blob_id": "df039e81c9319f56521b7c566f3abcf4ec880db4", "branch_name": "refs/heads/master", "committer_date": 1498644777000, "content_id": "9f33c78734aebbcf48d28aceeb1cd7317f9390a2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ea65d6c66db89171b81f2ae3e1d5e1070024d90a", "extension": "py"...
2.640625
stackv2
from flask import Flask, render_template, request, jsonify import os import json app = Flask(__name__) port = int(os.getenv('PORT', 8080)) @app.route('/') def home(): return render_template('index.html') @app.route('/api/visitors', methods=['POST']) def put_visitor(): user = request.json['name'] return ...
19
21.32
58
9
114
python
[{"finding_id": "codeql_py/flask-debug_66c030f34074178c_90b58201", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-079" ]
[ "py/flask-debug", "py/reflective-xss" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 19, 16 ]
[ null, null ]
[ 5, 12 ]
[ 51, 36 ]
2024-11-18T20:49:34.705021+00:00
1,670,290,533,000
acbcfc0809f4fa1df1c4342f985b03de28736059
3
{ "blob_id": "acbcfc0809f4fa1df1c4342f985b03de28736059", "branch_name": "refs/heads/master", "committer_date": 1670290533000, "content_id": "707984ea0a3e66d715f8c987ea41495aeda141f0", "detected_licenses": [ "MIT" ], "directory_id": "38fca7b44d98174c964a8dd1f7ad60d7937a160e", "extension": "py", "fi...
2.875
stackv2
import tarfile, os, zipfile, shutil, glob, sys from os.path import isfile, join dir_tmp = 'tmp_tar' z_content = 'zippy' tar_list = ['foo.tar', 'bar.tar.gz', 'baz.tar.bz2', 'combo.tar', 'combo2.tar', ] CRED = '\033[91m' CEND = '\033[0m' CBOLD = '\33[1m' CWHITE = '\33[37m' def test_tars(t_list): print(CRED + "\n--...
60
28.9
108
18
512
python
[{"finding_id": "codeql_py/tarslip_e0329e68ebc81a23_95e893e7", "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)." ]
[ 29 ]
[ null ]
[ 13 ]
[ 14 ]
2024-11-18T20:49:37.055222+00:00
1,553,106,383,000
e66dbff2b278e24f148799d0be701edf7bdae040
3
{ "blob_id": "e66dbff2b278e24f148799d0be701edf7bdae040", "branch_name": "refs/heads/master", "committer_date": 1553106383000, "content_id": "c4295c7dacf75ed6278b687fc09a34374778d4e1", "detected_licenses": [ "MIT" ], "directory_id": "9052cdba35af2214ff27f776caa682694768c10d", "extension": "py", "fi...
2.78125
stackv2
# Triple DES (or TDES or TDEA or 3DES) is a symmetric block cipher standardized by NIST in SP 800-67 Rev1. # TDES has a fixed data block size of 8 bytes. It consists of the cascade of 3 Single DES ciphers # (EDE: Encryption - Decryption - Encryption), where each stage uses an indipendent DES sub-key. import json impor...
402
32.43
113
15
3,297
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_d15bb5ebf9324be9_33cf94e6", "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 cryptograph...
10
true
[ "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327" ]
[ "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-cryptograph...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES3](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 cryptographic algorithm DES3](2) is broken or weak, and should not be used.", "[The cr...
[ 58, 76, 95, 113, 132, 150, 169, 187, 206, 224 ]
[ null, null, null, null, null, null, null, null, null, null ]
[ 26, 40, 26, 40, 26, 40, 26, 26, 26, 26 ]
[ 103, 73, 103, 73, 103, 73, 58, 59, 58, 59 ]
2024-11-18T20:49:42.638144+00:00
1,563,049,885,000
22b176142cac55a953705f64673428762d231b7e
2
{ "blob_id": "22b176142cac55a953705f64673428762d231b7e", "branch_name": "refs/heads/master", "committer_date": 1563049885000, "content_id": "4df5a7f002c46f029586a4e9fcb7bf6269b4c25e", "detected_licenses": [ "MIT" ], "directory_id": "1b6bf5a035ee78e0e2a98c1667184e2c3219fbb1", "extension": "py", "fi...
2.359375
stackv2
from flask import Flask, request, jsonify, make_response import subprocess import base64 import os import uuid import logging app = Flask(__name__) gen_images = 0 @app.route('/', methods=['POST']) def homepage(): global gen_images params = request.get_json() encoded_text = params['text'] unique_id =...
70
29
79
20
534
python
[{"finding_id": "codeql_py/path-injection_5ded0034e78cf572_e33106ab", "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)." ]
[ 56, 57 ]
[ null, null ]
[ 18, 19 ]
[ 49, 50 ]
2024-11-18T20:49:53.281467+00:00
1,617,785,827,000
b7d54187aaf58908b6bb8c15a7708e0eb19b7053
4
{ "blob_id": "b7d54187aaf58908b6bb8c15a7708e0eb19b7053", "branch_name": "refs/heads/main", "committer_date": 1617785827000, "content_id": "193bb1defde3cd5074ad9967aca34b891901b05e", "detected_licenses": [ "MIT" ], "directory_id": "ab1768163bcd8eedcd5accdeb91fb7f67b4d1f84", "extension": "py", "file...
4.1875
stackv2
class Student: def __init__(self, name, birthday, courses): # public attributes self.full_name = name self.first_name = name.split(' ')[0] self.birthday = birthday self.courses = courses # protected attributes self._grades = dict([(course, 0.0) for course in ...
53
30.11
82
12
524
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4df03ce006fa9c6c_c97db939", "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." ]
[ 35, 40 ]
[ null, null ]
[ 7, 7 ]
[ 21, 28 ]
2024-11-18T20:50:29.408180+00:00
1,647,483,969,000
4b72eef8665362908cf6a090bec67d080909daf1
3
{ "blob_id": "4b72eef8665362908cf6a090bec67d080909daf1", "branch_name": "refs/heads/master", "committer_date": 1647483969000, "content_id": "b47cb17e0c6173e4fbf4557510679d9c7f6c30ac", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "73f4dd295fc54ad3c0541418ae8567efa76fbb56", "extension": "p...
2.671875
stackv2
""" convert_netcdf_to_ascii.py: convert the netcdf files to the ascii format. """ from os.path import join import click import numpy as np from mpi4py import MPI from netCDF4 import Dataset comm = MPI.COMM_WORLD # pylint: disable=c-extension-no-member size = comm.Get_size() rank = comm.Get_rank() @click.command() ...
39
34.69
112
23
354
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7a2585cf56c32def_f176fff6", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text." ]
[ 35 ]
[ null ]
[ 33 ]
[ 112 ]
2024-11-18T20:50:34.772129+00:00
1,522,214,022,000
6dac3f781ffb6dd5c36afb24295eb8ef3e13b082
3
{ "blob_id": "6dac3f781ffb6dd5c36afb24295eb8ef3e13b082", "branch_name": "refs/heads/master", "committer_date": 1522214022000, "content_id": "0986101404bb9ba9c4cabb1957e77ef4f0b73585", "detected_licenses": [ "Apache-2.0" ], "directory_id": "37c53a0d1ab8395c1a0ebf95a1368ca131d1dd81", "extension": "py"...
2.53125
stackv2
xmlFileString = "Wi-Fi-FiOS-EXAMPLE" charset="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ123456789-_" f = open("pingResult.txt","r") pingResultText=f.read() #print pingResultText f.close() def isPingBroken(): if pingResultText.find("could not find") > 0: #print "ping Failed" modifyXML() print "yes"...
57
26.18
122
14
416
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_e08e0de040b50595_d41e206e", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text." ]
[ 54 ]
[ null ]
[ 10 ]
[ 22 ]
2024-11-18T20:51:00.948583+00:00
1,628,635,210,000
e395f3f070e1c324dfa738f8b261e20edc0ddb8f
2
{ "blob_id": "e395f3f070e1c324dfa738f8b261e20edc0ddb8f", "branch_name": "refs/heads/main", "committer_date": 1628635210000, "content_id": "a7fa46c02ac9e4aefc507faeb0112c587d61e445", "detected_licenses": [ "MIT" ], "directory_id": "e3e3a19a55219b90c838302f929b13b045717060", "extension": "py", "file...
2.34375
stackv2
import markdown import os from jinja2 import Environment, FileSystemLoader def render_md(path, reloader_url=None): title = os.path.basename(path) with open(path, 'r') as f: content = markdown.markdown(f.read()) file_loader = FileSystemLoader('templates') env = Environment(loader=file_loader)...
20
23.85
48
12
110
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_609783c147634214_b75a7e18", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 13 ]
[ null ]
[ 11 ]
[ 42 ]
2024-11-18T20:51:09.120986+00:00
1,478,334,927,000
d829f95e42ced386cc6fb065920fe250862c1e74
2
{ "blob_id": "d829f95e42ced386cc6fb065920fe250862c1e74", "branch_name": "refs/heads/master", "committer_date": 1478334927000, "content_id": "3a7931fc43cf0908ba2f9331b80d510b33e9c3b5", "detected_licenses": [ "MIT" ], "directory_id": "c8fef1a37ee97c73d69a55d9ba94d23311430094", "extension": "py", "fi...
2.390625
stackv2
import logging, adblock, base64, json from flask import Flask, Response, request app = Flask(__name__) config = { "logfile": "/tmp/css.log", "logformat": "%(asctime)-15s %(filename)s:%(lineno)-4s - %(funcName)-30s - %(message)s", "loglevel": logging.DEBUG, "logname": "css_bypass", "host": "0.0.0.0...
42
35.5
101
15
424
python
[{"finding_id": "codeql_py/flask-debug_b46b55388f9782b5_948b021b", "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-117" ]
[ "py/flask-debug", "py/log-injection" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This log entry depends on a [user-provided value](1).\nThis log entry depends on a [user-provided value](2)." ]
[ 40, 27 ]
[ null, null ]
[ 5, 15 ]
[ 66, 90 ]
2024-11-18T20:51:13.415116+00:00
1,488,725,945,000
72ba0d4602464bad4806a703eb4dd8008cca87de
3
{ "blob_id": "72ba0d4602464bad4806a703eb4dd8008cca87de", "branch_name": "refs/heads/master", "committer_date": 1488725945000, "content_id": "d1771275cc416fc79197fe19914c87c29beff4d1", "detected_licenses": [ "MIT" ], "directory_id": "578fd2879383eb0e985668fcfc501a54aaf87015", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python import re from os import makedirs from os.path import exists from argparse import ArgumentParser from multiprocessing import Pool import requests from bs4 import BeautifulSoup as BS try: from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.di...
138
23.44
75
13
878
python
[{"finding_id": "codeql_py/request-without-cert-validation_a4c1481c2089d29f_6d28c7f8", "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)." ]
[ 72, 116 ]
[ null, null ]
[ 15, 16 ]
[ 67, 69 ]
2024-11-18T20:51:25.043892+00:00
1,489,579,051,000
8e10eb499e3b3c71e9588e1add9afb990b8516a5
3
{ "blob_id": "8e10eb499e3b3c71e9588e1add9afb990b8516a5", "branch_name": "refs/heads/master", "committer_date": 1489579051000, "content_id": "0c185e3b6de026a0829be0b796a5091302c92abe", "detected_licenses": [ "MIT" ], "directory_id": "fb253fd9131d1ec3228b628475ddca76b94bd7f2", "extension": "py", "fi...
2.703125
stackv2
from __future__ import print_function import gzip import os import tarfile import urllib dialogue_url = "http://opus.lingfil.uu.se/download.php?f=OpenSubtitles2016/en.raw.tar.gz" dialogue_file = "bigfile.txt" train_file = "train.txt" test_file = "test.txt" unzipped = "unzipped/" def maybe_download(directory, filena...
132
35.67
94
18
1,125
python
[{"finding_id": "codeql_py/tarslip_8d646e49b8f103ec_6868e6d2", "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)." ]
[ 39 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T20:51:27.029330+00:00
1,693,477,536,000
eac1de3ba27d765816f805e9433824bb272d30ea
2
{ "blob_id": "eac1de3ba27d765816f805e9433824bb272d30ea", "branch_name": "refs/heads/master", "committer_date": 1693477536000, "content_id": "8edeb9e6954121aa1af6159f8f723d37334df2ab", "detected_licenses": [ "MIT" ], "directory_id": "c9500ad778b8521aaa85cb7fe3239989efaa4799", "extension": "py", "fi...
2.484375
stackv2
import insightconnect_plugin_runtime import time from .schema import NewMessageReceivedInput, NewMessageReceivedOutput, Input, Output, Component # Custom imports below from insightconnect_plugin_runtime.exceptions import PluginException from icon_microsoft_teams.util.teams_utils import ( get_teams_from_microsoft, ...
318
44.09
124
30
3,207
python
[{"finding_id": "codeql_py/redos_5ff6a847a348b944_fe01602a", "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 '-.'.", "remediat...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of '-.'." ]
[ 289 ]
[ null ]
[ 53 ]
[ 61 ]
2024-11-18T21:13:54.360723+00:00
1,552,112,184,000
d4d496118dfb994c57675c46bd0cb4a566c29094
3
{ "blob_id": "d4d496118dfb994c57675c46bd0cb4a566c29094", "branch_name": "refs/heads/master", "committer_date": 1552112184000, "content_id": "5aba8b9e85898574a6feac93a5dc2de95031f650", "detected_licenses": [ "MIT" ], "directory_id": "f4cc769b8d0ea93ab18aa86c507fc4356e2c286e", "extension": "py", "fi...
2.6875
stackv2
#!/usr/bin/env python import re, json from bottle import route, run, template from bottle import request, response from bottle import post, get, put, delete @route('/') def index(name): return template('Hello World!') #@route('/hello/<name>') #def index(name): # return template('<b>Hello {{name}}</b>!', nam...
135
22.53
57
16
734
python
[{"finding_id": "codeql_py/reflective-xss_002a7d3b5ccd530c_7f048cf8", "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)." ]
[ 65 ]
[ null ]
[ 12 ]
[ 38 ]
2024-11-18T21:14:05.223758+00:00
1,502,395,193,000
77ad972352f55a429585e4386a6b75add50b652d
3
{ "blob_id": "77ad972352f55a429585e4386a6b75add50b652d", "branch_name": "refs/heads/master", "committer_date": 1502395193000, "content_id": "af18d50923d952aba00e197d50fd264f9aaa52fd", "detected_licenses": [ "MIT" ], "directory_id": "935cd9cb3c81bb90fae5bbf9a467db0845cbbb9c", "extension": "py", "fi...
2.5625
stackv2
import re import random import string from functools import wraps from flask import Flask, request, jsonify, abort def key(): return ''.join(random.choice(string.ascii_letters) for x in range(10)) def nick_check(f): @wraps(f) def wrapper(*args, **kwargs): nick = request.args.get("nick") ...
44
21.05
74
16
261
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_b3a8ef1807288bca_fa9797dc", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (secret)](1) as clear text." ]
[ 39 ]
[ null ]
[ 19 ]
[ 30 ]
2024-11-18T21:14:27.631633+00:00
1,668,786,240,000
2bfb8475f1e50f3a5ce1746ae5ecd839da6e7a33
3
{ "blob_id": "2bfb8475f1e50f3a5ce1746ae5ecd839da6e7a33", "branch_name": "refs/heads/master", "committer_date": 1668786240000, "content_id": "de83aef58b3ec9d3e3174ab00054fcfd78ac5c7b", "detected_licenses": [ "MIT" ], "directory_id": "0e3c08bca0b8b6f9c6fe39748dffe78a25eba866", "extension": "py", "fi...
3.46875
stackv2
""" Parses a list of URLs, performs data extraction, and renders the output in HTML format as news articles. """ def render(template, **kwargs): """ Renders the HTML containing provided summaries. The summary has to be an instance of summary.Summary, or at least contain similar properties: title, ima...
81
27.27
85
17
527
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_20417a523082905f_c66e5e58", "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." ]
[ 20 ]
[ null ]
[ 11 ]
[ 44 ]
2024-11-18T21:14:39.995704+00:00
1,664,804,765,000
95539b37c1a79d81549c9e47ca5f91af18a465c5
3
{ "blob_id": "95539b37c1a79d81549c9e47ca5f91af18a465c5", "branch_name": "refs/heads/master", "committer_date": 1664804765000, "content_id": "2d44446ecceec9a7786858f53cfb41ab487e1054", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5436aaf27ce2bb77fe9618372a69e22110dc3eb1", "extension": "py"...
2.609375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import requests import threading from requests.adapters import HTTPAdapter from code_counter.conf.config import Config from code_counter.tools.progress import SearchingProgressBar session = requests.Session() session.mount('https://', HTTPAdapter(max_retries=3)) def c...
90
30.86
91
15
629
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_7e9009750352ac46_7e108a01", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://github.com](1) may be at an arbitrary position...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [https://github.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 15 ]
[ null ]
[ 12 ]
[ 56 ]
2024-11-18T21:14:44.299627+00:00
1,566,721,360,000
81894f6aaee71e7f7d30695e21ad89b983f05edd
3
{ "blob_id": "81894f6aaee71e7f7d30695e21ad89b983f05edd", "branch_name": "refs/heads/master", "committer_date": 1566721360000, "content_id": "5fc0ebbcf040892d8e72c6fc587274e87645005b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d9ec665c1582fca20918b6455371e32c99015606", "extension": "py"...
2.765625
stackv2
import glob import json import os import re import smtplib import time def readfile(filepath): """ reads a pipeline json file and returns the resulting dictionary """ with open(filepath, "r") as json_file: json_data = json.load(json_file) return json_data def writefile(filepath, datadict): """ writes the gi...
108
28
100
13
795
python
[{"finding_id": "codeql_py/overly-permissive-file_577fc09df977a380_fd0f80ff", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world writable.", "remediation": "", "location": ...
1
true
[ "CWE-732" ]
[ "py/overly-permissive-file" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Overly permissive mask in chmod sets file to world writable." ]
[ 33 ]
[ null ]
[ 3 ]
[ 26 ]
2024-11-18T21:14:44.526356+00:00
1,567,432,690,000
f6a2f2bc6116280dd78c5b6543e1e7448892f1b2
2
{ "blob_id": "f6a2f2bc6116280dd78c5b6543e1e7448892f1b2", "branch_name": "refs/heads/master", "committer_date": 1567432690000, "content_id": "5b42b865c0e3b4142e313e110bba674774722114", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6ca20d39f27b56656b59a1c8efe6330d53064a61", "extension": "py"...
2.46875
stackv2
# # Copyright 2014 Grupo de Sistemas Inteligentes (GSI) DIT, UPM # # 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 # # Unles...
531
25.19
92
20
3,035
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_741a637f848ed744_f3ea3838", "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." ]
[ 197 ]
[ null ]
[ 25 ]
[ 55 ]
2024-11-18T20:10:33.404210+00:00
1,599,053,689,000
e06cd86cd6860c263dc9d4fc3f20de149e2eb308
3
{ "blob_id": "e06cd86cd6860c263dc9d4fc3f20de149e2eb308", "branch_name": "refs/heads/master", "committer_date": 1599053689000, "content_id": "6ddf1e1ac3c92bc58889a4fc88091036bb8dc685", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5fe72bb13baf3649058ebe11aa86ad4fc56c69ed", "extension": "py"...
3.140625
stackv2
from Crypto.Cipher import DES3 def _make_des3_encryptor(key, iv): encryptor = DES3.new(key, DES3.MODE_CBC, iv) return encryptor def des3_encrypt(key, iv, data): encryptor = _make_des3_encryptor(key, iv) pad_len = 8 - len(data) % 8 # length of padding padding = chr(pad_len) * pad_len # PKCS5 paddi...
21
26.76
60
10
164
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_f259a06109ad7b73_0d4a37a8", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used." ]
[ 13, 18 ]
[ null, null ]
[ 12, 14 ]
[ 35, 37 ]
2024-11-18T20:10:34.336474+00:00
1,587,833,460,000
653dce94f7ab6ff7fdff57d232266b645fec7e9c
2
{ "blob_id": "653dce94f7ab6ff7fdff57d232266b645fec7e9c", "branch_name": "refs/heads/master", "committer_date": 1587833460000, "content_id": "c64cfdbfae4cf3c67835c694b514b86b3946f694", "detected_licenses": [ "MIT" ], "directory_id": "5b6888f916ae7357ffc45e24baf76e6810d41c4d", "extension": "py", "fi...
2.359375
stackv2
"""This module is responsible with getting access to OSC API""" import os import sys import urllib import json import logging from osm_access import osm_auth from osc_api_gateway import OSCApi from osc_api_gateway import OSCUser from osc_api_gateway import OSCAPISubDomain # constants CREDENTIALS_FILE = "credentials.js...
197
41.79
99
20
1,705
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0b76e30bf3053d86_ed9e2c28", "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." ]
[ 41 ]
[ null ]
[ 89 ]
[ 97 ]
2024-11-18T20:10:37.118945+00:00
1,690,398,086,000
9b9b9881c2172ffda795d4b2f37fe278cc7e27bd
3
{ "blob_id": "9b9b9881c2172ffda795d4b2f37fe278cc7e27bd", "branch_name": "refs/heads/master", "committer_date": 1690398086000, "content_id": "10c25a59ee5eb48a8a86bad88a72d6efc96159ef", "detected_licenses": [ "MIT" ], "directory_id": "bdf59a913bea4c400b65e04c0f0488ee712b5320", "extension": "py", "fi...
3.046875
stackv2
import os import sys import pandas as pd import argparse from jinja2 import Environment, FileSystemLoader script_dir = os.path.dirname(__file__) # a mapping of column names from the MS Form to names # used in the jinja template col_dict = { "ID": "ID", "Start time": "Start time", "Completion time": "Compl...
143
33.59
145
18
1,187
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_bd0586443f8ae203_8aba8977", "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." ]
[ 54 ]
[ null ]
[ 11 ]
[ 42 ]
2024-11-18T20:10:46.852562+00:00
1,619,005,848,000
22f255fc4f206455de9e7312980d086ad4aebd6f
3
{ "blob_id": "22f255fc4f206455de9e7312980d086ad4aebd6f", "branch_name": "refs/heads/master", "committer_date": 1619005848000, "content_id": "cc7e7cdae687b56a404f557bf8f8582010834480", "detected_licenses": [ "Apache-2.0" ], "directory_id": "61543ab3e0d92d0caed55f9c72fb1a2655771002", "extension": "py"...
3.125
stackv2
class Employe: nom = '' prenom = '' telephone = '' responsabilites = [] def printMotto (self): print('This is my motto') emp1 = Employe() emp1.nom = "Popescu" emp1.prenom = "Andrei" emp1.telephone = "12345" emp1.responsabilites = ['task1', 'task2'] print (emp1.nom) print (emp1.prenom) pri...
45
18.22
41
10
299
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_035235b2fb4ae4d9_f528f4ba", "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." ]
[ 18, 30, 42 ]
[ null, null, null ]
[ 8, 8, 8 ]
[ 22, 22, 22 ]
2024-11-18T20:10:51.247595+00:00
1,515,401,154,000
398a59ec0be41187a62b591ab1af64882eb0302a
3
{ "blob_id": "398a59ec0be41187a62b591ab1af64882eb0302a", "branch_name": "refs/heads/master", "committer_date": 1515401154000, "content_id": "fbca660b198c4c9de31d56f99068c13da50b1e2d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "bfb14530220fde1db210829d6871d50fcc0d75ab", "extension": "py"...
2.6875
stackv2
# -*- coding: utf-8 -*- import hashlib import random import requests import settings def query(search): salt = random.randint(1, 65536) sign = hashlib.md5((settings.ydAppId + search + str(salt) + settings.ydAppSecret).encode()).hexdigest() try: response = requests.get(settings.ydApiUrl.format(s...
51
30.35
117
21
359
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_ff4a0379f414ae63_1eed8e4d", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure." ]
[ 13 ]
[ null ]
[ 24 ]
[ 95 ]
2024-11-18T20:48:06.141904+00:00
1,693,348,322,000
3995f3e45a8f341fa404c16b27c3547facfae234
2
{ "blob_id": "3995f3e45a8f341fa404c16b27c3547facfae234", "branch_name": "refs/heads/master", "committer_date": 1693348322000, "content_id": "76fb854e6e3d778b4fa78ce68e29ff8f709aa5db", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5ef6c8d47864f471e26b9902d61f8c687e941f05", "extension": "py"...
2.4375
stackv2
# -*- coding: utf-8 -*- import re from genie.metaparser import MetaParser from genie.metaparser.util.schemaengine import Schema, Any, Optional # ============================================ # # Statistics # # ============================================ # # Schema clas...
469
36.91
109
21
3,693
python
[{"finding_id": "codeql_py/redos_9c75385ad3c91177_d03acbd6", "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 '\\t = ' and containing many repet...
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 '\\t = ' and containing many repetitions of '('.", "This part of the regular expression may cause exponential backtracking on strings starting with '\\t = a:' and containing many repetitions of 'aa:'.", "This part o...
[ 283, 283, 283, 283 ]
[ null, null, null, null ]
[ 63, 78, 86, 93 ]
[ 75, 81, 89, 96 ]
2024-11-18T20:48:13.593981+00:00
1,618,389,169,000
b0b58bb555d59d1b07c2ed90c3307c05a8447fac
3
{ "blob_id": "b0b58bb555d59d1b07c2ed90c3307c05a8447fac", "branch_name": "refs/heads/master", "committer_date": 1618389169000, "content_id": "7a468e6c15d971df037c0be0edecbca120e15401", "detected_licenses": [ "MIT" ], "directory_id": "4b75ad0c6bf74f9f1f35a4d26a093342e0f315b1", "extension": "py", "fi...
3.109375
stackv2
# Prototype of Omega 1 Multi Secret Sharing Scheme by Herranz, Ruiz & Saez # Filip Kubicz 2017 import os import math import copy from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.primitives import padding imp...
324
38.92
97
23
2,837
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a46f8180a6048ec4_0eb5b8cf", "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...
5
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.", "This expression logs [sensitive data (s...
[ 105, 113, 306, 315, 318 ]
[ null, 117, null, null, null ]
[ 30, 15, 15, 15, 15 ]
[ 33, 54, 74, 46, 50 ]
2024-11-18T20:48:32.563995+00:00
1,590,926,149,000
7d23132851b3bf01c1e04cb1d8c188f8ea2a6a5f
3
{ "blob_id": "7d23132851b3bf01c1e04cb1d8c188f8ea2a6a5f", "branch_name": "refs/heads/master", "committer_date": 1590926149000, "content_id": "631fa2961c7960eb4705821228b7fb785edc9123", "detected_licenses": [ "MIT" ], "directory_id": "028f73e0ff424a8527291474fff68f73ed9e0174", "extension": "py", "fi...
2.984375
stackv2
# "How was working with MongoDB different from working with # PostgreSQL? What was easier, and what was harder?" # Answer: MongoDB is a lot simpler in terms of Inserting data. # I would not say one is easier than the other because they all # have different purpose, pros and cons import pymongo import os import sqlit...
53
25.19
83
11
360
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bbf9391e913cd735_110ac935", "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." ]
[ 24 ]
[ null ]
[ 5 ]
[ 83 ]
2024-11-18T21:11:29.920622+00:00
1,401,936,862,000
b1fa8e617cc7f295c71a35f9eb8e05e3849d7706
3
{ "blob_id": "b1fa8e617cc7f295c71a35f9eb8e05e3849d7706", "branch_name": "refs/heads/master", "committer_date": 1401936862000, "content_id": "703a4960586e19a97ac33157a47da9488e5f8808", "detected_licenses": [ "Apache-2.0" ], "directory_id": "625b30489dc13eee8738d67d4771c7b6fc099282", "extension": "py"...
2.609375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'moonshawdo' """ 验证哪些IP可以用在gogagent中 主要是检查这个ip是否可以连通,并且证书是否为google.com """ import os import sys import threading import socket import ssl import re if sys.version_info[0] == 3: try: from functools import reduce finally: pass import tim...
235
27.62
91
21
1,929
python
[{"finding_id": "codeql_py/insecure-default-protocol_f390a7dc173faf25_fb20fd8c", "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." ]
[ 64 ]
[ null ]
[ 13 ]
[ 83 ]
2024-11-18T21:25:49.978978+00:00
1,526,016,608,000
6f4253424a6a1ab05f45bcdf733c4d180d8c1100
3
{ "blob_id": "6f4253424a6a1ab05f45bcdf733c4d180d8c1100", "branch_name": "refs/heads/master", "committer_date": 1526016608000, "content_id": "52750152aee53f86c7887d24e5bbdf5d0f8c915c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3f74c93b3808d1e4436d5760f424f5b08326c763", "extension": "py"...
2.59375
stackv2
# -*- coding: utf-8 -*- from google.appengine.api import urlfetch from google.appengine.api.app_identity import get_application_id from flask import Flask, render_template, request, abort from google.cloud import language from google.cloud import bigquery import json import logging app = Flask(__name__) @app.route('/...
63
31.4
96
13
442
python
[{"finding_id": "codeql_py/log-injection_91628e811dd29e12_a042c448", "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)." ]
[ 21 ]
[ null ]
[ 18 ]
[ 54 ]
2024-11-18T21:52:15.140250+00:00
1,535,638,046,000
e00e71e4d1049fdda2121331454c6a9041ace67f
3
{ "blob_id": "e00e71e4d1049fdda2121331454c6a9041ace67f", "branch_name": "refs/heads/master", "committer_date": 1535638046000, "content_id": "df0a178beea9650acb5de74999211eb52e90ed06", "detected_licenses": [ "MIT" ], "directory_id": "2c851d364d33c6e8f891aad778b3fbc469331e2a", "extension": "py", "fi...
2.671875
stackv2
from urllib import parse from bs4 import BeautifulSoup from urllib import request from selenium import webdriver import time import re # url 만들고 base_url = 'https://m.search.naver.com/search.naver?display=15&nso=p%3A' start = '20170305' end = '20170405' def make_url(keyword, start, end): period = 'from' + start + ...
75
29.24
72
14
651
python
[{"finding_id": "codeql_py/redos_87ddaa9492745709_85fdfd44", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '>' and containing many repetition...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with '>' and containing many repetitions of ' '." ]
[ 51 ]
[ null ]
[ 19 ]
[ 22 ]
2024-11-18T20:59:43.769750+00:00
1,546,608,760,000
436a5ec2a5558cbf552fff447aa9e925f995c4aa
2
{ "blob_id": "436a5ec2a5558cbf552fff447aa9e925f995c4aa", "branch_name": "refs/heads/master", "committer_date": 1546608760000, "content_id": "c90b91dc56053257353f0ff9a720324bb64bc23c", "detected_licenses": [ "MIT" ], "directory_id": "45ae351fefe4b8ca493e4606722c4d0b79d411a2", "extension": "py", "fi...
2.328125
stackv2
#! /usr/bin/python3 import _thread import socket import time import markdown2 from multiprocessing import Process import random import urllib.request from random import random from random import randint from flask import Flask from flask import request app = Flask(__name__) sock = socket.socket(socket.AF_INET, socket...
188
24.15
90
14
1,375
python
[{"finding_id": "codeql_py/reflective-xss_c874a98697294720_2ba02aa3", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
3
true
[ "CWE-079", "CWE-079", "CWE-079" ]
[ "py/reflective-xss", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 63, 83, 102 ]
[ null, null, null ]
[ 12, 12, 12 ]
[ 67, 61, 52 ]
2024-11-18T21:00:02.446776+00:00
1,639,894,556,000
19aa4f3016fc41918a9ce0976304250ec1aceb9c
2
{ "blob_id": "19aa4f3016fc41918a9ce0976304250ec1aceb9c", "branch_name": "refs/heads/master", "committer_date": 1639894556000, "content_id": "7bdcfebc1c40998992d68b6a8310cb083208f4d0", "detected_licenses": [ "MIT" ], "directory_id": "ffc7ee6f9c890999cd3e805885a96529629a6949", "extension": "py", "fi...
2.375
stackv2
#!/usr/bin/env python3 """ start ssh port-forwarding processes for NCS workers """ # standard library modules import argparse import contextlib import json import logging import socket import subprocess # third-party modules import psutil logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) # possible...
235
37.8
102
23
2,137
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_b1e25927379f559e_1be79a50", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [neocortix.com](1) may be at an arbitrary position in t...
2
true
[ "CWE-020", "CWE-200" ]
[ "py/incomplete-url-substring-sanitization", "py/bind-socket-all-network-interfaces" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [neocortix.com](1) may be at an arbitrary position in the sanitized URL.", "'0.0.0.0' binds a socket to all interfaces." ]
[ 126, 34 ]
[ null, null ]
[ 24, 5 ]
[ 46, 23 ]
2024-11-18T21:00:05.581259+00:00
1,609,368,951,000
36bce218c02f8b8d4f31438ba4be4ae6208b6987
3
{ "blob_id": "36bce218c02f8b8d4f31438ba4be4ae6208b6987", "branch_name": "refs/heads/master", "committer_date": 1609368951000, "content_id": "2f118a7fdf5da8f47549f7ece9331e96a5642572", "detected_licenses": [ "MIT" ], "directory_id": "c6c062a4b45a1c861d24499eebe7db899f1e2a0b", "extension": "py", "fi...
2.671875
stackv2
import os import sys import yaml import urllib import unidecode import re from jinja2 import FileSystemLoader, Environment from datetime import datetime def slugify(str): # Credit: http://stackoverflow.com/a/8366771 str = urllib.parse.unquote(str) str = unidecode.unidecode(str).lower() ret = re.sub(r...
204
31.15
107
18
1,649
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_d205caa8b5e6928e_829d823d", "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." ]
[ 100 ]
[ null ]
[ 15 ]
[ 65 ]
2024-11-18T21:10:21.967013+00:00
1,538,935,557,000
1cee64babe84ccff0cf5416bbc8a8bb6814ea0ae
2
{ "blob_id": "1cee64babe84ccff0cf5416bbc8a8bb6814ea0ae", "branch_name": "refs/heads/master", "committer_date": 1538935557000, "content_id": "65c07de33f4739a292fd22dace6256339d8dd375", "detected_licenses": [ "MIT" ], "directory_id": "00f3bb00485095c09bc17adffa73d5791212d549", "extension": "py", "fi...
2.421875
stackv2
import io import json import os import flask from PIL import Image from flask import send_file, render_template, Flask from keras import Input, Model from keras.applications import DenseNet121 from keras.layers import Dense import image_handler import numpy as np app: Flask = flask.Flask(__name__) app.config['UPLOAD_...
89
34.28
113
17
704
python
[{"finding_id": "codeql_py/path-injection_05ebe43512ad9296_08ad13fd", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
1
true
[ "CWE-022" ]
[ "py/path-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This path depends on a [user-provided value](1)." ]
[ 68 ]
[ null ]
[ 9 ]
[ 55 ]
2024-11-18T21:10:33.692234+00:00
1,607,979,044,000
f6448c8b6fc8c98ec63454c01e662e44bc4f37ac
3
{ "blob_id": "f6448c8b6fc8c98ec63454c01e662e44bc4f37ac", "branch_name": "refs/heads/master", "committer_date": 1607979044000, "content_id": "66732baefb900aa7977b59550cbbebd72d6d04aa", "detected_licenses": [ "MIT" ], "directory_id": "05a07cb22a11dc3bee4424dcfc05ccaf5d805ce3", "extension": "py", "fi...
3.078125
stackv2
# -*- coding: utf-8 -*- """Utilities for downloading patents from Google. Code modified from original work by Alexander Esser. """ import os import re from typing import Optional, Set import requests from bs4 import BeautifulSoup LINK_PATTERN = r"https?:\/\/patentimages\.storage\.googleapis\.com\/.+\/([A-z0-9]+\.p...
66
24.83
90
14
420
python
[{"finding_id": "codeql_py/overly-large-range_950f57937d23fa13_77a8c31f", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]." ]
[ 15 ]
[ null ]
[ 75 ]
[ 78 ]
2024-11-18T21:10:37.005968+00:00
1,596,030,399,000
4c375a56b264f6a17243bd53a8754bc806a7b538
3
{ "blob_id": "4c375a56b264f6a17243bd53a8754bc806a7b538", "branch_name": "refs/heads/master", "committer_date": 1596030399000, "content_id": "908a92e1fe5500385b09e4cf9b408f9597b9833f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8999b1ef8c7a115e2f4de24b7271ce055d89acc4", "extension": "py"...
2.765625
stackv2
#!/usr/bin/env python #Kriging Imports from __future__ import print_function __author__ = 'cpaulson' import pyKriging from pyKriging.krige import kriging from pyKriging.samplingplan import samplingplan #Kriging imports complete import math #Extra import for column stuff import numpy as np #Extra import for column s...
129
28.36
83
16
1,109
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2b9a7a0495ba95eb_7909a379", "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...
5
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (p...
[ 59, 77, 88, 89, 104 ]
[ null, null, null, null, null ]
[ 7, 11, 12, 12, 13 ]
[ 13, 23, 13, 13, 14 ]
2024-11-18T21:10:41.062998+00:00
1,464,739,044,000
f363223a5d2665334cfcfd140c14b348a78c29aa
2
{ "blob_id": "f363223a5d2665334cfcfd140c14b348a78c29aa", "branch_name": "refs/heads/master", "committer_date": 1464739044000, "content_id": "3b138de14f7806b781337cc5f35dcde1a1d5a32d", "detected_licenses": [ "MIT" ], "directory_id": "c88ba0e230aec9dae63a2a98a35223d76f268c5f", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- # Created by Kenneth G. Hartman http://www.kennethghartman.com # References and acknowledgements: # https://wikigurus.com/Article/Show/298784/Extract-the-SHA1-hash-from-a-torrent-file # http://error.news/question/139520/extract-the-sha1-hash-from-a-torrent-file/ # http://www....
202
30.84
129
18
1,618
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_e49105cf85998795_c42565db", "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 ]
[ 20 ]
[ 24 ]
[ 23 ]
2024-11-18T21:10:50.679090+00:00
1,641,240,409,000
2031cd96eab7b8e1eedb16a69c36a0f35e67c5d9
3
{ "blob_id": "2031cd96eab7b8e1eedb16a69c36a0f35e67c5d9", "branch_name": "refs/heads/master", "committer_date": 1641240409000, "content_id": "181f54d763eec0056fcb15c462f33a51566a651e", "detected_licenses": [ "MIT" ], "directory_id": "f0d3facba7a28aeedca0bf6f10aa5fdf63fb553f", "extension": "py", "fi...
2.65625
stackv2
"""Configuration file example generator.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import sys try: import jinja2 except ImportError as exc: raise exc except Exception as exc: if sys.version_...
71
24.55
76
11
377
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_75c379c7ee694233_50413d3a", "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." ]
[ 29 ]
[ null ]
[ 7 ]
[ 77 ]
2024-11-18T21:10:53.861568+00:00
1,677,131,347,000
b8182937a2a9ab14096616148df4145230bea81c
3
{ "blob_id": "b8182937a2a9ab14096616148df4145230bea81c", "branch_name": "refs/heads/master", "committer_date": 1677131347000, "content_id": "42f43e134d48f092fdb3ccf461334c0222082de4", "detected_licenses": [ "MIT" ], "directory_id": "5996eaf7438268677e01c6473f77fefb124a54c4", "extension": "py", "fi...
3.171875
stackv2
import random import hashlib import time import datetime class hash_utils: @classmethod def hash_password(cls, password): """ Hashes password for database. """ return hashlib.sha224(password).hexdigest() @classmethod def random_hex(cls): """ Generates r...
31
24.68
111
17
184
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_b8627ee94e91e902_0eb59562", "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 (SHA224) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA224) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 13 ]
[ null ]
[ 31 ]
[ 39 ]
2024-11-18T21:23:41.909535+00:00
1,603,718,938,000
0272b98c9ba999e2819accc6cfa797fcd27f34c7
4
{ "blob_id": "0272b98c9ba999e2819accc6cfa797fcd27f34c7", "branch_name": "refs/heads/master", "committer_date": 1603718938000, "content_id": "39de6fbccdc15ab74d07bfdc65e14206a3a3727a", "detected_licenses": [ "MIT" ], "directory_id": "5449b8067528f3afe4c3df051fea42bef4a52985", "extension": "py", "fi...
3.59375
stackv2
#!/usr/bin/env python3.6 from credentials import Credentials def create_credentials(aname,uname,passw,email): ''' Function to create a new credential ''' new_credentials = Credentials(aname,uname,passw,email) return new_credentials def save_credentials(w,x,y,z): ''' Function to save creden...
115
26.45
122
17
640
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_df7a20cccea74f6a_c01f0cc8", "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." ]
[ 86 ]
[ null ]
[ 31 ]
[ 112 ]
2024-11-18T21:23:44.928673+00:00
1,377,060,326,000
ff7bd4f7f0dd48d8a99a7b089afce50d0acaec35
2
{ "blob_id": "ff7bd4f7f0dd48d8a99a7b089afce50d0acaec35", "branch_name": "refs/heads/master", "committer_date": 1377060326000, "content_id": "aaf9f1410570fe95adafe85e4a9147ae2718774c", "detected_licenses": [ "BSD-2-Clause", "Apache-2.0" ], "directory_id": "df7c47f1b285e63a6ecd800da3fe2f7c1bc3fca9",...
2.375
stackv2
''' Replacement of HTTPS client from standart httplib module workaround of ssl bug: https://bugs.launchpad.net/ubuntu/source/openssl/bug/965371 Copyright (C) http://docs.python.org/license.html Marat Khayrullin <xmm.dev@gmail.com> ''' import httplib import socket try: import ssl except ImportError: pass else...
67
32.73
108
15
477
python
[{"finding_id": "codeql_py/insecure-protocol_32b30c3843748f60_53e0630c", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1).", "remediation": "", "l...
1
true
[ "CWE-327" ]
[ "py/insecure-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.wrap_socket](1)." ]
[ 39 ]
[ null ]
[ 25 ]
[ 109 ]
2024-11-18T21:24:00.053419+00:00
1,420,991,775,000
041af66e2df89a10a53a3bd854f3a5f539b8c359
2
{ "blob_id": "041af66e2df89a10a53a3bd854f3a5f539b8c359", "branch_name": "refs/heads/master", "committer_date": 1420991775000, "content_id": "aa63d0f82a25f2d3e20fa146041c9183fccab67f", "detected_licenses": [ "MIT" ], "directory_id": "168bea9e7d93027f2a9d28037c8df36c4904f1f3", "extension": "py", "fi...
2.4375
stackv2
import socket import sys import pynmea2 import time from geojson import FeatureCollection, Feature, LineString from collections import deque import os.path #CONFIG USERS=[("hildenae","htconem8"),("hildenæ","htcone m8!")] UDP_IP = "0.0.0.0" UDP_PORT = 11109 sock = socket.socket(socket.AF_INET, # Internet ...
61
32.31
93
18
570
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a49fed075c91a8b2_23a8abf8", "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-200" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/bind-socket-all-network-interfaces" ]
[ "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.", "'0.0.0.0' binds a socket to all interfaces." ]
[ 30, 30, 16 ]
[ null, null, null ]
[ 31, 45, null ]
[ 43, 58, 30 ]
2024-11-18T21:37:50.589011+00:00
1,474,139,456,000
6d2574083586a250da3f6eb9efd6645a0705bf00
2
{ "blob_id": "6d2574083586a250da3f6eb9efd6645a0705bf00", "branch_name": "refs/heads/master", "committer_date": 1474139456000, "content_id": "a2d736e9327bedff6875790c917b4bc6322acace", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7794c2ef88d468d579146c1477af4209542d1ff7", "extension": "py"...
2.390625
stackv2
import matplotlib as mpl mpl.use('Agg') import numpy as np import pandas as pd import matplotlib.pyplot as plt import yaml from time import gmtime, strftime, localtime from jinja2 import Environment, FileSystemLoader with open('../config/betfair_config.yml', 'r') as f: doc = yaml.load(f) data_dir = doc['defau...
76
34.14
98
11
704
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_6a7e2e6d5726e7e0_cf27692e", "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 ]
[ null ]
[ 7 ]
[ 48 ]
2024-11-18T21:59:06.332059+00:00
1,467,879,661,000
7f20758b24bfdc4da9400cf08fb2c87c3a6d3582
3
{ "blob_id": "7f20758b24bfdc4da9400cf08fb2c87c3a6d3582", "branch_name": "refs/heads/master", "committer_date": 1467879661000, "content_id": "a6ded75fb278752dc1aa2a6136c0bdfbd5c95219", "detected_licenses": [ "MIT" ], "directory_id": "6cd530330e9a0100083714374c8b6e5d8db44703", "extension": "py", "fi...
3.015625
stackv2
#!/usr/bin/env python """ A trivial code line counter for diff. """ import argparse import re import sys if sys.version_info < (3, 0): import __future__ class Line: def __init__(self, string, line_number): # String of the line self.string = string # Line number. Not be used now. ...
275
25.72
78
20
1,844
python
[{"finding_id": "codeql_py/bad-tag-filter_9acaf7349c78cad8_adb40b04", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression only parses --> and not --!> as a HTML comment end tag.", "remediation": "", "location":...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression only parses --> and not --!> as a HTML comment end tag." ]
[ 166 ]
[ null ]
[ 27 ]
[ 43 ]
2024-11-18T21:59:13.934489+00:00
1,400,272,179,000
04d2258fc59819f8eaa3d43471a2f280eaaa6c81
2
{ "blob_id": "04d2258fc59819f8eaa3d43471a2f280eaaa6c81", "branch_name": "refs/heads/master", "committer_date": 1400272179000, "content_id": "f672543a6d4e1685dcb32a4586b63a0f3200c80f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3cfad922fce2ce459c03ff84a3f7c262a5abcb2c", "extension": "py"...
2.421875
stackv2
#!/usr/bin/env python import argparse import json import requests import sys host = 'http://localhost:8080' headers = {'content-type':'application/json', 'accept':'application/json'} def format_json(text): return json.dumps(json.loads(text), sort_keys=True, indent=4) def list_versions(): result = requests....
84
28.51
109
11
586
python
[{"finding_id": "codeql_py/request-without-cert-validation_e3845f94a5a91b44_458a50d7", "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]...
6
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation becau...
[ 16, 21, 26, 31, 41, 46 ]
[ null, null, null, null, null, null ]
[ 14, 14, 14, 14, 14, 14 ]
[ 83, 79, 102, 110, 86, 105 ]
2024-11-18T21:59:20.004396+00:00
1,480,164,630,000
59fa3add3c3aa24311d48549a1070c04ace1e268
3
{ "blob_id": "59fa3add3c3aa24311d48549a1070c04ace1e268", "branch_name": "refs/heads/master", "committer_date": 1480164630000, "content_id": "cf02180c94445c6c6b8ec7b977267fbc34eae73c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "589e5d16bf11cc1cc64c5cf9e750bde122b9e0b5", "extension": "py"...
2.578125
stackv2
"""RestView for Host Addresses.""" from pyramid.view import ( view_config, view_defaults, ) from pyramid.response import Response from . import RestView @view_defaults(renderer='json') class RestHostAddressViews(RestView): """RestHostAddress View. self.request: set via parent constructor sel...
68
24.68
82
16
366
python
[{"finding_id": "codeql_py/stack-trace-exposure_8c9f62b3adfed996_f005468a", "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." ]
[ 46 ]
[ null ]
[ 20 ]
[ 26 ]
2024-11-18T21:59:22.417317+00:00
1,595,851,834,000
65fb8e73ee7c083523ed1746c3aae2992be80ee9
3
{ "blob_id": "65fb8e73ee7c083523ed1746c3aae2992be80ee9", "branch_name": "refs/heads/master", "committer_date": 1595851834000, "content_id": "eac515c658a5300e0d87e183bb35090f29d7de50", "detected_licenses": [ "MIT" ], "directory_id": "6f03d02203b3ff1ae9118e72a826b0c71faccb25", "extension": "py", "fi...
2.75
stackv2
import os import requests import config import time import smtplib, ssl from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart def sendnewip(ipaddr): sender_email = config.sender_email receiver_email = config.receiver_email password = config.password message = MIMEMultipart...
47
32.91
86
12
393
python
[{"finding_id": "codeql_py/request-without-cert-validation_bdcbe76aab9b95d8_0bb82629", "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)." ]
[ 37 ]
[ null ]
[ 14 ]
[ 77 ]
2024-11-18T22:11:29.480117+00:00
1,546,512,336,000
cba21333ca5d30ce61cef291cc138b2f29f64da5
4
{ "blob_id": "cba21333ca5d30ce61cef291cc138b2f29f64da5", "branch_name": "refs/heads/master", "committer_date": 1546512336000, "content_id": "753c3717a3e8f1120a8ef513e20c482e25b05b3c", "detected_licenses": [ "Unlicense" ], "directory_id": "36c9b867c60242fe9165cd4674f4a0efa322e681", "extension": "py",...
3.796875
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import random def main(): secret = random.randint(1, 50) while True: guess = int(input("Zoek een geheim getal tussen 1 an 50: ")) if guess == secret: print( "Geraden - We zochten het getal %s :)" % secret) print("Tot zie...
24
26.79
107
13
181
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4e2699a5a1499b00_184974ad", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text." ]
[ 14 ]
[ null ]
[ 20 ]
[ 67 ]
2024-11-18T22:11:31.454800+00:00
1,639,315,196,000
3ab4b131aa851265afd6190d2476dc85cd1a06d2
3
{ "blob_id": "3ab4b131aa851265afd6190d2476dc85cd1a06d2", "branch_name": "refs/heads/master", "committer_date": 1639315196000, "content_id": "e592eae033a27d73a0c741760658c051b2e91f12", "detected_licenses": [ "Unlicense" ], "directory_id": "3beec068158598234412d94ae89c652705cc08b8", "extension": "py",...
3.359375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- input = open("day21.txt", "r").read().split("\n")[:-1] password = [c for c in "abcdefgh"] scrambled_password = "fbgdceah" def swap_position(s, n, m): s = list(s) tmp = s[n] s[n] = s[m] s[m] = tmp return s def swap_letter(s, c1, c2): return swap_position(s, s.ind...
112
25.12
69
16
928
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_04827849a685ab82_b5dc18e7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw...
[ 111, 112 ]
[ null, null ]
[ 7, 7 ]
[ 18, 18 ]
2024-11-18T22:11:42.695512+00:00
1,603,799,757,000
86eb468596be68b86333aec3205a790a76c80964
3
{ "blob_id": "86eb468596be68b86333aec3205a790a76c80964", "branch_name": "refs/heads/main", "committer_date": 1603799757000, "content_id": "6f883fef4726fdc7ef98c1ba73c77a5d16caf4a8", "detected_licenses": [ "MIT" ], "directory_id": "5cc56a337ae269ec960ce93218824c307c218307", "extension": "py", "file...
2.796875
stackv2
# created by rvcgeeks <github.com/rvcgeeks> (linkedin.com/in/rvchavadekar) @ Pune, India from django.db import models from re import fullmatch class UserManager(models.Manager): def validator(self, postData): errors = {} name_regx = r"^[a-zA-Z ,.'-]{2,}$" # name should be greater than 2 chars ...
35
42.43
166
12
402
python
[{"finding_id": "codeql_py/redos_c8f1c3042497873f_63dbf80c", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with 'a' and containing many repetition...
2
true
[ "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with 'a' and containing many repetitions of 'a'.", "This part of the regular expression may cause exponential backtracking on strings starting with 'a@a' and containing many repetitions of 'a'." ]
[ 17, 17 ]
[ null, null ]
[ 39, 55 ]
[ 42, 58 ]
2024-11-18T22:23:58.427155+00:00
1,400,395,651,000
75b4255bcd304ffd644683798895f9ca3d638864
3
{ "blob_id": "75b4255bcd304ffd644683798895f9ca3d638864", "branch_name": "refs/heads/master", "committer_date": 1400395651000, "content_id": "84242a582c5ebd2c12c2a7f7bfa13b3aa2909824", "detected_licenses": [ "MIT" ], "directory_id": "bd2cbb06731631c933bd6f42689d25fc10a978de", "extension": "py", "fi...
2.984375
stackv2
# coding=utf8 """renderer to render data with jinja2 templates""" from . import charset from .exceptions import JinjaTemplateNotFound from jinja2 import Environment, FileSystemLoader from jinja2.exceptions import TemplateNotFound class Renderer(object): def initialize(self, templates_path, global_data): ...
47
31.64
72
15
311
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_e0281e756b2b1b22_f03e9536", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 21 ]
[ null ]
[ 20 ]
[ 72 ]
2024-11-18T22:24:12.742980+00:00
1,572,902,953,000
86ec344dfdc82c969f21bb2c5240bb4eaa8d6686
3
{ "blob_id": "86ec344dfdc82c969f21bb2c5240bb4eaa8d6686", "branch_name": "refs/heads/master", "committer_date": 1572902953000, "content_id": "bbbaf7b76a9e86534802b57426c5f15d3c8b9b39", "detected_licenses": [ "MIT" ], "directory_id": "ea4f3d9b089e4389e9b853046c9b3767d27571f7", "extension": "py", "fi...
2.734375
stackv2
import cv2 capture = cv2.videoCapture(0) ret,frame = capture.read(0) def getFaceBox(net, frame, conf_threshold=0.7): frameOpencvDnn = frame.copy() frameHeight = frameOpencvDnn.shape[0] frameWidth = frameOpencvDnn.shape[1] blob = cv2.dnn.blobFromImage(frameOpencvDnn, 1.0, (300, 300), [104, 117, 123], T...
53
35.85
110
16
678
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_68efd8011d488d9f_fb8890ff", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 36, 37 ]
[ null, null ]
[ 7, 7 ]
[ 47, 35 ]
2024-11-18T22:24:25.551099+00:00
1,529,603,659,000
12bfcfee1327da25a429c5c5d55598e7704131d5
3
{ "blob_id": "12bfcfee1327da25a429c5c5d55598e7704131d5", "branch_name": "refs/heads/master", "committer_date": 1529603659000, "content_id": "cec966a21e203a7368b3a5103060ba4340fc3c3a", "detected_licenses": [ "MIT" ], "directory_id": "dd134b5d9c8981e29701aff52f7ea7f71bddf8e5", "extension": "py", "fi...
2.671875
stackv2
#!/usr/bin/env python from __future__ import print_function from builtins import input, range, bytes import getpass # Portable password input import hashlib # for md5, sha256 import logging import sys import time import requests import lxml.html from cookiebake import * logging.basicConfig( level=logging.INFO,...
195
30.61
135
15
1,644
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_2bc30ef104f703a2_da27f9cc", "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...
4
true
[ "CWE-327", "CWE-327", "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\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...
[ 57, 58, 59, 60 ]
[ null, null, null, null ]
[ 19, 19, 16, 16 ]
[ 30, 29, 27, 26 ]