added
stringlengths
32
32
created
int64
1,236B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.03
source
stringclasses
1 value
text
stringlengths
330
19.3k
num_lines
int64
16
648
avg_line_length
float64
15.5
59.3
max_line_length
int64
37
179
ast_depth
int64
8
38
length
int64
102
3.79k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
1.11k
276k
sast_codeql_findings_count
int64
1
33
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
cwe_ids
listlengths
1
33
rule_ids
listlengths
1
33
confidences
listlengths
1
33
severities
listlengths
1
33
messages
listlengths
1
33
line_starts
listlengths
1
33
line_ends
listlengths
1
33
column_starts
listlengths
1
33
column_ends
listlengths
1
33
2024-11-19T03:00:17.312684+00:00
1,634,247,715,000
627adee9bb06f74eb67421eff959b3a8b1fab58c
3
{ "blob_id": "627adee9bb06f74eb67421eff959b3a8b1fab58c", "branch_name": "refs/heads/master", "committer_date": 1634247715000, "content_id": "04aa5b4a687f7ada8f623b6800b188e269e783d5", "detected_licenses": [ "MIT" ], "directory_id": "7d4c4d929538c8cc7080a31ace02e72d9f99a420", "extension": "py", "fi...
2.5625
stackv2
import json import os import enum import random from typing import Dict, Any, List, Optional from jinja2 import Template from .drills import Drill __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))) class SupportedTranslation(enum.Enum): INCORRECT_ANSWER = "INCORRECT_ANSWER" ...
139
25.17
127
15
1,071
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_d8e21fc2fb1ac62b_fc0d7045", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/jinja2/autoescape-false", "py/jinja2/autoescape-false" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 49, 53 ]
[ null, null ]
[ 16, 20 ]
[ 33, 36 ]
2024-11-19T03:11:29.776483+00:00
1,618,580,752,000
fb914bb12652bd51b979ff43889631674a6b9de9
2
{ "blob_id": "fb914bb12652bd51b979ff43889631674a6b9de9", "branch_name": "refs/heads/master", "committer_date": 1618580752000, "content_id": "c3363cc991da1ba252d3308522b29906839b5b9b", "detected_licenses": [ "MIT" ], "directory_id": "eac6619efd32cfb4c65b1514b8347e236b957791", "extension": "py", "fi...
2.46875
stackv2
import copy import importlib import itertools import json import os from jsonschema import validate from jinja2 import Template from .parameter_generators import parameter_generators def read_benchmark(path: str): directory = os.path.dirname(path) with open(path) as json_file: benchmark = json.load...
93
37.46
119
19
703
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_57bf637b1987ac78_fe2f61b8", "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." ]
[ 67 ]
[ null ]
[ 24 ]
[ 92 ]
2024-11-19T03:12:04.537202+00:00
1,614,167,394,000
bde8610cbd9df3f62ee508de64a7eed427f3ca31
3
{ "blob_id": "bde8610cbd9df3f62ee508de64a7eed427f3ca31", "branch_name": "refs/heads/master", "committer_date": 1614167394000, "content_id": "5d39c241af4783bf97e92225870d4b187d5817f0", "detected_licenses": [ "MIT", "Apache-2.0" ], "directory_id": "59952362f0ce1f7f012882e555cc61b13bbebe84", "exten...
2.59375
stackv2
import os import re import time import subprocess import json import shutil from flask import Flask, request, jsonify from werkzeug.utils import secure_filename import sqlite3 app = Flask(__name__) app.config['UPLOAD_PATH'] = '/tmp' @app.route('/', methods=['GET']) def execute(): ''' Entrypoint for HTTP call ...
93
26.41
97
14
584
python
[{"finding_id": "codeql_py/command-line-injection_68fb52ae16e04cb8_d76eb534", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {...
1
true
[ "CWE-078" ]
[ "py/command-line-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This command line depends on a [user-provided value](1)." ]
[ 63 ]
[ null ]
[ 26 ]
[ 35 ]
2024-11-19T03:25:18.588693+00:00
1,618,393,537,000
497476a515e530c760a235569e269f67228125bf
3
{ "blob_id": "497476a515e530c760a235569e269f67228125bf", "branch_name": "refs/heads/main", "committer_date": 1618393673000, "content_id": "8f820596bfd11f6edd3a1141937b9a959fe30f52", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "339d08ed70022de9b43692d9785c57859f2d5a70", "extension": "py"...
2.75
stackv2
# This function is used to collect the metadata of the GSV panoramas based on the sample point shapefile # Copyright(C) Xiaojiang Li, Ian Seiferling, Marwa Abdulhai, Senseable City Lab, MIT API_KEY="AIzaSyAm-tBwVc6PmbL6DDdL2XY9C8cfEp63Pwg" from datetime import datetime import requests def GSVpanoMetadataCollector(...
194
35.05
142
17
1,891
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_573dc3ea082e8293_e1161949", "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."...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 112, 101, 102, 110 ]
[ null, null, null, null ]
[ 36, 27, 27, 23 ]
[ 43, 37, 35, 114 ]
2024-11-19T03:25:21.744746+00:00
1,398,763,007,000
68b38f515f9bb130d19fa7599431a70fd7d80928
2
{ "blob_id": "68b38f515f9bb130d19fa7599431a70fd7d80928", "branch_name": "refs/heads/master", "committer_date": 1398763007000, "content_id": "0a727aa22afa90afbb0f1ad69d62d1451409a716", "detected_licenses": [ "MIT" ], "directory_id": "72e4d77bdde360a78fb95f9d2d2259c4fab32c26", "extension": "py", "fi...
2.34375
stackv2
# -*- coding: utf-8 -*- import argparse import os import sys from difflib import get_close_matches from getpass import getpass import copypaste from onepyssword.logic import ( get_keychain_items, get_encryption_key, unlock_encryption_key, load_keychain_item_data, decrypt_keychain_item_password, ) from onepys...
113
28.5
78
15
758
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bebfb050e302c6e0_358a7c23", "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." ]
[ 48 ]
[ null ]
[ 22 ]
[ 46 ]
2024-11-19T03:35:46.128570+00:00
1,629,145,053,000
31fcd9c678348597beb440b586b518e41628f51b
2
{ "blob_id": "31fcd9c678348597beb440b586b518e41628f51b", "branch_name": "refs/heads/main", "committer_date": 1629145053000, "content_id": "127de70dd8954a73dbf9c6ac83d57dd98007a78c", "detected_licenses": [ "MIT" ], "directory_id": "34cae71aafb2c4d14a68caddea7875287f48c4e7", "extension": "py", "file...
2.375
stackv2
import os from datetime import datetime import numpy as np from PIL import Image from flask import Flask, request, flash, redirect, render_template from flask_httpauth import HTTPBasicAuth from werkzeug.utils import secure_filename from tutorial.yolo_wrapper import YoloInferenceWrapper from tutorial.utils.utils impor...
80
32.48
96
16
572
python
[{"finding_id": "codeql_py/url-redirection_af7c4795cdab1632_9f3545cb", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
2
true
[ "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 33, 41 ]
[ null, null ]
[ 29, 29 ]
[ 40, 40 ]
2024-11-19T01:28:48.048922+00:00
1,633,435,711,000
c40e9cd302d32521b0f34272989e765becf131b8
2
{ "blob_id": "c40e9cd302d32521b0f34272989e765becf131b8", "branch_name": "refs/heads/main", "committer_date": 1633435711000, "content_id": "e4f4a53f2b6e71fc7ff5a64f4a4c36e3a2e16d72", "detected_licenses": [ "Apache-2.0" ], "directory_id": "966dc0a05e62af71d139a86217ed76606186f6d7", "extension": "py", ...
2.390625
stackv2
from __future__ import absolute_import from functools import wraps import jwt from flask import Blueprint, request, jsonify, json from flask.globals import current_app, g, session from flask.helpers import make_response, url_for from werkzeug.utils import redirect from backend import Beneficiary, Appointment, Subscr...
132
31.08
144
24
847
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d4513a85cb45fdb8_a4d880be", "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." ]
[ 20 ]
[ null ]
[ 11 ]
[ 22 ]
2024-11-19T01:28:49.948851+00:00
1,628,693,558,000
cb267ed2726755112deb80420315ad81a73ef722
3
{ "blob_id": "cb267ed2726755112deb80420315ad81a73ef722", "branch_name": "refs/heads/main", "committer_date": 1628693558000, "content_id": "000edf890499e8de8cb5663200fdac75bd194ad8", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0d0443bed60eab9202274de666d4d584021df3dc", "extension": "py", ...
3.203125
stackv2
import pandas as pd from GenderDecider import GenderDecider train = pd.read_csv("../../asset/imdb/train.csv", names=["label", "sentence"], sep="\t") gender_distribution_train = {"male": 0, "female": 0, "cannot decide": 0, "no gender": 0} for index, row in train.iterrows(): text = row["sentence"] obj = GenderD...
24
35.46
88
9
228
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_17e3567fb76afef9_c2bf108a", "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." ]
[ 13, 24 ]
[ null, null ]
[ 37, 36 ]
[ 62, 60 ]
2024-11-19T01:29:10.478223+00:00
1,613,707,762,000
acc2552852637f36e0969766d40a8541f2d1cdfd
3
{ "blob_id": "acc2552852637f36e0969766d40a8541f2d1cdfd", "branch_name": "refs/heads/master", "committer_date": 1613707762000, "content_id": "1c42381fa1ef141081328c94ed77762e9634c47f", "detected_licenses": [ "MIT" ], "directory_id": "f730cc9e3420c003c9be01b9118e145c96db39bf", "extension": "py", "fi...
2.703125
stackv2
import os password = '123456' def summon_php(password): f = open('shell.txt','w') f.write("<?php @eval($_POST['") f.write(password) f.write("']); ?>") f.close() os.rename('shell.txt','shell.php') print('[*]生成完毕 R > /shell.php',' password: '+password) while True: cmd = input('...
40
24.98
75
12
241
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_6886fc94e79db8a0_07c55e8f", "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.\...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression 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.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive d...
[ 8, 12, 21, 29 ]
[ null, null, null, null ]
[ 13, 37, 15, 15 ]
[ 21, 62, 73, 42 ]
2024-11-19T01:29:22.031481+00:00
1,559,046,612,000
27566b8394ef2d99f38cc00e1b33b0151692f2e7
2
{ "blob_id": "27566b8394ef2d99f38cc00e1b33b0151692f2e7", "branch_name": "refs/heads/master", "committer_date": 1559046612000, "content_id": "d8a10475efeb263793cec63db52f3adc5e7e3c39", "detected_licenses": [ "MIT" ], "directory_id": "efc297957628e991a36de9f891a6d3fe1e07b7b1", "extension": "py", "fi...
2.34375
stackv2
# 从数据库查询数据 并且传给模板 import hashlib import os import traceback import uuid import flask from flask import render_template, url_for, redirect, request, make_response, session, g, current_app from flask_mail import Message from sqlalchemy import and_, or_ from sqlalchemy.orm import sessionmaker from app import db, mail fr...
297
29.08
119
18
2,583
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_de1bf4b111c638c6_5811f9cb", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
4
true
[ "CWE-312", "CWE-079", "CWE-327", "CWE-022" ]
[ "py/clear-text-logging-sensitive-data", "py/reflective-xss", "py/weak-sensitive-data-hashing", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "Cross-site scripting vulnerability due to a [user-provided value](1).", "[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.", "Th...
[ 56, 68, 265, 281 ]
[ null, null, null, null ]
[ 25, 34, 30, 20 ]
[ 33, 92, 68, 31 ]
2024-11-19T01:29:30.003618+00:00
1,527,830,158,000
e7f07d94b68aee858ddf044d94c93ecad2499110
2
{ "blob_id": "e7f07d94b68aee858ddf044d94c93ecad2499110", "branch_name": "refs/heads/master", "committer_date": 1527830158000, "content_id": "9ec3f89a8940964138acdbf955febd5bedf34fa9", "detected_licenses": [ "MIT" ], "directory_id": "5b62139a4c35eebb17eec8d5d9c9511daf72bf17", "extension": "py", "fi...
2.359375
stackv2
from flask import render_template, flash, redirect, url_for, request from app import app from app.forms import SubmissionForm, LoginForm, RegistrationForm, EditForm from app.models import Post, User from app import db from flask_login import login_user, logout_user, current_user, login_required @app.route('/') @app.r...
124
35.11
115
16
956
python
[{"finding_id": "codeql_py/url-redirection_6ee1d06664aca2f7_b97da89b", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
1
true
[ "CWE-601" ]
[ "py/url-redirection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 83 ]
[ null ]
[ 25 ]
[ 34 ]
2024-11-19T01:29:32.980026+00:00
1,567,749,454,000
890589aa990230f4106c6a421082a33f18967984
3
{ "blob_id": "890589aa990230f4106c6a421082a33f18967984", "branch_name": "refs/heads/master", "committer_date": 1567749454000, "content_id": "e4a5a0bf86056ab4be6aa17d1e062ae52eaf2870", "detected_licenses": [ "MIT" ], "directory_id": "20e04d3becbcf6129a63a3cfb5d30d5b50bfadeb", "extension": "py", "fi...
3.015625
stackv2
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import os print(os.listdir("DataSample")) sns.set_palette('viridis') sns.set_style('whitegrid') np.random.seed(42) train_df = pd.read_csv('DataSample/train.csv') test_df = pd.read_csv('DataSample/test.csv') train_df.info() trai...
59
35.66
133
13
530
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9855e84b332ec02c_db560214", "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." ]
[ 26 ]
[ null ]
[ 7 ]
[ 24 ]
2024-11-19T01:30:15.443150+00:00
1,475,323,048,000
0924bfd7477b63078c2350e76715ecb7869b0413
2
{ "blob_id": "0924bfd7477b63078c2350e76715ecb7869b0413", "branch_name": "refs/heads/master", "committer_date": 1475323048000, "content_id": "d85e8add3e1ad01aaceab8b3b369c919310b38ce", "detected_licenses": [ "MIT" ], "directory_id": "592c5bfe97d715f33592fca4a5ceefb09b9300a1", "extension": "py", "fi...
2.421875
stackv2
# -*- coding: utf-8 -*- from hashlib import sha256 import time import math from main import PASSWORD_SALT def generate_password_hash(password): password = sha256(password.encode("utf-8")).hexdigest() password = "".join([password, PASSWORD_SALT]) return sha256(password).hexdigest() def uniqid(): lo...
18
23.44
96
13
120
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_79b8f0f538121e4c_9fa999f2", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational...
[ 11, 13 ]
[ null, null ]
[ 23, 19 ]
[ 47, 27 ]
2024-11-19T01:30:32.662956+00:00
1,417,576,327,000
23ab2012011c9ebac9e9aaef4a7cd3a7a1fcdc7a
3
{ "blob_id": "23ab2012011c9ebac9e9aaef4a7cd3a7a1fcdc7a", "branch_name": "refs/heads/master", "committer_date": 1417576327000, "content_id": "e0127a0bbdb7893ef5e65c61349d79d3118ec1ac", "detected_licenses": [ "MIT", "BSD-3-Clause" ], "directory_id": "94ce69aaffa946d6792ad640ef790bb91ee86808", "ext...
2.796875
stackv2
# -*- coding: utf-8 -*- """Validation functions for various types of data.""" import re from marshmallow.compat import basestring from marshmallow.exceptions import ValidationError URL_REGEX = re.compile( r'^(?:http|ftp)s?://' # http:// or https:// r'(?:[^:@]+?:[^:@]*?@|)' # basic auth r'(?:(?:[A-Z0-9](...
225
32.61
89
15
2,094
python
[{"finding_id": "codeql_py/redos_52124689d27887ce_f529c769", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitio...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with '\"' and containing many repetitions of '\\\\013'." ]
[ 50 ]
[ null ]
[ 10 ]
[ 85 ]
2024-11-19T01:30:34.003364+00:00
1,535,373,071,000
ce53ed26e30a4465bb65333e6c6d568c3841fc67
2
{ "blob_id": "ce53ed26e30a4465bb65333e6c6d568c3841fc67", "branch_name": "refs/heads/master", "committer_date": 1535373071000, "content_id": "426a8ce8fa150f9ff274ceff841d2abb8c274a8e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4e8216e3b932f443c2d9bbc397775a265be0aabd", "extension": "py"...
2.40625
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- """ An loader tool to simulate grafana dashboard queries against prometheus. Usage: python prometheusLoader.py -f ./qs.txt -i 20 -t 50 -p 15 > /dev/null 2>&1 & Log: /tmp/prometheus_loader.log """ import logging import os import requests import random import time import argpa...
160
34.93
79
17
1,174
python
[{"finding_id": "codeql_py/request-without-cert-validation_87a46ef1dbe8515a_157a7f37", "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)." ]
[ 136 ]
[ null ]
[ 19 ]
[ 72 ]
2024-11-19T01:30:37.004047+00:00
1,591,392,455,000
a446e74988a46c00ab467cf69fc453d2b18ac806
3
{ "blob_id": "a446e74988a46c00ab467cf69fc453d2b18ac806", "branch_name": "refs/heads/master", "committer_date": 1591392455000, "content_id": "f9cdc8656c412dfb71b21b96687dd7a9c5b837ec", "detected_licenses": [ "MIT" ], "directory_id": "6c84adfd2ab03247e0042584f258455102c34a44", "extension": "py", "fi...
2.890625
stackv2
import re, sys #sample = '^ENWWW(NEEE|SSE(EE|N))SSWE(S|)$' sample = '^ENNWSWW(NEWS|)SSSEEN(WNSE|)EE(SWEN|)NNN$' #sample = '^ESSWWN(E|NNENN(EESS(WNSE|)SSS|WWWSSSSE(SW|NNNE)))$' regex = re.compile(r'(\w+)') bracketed = re.compile(r'\((\w*\|?)*\)') final = re.compile(r'^((\)|\|)*\$)') #bracketed = re.compile(r'\(([^()]|...
94
23.9
63
16
715
python
[{"finding_id": "codeql_py/redos_e0f6ac63db9bbe12_119412ac", "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 'a'." ]
[ 8 ]
[ null ]
[ 29 ]
[ 32 ]
2024-11-19T01:43:05.561929+00:00
1,587,491,994,000
cedae8618b6781ddac0348af16e35add3496d11a
2
{ "blob_id": "cedae8618b6781ddac0348af16e35add3496d11a", "branch_name": "refs/heads/master", "committer_date": 1587491994000, "content_id": "e9705794f9a5cdc9282cc4dcdf6cbd1c7735598e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "f2416e179125ef80e1c94d03bbbc79c335a61e8e", "extension": "p...
2.484375
stackv2
''''This module is for starting a Flask website for exaBGP demo Author: Karthik Kumaravel Contact: kkumara3@cisco.com ''' from flask import Flask, render_template, request, jsonify import requests import json import sys import os import ConfigParser from solenoid import CiscoGRPCClient from solenoid import JSONRestCa...
149
32.23
105
17
1,114
python
[{"finding_id": "codeql_py/flask-debug_d861901ea9563a14_2094503f", "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)." ]
[ 147, 70 ]
[ null, null ]
[ 5, 24 ]
[ 52, 35 ]
2024-11-19T01:55:29.790334+00:00
1,605,124,570,000
04d26d430abebb36a2768af7087c97ab78a10a4b
3
{ "blob_id": "04d26d430abebb36a2768af7087c97ab78a10a4b", "branch_name": "refs/heads/master", "committer_date": 1605124570000, "content_id": "56bebb8cd94157bcc005bea524cc23bab9e12cc8", "detected_licenses": [ "MIT" ], "directory_id": "ebef9ce0591ec550ce3c8c4366dd5c184538f220", "extension": "py", "fi...
3.21875
stackv2
import random import string adjectives = ['cubic', 'fragrant', 'rough', 'wet', 'calm', 'hairy', 'sleepy', 'slow', 'hot', 'cold', 'big', 'red', 'orange', 'yellow', 'green' ] nouns = ['apple', 'dinosaur', 'ball', 'goat', 'dragon', 'car', 'car', 'eggplant ', 'jelly', 'sugar', 'avocado...
25
30.76
70
12
224
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_003085cb43242a28_5ddddfce", "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." ]
[ 17 ]
[ null ]
[ 15 ]
[ 42 ]
2024-11-19T02:06:41.077116+00:00
1,545,155,049,000
971a60bdf3122c1a0eeeb6b0c68d0453c4147320
3
{ "blob_id": "971a60bdf3122c1a0eeeb6b0c68d0453c4147320", "branch_name": "refs/heads/master", "committer_date": 1545155049000, "content_id": "c72a85d9a196be9ad69c2f92edb7533fdea5168c", "detected_licenses": [ "MIT" ], "directory_id": "0c0e6e78c3c6230133af568f15d08d3441534de4", "extension": "py", "fi...
2.703125
stackv2
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer import cgi import os import urllib2 import hashlib import collections import threading class webServerHandler(BaseHTTPRequestHandler): def compare(self,x,y) : return collections.Counter(x) == collections.Counter(y) def validate_cach...
69
30.64
111
18
467
python
[{"finding_id": "codeql_py/full-ssrf_2ad43f920238883e_e8736d5a", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
2
true
[ "CWE-918", "CWE-918" ]
[ "py/full-ssrf", "py/full-ssrf" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1).", "The full URL of this request depends on a [user-provided value](1)." ]
[ 19, 38 ]
[ null, null ]
[ 20, 24 ]
[ 46, 50 ]
2024-11-19T02:06:43.193598+00:00
1,524,805,131,000
382444b312e5a6fc11d085ee108a4143ee36b0d3
3
{ "blob_id": "382444b312e5a6fc11d085ee108a4143ee36b0d3", "branch_name": "refs/heads/master", "committer_date": 1524805131000, "content_id": "2c60ec4e2b7a51a49f5bfbbd5ffc19d072227da9", "detected_licenses": [ "MIT" ], "directory_id": "9faf9845fe3a412db8a5f1a9a785d9c0a28c56a8", "extension": "py", "fi...
2.703125
stackv2
# pylint: disable=import-error import logging from urlparse import urlparse import json from curling.sites.gsoc import Gsoc from curling.sites.tsn import Tsn class Scraper(object): def __init__(self): self.sites = [] @staticmethod def init_site_from_url(url): """Factory method for gett...
46
23.83
62
14
257
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_fb4b25b1b44b3aa9_786171e0", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [thegrandslamofcurling.com](1) may be at an arbitrary p...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [thegrandslamofcurling.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 22 ]
[ null ]
[ 14 ]
[ 58 ]
2024-11-19T02:06:44.390358+00:00
1,587,260,951,000
699a72dc8786a50b9f55640a484a7536fb239a36
3
{ "blob_id": "699a72dc8786a50b9f55640a484a7536fb239a36", "branch_name": "refs/heads/master", "committer_date": 1587260951000, "content_id": "da665b2fcdced90104411876dfea157f94285c9f", "detected_licenses": [ "MIT" ], "directory_id": "655b80c7f0b02777783a9bbc88f82a281b9e7add", "extension": "py", "fi...
2.515625
stackv2
#!/usr/bin/env python import sys, os, re, shutil from pathlib import Path import plasTeX.Renderers.HTML5 from plasTeX.Renderers import Renderer as BaseRenderer from plasTeX.Renderers import Renderable as _Renderable from plasTeX.Logging import getLogger import pyduktape import jinja2 ctx = pyduktape.DuktapeContext() ...
268
33.34
130
24
1,993
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_15ea794f9e00e2a3_31a914c5", "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." ]
[ 34 ]
[ null ]
[ 11 ]
[ 60 ]
2024-11-19T02:07:17.510968+00:00
1,596,093,948,000
7d6bc6f824f94b2b4914780163c9c34f24aa19e7
3
{ "blob_id": "7d6bc6f824f94b2b4914780163c9c34f24aa19e7", "branch_name": "refs/heads/master", "committer_date": 1596093948000, "content_id": "fe95ca4c8a6582c152bfa1cd462af105bbcc01b2", "detected_licenses": [ "MIT" ], "directory_id": "3284a3b709ed69c0b4cd7a9cd8f292b84dadc3e2", "extension": "py", "fi...
2.71875
stackv2
from flask import Flask,request, url_for, redirect, render_template from bs4 import BeautifulSoup import re import requests import heapq from textblob import TextBlob from nltk.tokenize import sent_tokenize,word_tokenize app = Flask(__name__) @app.route('/') def home(): return render_template("index.html") @app.r...
100
29.98
146
19
721
python
[{"finding_id": "codeql_py/overly-large-range_08cc38ee77087da9_b98b072c", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A...
3
true
[ "CWE-020", "CWE-215", "CWE-918" ]
[ "py/overly-large-range", "py/flask-debug", "py/full-ssrf" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "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 v...
[ 44, 100, 24 ]
[ null, null, null ]
[ 29, 5, 11 ]
[ 32, 24, 44 ]
2024-11-19T02:31:36.227115+00:00
1,691,007,356,000
0a70a644dae51667591afd698cc516b20dc7fbba
3
{ "blob_id": "0a70a644dae51667591afd698cc516b20dc7fbba", "branch_name": "refs/heads/main", "committer_date": 1691007356000, "content_id": "94f02c3546e51e7b537a9762ea3b957c28539feb", "detected_licenses": [ "ECL-2.0" ], "directory_id": "c5cfdd597888fa2281cf7169b914203454c8f14e", "extension": "py", "...
2.5625
stackv2
#!/usr/bin/env python """ Usage: create_koha_csv.py <prox_report.csv> --end <YYYY-MM-DD> Options: --end=DATE last day of the semester in YYYY-MM-DD format This script takes JSON data from Workday and maps it into a format appropriate for import into Koha. We run it once per semester just prior to the semeste...
273
36.86
81
21
2,427
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_13a0484717752926_a1afb659", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 203 ]
[ null ]
[ 15 ]
[ 21 ]
2024-11-19T02:31:43.617827+00:00
1,525,357,430,000
72714a46c1006a3ad0e44e42abce14708d9955bc
3
{ "blob_id": "72714a46c1006a3ad0e44e42abce14708d9955bc", "branch_name": "refs/heads/master", "committer_date": 1525357430000, "content_id": "f3a394f05e040771e60a56652c4a346e71522e23", "detected_licenses": [ "MIT" ], "directory_id": "0a741d2ef6ccbd455bd320e03b461960b4ec8b7b", "extension": "py", "fi...
2.6875
stackv2
from PyQt5.QtWidgets import QWidget, QLabel, QTextEdit, QGridLayout from PyQt5.QtGui import QPixmap import configparser import requests import time import random import hmac, hashlib, base64, json, binascii class AnalysisWindow(QWidget): def __init__(self, filename, x, y): super().__init__() self....
92
31.96
130
19
775
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_aa49eb7b00dfedbc_edc89a36", "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." ]
[ 57 ]
[ null ]
[ 52 ]
[ 76 ]
2024-11-19T02:31:50.155781+00:00
1,632,478,104,000
0f926f51d0b00b51873aa25dec74cd2f5e40e232
2
{ "blob_id": "0f926f51d0b00b51873aa25dec74cd2f5e40e232", "branch_name": "refs/heads/main", "committer_date": 1632478104000, "content_id": "c9c4a1a0d1724986b1beddd7d00a87e19ac2deec", "detected_licenses": [ "MIT" ], "directory_id": "4d28f71816133e0febe0b60271ec8d807ea574f2", "extension": "py", "file...
2.421875
stackv2
from flask import render_template,redirect,url_for,request,flash from .forms import LoginForm,RegisterForm from flask_login import login_user,logout_user,login_required from . import auth from .. import db from ..models import User @auth.route('/login',methods=['GET','POST']) def login(): form = LoginForm() if...
37
31.7
106
16
258
python
[{"finding_id": "codeql_py/url-redirection_88bf4df666282d1a_06f3f6a2", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
1
true
[ "CWE-601" ]
[ "py/url-redirection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 15 ]
[ null ]
[ 29 ]
[ 80 ]
2024-11-19T02:31:57.219461+00:00
1,608,412,793,000
3b02b0ae48928c8e0340d7d405be41c82da0e6cc
3
{ "blob_id": "3b02b0ae48928c8e0340d7d405be41c82da0e6cc", "branch_name": "refs/heads/master", "committer_date": 1608412793000, "content_id": "802825e887a97211dca9b76c7a215cd7501da9ff", "detected_licenses": [ "MIT" ], "directory_id": "2343561258b262a39c2f245faaa1b390328d1e34", "extension": "py", "fi...
2.546875
stackv2
#!/usr/bin/env python3 import gitlab import os import yaml from jinja2 import Template, Undefined, Environment from jinja2_base64_filters import jinja2_base64_filters import xmlplain class NullUndefined(Undefined): def __getattr__(self, key): return '' class Gitlab: __instance = None @staticmethod ...
119
27.72
85
17
847
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_2015fc1c97439ce3_48513d41", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/jinja2/autoescape-false", "py/jinja2/autoescape-false" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 40, 103 ]
[ null, null ]
[ 9, 15 ]
[ 53, 78 ]
2024-11-19T02:32:06.032149+00:00
1,672,121,759,000
fd598e12327345931a8be27637a82c290f4f9bdf
3
{ "blob_id": "fd598e12327345931a8be27637a82c290f4f9bdf", "branch_name": "refs/heads/master", "committer_date": 1672121759000, "content_id": "0f2b1f431852bffa0e364c8a6bcad88ad1bd053b", "detected_licenses": [ "MIT" ], "directory_id": "7e46658f6b16d6564b095158151cc1ecb066bebb", "extension": "py", "fi...
2.546875
stackv2
from pathlib import Path import sys from typing import Any, Dict from jinja2 import Environment, FileSystemLoader from advent import data NUMBER_OF_LATEST_PUBLISHED_ENTRIES = 10 root_dir = Path(__file__).parent.parent data_dir = root_dir / "data" source_dir = root_dir / "source" output_dir = root_dir / "output" lo...
66
26.39
76
13
447
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_214ebef596a2d1b9_b6cf4c28", "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 ]
[ 33 ]
2024-11-19T02:32:16.038244+00:00
1,689,092,321,000
8719dbd625af889232b2b873959ca157cced366e
3
{ "blob_id": "8719dbd625af889232b2b873959ca157cced366e", "branch_name": "refs/heads/master", "committer_date": 1689092321000, "content_id": "e7eb2149fb4decc02bc62aac857c2b6461df3a08", "detected_licenses": [ "MIT" ], "directory_id": "eec52b39ff7b2012624dc421bf8fadac08f9c8bc", "extension": "py", "fi...
2.921875
stackv2
import logging import os import shutil import json from jinja2 import Environment, FileSystemLoader def format_matches(matches, dir): """Function receives similarity detection and returns user friendly results of similarity detection. :param matches: Similarity detection results in JSON format ...
91
36.46
81
16
709
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_33e22f3fa1f9c12e_5fc5102f", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 22 ]
[ null ]
[ 11 ]
[ 42 ]
2024-11-19T02:32:16.604200+00:00
1,432,829,787,000
c1efb12ee291a20aab069a04d4dcf286d8187eb7
3
{ "blob_id": "c1efb12ee291a20aab069a04d4dcf286d8187eb7", "branch_name": "refs/heads/master", "committer_date": 1432829787000, "content_id": "45931545c4c285ac562ca672d36e138847c12621", "detected_licenses": [ "MIT" ], "directory_id": "22d94ebcc6ae8cf89e44e403709d869ae2cd04b6", "extension": "py", "fi...
2.671875
stackv2
""" web cam controller for tracking slime molds University of Applied Sciences Potsdam (Germany) @idpotsdam author: fabiantheblind license: MIT """ import sys # we need this to exit if the GPIO lib is not present import time # just for testing purpose import datetime # for timestamps import os # for path checking impo...
122
30.48
141
11
1,060
python
[{"finding_id": "codeql_py/overly-permissive-file_9d3452dd606bed06_fe99703a", "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." ]
[ 107 ]
[ null ]
[ 9 ]
[ 33 ]
2024-11-19T02:32:23.342817+00:00
1,581,596,209,000
6f107b1a9035bc22042c12b1b59078214a6cec1e
2
{ "blob_id": "6f107b1a9035bc22042c12b1b59078214a6cec1e", "branch_name": "refs/heads/master", "committer_date": 1581596209000, "content_id": "6d2e91e86b9bf5f9772ba9bf2b148b76b45537cb", "detected_licenses": [ "MIT" ], "directory_id": "2de0cdf70b99e5579f6f6991327914ebf996cb93", "extension": "py", "fi...
2.359375
stackv2
# -*- coding: utf-8 -*- # Copyright (c) 2012-2019, Anima Istanbul # # This module is part of anima and is released under the MIT # License: http://www.opensource.org/licenses/MIT import os import nuke from nukescripts import * from anima.env import empty_reference_resolution from anima.env.base import EnvironmentBase ...
427
32.07
111
24
2,910
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_160e87264b357de6_60ebea2c", "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." ]
[ 413 ]
[ 420 ]
[ 20 ]
[ 13 ]
2024-11-19T02:32:41.771660+00:00
1,497,381,244,000
a957389336747ee383fa07564b2bd91b1d50fa22
3
{ "blob_id": "a957389336747ee383fa07564b2bd91b1d50fa22", "branch_name": "refs/heads/master", "committer_date": 1497381244000, "content_id": "b0a830bcc8e089992da6ddfe2c9454524fcf5412", "detected_licenses": [ "MIT" ], "directory_id": "b65e666f19ca91a4d25f416e8c6a55f4eeec0859", "extension": "py", "fi...
3.203125
stackv2
from hashlib import sha512 import datetime as dt import sys import os class PwdGen: hashDict = ('abcdefghijklmnopqrstuvwyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' '0123456789!@#$%^&*()-_') maxSize = 100 outSize = 0 workFactor = 0 masterKey = 'empty' def __init__(self): print("Password Generator Initialized...\...
103
26.36
97
21
797
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_783af7425e3d72da_db477da5", "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-327" ]
[ "py/clear-text-logging-sensitive-data", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 96, 78 ]
[ null, null ]
[ 8, 17 ]
[ 59, 35 ]
2024-11-19T02:32:48.774428+00:00
1,610,173,326,000
654fae2920514b0223ed8c280f6d6af341255bed
3
{ "blob_id": "654fae2920514b0223ed8c280f6d6af341255bed", "branch_name": "refs/heads/master", "committer_date": 1610173326000, "content_id": "28d1ee9e57bfbcb8e097eac8c59401bc1995db3a", "detected_licenses": [ "MIT" ], "directory_id": "da5993888e0b9a20f50f6fc9f6bbc853627cba77", "extension": "py", "fi...
2.5625
stackv2
# noinspection PyPackageRequirements import json import os import discord import requests # noinspection PyPackageRequirements from discord.ext import commands API_KEY = os.getenv("CLEVERBOT_API_KEY") class CleverbotCog(commands.Cog, name="Cleverbot"): def __init__(self, bot): self.bot = bot se...
70
35.27
113
18
536
python
[{"finding_id": "codeql_py/request-without-cert-validation_6ba3699c21a686fc_316a3f2d", "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)." ]
[ 34, 58 ]
[ 37, 63 ]
[ 17, 17 ]
[ 14, 14 ]
2024-11-19T02:43:29.879244+00:00
1,389,672,229,000
aa8349568fc8dec60cbbdaa10f673792fd243c98
3
{ "blob_id": "aa8349568fc8dec60cbbdaa10f673792fd243c98", "branch_name": "refs/heads/master", "committer_date": 1389672229000, "content_id": "c30890f737f500c63573a5b7eb28a6fcfe15787e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "06ed6bdd06713645810342bf7a69411b98e506a9", "extension": "py"...
2.640625
stackv2
from urlparse import urlparse from tinycss.css21 import CSS21Parser import sys import classes.HtmlPage as HtmlPage import classes.PagePrinter as PagePrinter import os filePath = os.path.dirname(os.path.realpath(__file__))+'/newcss/' pageCounter = 1 pageObjects = [] pagesVisited = [] cssVisited = [] cssObjects = [] j...
169
28.04
78
18
1,055
python
[{"finding_id": "codeql_py/overly-permissive-file_b0e3e99517449621_07653c31", "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." ]
[ 40 ]
[ null ]
[ 5 ]
[ 24 ]
2024-11-19T02:43:31.935542+00:00
1,507,559,356,000
c3edff79c782b603c04fc8627d46c7b144352af3
2
{ "blob_id": "c3edff79c782b603c04fc8627d46c7b144352af3", "branch_name": "refs/heads/master", "committer_date": 1507559356000, "content_id": "347f482014ed4eaa50be307f063e8d6bfd20bebf", "detected_licenses": [ "MIT" ], "directory_id": "85671f7fbca2258312a4650ed391774cfb37645e", "extension": "py", "fi...
2.34375
stackv2
"""Last.fm Authentication Views""" from hashlib import md5 from pyramid.httpexceptions import HTTPFound from pyramid.security import NO_PERMISSION_REQUIRED import requests from ..api import ( AuthenticationComplete, AuthenticationDenied, register_provider, ) from ..exceptions import ThirdPartyFailure fro...
155
34.1
76
15
1,106
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_bf45fb06bb760942_f4b6c319", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](2) is used in a hashing algorithm (MD5) that is insecure." ]
[ 152 ]
[ null ]
[ 19 ]
[ 42 ]
2024-11-19T02:54:54.090614+00:00
1,592,229,527,000
8b9c0a12cf5224b1b86d77202f697c1edd335e58
2
{ "blob_id": "8b9c0a12cf5224b1b86d77202f697c1edd335e58", "branch_name": "refs/heads/master", "committer_date": 1592229527000, "content_id": "ed9b07a88f095578c4e8d8ed579b1fc3df4c8ee6", "detected_licenses": [ "MIT" ], "directory_id": "7ccbdb2a1511a17a2f590ceddf70a5d47e78a2db", "extension": "py", "fi...
2.4375
stackv2
from flask import Flask, render_template, flash, redirect, url_for, session, request, logging, send_file, send_from_directory from wtforms import Form, StringField, TextAreaField, PasswordField, validators, FloatField from wtforms.validators import Length, Regexp, DataRequired, EqualTo, NumberRange from passlib.hash im...
378
27.99
125
17
2,666
python
[{"finding_id": "codeql_py/path-injection_e55e5d09aa631aba_664d26fe", "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)." ]
[ 275 ]
[ null ]
[ 19 ]
[ 37 ]
2024-11-19T02:55:00.125718+00:00
1,477,021,085,000
0c1fc0d609cd2ca736363a77cc6deb425101f3a1
3
{ "blob_id": "0c1fc0d609cd2ca736363a77cc6deb425101f3a1", "branch_name": "refs/heads/master", "committer_date": 1477099594000, "content_id": "fdad03c61b06fe5e422d8f822c89d813bf144e0d", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "9473783224bdac35359eae6885c2f18b380ea47a", "extension": "p...
3.171875
stackv2
"""Miscellaneous utility and IO functions.""" import os import os.path as op from mne.utils import _fetch_file from subprocess import check_output from zipfile import ZipFile from imp import reload def url_to_interact(url, url_type='data8'): """Create an interact link from a URL in github or data-8.org. Para...
135
35.53
79
16
1,193
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a304ad9c38ff3404_32e05a32", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [github.com](1) may be at an arbitrary position in the ...
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 [github.com](1) may be at an arbitrary position in the sanitized URL.", "The string [data8.org](1) may be at an arbitrary position in the sanitized URL.", "The string [github.com](1) may be at an arbitrary position in the sanitized URL.", "The string [drive.google.com](1) may be at an arbitrary po...
[ 23, 25, 32, 44, 50 ]
[ null, null, null, null, null ]
[ 8, 10, 33, 8, 10 ]
[ 27, 28, 52, 33, 34 ]
2024-11-19T02:55:00.963000+00:00
1,574,827,476,000
f937c92114c6955f5cef3272c7d9169f88f90c1c
4
{ "blob_id": "f937c92114c6955f5cef3272c7d9169f88f90c1c", "branch_name": "refs/heads/master", "committer_date": 1574827476000, "content_id": "c50aa2e61492247259ff31b584ea1c833c848a7d", "detected_licenses": [ "MIT" ], "directory_id": "b5bc3ca5c68d61124e695ad328e3bd6e634555eb", "extension": "py", "fi...
3.8125
stackv2
print('*********************************') print('***Bem vindo ao jogo da Forca!***') print('*********************************') palavra_secreta = 'banana' print('Fim do jogo') certou = False enforcou= False while(not acertou and not errou): chute = input('Qual letra?') ...
22
24.27
80
14
138
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_266b851c3cfb77eb_a4f7eadb", "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." ]
[ 19 ]
[ null ]
[ 23 ]
[ 82 ]
2024-11-19T02:55:03.365035+00:00
1,639,507,880,000
08bdedd8c833a1354ee26115df30a73dd0e1af3d
2
{ "blob_id": "08bdedd8c833a1354ee26115df30a73dd0e1af3d", "branch_name": "refs/heads/master", "committer_date": 1639507880000, "content_id": "314d87c21960a0d5c442ae7f861f165a85c763f7", "detected_licenses": [ "MIT" ], "directory_id": "ffa6c84ccd269691b58e325c8be017160b5b324d", "extension": "py", "fi...
2.40625
stackv2
from flask import Flask from flask import request, redirect from flask import render_template from ReportingService import ReportingService from APIConnectionService import ApiConnectionService from database_service import * rp = ReportingService() db_operations = DatabaseService() app = Flask(__name__) apiService...
192
35.96
125
14
1,604
python
[{"finding_id": "codeql_py/stack-trace-exposure_0607773fa0f11338_ccd5c68e", "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.", "...
6
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-601", "CWE-601" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "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...
[ 22, 45, 143, 158, 54, 110 ]
[ null, null, null, null, null, null ]
[ 16, 16, 16, 16, 25, 21 ]
[ 22, 22, 22, 22, 53, 57 ]
2024-11-19T02:55:03.759482+00:00
1,623,369,146,000
eb310d34f39d3c7d5ba54caec5214f63177b206b
3
{ "blob_id": "eb310d34f39d3c7d5ba54caec5214f63177b206b", "branch_name": "refs/heads/master", "committer_date": 1623369146000, "content_id": "823cafea836c2dd48c2c4445f70061f2da091230", "detected_licenses": [ "MIT" ], "directory_id": "bc6070163646184df2c00ecaed7cef0712fd8a4b", "extension": "py", "fi...
2.625
stackv2
from flask import Blueprint, request, Response, jsonify from app.resources.controller import controller components_bp = Blueprint('components', __name__) @components_bp.route('/') def index(): return {"message": "Hello World!"} @components_bp.route('/data') def show_data(): components = [x.to_json() for x in con...
102
29.47
108
15
821
python
[{"finding_id": "codeql_py/stack-trace-exposure_4b048f123ce4e37e_1d054907", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
2
true
[ "CWE-209", "CWE-079" ]
[ "py/stack-trace-exposure", "py/reflective-xss" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 27, 42 ]
[ null, null ]
[ 12, 12 ]
[ 39, 69 ]
2024-11-19T02:55:04.849169+00:00
1,609,975,561,000
9c3985d851ff34f3ccae0ba62a2222edd8edcaec
3
{ "blob_id": "9c3985d851ff34f3ccae0ba62a2222edd8edcaec", "branch_name": "refs/heads/master", "committer_date": 1609975561000, "content_id": "dfa50e9b657c7aa33a5d2c7fdaf51d70f5e9b77f", "detected_licenses": [ "MIT" ], "directory_id": "ce6abd82fae788673e633469ab9bd720145901f0", "extension": "py", "fi...
2.515625
stackv2
import os from cs50 import SQL from flask import Flask, flash, jsonify, redirect, render_template, request, session from flask_session import Session from tempfile import mkdtemp from werkzeug.exceptions import default_exceptions, HTTPException, InternalServerError from werkzeug.security import check_password_hash, ge...
402
34.34
135
19
3,080
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7744271d16375803_61f56f2b", "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." ]
[ 167 ]
[ null ]
[ 15 ]
[ 43 ]
2024-11-19T02:55:05.728875+00:00
1,502,719,072,000
c7050a8cce4d5c6f0a29a26f179e6eb6a8a23b6b
2
{ "blob_id": "c7050a8cce4d5c6f0a29a26f179e6eb6a8a23b6b", "branch_name": "refs/heads/master", "committer_date": 1502719087000, "content_id": "03f7c25fa055c52a3222342e68df796f1c067e51", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "d5bbe1214017d0895b2813f458df0305533f046c", "extension": "p...
2.3125
stackv2
# -*- coding: utf-8 -*- """ fsnviz.utils ~~~~~~~~~~~~ General utilities. :copyright: (c) 2016 Wibowo Arindrarto <bow@bow.web.id> :license: BSD """ import os import sys from os import path from subprocess import run, PIPE import click from jinja2 import Environment, PackageLoader if sys.version_...
88
30.83
94
12
706
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_033d7b205fadd0c1_df57e12a", "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." ]
[ 23 ]
[ null ]
[ 14 ]
[ 70 ]
2024-11-19T02:55:07.849989+00:00
1,557,169,662,000
9af7cddf7fc36d66efcb87067ae0d63cbc83f66e
3
{ "blob_id": "9af7cddf7fc36d66efcb87067ae0d63cbc83f66e", "branch_name": "refs/heads/master", "committer_date": 1557169662000, "content_id": "1eafe6b072d88ec7ba5c42c013519bd90f8214e2", "detected_licenses": [ "MIT" ], "directory_id": "192f0e76f5daebd2c8d0e03a67b934bccd4ba4a7", "extension": "py", "fi...
2.5625
stackv2
# -*- coding: utf-8 -*- #!/usr/bin/env python27 from findARestaurant import findARestaurant from database_setup import Base, Restaurant from flask import Flask, jsonify, request from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship, sessionmaker from sqlalchemy import create_e...
120
25.2
96
18
678
python
[{"finding_id": "codeql_py/reflective-xss_c1ed65c65d490b71_82ffdecc", "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)." ]
[ 68 ]
[ null ]
[ 16 ]
[ 36 ]
2024-11-19T02:55:11.194459+00:00
1,610,141,710,000
da0f2eaf8f90f2e7341c7ee1f8234a9c8390cfe4
3
{ "blob_id": "da0f2eaf8f90f2e7341c7ee1f8234a9c8390cfe4", "branch_name": "refs/heads/main", "committer_date": 1610141710000, "content_id": "49046626ebea999734b467de37fc2b2ae85d8497", "detected_licenses": [ "MIT" ], "directory_id": "0cc6eeb82e685e715b786b5c99132486a357e6be", "extension": "py", "file...
2.875
stackv2
import math import os import requests from typing import Any import time import numpy as np from pandas.core.frame import DataFrame import pandas as pd from progress_keeper import Progress def timer(func) -> Any: """ Decorator used to time a function call. After function is run, the time of the functio...
274
37.84
112
22
2,315
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_de1fc53ed529bca1_9fff3ada", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
3
true
[ "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p...
[ 112, 114, 125 ]
[ null, null, null ]
[ 21, 19, 13 ]
[ 107, 58, 100 ]
2024-11-19T02:55:15.846799+00:00
1,691,856,617,000
3d1b4453a68b7d09a5d484815c902044321c9b78
3
{ "blob_id": "3d1b4453a68b7d09a5d484815c902044321c9b78", "branch_name": "refs/heads/main", "committer_date": 1691856617000, "content_id": "1e31220c74ba501550c4291e8aae8ec2e21ed413", "detected_licenses": [ "MIT" ], "directory_id": "83b2a26ccbbc3d6307d98ce60b1ed5a331380f42", "extension": "py", "file...
3.46875
stackv2
""" Makes a nice little map in an .html file for viewing in a web browser using a bit of javascript and Leaflet. """ from jinja2 import Template from config import MAP_FOLDER def make_map(df): """ input: df: a Pandas dataframe with the cols [id, lat, lng, name, area_reported, area_calc, result] ...
86
28.55
110
13
692
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_af65509b2c7ac8ff_65e68695", "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." ]
[ 55 ]
[ null ]
[ 16 ]
[ 38 ]
2024-11-19T02:55:18.345483+00:00
1,412,120,430,000
5ee2db922f9c04605af45e7d76feaa71964ea1dd
2
{ "blob_id": "5ee2db922f9c04605af45e7d76feaa71964ea1dd", "branch_name": "refs/heads/master", "committer_date": 1412120430000, "content_id": "2619764d6284662b9c7ef281fd1c1e84871b26fe", "detected_licenses": [ "MIT" ], "directory_id": "5bc8316d5181af712150475b9a6827b0d5a39311", "extension": "py", "fi...
2.328125
stackv2
import jinja2 import os from google.appengine.api import users from cgi import escape import webapp2 from google.appengine.api.users import User from models import Message jinja_environment = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__))) class BaseHandler(webapp2.RequestHandler)...
91
33.42
118
14
695
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_4be2e976b1a545f6_030baa39", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 10 ]
[ 11 ]
[ 21 ]
[ 63 ]
2024-11-19T02:55:30.380438+00:00
1,678,433,610,000
78dfd57129d844f7923516e5138f5cf83285d8c6
3
{ "blob_id": "78dfd57129d844f7923516e5138f5cf83285d8c6", "branch_name": "refs/heads/master", "committer_date": 1678448408000, "content_id": "449ee586c54e7e1248c035e420674a492c3cf64f", "detected_licenses": [], "directory_id": "1fccc3615b400a119e43ee85d10b739430ee17d4", "extension": "py", "filename": "gen...
2.875
stackv2
# greeting.py # # Demonstration of the pyparsing module, on the prototypical "Hello, World!" # example # # Copyright 2003, 2019 by Paul McGuire # import pyparsing as pp import sys from jinja2 import Template, Environment from collections import OrderedDict # define grammar singleLineComment = "#" + pp.restOfLine ident...
26
41.35
131
17
301
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_1c877fca36cd6c8e_4c5e3242", "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 ]
[ 7 ]
[ 36 ]
2024-11-19T02:55:49.118216+00:00
1,689,176,348,000
615ebfe226da0047beb3f6e8843a936074ad8645
3
{ "blob_id": "615ebfe226da0047beb3f6e8843a936074ad8645", "branch_name": "refs/heads/master", "committer_date": 1689176348000, "content_id": "f7984debd651c97a1c8d24a44777143aca8d28a5", "detected_licenses": [ "MIT" ], "directory_id": "43219f285c7985460543ea6afaac73369b8de037", "extension": "py", "fi...
2.84375
stackv2
import requests import json import numpy as np import sys """ This python script is used to get all ec2 instances python3 get_ec2_instances.py 0000000000000000000000000000000000000000000000000000000000000000 """ def get_token_ec2_instances(admin_api_key, env, account_name, i, next_token): # if first time the met...
93
32.42
170
18
805
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bfffdf5daa2ee4d0_e23f6168", "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...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p...
[ 19, 30, 36, 47 ]
[ null, null, null, null ]
[ 19, 19, 19, 19 ]
[ 44, 28, 44, 28 ]
2024-11-19T02:55:52.870098+00:00
1,568,211,909,000
c5e5ac8af929141a0d60cc1c0821ce851a8d5fa1
2
{ "blob_id": "c5e5ac8af929141a0d60cc1c0821ce851a8d5fa1", "branch_name": "refs/heads/master", "committer_date": 1568211909000, "content_id": "8860024679d1ee0117c76d2ee901912cdcb381d0", "detected_licenses": [ "MIT" ], "directory_id": "609a6119be07f1038ddf8e39c576b17355b78ce5", "extension": "py", "fi...
2.359375
stackv2
from flask import render_template, url_for, flash, redirect, request, Blueprint from flask_login import login_user, current_user, logout_user, login_required from app import db, bcrypt from app.models import User, Post from app.users.forms import (RegistrationForm, LoginForm, UpdateAccountForm, ...
125
37.46
94
16
1,103
python
[{"finding_id": "codeql_py/url-redirection_7f526f17ce3b4345_28492931", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
1
true
[ "CWE-601" ]
[ "py/url-redirection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 51 ]
[ null ]
[ 20 ]
[ 29 ]
2024-11-19T02:55:55.085085+00:00
1,621,127,573,000
69f7b85a97f2e5217c065991c062bc09b3c84f74
4
{ "blob_id": "69f7b85a97f2e5217c065991c062bc09b3c84f74", "branch_name": "refs/heads/main", "committer_date": 1621127573000, "content_id": "17fea1284d405ed9fe3a2e5c0950a2f0a8ed0ad5", "detected_licenses": [ "MIT" ], "directory_id": "5c7f87cc3777db8700a98e5b390b6964f1104504", "extension": "py", "file...
3.671875
stackv2
import random def jogar(): imprimirCabecalho() palavraSecreta = carregarPalavraSecreta() letrasCorretas = inicializarPalavraSecreta(palavraSecreta) print(letrasCorretas) enforcou = False acertou = False erros = 0 # Enquanto True while (not enforcou and not acertou): ...
156
24.81
63
13
1,087
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f53e4d14e8d5f36e_de75f8d8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
3
true
[ "CWE-312", "CWE-312", "CWE-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 (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.\nThis expression logs [sensitive data (secre...
[ 11, 30, 86 ]
[ null, null, null ]
[ 11, 15, 11 ]
[ 25, 29, 52 ]
2024-11-19T02:55:59.843739+00:00
1,571,677,010,000
77ada6f2cb55da95a20f75c60ce724f3d6a92734
3
{ "blob_id": "77ada6f2cb55da95a20f75c60ce724f3d6a92734", "branch_name": "refs/heads/master", "committer_date": 1571677010000, "content_id": "d8d93e575d328882485e95a530f6c18898c75452", "detected_licenses": [ "MIT" ], "directory_id": "e09df0659ba2fc86522548aa0d460fd8e9d3e290", "extension": "py", "fi...
2.578125
stackv2
import requests from flask import Flask, request, redirect, url_for from src.classifier import MyTextClassifier from werkzeug.utils import secure_filename import os import json APP_ROOT = os.path.dirname(os.path.abspath(__file__)) UPLOAD_FOLDER = APP_ROOT + "/src/chats" app = Flask(__name__) app.config['UPLOAD_FOLDER...
189
35.12
158
31
1,348
python
[{"finding_id": "codeql_py/flask-debug_285906f467e5150d_29460072", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
4
true
[ "CWE-215", "CWE-918", "CWE-079", "CWE-079" ]
[ "py/flask-debug", "py/full-ssrf", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "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.", "The full URL of this request depends on a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [u...
[ 188, 97, 20, 68 ]
[ null, null, null, null ]
[ 5, 45, 12, 16 ]
[ 50, 78, 31, 50 ]
2024-11-19T03:10:22.534921+00:00
1,555,581,080,000
d2ced1d97969ce1afa63b7fdbe12079166f3af20
3
{ "blob_id": "d2ced1d97969ce1afa63b7fdbe12079166f3af20", "branch_name": "refs/heads/master", "committer_date": 1555581080000, "content_id": "409c85322eb3f32d8764467f11548a0ed8492b06", "detected_licenses": [ "MIT" ], "directory_id": "5b697102ba7b77dd3e730edcbca8d3d4c726c804", "extension": "py", "fi...
2.921875
stackv2
import requests import json import os from operator import itemgetter import re headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.76 Safari/537.36'} api_key="" def load_api_key(file=None): cwd = os.getcwd() secrets_file = "{}/secrets.json".fo...
70
34.49
136
16
640
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dfb67df8ef3ba996_0c99325b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (password)...
[ 44, 70 ]
[ null, null ]
[ 11, 11 ]
[ 66, 105 ]
2024-11-19T03:10:53.371726+00:00
1,670,882,883,000
52964571f3fae4e1cb5b2628b779d0edf7a94236
3
{ "blob_id": "52964571f3fae4e1cb5b2628b779d0edf7a94236", "branch_name": "refs/heads/master", "committer_date": 1670882883000, "content_id": "45354bbf59ae295de012e1fd8a44bd17b09a942b", "detected_licenses": [ "MIT" ], "directory_id": "a50fe00ec40c0014a27d17f24278d13976800e8e", "extension": "py", "fi...
2.609375
stackv2
# coding: utf-8 """ Base para desarrollo de modulos externos. Para obtener el modulo/Funcion que se esta llamando: GetParams("module") Para obtener las variables enviadas desde formulario/comando Rocketbot: var = GetParams(variable) Las "variable" se define en forms del archivo package.json Para modifica...
62
22.32
86
12
344
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6541d24195546fa2_13de9a23", "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." ]
[ 39 ]
[ null ]
[ 15 ]
[ 22 ]
2024-11-19T03:10:55.615741+00:00
1,453,339,854,000
ecb7f2c8e0c5c524b1a94b8ef793278e52984290
3
{ "blob_id": "ecb7f2c8e0c5c524b1a94b8ef793278e52984290", "branch_name": "refs/heads/master", "committer_date": 1453339854000, "content_id": "d8681a3b6a8d2a9dcbb74062923e2a612c9f10d4", "detected_licenses": [ "MIT" ], "directory_id": "3b2d89cc9ec110977529772ed6e86b3d492cbb53", "extension": "py", "fi...
2.96875
stackv2
"""Given a source page on wikipedia, finds the path to the Philosophy page """ from pyquery import PyQuery as pq import re from collections import defaultdict from multiprocessing import Pool from tabulate import tabulate from operator import itemgetter import argparse import sys from errors import * INFINITY = 1000...
210
30.33
136
20
1,449
python
[{"finding_id": "codeql_py/redos_8192b4cdfc7ebdd4_2cc7b43d", "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 'http://' and containing many repe...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with 'http://' and containing many repetitions of '.'." ]
[ 16 ]
[ null ]
[ 36 ]
[ 38 ]
2024-11-19T03:44:02.910287+00:00
1,462,067,856,000
2278a6d52a4ffd9e04af639d3e9b884fb6820432
2
{ "blob_id": "2278a6d52a4ffd9e04af639d3e9b884fb6820432", "branch_name": "refs/heads/master", "committer_date": 1462067856000, "content_id": "fc1b323844f1ea63633e89fa33dcf3c1f834ac6a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7bb4d65f143cfa2971118f9acb54ec6b07fd29f4", "extension": "py"...
2.453125
stackv2
from django.shortcuts import render from models import * from forms import * # Create your views here. def homepage(request): # get top five blogs here latest_article = Article.objects.order_by('-article_published_time')[:5] page_name = 'ME_KUN_HAN' context = {'latest_article': latest_article, 'page_na...
67
30.4
117
12
498
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5c46e8b18234dc9a_5a9a9ca8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 53 ]
[ null ]
[ 32 ]
[ 37 ]
2024-11-19T03:44:15.309695+00:00
1,441,636,118,000
f5647e739a64ccc5dbf5d2b534a8f0cb536d89d0
3
{ "blob_id": "f5647e739a64ccc5dbf5d2b534a8f0cb536d89d0", "branch_name": "refs/heads/master", "committer_date": 1441636118000, "content_id": "cadc07eb4ccd56e6ed7e8ade605aa4e46c385984", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "91eec4b6e5e60c4f8d51a8626cc1b3474f09b264", "extension": "p...
2.828125
stackv2
import urllib.parse import jinja2 import json import eupheme.mime as mime def parse_strings(mimetypes): """ Iterates through 'mimetypes' and returns a generator in which every string is replaced by its parsed MimeType instance. """ for mimetype in mimetypes: if isinstance(mimetype, str):...
226
26.22
79
14
1,316
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_a879a7f70bdc6899_db0cc93b", "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." ]
[ 182 ]
[ 184 ]
[ 28 ]
[ 10 ]
2024-11-19T03:44:35.278674+00:00
1,630,958,953,000
dff5df518c2f7725cbf36e3027bc185a7c2fa737
4
{ "blob_id": "dff5df518c2f7725cbf36e3027bc185a7c2fa737", "branch_name": "refs/heads/main", "committer_date": 1630958953000, "content_id": "4860911683667a1a275377be3cf16cd819634d68", "detected_licenses": [ "MIT" ], "directory_id": "094372a15758ed4bab6f86c6b1f559cc1e12ce08", "extension": "py", "file...
3.859375
stackv2
# Classe / entidade class User: def __init__(self, name, email, password): """Método construtor da classe User. Note que o primeiro parâmetro deve ser o `self`. Isso é uma particularidade de Python, vamos falar mais disso adiante!""" self.name = name self.email = em...
34
23.94
59
10
249
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c5e4a7b0e00cdf5f_077fee5f", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 28 ]
[ null ]
[ 7 ]
[ 24 ]
2024-11-19T02:08:15.285990+00:00
1,485,563,193,000
f54aed365724eeedc09a74d8cfce4ad0f84448c0
2
{ "blob_id": "f54aed365724eeedc09a74d8cfce4ad0f84448c0", "branch_name": "refs/heads/master", "committer_date": 1485563193000, "content_id": "6293d4dafc9f5f15dd02299879b125cdea61f327", "detected_licenses": [ "MIT" ], "directory_id": "3e13cff0ca27d07b89bee56053df9d77bad2a6fc", "extension": "py", "fi...
2.453125
stackv2
# coding=utf-8 """A lightweight Python wrapper of SoX's effects.""" import fnmatch import io import logging import os import wave from os.path import isfile, join from struct import pack from subprocess import PIPE, run from typing import Union import pyaudio from .phonems import PhonemList class AudioPlayer: "...
151
35.86
117
17
1,497
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fd0cab0283827135_a1e4f4b5", "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." ]
[ 112, 119 ]
[ null, null ]
[ 23, 23 ]
[ 64, 72 ]
2024-11-19T02:08:16.990315+00:00
1,673,487,480,000
95a15114926643101c8cceb2da65c3854e52d5f0
3
{ "blob_id": "95a15114926643101c8cceb2da65c3854e52d5f0", "branch_name": "refs/heads/master", "committer_date": 1673487480000, "content_id": "17dd513bea9134a92e0481d32a88076be03e1c9c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6f0e74cdc81f78ffc5dbc1b2db1cef8cbec950c4", "extension": "py"...
3.078125
stackv2
# -*- coding: utf-8 -*- import hashlib import os import decimal import base64 import tempfile import json class Salt: @classmethod def get_salt(cls, size): return os.urandom(size).hex() class Hash: @classmethod def sha3_512(cls, plain): plain = plain.encode() hash = hashlib.s...
71
23.42
76
16
445
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_6e6d2ea4c66ad6d6_4b014934", "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 (SHA3512) that is i...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA3512) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 20 ]
[ null ]
[ 33 ]
[ 38 ]
2024-11-19T02:08:19.331153+00:00
1,691,174,878,000
dc3c07119ccf7262a10647889edbdb57c9d739ea
3
{ "blob_id": "dc3c07119ccf7262a10647889edbdb57c9d739ea", "branch_name": "refs/heads/master", "committer_date": 1691174878000, "content_id": "9119fe3646ce5ae709bfb0b1cb96cd25d474f8ca", "detected_licenses": [ "MIT" ], "directory_id": "5dc35a39169d191166c44b7ac45389a14e5b0857", "extension": "py", "fi...
2.8125
stackv2
import os from twilio.rest import Client # Auth credentials # To set up environmental variables, see http://twil.io/secure account_sid = os.environ['TWILIO_ACCOUNT_SID'] auth_token = os.environ['TWILIO_AUTH_TOKEN'] # Use Lookup API to get country code / MCC / MNC that corresponds # to given phone number phone_number ...
34
36.91
71
15
291
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_680090e4e3be969e_dcebf592", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 12 ]
[ null ]
[ 39 ]
[ 51 ]
2024-11-19T02:08:38.797991+00:00
1,579,095,519,000
64bb3b9d8c6d320e566a50c59e6fc491bf6f3756
2
{ "blob_id": "64bb3b9d8c6d320e566a50c59e6fc491bf6f3756", "branch_name": "refs/heads/master", "committer_date": 1579095519000, "content_id": "5a7c53e76f98790a551178fd1045c412f586a320", "detected_licenses": [ "MIT", "Apache-2.0" ], "directory_id": "6711dc9452243f6786154db33a9896ee034684d7", "exten...
2.34375
stackv2
# This script shows the usage of binary message types # It demonstrates the low level interaction (also suitable for uControlers) to do a https GET in order to receive data sent via the Push API # response parsing and handling of larger responses are left to the user # all configuration settings come from config.py tr...
37
28.92
140
10
273
python
[{"finding_id": "codeql_py/insecure-default-protocol_d8020510015985df_94762d37", "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." ]
[ 17 ]
[ null ]
[ 3 ]
[ 21 ]
2024-11-19T02:21:38.340591+00:00
1,646,291,267,000
7f96ebf364a63e10ece239b003cb419f00330974
2
{ "blob_id": "7f96ebf364a63e10ece239b003cb419f00330974", "branch_name": "refs/heads/master", "committer_date": 1646291267000, "content_id": "16d233fb12169679d7a2123b45b4ecdddfd0791f", "detected_licenses": [ "MIT" ], "directory_id": "269852177052ab4f0a840846a1a0a6c04af51352", "extension": "py", "fi...
2.390625
stackv2
from flask import Flask, jsonify, request from flask_cors import CORS, cross_origin import simplejson from pymongo import MongoClient from datetime import datetime client = MongoClient('localhost',27017) collection = client['DIC']['Tweet_Processed'] app = Flask(__name__) cors = CORS(app) app.config['CORS_HEADERS'] = ...
115
43.77
175
18
1,519
python
[{"finding_id": "codeql_py/nosql-injection_e9c2a15affcad224_dca021aa", "tool_name": "codeql", "rule_id": "py/nosql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This NoSQL query contains an unsanitized [user-provided value](1).", "remediation": "", "location": {"fil...
5
true
[ "CWE-943", "CWE-943", "CWE-943", "CWE-943", "CWE-943" ]
[ "py/nosql-injection", "py/nosql-injection", "py/nosql-injection", "py/nosql-injection", "py/nosql-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This NoSQL query contains an unsanitized [user-provided value](1).", "This NoSQL query contains an unsanitized [user-provided value](1).", "This NoSQL query contains an unsanitized [user-provided value](1).", "This NoSQL query contains an unsanitized [user-provided value](1).", "This NoSQL query contains a...
[ 27, 46, 68, 80, 93 ]
[ null, null, null, null, null ]
[ 4, 3, 3, 3, 4 ]
[ 136, 159, 157, 135, 163 ]
2024-11-19T03:10:13.771604+00:00
1,402,402,566,000
adce7915164a8ab41a7ed9b08cf61291ce98ba04
2
{ "blob_id": "adce7915164a8ab41a7ed9b08cf61291ce98ba04", "branch_name": "refs/heads/master", "committer_date": 1402402566000, "content_id": "7ddec512e7cb92c1e7ec6061cd63bd11d83d3755", "detected_licenses": [ "MIT" ], "directory_id": "2233d2cb69e1d6ab732ac90f84c0c03fedbeb6f0", "extension": "py", "fi...
2.359375
stackv2
#============================================================================== # Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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 ...
179
35.51
141
24
1,530
python
[{"finding_id": "codeql_py/incomplete-hostname-regexp_3290589bbe06fe7f_36f5bb3e", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'amazonaws.com', so it might match m...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-hostname-regexp", "py/incomplete-hostname-regexp" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This regular expression has an unescaped '.' before 'amazonaws.com', so it might match more hosts than expected.", "This regular expression has an unescaped '.' before 'amazonaws.com', so it might match more hosts than expected." ]
[ 61, 82 ]
[ null, null ]
[ 28, 28 ]
[ 70, 71 ]
2024-11-19T03:10:27.906666+00:00
1,534,970,093,000
30d96c87ace98a1431d07006ad813a2fc39dd95f
2
{ "blob_id": "30d96c87ace98a1431d07006ad813a2fc39dd95f", "branch_name": "refs/heads/master", "committer_date": 1534970093000, "content_id": "0e7972cd10281d7f736b8a3cbe54f2d16db7cb51", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "8ee782ea7cc7a5c28ce3eaf494315b25628e81b9", "extension": "p...
2.40625
stackv2
#!/usr/bin/env python #!/bin/env python # # update-docs.py LOC # update-docs.py LOC clean # from __future__ import print_function import os import glob import posixpath import string from sys import * import shutil import os.path def modifyfile(filename): print('processing file : ' + filename) import re ...
158
25.18
82
13
1,126
python
[{"finding_id": "codeql_py/incomplete-hostname-regexp_0d647db511e5bb48_c2cfb704", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'anl.gov/petsc/petsc-current/docs/',...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-hostname-regexp", "py/incomplete-hostname-regexp" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This regular expression has an unescaped '.' before 'anl.gov/petsc/petsc-current/docs/', so it might match more hosts than expected.", "This regular expression has an unescaped '.' before 'anl.gov/petsc/petsc-current/include/', so it might match more hosts than expected." ]
[ 49, 53 ]
[ null, null ]
[ 22, 22 ]
[ 70, 73 ]
2024-11-19T03:22:34.434519+00:00
1,444,121,056,000
0ed02d5a69bf7ce639e424f670df4d5ae40a9d4e
2
{ "blob_id": "0ed02d5a69bf7ce639e424f670df4d5ae40a9d4e", "branch_name": "refs/heads/master", "committer_date": 1444121056000, "content_id": "d7e352f8c692e664acf8588f6418bf7c225cf435", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ccffdc70d7e9e2ca54db0cf973fcf872a00d260d", "extension": "py"...
2.421875
stackv2
#!flask/bin/python from flask import Flask, jsonify, request import ConfigParser, io, re, requests, os,subprocess app = Flask(__name__) cfile="config/services.ini" # Load the configuration file with open(cfile) as f: sample_config = f.read() config = ConfigParser.RawConfigParser(allow_no_value=True) config.readfp(...
81
27.65
128
19
647
python
[{"finding_id": "codeql_py/flask-debug_72c725e70622ecfa_cc8d4fcf", "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)." ]
[ 80, 76 ]
[ null, null ]
[ 2, 9 ]
[ 36, 35 ]
2024-11-19T03:22:47.043994+00:00
1,411,596,547,000
c77cd1d4c46138cd018a2f33a7f7ca0666f454cd
3
{ "blob_id": "c77cd1d4c46138cd018a2f33a7f7ca0666f454cd", "branch_name": "refs/heads/master", "committer_date": 1411596547000, "content_id": "6803d0a587b3a7d26db2fb0ef0ed572885b94b50", "detected_licenses": [ "MIT" ], "directory_id": "7bf8f553e2fe765d7d4375aa99a2d78c10519570", "extension": "py", "fi...
3.03125
stackv2
#!/bin/python from __future__ import print_function from binascii import hexlify import hashlib import base64 from getpass import getpass import sys import argparse charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" chameleon_charset = "ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz123456...
81
29.44
117
12
611
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6ae82eaa7120c216_8385be23", "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-327" ]
[ "py/clear-text-logging-sensitive-data", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure for secret hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA1) that is in...
[ 67, 17 ]
[ null, null ]
[ 11, 14 ]
[ 60, 18 ]
2024-11-19T03:44:36.612100+00:00
1,517,525,636,000
d19c2a0168a18bad8f83afd2b1cc2d73ec84906e
4
{ "blob_id": "d19c2a0168a18bad8f83afd2b1cc2d73ec84906e", "branch_name": "refs/heads/master", "committer_date": 1517525636000, "content_id": "301002ca4b658cfa5883edf27f97f452c53c471d", "detected_licenses": [ "MIT" ], "directory_id": "c72ff92d23eb908461865ef73a489c84437a2513", "extension": "py", "fi...
3.59375
stackv2
from .rules import SYMBOLS class StrengthMeter: def __init__(self, password=None): self.__password = password if password else '' self.__length = self.__calculate_length() self.__uniqueness = self.__calculate_uniqueness() self.__score = self.__calculate_score() def __calculate...
118
25.6
63
13
691
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_228d836ca0be249b_3fdfd504", "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." ]
[ 115 ]
[ null ]
[ 15 ]
[ 55 ]
2024-11-19T02:08:12.125768+00:00
1,663,860,514,000
4c84990cfa33f61e8c325e9bc75fffd2abf2ac19
2
{ "blob_id": "4c84990cfa33f61e8c325e9bc75fffd2abf2ac19", "branch_name": "refs/heads/master", "committer_date": 1663860514000, "content_id": "ae811026e69c9bdfb0798788926411cbd6ef218a", "detected_licenses": [ "BSL-1.0" ], "directory_id": "9e0ad27005426e5d65e2e781d4e2d2dfc5961ae1", "extension": "py", ...
2.40625
stackv2
# Copyright Jean Pierre Cimalando 2022. # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE or copy at # http://www.boost.org/LICENSE_1_0.txt) # # SPDX-License-Identifier: BSL-1.0 from faustpp.metadata import Metadata, WTYPE_Active, WTYPE_Passive from faus...
113
30.15
87
15
863
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_25c3ad8fb2bae08d_ac4c73d8", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 19 ]
[ null ]
[ 11 ]
[ 56 ]
2024-11-19T02:17:34.088861+00:00
1,635,977,206,000
a6b5ec20ff69c9ecb1c3fdebca66e91a6751d2e7
2
{ "blob_id": "a6b5ec20ff69c9ecb1c3fdebca66e91a6751d2e7", "branch_name": "refs/heads/main", "committer_date": 1635977206000, "content_id": "8259eb059b22d677d557969bd60046277cc7e33f", "detected_licenses": [ "MIT" ], "directory_id": "5774eef2807999ecb0263447fe526bcc3d646079", "extension": "py", "file...
2.40625
stackv2
import hashlib from chia.types.blockchain_format.program import Program from chia.util.bech32m import encode_puzzle_hash from cdv.util.load_clvm import load_clvm # Load the Chialisp puzzle code PASSWORD_MOD = load_clvm("password.clsp", "password") def create_coin_puzzle(PASSWORD_HASH): """ Return curried versio...
43
24.12
82
13
240
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_c05a5365ad57c3dc_02e961fb", "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." ]
[ 36 ]
[ null ]
[ 41 ]
[ 58 ]
2024-11-19T02:17:48.833992+00:00
1,399,865,905,000
40045dff4027417abc664558baff09b231f5db6c
2
{ "blob_id": "40045dff4027417abc664558baff09b231f5db6c", "branch_name": "refs/heads/master", "committer_date": 1399865905000, "content_id": "0ffb9891e3fc3ec20642f9375fbc80c843fc5fbd", "detected_licenses": [ "MIT" ], "directory_id": "526167ca0778eec1f096d144276fb052d5681ac6", "extension": "py", "fi...
2.4375
stackv2
from flask import Blueprint, render_template, request, redirect, url_for, flash, g, jsonify from flask.ext.login import login_user, login_required, logout_user # Project 5 - Steve - Adjusted imports to minimal subset from ..models.userProfile import User, Seeker, Provider from ..forms import LoginForm, RegisterForm, D...
82
36.84
96
18
624
python
[{"finding_id": "codeql_py/url-redirection_c4e43eb37f1d5c10_f5f3fce4", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
1
true
[ "CWE-601" ]
[ "py/url-redirection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 29 ]
[ null ]
[ 33 ]
[ 37 ]
2024-11-19T02:18:02.595887+00:00
1,551,727,950,000
aa31655d600a8cf183f183038049d37a9849f0ac
3
{ "blob_id": "aa31655d600a8cf183f183038049d37a9849f0ac", "branch_name": "refs/heads/master", "committer_date": 1551727950000, "content_id": "8bdb348b2625eacefef403a2bc4e068e7a96b12b", "detected_licenses": [ "MIT" ], "directory_id": "35a5393840d4a8f94a2fe0d04e202236d582126c", "extension": "py", "fi...
3.203125
stackv2
from pizzapy import * class Pizza: def __init__(self,customer,store,menu,order,card): self.customer = customer self.store = store self.menu = menu self.order = order self.card = card self.orderList = []; self.method = '' #TODO error handling def initCustomer(self): firstName = in...
142
22.87
102
17
810
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4c496e6077e3a2c1_949e9df1", "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." ]
[ 103 ]
[ null ]
[ 11 ]
[ 20 ]
2024-11-19T02:18:05.838826+00:00
1,537,412,280,000
7ab14f15c00de12e77681f427c26815256206b72
3
{ "blob_id": "7ab14f15c00de12e77681f427c26815256206b72", "branch_name": "refs/heads/master", "committer_date": 1537412280000, "content_id": "d4906fb2b62e87f7b02e8cf90104e68c00d1b7ea", "detected_licenses": [ "MIT" ], "directory_id": "64ef4175787ee8969ea3d7d91b324a272c9f0303", "extension": "py", "fi...
3.328125
stackv2
#!/usr/bin/env python3 """ AirQual Sensor Simulator Randomly pings the API, adding datapoints """ from time import sleep from urllib.request import urlopen from random import seed, uniform, choice, randint # Connection Settings PROTO = "http" HOST = "127.0.0.1:8000" # Sensor Settings # format: {'sensor_id':'api_key'...
55
23.53
86
12
452
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_79fcfee0d73b9536_842a2409", "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." ]
[ 39 ]
[ null ]
[ 15 ]
[ 86 ]
2024-11-19T02:18:18.226474+00:00
1,479,749,260,000
8df2f8347488b693f5cb0b0ed44f20335e472b60
3
{ "blob_id": "8df2f8347488b693f5cb0b0ed44f20335e472b60", "branch_name": "refs/heads/master", "committer_date": 1479749260000, "content_id": "7269f61a5c294c0ad4fc2a8c061586e62bec8ded", "detected_licenses": [ "MIT" ], "directory_id": "56b5c69cedc1abfe204c0d31dc7f4870c5c2da2d", "extension": "py", "fi...
2.625
stackv2
# http://flask.pocoo.org/docs/0.11/patterns/fileuploads/ import os import subprocess import time import datetime import uuid from flask import Flask, request, redirect, url_for, render_template, flash from werkzeug.utils import secure_filename from simple_print_server.database import db_session from simple_print_serv...
79
33.54
101
16
605
python
[{"finding_id": "codeql_py/url-redirection_8d91c759627644ff_1f2ef554", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
2
true
[ "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 45, 73 ]
[ null, null ]
[ 25, 21 ]
[ 36, 32 ]
2024-11-19T02:29:48.248136+00:00
1,607,545,737,000
714f6280e3d215cb370e8e34e7f0116672ab8490
3
{ "blob_id": "714f6280e3d215cb370e8e34e7f0116672ab8490", "branch_name": "refs/heads/master", "committer_date": 1607545737000, "content_id": "17afe36ceef5739154901996d9e07ac278169635", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d0b0d718978a1299e3c46cb39bc749f9208c4e3f", "extension": "py"...
2.5625
stackv2
from flask import ( Flask, escape, flash, request, jsonify, redirect, url_for, render_template, send_file, ) import numpy as np import os from sklearn.externals import joblib knn = joblib.load("knn.pkl") app = Flask(__name__) @app.route("/") def hello(): print("Started hello")...
161
24.27
101
16
955
python
[{"finding_id": "codeql_py/url-redirection_7c5063978a2c25c7_b325fea4", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
2
true
[ "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 141, 147 ]
[ null, null ]
[ 29, 29 ]
[ 40, 40 ]
2024-11-19T02:29:52.915177+00:00
1,310,417,771,000
5963088c0901ec8debfff903f7f9ae4032909dce
2
{ "blob_id": "5963088c0901ec8debfff903f7f9ae4032909dce", "branch_name": "refs/heads/master", "committer_date": 1310417771000, "content_id": "e2b74bc1c21e0b3d60e64550fcb0de336d5dc314", "detected_licenses": [ "MIT" ], "directory_id": "d7c4f187a5ca59bb94d16fa07d3ca1d285828000", "extension": "py", "fi...
2.4375
stackv2
import logging import traceback from django.http import HttpResponse from hiicart.models import CART_TYPES log = logging.getLogger("hiicart") def call_func(name, *args, **kwargs): """Call a function when all you have is the [str] name and arguments.""" parts = name.split('.') module = __import__(".".joi...
42
27.5
76
14
259
python
[{"finding_id": "codeql_py/stack-trace-exposure_bfcc81b6e5d4dcae_a8e7d589", "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." ]
[ 31 ]
[ null ]
[ 37 ]
[ 40 ]
2024-11-19T02:30:08.392279+00:00
1,562,269,473,000
e3859e2f8bd53f547b74c7c49285cd2f2a078e58
3
{ "blob_id": "e3859e2f8bd53f547b74c7c49285cd2f2a078e58", "branch_name": "refs/heads/master", "committer_date": 1562269473000, "content_id": "2ab4d2e057f7b6a587351a6ab627f045fb050850", "detected_licenses": [ "MIT" ], "directory_id": "7c981dec3c7fcf01d8573c0c2fc5dc1effaff5f9", "extension": "py", "fi...
3.03125
stackv2
import base64 import hashlib from Crypto.Cipher import AES from Crypto import Random BLOCK_SIZE = 16 def pad(s): return s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * chr(BLOCK_SIZE - len(s) % BLOCK_SIZE) def unpad(s): return s[:-ord(s[len(s) - 1:])] def encrypt(raw, password): if isinstance(password, str)...
38
25.82
89
15
278
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_5f9778dff53b26ab_23d00276", "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...
[ 22, 34 ]
[ null, null ]
[ 34, 34 ]
[ 42, 42 ]
2024-11-19T02:30:09.887132+00:00
1,631,854,394,000
3abe9e650c6b25e1e6ec16345f19f221341a6d26
3
{ "blob_id": "3abe9e650c6b25e1e6ec16345f19f221341a6d26", "branch_name": "refs/heads/master", "committer_date": 1631854394000, "content_id": "4583acc3fdb47a14519f74721ed9d9f8419d917a", "detected_licenses": [ "MIT" ], "directory_id": "b2ff37406e50976b8db1c75bde4297f5039f7391", "extension": "py", "fi...
2.8125
stackv2
from flask import Flask, render_template, redirect, request app = Flask(__name__) @app.route('/') def home(): return render_template('index.html') @app.route('/process', methods=['GET', "POST"]) def process(): if request.method == "POST": get_name = request.form.get("input_name") age = reque...
28
27.18
92
12
189
python
[{"finding_id": "codeql_py/flask-debug_b65f1c227b1a9e1d_0b755f29", "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-601" ]
[ "py/flask-debug", "py/url-redirection" ]
[ "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.", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 28, 17 ]
[ null, null ]
[ 5, 25 ]
[ 24, 67 ]
2024-11-19T02:30:19.988210+00:00
1,563,487,869,000
d1345a722b61cb486b679befe0478df70c7c3474
3
{ "blob_id": "d1345a722b61cb486b679befe0478df70c7c3474", "branch_name": "refs/heads/master", "committer_date": 1563487869000, "content_id": "c01ebb15f05d539e67d9ce072a750ecd0f11398c", "detected_licenses": [ "MIT" ], "directory_id": "95bf09d26dcfcb6034dde4b4c806cd5efbb2bf50", "extension": "py", "fi...
2.5625
stackv2
import re from filesystem_check.base import FilesystemChecksBase class AasChecks(FilesystemChecksBase): def __init__(self, paths): super().__init__(self, paths) self.lifecycle_directory = re.compile(r'^/lifecycle(/.+)*$') self.communication_directory = re.compile(r'^/communication$') ...
46
44.09
147
13
464
python
[{"finding_id": "codeql_py/redos_8583911043fa5494_5017c57d", "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 '/lifecycle/' and containing many ...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with '/lifecycle/' and containing many repetitions of 'a/'." ]
[ 10 ]
[ null ]
[ 62 ]
[ 64 ]
2024-11-19T02:30:35.613854+00:00
1,691,926,309,000
f3f8372af34fcf4d8adb52edc9d8cf34fc4c5ad8
2
{ "blob_id": "f3f8372af34fcf4d8adb52edc9d8cf34fc4c5ad8", "branch_name": "refs/heads/master", "committer_date": 1691926309000, "content_id": "f32e200baa696cc66e8e70a91e4f27d60d91a62f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "00dbbf6e17e8ce08d50ff5b647554ea423d7f845", "extension": "py"...
2.375
stackv2
#!/usr/bin/env python3 # coding=utf-8 import os import tarfile import shutil import urllib.request import numpy as np import _pickle as cPickle import scipy.misc cache_dir = '../../cache/' extract_folder = os.path.join(cache_dir, 'cifar-10-batches-py') if not os.path.exists(cache_dir): os.makedirs(cache_dir) do...
120
33.78
100
13
1,078
python
[{"finding_id": "codeql_py/tarslip_4c848a829f298638_db49a0e2", "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)." ]
[ 62 ]
[ null ]
[ 5 ]
[ 8 ]
2024-11-19T02:30:37.969072+00:00
1,542,812,757,000
87e270c3ef6aed37d84fe3c290ab3a9b45c10fc8
3
{ "blob_id": "87e270c3ef6aed37d84fe3c290ab3a9b45c10fc8", "branch_name": "refs/heads/master", "committer_date": 1542812757000, "content_id": "753da1218fc56398dabfab6bc598235f2db405e5", "detected_licenses": [ "MIT" ], "directory_id": "0f5153421a77e567d4775f4eeff5f316788aa1ba", "extension": "py", "fi...
2.609375
stackv2
from django.core.management.base import BaseCommand, CommandError from api.models import Crimes import datetime import csv import os import pytz class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('path', nargs='+', type=str) parser.add_argument( '--max-s...
102
32.08
90
19
643
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5d8e3056ce63b598_0f43e175", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 43 ]
[ null ]
[ 19 ]
[ 37 ]
2024-11-19T02:30:38.903198+00:00
1,592,275,582,000
58042edaf0f3d1bf5e19eb10708ab00de20f637e
3
{ "blob_id": "58042edaf0f3d1bf5e19eb10708ab00de20f637e", "branch_name": "refs/heads/master", "committer_date": 1592275582000, "content_id": "fed002de1dbe52359dff25ebb55563fd62fc50cb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1b7c6ffcddc5801968a86932fddae6e70225cf46", "extension": "py"...
2.65625
stackv2
"""Defines pollock Cli class.""" # builtin import argparse import getpass import subprocess import importlib import shutil # platform semi-specific import os # some commands are linux specific (e.g. 'uname -r') # package from .swap import SwapTools from .processtools import print_process_lines from .tools import Do...
417
31.64
79
22
2,768
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_2030264e34ca0f45_cca2182c", "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 positio...
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." ]
[ 58 ]
[ null ]
[ 12 ]
[ 45 ]
2024-11-19T02:50:45.476422+00:00
1,640,843,529,000
10c259bb87429c99e4d0dd93c3d67cd4a70fd728
3
{ "blob_id": "10c259bb87429c99e4d0dd93c3d67cd4a70fd728", "branch_name": "refs/heads/master", "committer_date": 1640843529000, "content_id": "a6ec8b321a901d969adf885dde86ff2151311018", "detected_licenses": [ "MIT" ], "directory_id": "627b91601bb5ee4d9f154556c35476fa8e3c410d", "extension": "py", "fi...
2.65625
stackv2
import logging from flask import ( request, session, g, redirect, url_for, abort, render_template, flash, current_app, Blueprint ) from flask_login import login_user, logout_user, current_user, login_required from marvinbot.models import User from marvinbot.forms import LoginForm from marvinbot.utils.net import...
47
28.47
77
16
302
python
[{"finding_id": "codeql_py/url-redirection_9805fd051e897c96_f38ff716", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
1
true
[ "CWE-601" ]
[ "py/url-redirection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 38 ]
[ null ]
[ 29 ]
[ 57 ]
2024-11-18T18:15:55.533855+00:00
1,553,828,785,000
d14ca446be64c51171040bb14d3f7b409d724c20
3
{ "blob_id": "d14ca446be64c51171040bb14d3f7b409d724c20", "branch_name": "refs/heads/master", "committer_date": 1553828785000, "content_id": "28e22dbcdb3a4c4bae49232ae153779bd6a20fcb", "detected_licenses": [ "MIT" ], "directory_id": "967f0446e77c17a5f8f4d9563a49746a2f915387", "extension": "py", "fi...
2.96875
stackv2
from flask import Flask, request, jsonify, send_from_directory import os import uuid import hashlib from copy import copy from random import randint app = Flask(__name__) # Databases # Customer database. Key is the customer ID, Value is Customer object CUSTOMERS = dict() # Accounts Database. Key is the account ID, v...
283
33.76
138
21
2,206
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_c7e536521dfe7cc9_fc2fe326", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.", "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure." ]
[ 132, 175 ]
[ null, null ]
[ 32, 32 ]
[ 58, 58 ]
2024-11-18T18:16:06.347190+00:00
1,625,609,793,000
81db1a0c6b328117a2e79c38ce3466b76218156f
3
{ "blob_id": "81db1a0c6b328117a2e79c38ce3466b76218156f", "branch_name": "refs/heads/main", "committer_date": 1625609793000, "content_id": "b38cf01c0f4b052968beae2c3b58ba09ff8d47ac", "detected_licenses": [ "MIT" ], "directory_id": "d6bbd9e15d4f6b72417811c4639d2cef82f9e3c4", "extension": "py", "file...
2.640625
stackv2
# Generated by Glenn Jocher (glenn.jocher@ultralytics.com) for https://github.com/ultralytics import argparse import os import time import requests from flickrapi import FlickrAPI from config import FLICKR_KEY, FLICKR_SECRET, LICENSE_TYPES def download_uri(uri, dir='./'): with open(dir + uri.split('/')[-1], 'w...
54
29.78
95
17
401
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_1dd28ab920ee1844_04649cde", "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." ]
[ 15 ]
[ null ]
[ 17 ]
[ 55 ]
2024-11-18T18:16:14.464231+00:00
1,561,410,866,000
2735107218f36e5145c925043e86cd8650dc35c2
2
{ "blob_id": "2735107218f36e5145c925043e86cd8650dc35c2", "branch_name": "refs/heads/master", "committer_date": 1561410866000, "content_id": "2dff32e9b4cd70017e9a7acdf2b3ec5315204778", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5f1a2083fd30149ee9a4db638229e229b9b07fae", "extension": "py"...
2.359375
stackv2
# Copyright 2018 Flight Lab authors. # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
278
28.2
79
18
1,955
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_eceb1d7f407ffad1_ac7a0458", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 168 ]
[ null ]
[ 35 ]
[ 44 ]
2024-11-18T19:11:50.312363+00:00
1,406,134,156,000
17b5e17e792f27d49d363b903b9e2af1dbd798ff
2
{ "blob_id": "17b5e17e792f27d49d363b903b9e2af1dbd798ff", "branch_name": "refs/heads/master", "committer_date": 1406134156000, "content_id": "04ca4fc79e4c39b3d30b726cdc80aaa8886651d0", "detected_licenses": [ "MIT" ], "directory_id": "18df4fb257080eb11b39e5fbb8740c363b432877", "extension": "py", "fi...
2.5
stackv2
import re, codecs f = codecs.open('BWV.txt', 'r', 'utf16') uc = f.read() BWV_RE = re.compile(r'BWV\s*[0-9]+[A-z]?', re.I) bach_dict = {} for b in BWV_RE.findall(uc): bach_dict[b.lower().replace('bwv', 'BWV')] = '' out = codecs.open('bwv_out.txt', 'w', 'utf8') for k in bach_dict.keys(): out.write(k + '\n') ou...
16
19.62
51
11
117
python
[{"finding_id": "codeql_py/overly-large-range_0bc5506324fea695_45c7eb93", "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\\]." ]
[ 6 ]
[ null ]
[ 36 ]
[ 39 ]
2024-11-18T19:24:02.974463+00:00
1,669,077,766,000
2c337f679c4ae6ad123fa2ce4321e01a0a5f21df
3
{ "blob_id": "2c337f679c4ae6ad123fa2ce4321e01a0a5f21df", "branch_name": "refs/heads/main", "committer_date": 1669077766000, "content_id": "be915c14574745228f782b1ecd8ad937cbb3c17e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "234c46d1249c9209f268417a19018afc12e378b4", "extension": "py", ...
2.53125
stackv2
""" Helper functions for archiving models and restoring archived models. """ from os import PathLike from pathlib import Path from typing import Tuple, NamedTuple, Union, Dict, Any, List, Optional import logging import os import tempfile import tarfile import shutil from contextlib import contextmanager import glob imp...
337
37.09
104
23
2,730
python
[{"finding_id": "codeql_py/tarslip_d7caf63439a1785e_cfd00f2d", "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)." ]
[ 302 ]
[ null ]
[ 13 ]
[ 20 ]
2024-11-18T18:39:30.035898+00:00
1,529,408,564,000
0dc56f5e1f2aa0a45b45eb8d54f146ac5763253f
3
{ "blob_id": "0dc56f5e1f2aa0a45b45eb8d54f146ac5763253f", "branch_name": "refs/heads/master", "committer_date": 1529408564000, "content_id": "62eb30069ecdc72ef1d8b28f5cc796a73c03cac4", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "bb24ac8fe7f4e9c25b70a622a4b77164f5df1c42", "extension": "p...
2.90625
stackv2
# Generate the html files for pypi index structure. import os import io from jinja2 import Environment, FileSystemLoader, select_autoescape env = Environment( loader=FileSystemLoader(os.path.curdir), autoescape=False ) def find_libs(): ''' Find all libraries. Return as the following...
62
20.92
105
14
348
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_411845cda72b6942_8764b676", "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." ]
[ 7 ]
[ 10 ]
[ 7 ]
[ 6 ]
2024-11-18T18:39:40.205645+00:00
1,635,232,635,000
43345f25c1ebfb540d326762f029386666b7f1d0
2
{ "blob_id": "43345f25c1ebfb540d326762f029386666b7f1d0", "branch_name": "refs/heads/master", "committer_date": 1635233771000, "content_id": "74702a96384d7ec83dfee484a70b08bd17676288", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1267a2395f069324733ff13646e8e53a768b04c1", "extension": "py"...
2.3125
stackv2
import logging from uuid import uuid4 from random import getrandbits from flask import Flask, request, render_template from aws_mock.lib import get_aws_mock_db, get_collection_name LOGGER = logging.getLogger(__name__) app = Flask(__name__) def generate_resource_id(resource_type: str, length: int = 17) -> str: ...
67
34.69
106
15
512
python
[{"finding_id": "codeql_py/log-injection_bbdce01003d11e46_89690b2b", "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)." ]
[ 47 ]
[ null ]
[ 50 ]
[ 67 ]
2024-11-18T18:40:03.997152+00:00
1,578,463,825,000
f14b72a51ac3beb55505b0e0b1c2a998a456765a
3
{ "blob_id": "f14b72a51ac3beb55505b0e0b1c2a998a456765a", "branch_name": "refs/heads/master", "committer_date": 1578463825000, "content_id": "b8107f29e705ad3c2cf84d53525f471c1414bacb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0d45186f834336339932453f14c1662e2b08d704", "extension": "py"...
2.515625
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2019 Matt Post <post@cs.jhu.edu> # # 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....
98
28.16
85
13
694
python
[{"finding_id": "codeql_py/overly-permissive-file_e66ffcbc9ac9df78_f694f572", "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." ]
[ 60 ]
[ null ]
[ 5 ]
[ 30 ]
2024-11-18T18:40:06.493500+00:00
1,362,808,287,000
14e0b4ab44ce84c2a1cba6ef0383682e3028221b
3
{ "blob_id": "14e0b4ab44ce84c2a1cba6ef0383682e3028221b", "branch_name": "refs/heads/master", "committer_date": 1362808287000, "content_id": "bdbf8faa259ce8d1651e0a8b1cc89ab3826dde68", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c380e7c61c97cb03531e4f33fe31c99c7593c70b", "extension": "py"...
2.953125
stackv2
import hashlib import base64 from tlslite.utils import cipherfactory BLOCK_SIZE = 16 class SimplerAES(object): def __init__(self, key): # First, generate a fixed-length key of 32 bytes (for AES-256) self._rawkey = key def pad (self, data): pad = BLOCK_SIZE - len(data) % BLOCK_SIZE ...
56
22.05
70
13
331
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_5e9a6b2a1c4bc9f5_6a2ac7a7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec...
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 (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.", "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally exp...
[ 24, 28, 45, 49 ]
[ null, null, null, null ]
[ 18, 18, 18, 18 ]
[ 26, 32, 26, 32 ]
2024-11-18T18:46:56.319376+00:00
1,431,907,388,000
36a3f4848e2a335cfd12c4a4e64576550fb17112
2
{ "blob_id": "36a3f4848e2a335cfd12c4a4e64576550fb17112", "branch_name": "refs/heads/master", "committer_date": 1431907388000, "content_id": "0e0cb11bf45154df90f10dbdcbe6275fab676454", "detected_licenses": [ "MIT" ], "directory_id": "a671c37384497831ba6cbabd299fcc842c3d87ca", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/python from flask import Flask, request from flask_debugtoolbar import DebugToolbarExtension from linode import api as l from cloudflare import CloudFlare as CF import os import yaml config = yaml.load(open('config.yml')) app = Flask(__name__) app.debug = config['DYN_DEBUG'] == '1' if app.debug: app.confi...
101
28.79
114
14
723
python
[{"finding_id": "codeql_py/reflective-xss_1143b7f510d3d629_8a0a3520", "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)." ]
[ 29 ]
[ null ]
[ 12 ]
[ 14 ]
2024-11-18T20:58:34.593085+00:00
1,525,738,966,000
35650c7280a02bb68024d4f49d36e54537297a3b
2
{ "blob_id": "35650c7280a02bb68024d4f49d36e54537297a3b", "branch_name": "refs/heads/master", "committer_date": 1525738966000, "content_id": "b7821b39135dddf88f0a2acb4a70b05cf8ed385c", "detected_licenses": [ "MIT" ], "directory_id": "4921e655f9292cac50c964e7ac4713ff2da5a7b6", "extension": "py", "fi...
2.5
stackv2
from utils.deployutils import attempt, compile_contracts, attempt_deploy, W3, mine_txs, UNIT, MASTER from utils.testutils import ZERO_ADDRESS # Source files to compile from SOLIDITY_SOURCES = ["contracts/Havven.sol", "contracts/EtherNomin.sol", "contracts/Court.sol", "contracts/HavvenEscrow.sol", ...
77
46.43
131
12
797
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_431aefd452705752_a5a03411", "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." ]
[ 77 ]
[ null ]
[ 11 ]
[ 64 ]
2024-11-18T20:15:44.263786+00:00
1,686,750,320,000
56d7109e4dfe71257f184520fca6c1b8d0a90c83
2
{ "blob_id": "56d7109e4dfe71257f184520fca6c1b8d0a90c83", "branch_name": "refs/heads/master", "committer_date": 1686750320000, "content_id": "0e52b2f71290b2828f279a92fe58278da90e5e8d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "28235e5da459349ad2852c9b5c67b8a16286c807", "extension": "py"...
2.5
stackv2
#!/usr/bin/env python # # CLUES - Cluster Energy Saving System # Copyright (C) 2015 - GRyCAP - Universitat Politecnica de Valencia # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
257
36.52
129
23
2,146
python
[{"finding_id": "codeql_py/request-without-cert-validation_3ee419e596d594b7_881d8c83", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
3
true
[ "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1) by [this value](2).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 103, 125, 155 ]
[ null, null, null ]
[ 20, 20, 20 ]
[ 67, 113, 113 ]
2024-11-18T20:15:45.254771+00:00
1,543,573,626,000
4f923a91ef3cc8a0c8190860fa696d44b2643585
2
{ "blob_id": "4f923a91ef3cc8a0c8190860fa696d44b2643585", "branch_name": "refs/heads/master", "committer_date": 1543573626000, "content_id": "e7385563598f0a696d807ca097f009f46751d01a", "detected_licenses": [ "MIT" ], "directory_id": "cdaa8551fbd8079d5e7ef241b8437297102007de", "extension": "py", "fi...
2.375
stackv2
#coding:utf-8 #download from flask import Blueprint, render_template, redirect, request, jsonify from os import listdir from os.path import join, isdir, exists download = Blueprint('download',__name__) # @user.route('/index') # def index(): # return render_template('user/index.html') # @user.route('/add') # def ad...
75
22.97
72
15
458
python
[{"finding_id": "codeql_py/path-injection_c3b4b7134a736dc4_873c9a62", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
5
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 22, 36, 38, 66, 68 ]
[ null, null, null, null, null ]
[ 19, 26, 18, 26, 18 ]
[ 26, 33, 22, 33, 22 ]
2024-11-18T20:15:50.393756+00:00
1,630,073,705,000
04bae7b330117de3eede56eacdd6d1e34f2de826
3
{ "blob_id": "04bae7b330117de3eede56eacdd6d1e34f2de826", "branch_name": "refs/heads/master", "committer_date": 1630073705000, "content_id": "1570d4d911f5418b28c967a2d747c5f0b3b075de", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1a7cd763feaee731a1436b027f5a3f977aa263fa", "extension": "py"...
2.609375
stackv2
""" Download cifar10 data """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import tarfile from helper_fcts import data_path_join data_dir = data_path_join('cifar10_data') os.makedirs(data_dir, exist_ok=True) url = "http://www.cs.tor...
34
23.26
64
10
212
python
[{"finding_id": "codeql_py/tarslip_3f0a42a5903cf010_d42c8352", "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)." ]
[ 32 ]
[ null ]
[ null ]
[ 4 ]
2024-11-18T20:15:56.144823+00:00
1,674,088,653,000
7e6d0996e7f5e041927801c9d22cc3b7b5b752d8
2
{ "blob_id": "7e6d0996e7f5e041927801c9d22cc3b7b5b752d8", "branch_name": "refs/heads/master", "committer_date": 1674088653000, "content_id": "c95d31b0676e29a7828f2482d0752f5bf8b81f27", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9abd182d02355ddf0b79afd4a35f7127a4a66f7a", "extension": "py"...
2.421875
stackv2
"""Registry of most widely used datasets""" import os import shutil import tarfile import zipfile from ...data import VOCDetection, COCODetection from ...utils import download as _download, makedirs __all__ = ['get_dataset', 'list_dataset'] _DATASETS = {} def list_dataset(): """List available dataset registered...
103
38.25
95
15
1,086
python
[{"finding_id": "codeql_py/tarslip_55b88dd169d9e9e9_50825059", "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)." ]
[ 71 ]
[ null ]
[ 13 ]
[ 16 ]
2024-11-18T20:16:04.177506+00:00
1,591,131,708,000
af55ce8bbd7784a4158d9621eef7298e12ebf305
3
{ "blob_id": "af55ce8bbd7784a4158d9621eef7298e12ebf305", "branch_name": "refs/heads/master", "committer_date": 1591131708000, "content_id": "b70ed64aa3da58e55efed91354e93b15a6186b4e", "detected_licenses": [ "MIT" ], "directory_id": "d1d479f14638173ed813eeb49a874c664de320a9", "extension": "py", "fi...
3.171875
stackv2
import board import neopixel import requests import time from datetime import datetime, timedelta import APIKeys location = "Malmö" weatherURL = f"http://api.openweathermap.org/data/2.5/weather?q={location}&appid={APIKeys.APIKey}" pixels = neopixel.NeoPixel(board.D18, 30) # Execute API call every 10 minutes startTi...
98
31.51
104
14
1,003
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4601f2279bef364a_583282d2", "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." ]
[ 91 ]
[ null ]
[ 20 ]
[ 23 ]
2024-11-18T19:38:02.602017+00:00
1,497,552,782,000
5486b1d0a4deb9b775a3987a71c509b9bef09dc7
3
{ "blob_id": "5486b1d0a4deb9b775a3987a71c509b9bef09dc7", "branch_name": "refs/heads/master", "committer_date": 1497552782000, "content_id": "3cda3648d129f241b82243888e7af0d150e3a1e6", "detected_licenses": [ "MIT" ], "directory_id": "64d10d32fa11293fa49dde256d764e3a26c8b9a6", "extension": "py", "fi...
2.5625
stackv2
import os import glob from flask import Flask, request, redirect, url_for, render_template from werkzeug.utils import secure_filename from flask import send_from_directory import chess_board_recognizer import uuid import tester if not os.path.exists('user_chessboards'): os.makedirs('user_chessboards') if not os.p...
103
32.67
144
18
846
python
[{"finding_id": "codeql_py/url-redirection_7775828403b85622_60ca57e7", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
2
true
[ "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 71, 79 ]
[ null, null ]
[ 29, 29 ]
[ 40, 40 ]
2024-11-18T19:38:14.039039+00:00
1,532,941,375,000
2320f6de8c9566c7aeb8bfe37aa514fc7c6a96c8
3
{ "blob_id": "2320f6de8c9566c7aeb8bfe37aa514fc7c6a96c8", "branch_name": "refs/heads/master", "committer_date": 1532941375000, "content_id": "d5a2851fee3245c0a96d246634fedb0768b0fd8e", "detected_licenses": [ "MIT" ], "directory_id": "ddc86429810ceece000acfa4cd7e4797a8a10848", "extension": "py", "fi...
3.203125
stackv2
from user.birth import generate_birth from user.name import generate_en_us_name from user.password import generate_password def generate_user(sex='F'): """ :param sex: 'F'=female or 'M'=male :return: """ user = { 'sex': sex, } name = generate_en_us_name(sex) birth = generate_b...
25
19.48
43
9
127
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4eace38d4d8e3ec7_acfbfae3", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 25 ]
[ null ]
[ 11 ]
[ 15 ]
2024-11-18T19:38:37.267932+00:00
1,615,949,216,000
9f1c7cefc4b4a827d64e2ba1b77b991ce03eef7e
3
{ "blob_id": "9f1c7cefc4b4a827d64e2ba1b77b991ce03eef7e", "branch_name": "refs/heads/main", "committer_date": 1615949216000, "content_id": "e2f3b0b16cf65ce02ea61cb9a4a1cab5853db4d7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2fcbc4aa4af5bca17309fcba0e18acb68919db73", "extension": "py", ...
2.890625
stackv2
import tqdm import os import requests import pathlib import tarfile import zipfile def download_url(url, filename, filesize=None, resume=True): pathlib.Path(filename).parents[0].mkdir(parents=True, exist_ok=True) if filesize is not None and os.path.isfile(filename) and os.path.getsize(filename) == filesize: ...
45
37.76
109
13
399
python
[{"finding_id": "codeql_py/request-without-cert-validation_3845e590c5efb288_fb861b5a", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
3
true
[ "CWE-295", "CWE-295", "CWE-022" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/tarslip" ]
[ "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 file extraction depends on a [potentially untrusted source](1)." ]
[ 20, 17, 38 ]
[ null, null, null ]
[ 20, 20, 9 ]
[ 86, 110, 15 ]