added
stringlengths
32
32
created
int64
1,244B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.25
source
stringclasses
1 value
text
stringlengths
324
20.1k
num_lines
int64
16
598
avg_line_length
float64
15.1
58.3
max_line_length
int64
33
179
ast_depth
int64
8
39
length
int64
101
3.8k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
1.1k
265k
sast_codeql_findings_count
int64
1
45
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
cwe_ids
listlengths
1
45
rule_ids
listlengths
1
45
confidences
listlengths
1
45
severities
listlengths
1
45
messages
listlengths
1
45
line_starts
listlengths
1
45
line_ends
listlengths
1
45
column_starts
listlengths
1
45
column_ends
listlengths
1
45
2024-11-18T21:33:24.383873+00:00
1,563,028,940,000
2f2f5948f279536ab14b386ca7755a95e807cf1d
3
{ "blob_id": "2f2f5948f279536ab14b386ca7755a95e807cf1d", "branch_name": "refs/heads/master", "committer_date": 1563028940000, "content_id": "484f70b193f7a2db37cd82415fd6acceb35f4fcf", "detected_licenses": [ "MIT" ], "directory_id": "473a81e43ee8cdad66533924a9d3c4262cc12ee8", "extension": "py", "fi...
2.734375
stackv2
import sh import os import boto3 import requests sizeCheckTimeout = 8 # How long to wait for getBucketSize to return awsCredsConfigured = True errorCodes = ['AccessDenied', 'AllAccessDisabled', '[Errno 21] Is a directory:'] client = boto3.client('s3') def checkAcl(bucket): """ Attempts to retrieve a buck...
239
36.17
121
18
2,200
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_dea570660b2294ab_242cb6cf", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [.amazonaws.com](1) may be at an arbitrary position in ...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [.amazonaws.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 78 ]
[ null ]
[ 8 ]
[ 36 ]
2024-11-18T21:33:31.893171+00:00
1,547,153,634,000
f0dc8e825f0eb7c2bb6eab7b8898fa38ce4218df
2
{ "blob_id": "f0dc8e825f0eb7c2bb6eab7b8898fa38ce4218df", "branch_name": "refs/heads/master", "committer_date": 1547153634000, "content_id": "fda02d2e18710a2cef7c3fbf0c15dc38c4cc4249", "detected_licenses": [ "MIT" ], "directory_id": "4645baf780eb173978b4820ead8e17841b146f11", "extension": "py", "fi...
2.421875
stackv2
# Dependencies import logging import os from flask import Flask, render_template, flash, request, redirect, url_for from flask_scss import Scss from werkzeug.utils import secure_filename # Local from stats import * from randomizer import * app = Flask(__name__) log = logging.getLogger('werkzeug') log.disabled = True ...
135
29.73
141
15
944
python
[{"finding_id": "codeql_py/url-redirection_808dcdf67e365da1_fc3f6a85", "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)." ]
[ 119 ]
[ null ]
[ 29 ]
[ 40 ]
2024-11-18T21:33:32.533681+00:00
1,608,476,001,000
41c6562427b351966242330177d71b335b3d5838
2
{ "blob_id": "41c6562427b351966242330177d71b335b3d5838", "branch_name": "refs/heads/main", "committer_date": 1608476001000, "content_id": "141d60e3adba1a4d66e47040ab5d397e8b79f107", "detected_licenses": [ "MIT" ], "directory_id": "ed3eeb562a5c5320754ebfa7899ac42725a92aee", "extension": "py", "file...
2.328125
stackv2
import pymem import pymem.process import pymem.exception import time import pyautogui import json import time import os import sys import threading import keyboard import requests from PySide2 import QtWidgets, QtGui from os import system, name from flask import Flask, render_template, request offsetURL = "https://lea...
375
28.9
108
21
2,593
python
[{"finding_id": "codeql_py/command-line-injection_d24922213cd2b02b_5f57dcd6", "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": {...
3
true
[ "CWE-078", "CWE-078", "CWE-079" ]
[ "py/command-line-injection", "py/command-line-injection", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This command line depends on a [user-provided value](1).", "This command line depends on a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 53, 69, 313 ]
[ null, null, null ]
[ 23, 19, 12 ]
[ 70, 66, 25 ]
2024-11-18T21:55:39.323318+00:00
1,601,185,799,000
a3953ffb59da037ed43d3a08664916cfa6e7473c
3
{ "blob_id": "a3953ffb59da037ed43d3a08664916cfa6e7473c", "branch_name": "refs/heads/master", "committer_date": 1601185799000, "content_id": "0d5ee548a9fe935deee508095ba43986a78f591d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4e73fb3054fc3089d98dc0df8293f0619f8f2a9d", "extension": "py"...
2.875
stackv2
# -*- coding: utf-8 -*- # AUTHOR:Tony Tannous # DESCRIPTION: Script to create Airflow v1.10.11 API user and HTTP Authorization header/token import argparse from airflow import models from airflow.settings import Session from airflow.contrib.auth.backends.password_auth import PasswordUser import base64 # Script is ba...
65
38.66
110
17
606
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_91b875745036a96b_a5672dcd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 60, 62 ]
[ null, 65 ]
[ 19, 19 ]
[ 96, 51 ]
2024-11-18T21:55:41.807076+00:00
1,502,478,701,000
bb7cc2799d9e6f70d631f707b2acb5cfde5c473e
3
{ "blob_id": "bb7cc2799d9e6f70d631f707b2acb5cfde5c473e", "branch_name": "refs/heads/master", "committer_date": 1502478701000, "content_id": "806d9dce797dbcc3b8101364174a456d66492d84", "detected_licenses": [ "MIT" ], "directory_id": "8934e7bb0cc3d87b1c2946c0aff9371869bf874d", "extension": "py", "fi...
2.625
stackv2
import lxml.html as html from util import * # parse the menu page and get the urls on the mune def menu_parse(source) : root = html.fromstring(source) elements = root.xpath('.//a[text()="Go to article "]') return [e.get("href") for e in elements if "http://works.bepress.com/" in e.get("href")] # parse the...
23
38.35
132
21
243
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_81049dea55c68f90_259f7f50", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://works.bepress.com/](1) may be at an arbitrary p...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [http://works.bepress.com/](1) may be at an arbitrary position in the sanitized URL." ]
[ 8 ]
[ null ]
[ 48 ]
[ 92 ]
2024-11-18T22:39:31.275272+00:00
1,525,471,219,000
cef52f727caa1fd6842999564237407d831d0fdf
2
{ "blob_id": "cef52f727caa1fd6842999564237407d831d0fdf", "branch_name": "refs/heads/master", "committer_date": 1525471219000, "content_id": "ef85238479d109dac81b6f58d22771494026e525", "detected_licenses": [ "MIT" ], "directory_id": "f1f6ba822082e6c76353890f2210fae5066581db", "extension": "py", "fi...
2.359375
stackv2
import datetime import time import mimetypes import os import re import zipfile from django.http import Http404, HttpResponse, HttpResponseNotFound from django.http.response import FileResponse, HttpResponseNotModified from django.utils.http import http_date from django.views.generic.base import View from le_utils.cons...
97
42.95
132
21
911
python
[{"finding_id": "codeql_py/reflective-xss_51140571143b5294_2784c39f", "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).\nCross-site scripting vulnerability d...
1
true
[ "CWE-079" ]
[ "py/reflective-xss" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2)." ]
[ 62 ]
[ null ]
[ 45 ]
[ 121 ]
2024-11-18T22:39:38.932491+00:00
1,463,417,280,000
bb7751f8a9bc31901b815bad65ba9cdbd31f9ee1
3
{ "blob_id": "bb7751f8a9bc31901b815bad65ba9cdbd31f9ee1", "branch_name": "refs/heads/master", "committer_date": 1463417280000, "content_id": "be7437c8402aabb271ca399169cc47184ba94e27", "detected_licenses": [ "MIT" ], "directory_id": "5ec3a659dff6e9e55d431e9be696f236f49a86ed", "extension": "py", "fi...
3.1875
stackv2
""" Utility functions for filtering content """ from nltk import tokenize from nltk.tokenize import TweetTokenizer from constants import REDUCED, SUFFIX_FLAG, PREFIX_FLAG, LENGTH, \ REDUCED_LENGTH, VOWEL_FLAG, ITEMTYPE, HASHTAG, URL, DEFAULT import re def getWords(sentence): """ Extracts words/tokens ...
44
29.57
109
10
364
python
[{"finding_id": "codeql_py/overly-large-range_2cc090e23b769569_676c729b", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]." ]
[ 38 ]
[ null ]
[ 54 ]
[ 57 ]
2024-11-18T22:43:26.936687+00:00
1,606,230,813,000
bd4358acadb42eff48d48493fe566aa27897cf9e
3
{ "blob_id": "bd4358acadb42eff48d48493fe566aa27897cf9e", "branch_name": "refs/heads/master", "committer_date": 1606230813000, "content_id": "e9f86f79272c4d912395ac7cc176001f69e63c7f", "detected_licenses": [ "MIT" ], "directory_id": "6a637525c325b56d9bcd7acd75685400c38f2b7f", "extension": "py", "fi...
2.765625
stackv2
import requests from bs4 import BeautifulSoup def linkedin(area, ctr = 0): while ctr < 150: query = 'https://google.com/search?q=site:linkedin.com/in+AND+"{}"&start='.format(area) +str(ctr) profile_urls = [] response = requests.get(query) soup = BeautifulSoup(response.text,'html.par...
16
39.06
105
17
149
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_35c3201d85d10623_bbc1cee5", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://www.linkedin.com/](1) may be at an arbitrary p...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [https://www.linkedin.com/](1) may be at an arbitrary position in the sanitized URL." ]
[ 12 ]
[ null ]
[ 16 ]
[ 50 ]
2024-11-18T22:43:33.407236+00:00
1,649,706,319,000
ab5c1657e9536bdeaa1e89dfcef505106fddc566
3
{ "blob_id": "ab5c1657e9536bdeaa1e89dfcef505106fddc566", "branch_name": "refs/heads/master", "committer_date": 1649706319000, "content_id": "70ecb71716b4d14da763bd3ca540934293148b86", "detected_licenses": [ "MIT" ], "directory_id": "78db5bc74181173f2d00bea409997a64b4682adf", "extension": "py", "fi...
2.5625
stackv2
"""Cisco Meraki Location Scanning Data simulator""" # Libraries from merakicloudsimulator import merakicloudsimulator from flask import request, render_template, redirect import random import datetime from time import sleep import requests import threading # module vars location_data = "" map_bounds = "" client_macs ...
291
30.47
101
23
1,988
python
[{"finding_id": "codeql_py/full-ssrf_631aa5bd168164c3_dfc8f0fa", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
1
true
[ "CWE-918" ]
[ "py/full-ssrf" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1)." ]
[ 290 ]
[ null ]
[ 5 ]
[ 48 ]
2024-11-18T22:29:31.421478+00:00
1,581,653,341,000
aa1b5640f9f1a90886ad38da953fe8f703201559
4
{ "blob_id": "aa1b5640f9f1a90886ad38da953fe8f703201559", "branch_name": "refs/heads/master", "committer_date": 1581653341000, "content_id": "e736b5a17c2590ae2ac2a0d844036479543a86a8", "detected_licenses": [ "MIT" ], "directory_id": "edf5f9a1f2bcb80fe9a9d002773e2f414811a752", "extension": "py", "fi...
4.34375
stackv2
# Dictionary is a DS which have (key, value) pairs. Like a dictionary, it # can't have duplicate keys. student = { "name": "Muntaha", "age": "19", "givenFinal": True } # Printing can be done in two ways. print(student["name"]) print(student.get("age")) # One can explicitly change the value of one key. st...
31
23.81
75
8
192
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_85fc6f6985c5781f_c88c53ae", "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." ]
[ 22, 26 ]
[ null, null ]
[ 7, 7 ]
[ 31, 31 ]
2024-11-18T22:29:37.306137+00:00
1,685,049,756,000
78753f2b2032a7f99a000c1c8fc7fc4a1b2f9dce
3
{ "blob_id": "78753f2b2032a7f99a000c1c8fc7fc4a1b2f9dce", "branch_name": "refs/heads/master", "committer_date": 1685049756000, "content_id": "792d9e89e4520d5873cc01cf6641bcf0d28fd7ad", "detected_licenses": [ "MIT" ], "directory_id": "9c4ebf9ef4c2c7abfc1ae8e4e8e3b54e3d879d9f", "extension": "py", "fi...
3.296875
stackv2
import os import pickle import numpy as np from abc import ABC, abstractmethod import data_scraping from ..game_attrs import GameValues, Team class TeamComparator(ABC): """ Interface for comparing two teams based on some ranking. Implementing classes can determine what the ranking is based on. The o...
101
31.81
97
19
737
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7fa93a7a0f32e555_ea02f21d", "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.", "...
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 (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text." ]
[ 24, 46, 52, 55 ]
[ null, null, null, null ]
[ 15, 17, 23, 19 ]
[ 84, 98, 80, 70 ]
2024-11-18T23:10:14.311400+00:00
1,570,417,477,000
237e175df3fedfb675724863de038429d885adfc
2
{ "blob_id": "237e175df3fedfb675724863de038429d885adfc", "branch_name": "refs/heads/master", "committer_date": 1570417477000, "content_id": "95f20dfa63c306e60f63c4de8a63d12b35817232", "detected_licenses": [ "MIT" ], "directory_id": "2dd945b839c36b3a93812aec2d92b1228d80e4e0", "extension": "py", "fi...
2.375
stackv2
import requests from cookiespool.db import AccountRedisClient conn = AccountRedisClient(name='weibo') def scan(): # 账号 accounts = [{"username": '19181783661', "password": "puget123456"}, {"username": '19181783661', "password": "puget123456"}] for acount in accounts: username = a...
22
24.45
71
11
165
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f164e567b29b0657_0e74261e", "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 ]
[ 37 ]
[ 45 ]
2024-11-18T23:10:20.802778+00:00
1,635,570,623,000
171ae70dda198f0a644ed74d424408a455141d44
2
{ "blob_id": "171ae70dda198f0a644ed74d424408a455141d44", "branch_name": "refs/heads/main", "committer_date": 1635570623000, "content_id": "04192145f44a0332fd5f900086a0de23c2761383", "detected_licenses": [ "MIT" ], "directory_id": "fcc88237b13b657e5130fa444089e08a5fa132be", "extension": "py", "file...
2.3125
stackv2
# -*- coding: utf-8 -*- #------------------------ # v2021-10-30 1. update test #======================== from flask import Flask, request, abort, render_template, Response from flask import json, jsonify, session, redirect, url_for #from flask_cors import CORS, cross_origin # for cross domain problem from flask impo...
154
28.64
148
19
1,401
python
[{"finding_id": "codeql_py/reflective-xss_76f438e6f6aa3048_3b45f9ac", "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)." ]
[ 31 ]
[ null ]
[ 12 ]
[ 27 ]
2024-11-18T23:21:47.136154+00:00
1,556,826,488,000
c865dc91868023a6255df28cb1871856722d2cc6
3
{ "blob_id": "c865dc91868023a6255df28cb1871856722d2cc6", "branch_name": "refs/heads/master", "committer_date": 1556826488000, "content_id": "aa46ccb33e06daf9e9d6af31113c87509df794c6", "detected_licenses": [ "MIT" ], "directory_id": "09eda169394f68ca3a76c2aa5ee83c6ef277761a", "extension": "py", "fi...
2.515625
stackv2
import json import re from flask import request, render_template, Blueprint from lexos.managers import utility from lexos.views.base_view import detect_active_docs # this is a flask blue print # it helps us to manage groups of views # see here for more detail: # http://exploreflask.com/en/latest/blueprints.html # ht...
247
33.82
78
16
1,901
python
[{"finding_id": "codeql_py/regex-injection_a6684a650af9e4fc_1e980a83", "tool_name": "codeql", "rule_id": "py/regex-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This regular expression depends on a [user-provided value](1) and is executed by [re.sub](2).", "remediat...
3
true
[ "CWE-730", "CWE-079", "CWE-079" ]
[ "py/regex-injection", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This regular expression depends on a [user-provided value](1) and is executed by [re.sub](2).", "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 239, 220, 247 ]
[ null, null, null ]
[ 23, 12, 12 ]
[ 36, 28, 58 ]
2024-11-18T23:15:48.258418+00:00
1,533,739,260,000
11edb0a3c29846be32ee635d37b7db2c80dc7d82
3
{ "blob_id": "11edb0a3c29846be32ee635d37b7db2c80dc7d82", "branch_name": "refs/heads/master", "committer_date": 1533739260000, "content_id": "7d18ac4127bab6e4a7950fb95212ef60cc06bade", "detected_licenses": [ "Apache-2.0" ], "directory_id": "40a6814d36e728bb1ed7ca3b125e0b534ca4061c", "extension": "py"...
2.78125
stackv2
import os import tarfile import time import sys import scipy.io import numpy as np from PIL import Image import re import h5py try: from urllib.request import urlretrieve except ImportError: from urllib import urlretrieve def reporthook(count, block_size, total_size): """Taken from https://blog.shichao....
160
39.75
122
16
1,739
python
[{"finding_id": "codeql_py/tarslip_2593bc3b206f0e5b_560683e7", "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)." ]
[ 57 ]
[ null ]
[ 9 ]
[ 14 ]
2024-11-18T22:30:14.523947+00:00
1,579,981,886,000
742c271a66cc5c4f947e826e0cb324ed4e05e375
3
{ "blob_id": "742c271a66cc5c4f947e826e0cb324ed4e05e375", "branch_name": "refs/heads/master", "committer_date": 1579981886000, "content_id": "6af7e07bb1b3a5ccc45f1265fa81ca5b1d4a2a34", "detected_licenses": [ "MIT" ], "directory_id": "f28637940bfb9c885a432629c032a5c52b05d015", "extension": "py", "fi...
2.609375
stackv2
## See readme from flask import Flask from threading import Thread import time, json, pickle, os from datetime import datetime import praw app = Flask(__name__) ## RedditParser tracked = [] class RedditParser: reddit = praw.Reddit(client_id=os.environ['REDDIT_CLIENT_ID'], client_secret=...
87
31.99
104
16
639
python
[{"finding_id": "codeql_py/reflective-xss_425fbad3b654246f_82aacabd", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
4
true
[ "CWE-079", "CWE-022", "CWE-022", "CWE-117" ]
[ "py/reflective-xss", "py/path-injection", "py/path-injection", "py/log-injection" ]
[ "HIGH", "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 52, 57, 58, 51 ]
[ null, null, null, null ]
[ 16, 23, 61, 25 ]
[ 92, 31, 69, 60 ]
2024-11-18T22:30:14.773666+00:00
1,588,934,972,000
cb39688ea8f3efb876f299eda937281683ab3a91
3
{ "blob_id": "cb39688ea8f3efb876f299eda937281683ab3a91", "branch_name": "refs/heads/master", "committer_date": 1588934972000, "content_id": "165306bd74a19505a7a7fc107994026d80901faf", "detected_licenses": [ "MIT" ], "directory_id": "e07cb04b49c7e604173b71b117e4d18e3a2513ae", "extension": "py", "fi...
3.265625
stackv2
# -*- coding: utf-8 -*- import re file_in_name = 'corpus.txt' file_out_name = 'output.txt' text_len = 0 text = '' def my_print(memo): print(str.format('{:<30}: {:>10} {:>10.2f}%', memo, len(text), float(len(text)) / text_len * 100)) with open(file_in_name, encoding='UTF-8') as file_in: with open(file_out_na...
36
35.86
102
15
391
python
[{"finding_id": "codeql_py/redos_eade1d2377173ac2_7247f7aa", "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 '-header' 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 '-header' and containing many repetitions of ' '." ]
[ 21 ]
[ null ]
[ 32 ]
[ 40 ]
2024-11-18T22:30:23.499571+00:00
1,669,114,404,000
35ddb3155f1dc7bd425ee68d8449a0060eb8ac26
3
{ "blob_id": "35ddb3155f1dc7bd425ee68d8449a0060eb8ac26", "branch_name": "refs/heads/master", "committer_date": 1669114404000, "content_id": "0b6a948ef236757d319ef143ab7c8c06b638155b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "cdceac6fff8b1a27aa435bc0be78e652d5c387dd", "extension": "py"...
2.796875
stackv2
#!/usr/bin/python import sys, getopt import os import requests from bs4 import BeautifulSoup import re ############################################### # # # Download PDF from Ministerio de Sanidad # # # #######################...
56
26.96
72
15
345
python
[{"finding_id": "codeql_py/request-without-cert-validation_28199d203e87f372_8adb1d7d", "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)." ]
[ 19 ]
[ null ]
[ 10 ]
[ 54 ]
2024-11-18T22:30:24.367407+00:00
1,614,451,152,000
2e33ece6494888edb1d596366b5f03b61dc5065b
3
{ "blob_id": "2e33ece6494888edb1d596366b5f03b61dc5065b", "branch_name": "refs/heads/main", "committer_date": 1614451152000, "content_id": "24ad18526508a298b9d1d7243b317a7d1838093f", "detected_licenses": [ "MIT" ], "directory_id": "b9d7d3db996bb64c376f4b84f4d719ac54d2736e", "extension": "py", "file...
2.84375
stackv2
#!/usr/bin/python3 from os import system from getpass import getpass from datetime import datetime, date import json import super import manage import local import hashlib _ = system("clear") def logout(lo): logout_choice = lo if logout_choice == "quit": quit() while True: users = json.load(op...
53
28.26
128
22
360
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_8d3f0ac19428b564_b3608584", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e...
[ 28 ]
[ null ]
[ 28 ]
[ 40 ]
2024-11-18T22:30:25.168645+00:00
1,544,796,075,000
1e60e1ad8b99d44137c65d4e795d90ce59f7d883
2
{ "blob_id": "1e60e1ad8b99d44137c65d4e795d90ce59f7d883", "branch_name": "refs/heads/master", "committer_date": 1544796075000, "content_id": "366673cf6c4f73de13401f84f157bd5a18559dbe", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "fcbe0df5d05b1a342d91f9b4e77a6a83e9723ab9", "extension": "p...
2.3125
stackv2
from flask_restplus import Namespace, Resource, fields from flask import request import requests from app import config api = Namespace('Things', description='things related operations') thing_data = api.model('data', { "name": fields.String, "valueType": fields.String, "valueUni...
98
29.62
146
15
647
python
[{"finding_id": "codeql_py/request-without-cert-validation_1bc90de9402af5ef_ed623cce", "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-918" ]
[ "py/request-without-cert-validation", "py/partial-ssrf" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 96, 67 ]
[ null, null ]
[ 20, 20 ]
[ 118, 71 ]
2024-11-18T21:57:30.298659+00:00
1,611,614,415,000
485134b90c660e51c6359bb0bcce4edf11e78c32
3
{ "blob_id": "485134b90c660e51c6359bb0bcce4edf11e78c32", "branch_name": "refs/heads/master", "committer_date": 1611614415000, "content_id": "da8b99c2cfa5b0409cb3b1b496408c8ca8665494", "detected_licenses": [ "MIT" ], "directory_id": "b44d461fabab14900381503f2159436dfe3a36a4", "extension": "py", "fi...
2.515625
stackv2
import re from django import forms from.models import Article, Topic class ArticleForm(forms.ModelForm): captcha = forms.CharField(label='Captcha', max_length=100) class Meta: model = Article fields = ('title', 'summary', 'link', 'img', 'parent_topic') def clean_parent_topic(self): ...
40
30.85
68
13
294
python
[{"finding_id": "codeql_py/polynomial-redos_20096f2d15e525d0_cde2ce5e", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with ma...
1
true
[ "CWE-1333" ]
[ "py/polynomial-redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of '9'." ]
[ 20 ]
[ null ]
[ 46 ]
[ 49 ]
2024-11-18T21:57:32.039599+00:00
1,576,182,737,000
0a99463f0d2b8c81b481b5820b0faace9c95f3a9
3
{ "blob_id": "0a99463f0d2b8c81b481b5820b0faace9c95f3a9", "branch_name": "refs/heads/master", "committer_date": 1616968366000, "content_id": "c08d61dbdbed416487fe8565e95c0ddac424107c", "detected_licenses": [ "MIT" ], "directory_id": "afb81ff1a18ff8079908e2eb13e35048ec1e6460", "extension": "py", "fi...
3.015625
stackv2
import socket import datetime import threading import hashlib from time import sleep, time class listener(threading.Thread): def __init__(self, sock): super(listener, self).__init__() self.sock = sock self.stop = False def run(self): while not self.stop: try: ...
145
29.22
124
25
950
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_2aec582930850f6f_7427705a", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e...
[ 28 ]
[ null ]
[ 36 ]
[ 56 ]
2024-11-18T21:57:34.443129+00:00
1,502,685,185,000
8911317a8e379c564061c28b965fdb0ea6b98cda
3
{ "blob_id": "8911317a8e379c564061c28b965fdb0ea6b98cda", "branch_name": "refs/heads/master", "committer_date": 1502685185000, "content_id": "6c54a2300b0fa05cd55fc81f1b8285c5948f85d8", "detected_licenses": [ "Apache-2.0", "BSD-3-Clause", "MIT" ], "directory_id": "f62fd455e593a7ad203a5c268e23129...
2.890625
stackv2
# (C) Copyright 2016 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
92
30.39
75
15
673
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_163a5aff80ec3011_d53834b3", "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.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi...
[ 46 ]
[ null ]
[ 31 ]
[ 38 ]
2024-11-18T21:58:08.923909+00:00
1,487,346,640,000
4be1e3dc1c9fdffa4f6b907d06cbe59592abfbb7
2
{ "blob_id": "4be1e3dc1c9fdffa4f6b907d06cbe59592abfbb7", "branch_name": "refs/heads/master", "committer_date": 1487346640000, "content_id": "ed5335f338c3d7d9ddc53df04c17593ce9bb96a3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5e53cd4def79ae0c1e18228185434e9dfe94d2e4", "extension": "py"...
2.40625
stackv2
import re import os import string import sys import yaml from yaml import scanner from jinja2 import Environment from jinja2.loaders import FileSystemLoader from cwl2zshcomp.cwl_classes import Tool argument_names = [] class Argument: def __init__(self, arg): self.dest = Argument._get_dest(arg) ...
151
30.11
102
19
1,064
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_1e8df1de03300c9e_c3df2152", "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." ]
[ 128 ]
[ 130 ]
[ 11 ]
[ 42 ]
2024-11-18T21:58:20.750404+00:00
1,667,898,926,000
485283d0a66c9a22d867f8b4103fe0af3051ec37
2
{ "blob_id": "485283d0a66c9a22d867f8b4103fe0af3051ec37", "branch_name": "refs/heads/master", "committer_date": 1667898926000, "content_id": "b0a397bd6a7c8de481d3b16bcacca58ef3e7d4c1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "eda9cac7cba83fb1f551b0162d346d410bb1e864", "extension": "py"...
2.4375
stackv2
from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import hashes from cryptography import x509 from cryptography.x509.oid import NameOID from flask import Flask, r...
113
26.75
75
15
752
python
[{"finding_id": "codeql_py/flask-debug_c0dd300d537a0db9_77f754bc", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
3
true
[ "CWE-215", "CWE-022", "CWE-022" ]
[ "py/flask-debug", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 113, 94, 107 ]
[ null, null, null ]
[ 5, 13, 13 ]
[ 40, 24, 16 ]
2024-11-18T22:35:54.998660+00:00
1,688,902,600,000
5304538bc998ed672bf3b5418fa59b52d5b60870
3
{ "blob_id": "5304538bc998ed672bf3b5418fa59b52d5b60870", "branch_name": "refs/heads/master", "committer_date": 1688902600000, "content_id": "be82632963db1b108574c3ac696f62ac00b2a0de", "detected_licenses": [], "directory_id": "f9c4e0be685286cd49ee1d688937b52d27797f22", "extension": "py", "filename": "cre...
2.71875
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # load tempfile for temporary dir creation import sys, os, time, tempfile, shutil, traceback import pandas as pd # load libraries for string proccessing import re, string, codecs from chardet.universaldetector import UniversalDetector # for displacy import json # load ...
127
40.51
176
14
1,358
python
[{"finding_id": "codeql_py/overly-large-range_27bf5224344b1807_5a4657ca", "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...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]." ]
[ 109, 110 ]
[ null, null ]
[ 46, 39 ]
[ 49, 42 ]
2024-11-18T22:49:00.338778+00:00
1,302,706,092,000
5c28af4f313d70ea99ceefb334652f8ee3833673
3
{ "blob_id": "5c28af4f313d70ea99ceefb334652f8ee3833673", "branch_name": "refs/heads/master", "committer_date": 1302706092000, "content_id": "ee28a7cf092375d5a0f576793ea9b2ad11022f2c", "detected_licenses": [ "MIT" ], "directory_id": "eec3ec4a8b4483842616f3be51b64297f3410c64", "extension": "py", "fi...
2.546875
stackv2
#!/usr/bin/env python import os, sys, errno, shutil CURRENT_DIR = os.path.dirname(__file__) UTIL_ROOT = os.path.join(CURRENT_DIR, 'utils') sys.path.insert(0, UTIL_ROOT) import simplejson as json # create output dir(s) if necessary try: output_dir = sys.argv[2] except IndexError: output_dir = os.path.join(CU...
76
26.42
65
11
557
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_56e6c2006195407e_8d864e57", "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." ]
[ 43 ]
[ null ]
[ 12 ]
[ 35 ]
2024-11-18T22:49:02.654005+00:00
1,298,488,650,000
c8285e98311f0e0845d9305af00d1c0c09ec9ada
2
{ "blob_id": "c8285e98311f0e0845d9305af00d1c0c09ec9ada", "branch_name": "refs/heads/master", "committer_date": 1298488650000, "content_id": "0ee5f1b047255e127973b5433126d5ce5e958475", "detected_licenses": [ "BSD-3-Clause", "AFL-2.1" ], "directory_id": "75f5a093e41da14ce4179ff990ed4b76987df50d", ...
2.3125
stackv2
''' Session administrator. Copyright (c) The Dojo Foundation 2011. All Rights Reserved. Copyright (c) IBM Corporation 2008, 2011. All Rights Reserved. ''' # tornado import tornado.web import logging import urlparse # std lib import json # coweb import bayeux import session log = logging.getLogger('coweb.admin') clas...
83
30.67
90
16
557
python
[{"finding_id": "codeql_py/reflective-xss_5eee2562b19b4ea6_66fb888c", "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).\nCross-site scripting vulnerability d...
1
true
[ "CWE-079" ]
[ "py/reflective-xss" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 83 ]
[ null ]
[ 20 ]
[ 24 ]
2024-11-18T23:25:56.199703+00:00
1,634,891,391,000
00c39921ba7f743a659eadf49c0a8524022208c1
3
{ "blob_id": "00c39921ba7f743a659eadf49c0a8524022208c1", "branch_name": "refs/heads/master", "committer_date": 1634891391000, "content_id": "1b6067a2a5717747e5fbcbeddd1145c6608f525e", "detected_licenses": [], "directory_id": "e37aa29f83a0c1cc22fcd803311727bda877e2f7", "extension": "py", "filename": "uti...
2.75
stackv2
import functools import logging import random import threading import time import paramiko log = logging.getLogger(__name__) def download_file_to_host(url, host, username, password, dest_path): ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) retry( functools...
72
22.72
68
18
405
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_a19385dacc5f5a60_65581f26", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 14 ]
[ null ]
[ 5 ]
[ 62 ]
2024-11-18T22:39:32.763844+00:00
1,576,701,063,000
e5b41c9ab2ac128d5c304819e210dcebec036366
3
{ "blob_id": "e5b41c9ab2ac128d5c304819e210dcebec036366", "branch_name": "refs/heads/master", "committer_date": 1576701063000, "content_id": "be35daf0617ff175702e670f55feb676b30e7838", "detected_licenses": [ "MIT" ], "directory_id": "6f9751a5dadc7cd9f916cb5b5eb1a18d697f160b", "extension": "py", "fi...
2.6875
stackv2
import argparse import logging import sys import numpy as np import conllu from flask import Flask, jsonify, request, g from embedding_knn import SentenceEmbeddingKnn app = Flask(__name__) def read_conllu(filepath): logging.info(f"reading conllu file {filepath}") with open(filepath, 'r') as f: senten...
119
32.17
136
15
925
python
[{"finding_id": "codeql_py/log-injection_1d7ab373a0154d55_c9917df5", "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)." ]
[ 66 ]
[ null ]
[ 18 ]
[ 51 ]
2024-11-18T22:55:27.257724+00:00
1,587,979,099,000
55ac22f44ea8589f6a1efe0b1aac4b5c98660302
3
{ "blob_id": "55ac22f44ea8589f6a1efe0b1aac4b5c98660302", "branch_name": "refs/heads/master", "committer_date": 1587979099000, "content_id": "1586fb4af96891544ad9d9e7bea0680e546c47e4", "detected_licenses": [ "MIT" ], "directory_id": "748011ae2df1bc37a74358616b8009c9589fbfa1", "extension": "py", "fi...
3.296875
stackv2
from flask import Flask from flask import redirect from flask import request app = Flask(__name__) # Basic Route @app.route("/") def hello(): return "Hello World!" # Different Route @app.route("/test") def test(): return "Test different route" # Route with parameter in route # Variable must be passed to meth...
46
26.41
139
10
312
python
[{"finding_id": "codeql_py/reflective-xss_e04c3a7fb952394a_e8a5f8b9", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
3
true
[ "CWE-079", "CWE-079", "CWE-079" ]
[ "py/reflective-xss", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 20, 28, 41 ]
[ null, null, null ]
[ 12, 12, 12 ]
[ 40, 53, 61 ]
2024-11-18T22:55:33.811029+00:00
1,606,499,014,000
5aa4d840175f6b228693e32577dbf0761b4a27fd
3
{ "blob_id": "5aa4d840175f6b228693e32577dbf0761b4a27fd", "branch_name": "refs/heads/master", "committer_date": 1606499014000, "content_id": "3a86bcbbe90f56e7ec3e1c735b4a7bb4032a8aef", "detected_licenses": [ "Unlicense" ], "directory_id": "58921ba123e3739c8ce0abe16b7a1756d4f6a696", "extension": "py",...
3.171875
stackv2
# Database Generator # v0.4.0 from random import randint import hashlib # ---------------------------------------------------------- # def get_data(filename): with open(filename, "r") as data: temp = data.read().split("\n") data.close() return temp # -----------------------------------------...
73
31.34
88
16
577
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_16567e84845e73ef_c638ed3f", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\...
3
true
[ "CWE-312", "CWE-312", "CWE-327" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.\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...
[ 69, 55, 44 ]
[ null, null, null ]
[ 24, 11, 35 ]
[ 35, 66, 62 ]
2024-11-19T00:07:26.650856+00:00
1,488,895,367,000
ded11a643ed8bc4170eeb0c0552302aa048f98ed
3
{ "blob_id": "ded11a643ed8bc4170eeb0c0552302aa048f98ed", "branch_name": "refs/heads/master", "committer_date": 1488895367000, "content_id": "205a49a3945f2fb531f68446c0d41c123852d949", "detected_licenses": [ "MIT" ], "directory_id": "d545e558895fb05f8eb0a7ad360d575460db3b21", "extension": "py", "fi...
2.90625
stackv2
# coding: utf-8 """命令行火车票查看器 Usage: tickets [-gdtkz] <from> <to> <date> Options: -h,--help 显示帮组菜单 -g 高铁 -d 动车 -t 特快 -k 快速 -z 直达 Example: tickets 北京 上海 2017-01-07 tickets -dg 成都 南京 2017-01-07 """ from docopt import docopt from statio...
52
22.33
169
12
370
python
[{"finding_id": "codeql_py/request-without-cert-validation_f82323f01512846d_8c21b4ff", "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)." ]
[ 40 ]
[ null ]
[ 9 ]
[ 40 ]
2024-11-19T00:07:31.196961+00:00
1,581,007,672,000
94993daad2c0c20384c00e998c97adb3f38862de
3
{ "blob_id": "94993daad2c0c20384c00e998c97adb3f38862de", "branch_name": "refs/heads/master", "committer_date": 1581007672000, "content_id": "08947595a1a2042305eed1fadfafea42b02f170a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "809d24ea7e61ed5d2c2bd5824abeb70d73c14d76", "extension": "py"...
2.890625
stackv2
# -*- coding: UTF-8 -*- from flask import Flask, request # From module flask import class Flask app = Flask(__name__) # Construct an instance of Flask class for our webapp def get_something_from_database_(): import psycopg2 connection_ = psycopg2.connect(host="", port=5432, user="postgres", password=...
32
33.88
124
16
282
python
[{"finding_id": "codeql_py/stack-trace-exposure_65b4c2ef4649aa5a_df3cd79d", "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-215" ]
[ "py/stack-trace-exposure", "py/flask-debug" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger." ]
[ 25, 32 ]
[ 28, null ]
[ 16, 5 ]
[ 10, 69 ]
2024-11-19T00:45:02.224768+00:00
1,413,849,456,000
348ff5956fcc63dae08075f4696d16a699e2d026
2
{ "blob_id": "348ff5956fcc63dae08075f4696d16a699e2d026", "branch_name": "refs/heads/master", "committer_date": 1413849456000, "content_id": "adc2e68410075623a61fc2511ebce29d490787e4", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ec425ecd9183692c01d4a140c7bd452801f95e73", "extension": "py"...
2.3125
stackv2
#!/bin/env python2 import logging import random import time from flask import Flask, g, request log = logging.getLogger('rolling') log.info('importing %s...', 'ver_b') # do busy work to delay starting up for i in range(10**7 * random.randint(3, 10)): i *= 3.71543 i %= 1000000 # Setup the app app = Flask(__n...
78
23
77
12
553
python
[{"finding_id": "codeql_py/log-injection_22b4233c1d27cbdc_4081e871", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno...
2
true
[ "CWE-117", "CWE-117" ]
[ "py/log-injection", "py/log-injection" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 37, 48 ]
[ null, null ]
[ 38, 49 ]
[ 50, 61 ]
2024-11-18T23:28:39.024844+00:00
1,616,046,354,000
f92853385c49d63d2921e56e38d709d6bf4a4fec
3
{ "blob_id": "f92853385c49d63d2921e56e38d709d6bf4a4fec", "branch_name": "refs/heads/main", "committer_date": 1616046354000, "content_id": "bfe0281f1f0e81ba3c5b4de9cc7ad595e725dcad", "detected_licenses": [ "MIT" ], "directory_id": "e34dd9722a223005204e841fdf2904c50093069f", "extension": "py", "file...
3.03125
stackv2
#Author: Claudio Moises Valiense de Andrade. Licence: MIT. Objective: Create general purpose library import timeit # calcular metrica de tempo from datetime import datetime # Datetime for time in file import nltk import random import scipy.stats as stats # Calcular intervalo de confiança import unidecode # remove acc...
274
41.37
160
14
3,279
python
[{"finding_id": "codeql_py/overly-large-range_2a1234b53fe8e78b_54b89781", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[+,\\-.\\/0-9:;<=\\].", "remediation": "", "location"...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[+,\\-.\\/0-9:;<=\\]." ]
[ 154 ]
[ null ]
[ 35 ]
[ 38 ]
2024-11-18T23:28:42.163696+00:00
1,429,906,647,000
7d67272800f520b10a0d8b1555e38eed09bc247e
2
{ "blob_id": "7d67272800f520b10a0d8b1555e38eed09bc247e", "branch_name": "refs/heads/master", "committer_date": 1429906647000, "content_id": "88e72f86ce64aaa3a2fe714aed9f4a20f3b4f3fe", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6cb833a1af5e3b9972f14b185cf32cfd67a14011", "extension": "py"...
2.46875
stackv2
#!/usr/bin/env python """Implements Authentication options for BaseCRM's v2 API""" import logging logger = logging.getLogger(__name__) import requests from prototype import BaseCrmAuthentication __author__ = 'Clayton Daley III' __copyright__ = "Copyright 2015, Clayton Daley III" __license__ = "Apache License 2.0" __...
85
29.73
71
12
593
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_424e67b79ea298b9_71f0a378", "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." ]
[ 74 ]
[ null ]
[ 22 ]
[ 51 ]
2024-11-18T23:40:03.578359+00:00
1,340,739,608,000
71e471cc80a3155f9b8a2c1032846aea963a6376
3
{ "blob_id": "71e471cc80a3155f9b8a2c1032846aea963a6376", "branch_name": "refs/heads/master", "committer_date": 1340739608000, "content_id": "9207e206eacc7de35cd5db82886f27323ad2e1d9", "detected_licenses": [ "MIT" ], "directory_id": "1cf26a143d363bc58866cc65aa53c187f128388f", "extension": "py", "fi...
2.8125
stackv2
# fabpup: Fabric Interface to Puppet REST API # Author: Jason Ashby # import requests import ast import os.path import sys # # Default Settings # fabpup = { # puppetmaster host 'host': 'localhost', # port for puppet rest API 'port': 8140, # environment 'environment': 'production', # what fo...
57
24.26
109
13
382
python
[{"finding_id": "codeql_py/request-without-cert-validation_1fdbaa16eee22444_97206c0a", "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)." ]
[ 35 ]
[ null ]
[ 9 ]
[ 74 ]
2024-11-19T00:05:00.999604+00:00
1,518,709,236,000
d935e590f8ee7ab2dc22faf3e27e4f8462b8af49
2
{ "blob_id": "d935e590f8ee7ab2dc22faf3e27e4f8462b8af49", "branch_name": "refs/heads/master", "committer_date": 1518709236000, "content_id": "61d582019af821bf70134e24b9ff528913db07d9", "detected_licenses": [ "MIT" ], "directory_id": "2ecc9ffe1f69bd5ba9c8fd69480e09bad6f5ebeb", "extension": "py", "fi...
2.390625
stackv2
from flask import Blueprint, request from handler import handle_detection from validator import ValidationException api = Blueprint('api', __name__) @api.route('/detection', methods=['POST']) def detection(): try: message = request.get_json(force=True) except Exception, e: return "Message wa...
23
25.96
81
13
144
python
[{"finding_id": "codeql_py/stack-trace-exposure_506e7755d840b6cb_58122fea", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
2
true
[ "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user." ]
[ 19, 21 ]
[ null, null ]
[ 16, 16 ]
[ 68, 82 ]
2024-11-18T23:46:49.936951+00:00
1,549,605,071,000
c74bf34e5b478073209a5d600cd12fc5c3f9bb11
3
{ "blob_id": "c74bf34e5b478073209a5d600cd12fc5c3f9bb11", "branch_name": "refs/heads/master", "committer_date": 1549605071000, "content_id": "a0744de5ad6c9b0d8320cb08c662824398ecab2c", "detected_licenses": [ "MIT" ], "directory_id": "03a43fc18c248178ce5ed6d6da9ff2f6c47f13d7", "extension": "py", "fi...
2.5625
stackv2
#!/usr/bin/env python from flask import Flask, request, jsonify, Response from db import engine from flask_restful import Api import sys, os, pdb import pandas as pd import numpy as np from json import dumps as jsonify from lib.util import jsonResponse import lib.stocks as st # from sklearn.svm import SVR # from skl...
103
35.23
103
14
896
python
[{"finding_id": "codeql_py/flask-debug_27467a53fd6c64f1_50b9f6b0", "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-022" ]
[ "py/flask-debug", "py/path-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This path depends on a [user-provided value](1)." ]
[ 103, 58 ]
[ null, null ]
[ 5, 17 ]
[ 35, 26 ]
2024-11-18T23:46:50.066356+00:00
1,624,884,828,000
4f1795d3d2dbc7305c63955725c5f9b6f1c5115f
3
{ "blob_id": "4f1795d3d2dbc7305c63955725c5f9b6f1c5115f", "branch_name": "refs/heads/master", "committer_date": 1624884828000, "content_id": "3c3a4fd20cfa5f2b870b04630d9f32276dd515f0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a9097b656e07b70c2c899e6df8b98efa3053a4a5", "extension": "py"...
2.53125
stackv2
# -*- coding: utf-8 -*- """ @author:XuMing(xuming624@qq.com) @description: """ import tornado.ioloop import tornado.web import tornado.options from tornado.options import options, define from tornado.web import RequestHandler define("port", default=8000, type=int, help="run server on the given port.") class IndexHa...
38
27.66
84
12
289
python
[{"finding_id": "codeql_py/reflective-xss_be5f5952ceacc7a3_32a10861", "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).\nCross-site scripting vulnerability d...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2).", "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2)." ]
[ 22, 27 ]
[ null, null ]
[ 21, 21 ]
[ 64, 65 ]
2024-11-19T00:44:18.310797+00:00
1,684,792,236,000
f8405e6a1cf0a706a8861cc41ae1f421047645d3
2
{ "blob_id": "f8405e6a1cf0a706a8861cc41ae1f421047645d3", "branch_name": "refs/heads/master", "committer_date": 1684910798000, "content_id": "399c76a434bf7b282a8219a28dd223673423a92b", "detected_licenses": [ "MIT" ], "directory_id": "6e809100c3772cd490fe5c5d13c9ad0838b3d715", "extension": "py", "fi...
2.390625
stackv2
from django.core.exceptions import ValidationError from django.core.validators import URLValidator from rest_framework import status from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import IsAdminUser from rest_framework.response import Response from api.modules.city.m...
64
32.44
80
14
476
python
[{"finding_id": "codeql_py/stack-trace-exposure_9ce94427ea87bb55_bed0f096", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
2
true
[ "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user." ]
[ 38, 41 ]
[ null, null ]
[ 25, 25 ]
[ 38, 38 ]
2024-11-18T23:05:43.763118+00:00
1,535,718,019,000
bfc9248e806d65cebf623d3303fd6bdf05d3f010
3
{ "blob_id": "bfc9248e806d65cebf623d3303fd6bdf05d3f010", "branch_name": "refs/heads/master", "committer_date": 1535718019000, "content_id": "6752e81257a87e25b087a49dbc2178fe27a95823", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d3441c30b2a6807e2ca7d21cf15a2acd8f5842e9", "extension": "py"...
2.671875
stackv2
#encoding: utf-8 import rsa import time if __name__ == '__main__': s = time.time() # 生成公、私钥 _public, _private = rsa.newkeys(1024) print time.time() - s s = time.time() #存储公、私钥 with open('public.pem', 'wb') as handler: handler.write(_public.save_pkcs1()) print time.time() -...
62
19
64
12
377
python
[{"finding_id": "codeql_py/weak-crypto-key_03e9d5a6a19fb92b_7fe2efd2", "tool_name": "codeql", "rule_id": "py/weak-crypto-key", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable.", "remediation": "",...
1
true
[ "CWE-326" ]
[ "py/weak-crypto-key" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Creation of an RSA key uses [1024](1) bits, which is below 2048 and considered breakable." ]
[ 11 ]
[ null ]
[ 25 ]
[ 42 ]
2024-11-18T23:18:42.724474+00:00
1,553,382,921,000
6a24e6cca7f1144c087e3ae248b2e6a981948d77
3
{ "blob_id": "6a24e6cca7f1144c087e3ae248b2e6a981948d77", "branch_name": "refs/heads/master", "committer_date": 1553382921000, "content_id": "a3b77ee7d3d47c53d3fc03b893827ff8a9bfed96", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6a63741895e3f1ea45e09c1d44c2e56b46f4eb69", "extension": "py"...
2.578125
stackv2
from flask import Flask, request, render_template from Class_for_courses import Course from Request import Request import json app = Flask(__name__) newRequest = Request() # @app.route('/') # def index(): # return 'This is the homepage' @app.route('/courses', methods=['GET']) def courses(): CS125 = Course("CS125") ...
50
23.68
50
12
301
python
[{"finding_id": "codeql_py/flask-debug_b2790f23aac191ce_f71f1b6c", "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)." ]
[ 50, 21 ]
[ null, null ]
[ 2, 9 ]
[ 23, 21 ]
2024-11-18T23:43:00.485071+00:00
1,547,801,082,000
39f10e61c72a4465b433f375049a82cba9ece205
2
{ "blob_id": "39f10e61c72a4465b433f375049a82cba9ece205", "branch_name": "refs/heads/master", "committer_date": 1547801082000, "content_id": "2a1e54f837edbfa2e0b447bd4ff2e82d24ddfcbc", "detected_licenses": [ "MIT" ], "directory_id": "9eef9d0d4dbba72c973ddcf7a897d06bfb179a9d", "extension": "py", "fi...
2.40625
stackv2
from flask import Flask, url_for from flask import request, make_response, Response, jsonify from datetime import datetime from fractal import run_stub from random import random import requests import hashlib import os app = Flask(__name__) client = None import boto3 client = boto3.client('s3') # Call S3 to list curr...
130
28.85
103
19
1,017
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_da8e3cc4740192f7_01404dda", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
2
true
[ "CWE-312", "CWE-215" ]
[ "py/clear-text-logging-sensitive-data", "py/flask-debug" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger." ]
[ 43, 129 ]
[ null, null ]
[ 39, 5 ]
[ 78, 43 ]
2024-11-18T23:11:09.408749+00:00
1,615,163,552,000
c90ef56d533be30d1b2d05d3fec65589bcc140ed
3
{ "blob_id": "c90ef56d533be30d1b2d05d3fec65589bcc140ed", "branch_name": "refs/heads/master", "committer_date": 1615163552000, "content_id": "f3795dc41d4a9c6cb1e5bd77185f208707e9c6d1", "detected_licenses": [ "MIT" ], "directory_id": "cb61f1f50dd642f5fcd66ce29bf297a84f4f642b", "extension": "py", "fi...
2.984375
stackv2
import re import requests class Reddit: @classmethod def get_wiki_url(cls, month, year): return f"https://www.reddit.com/r/kpop/wiki/upcoming-releases/{year}/{month}" @classmethod def get_releases(cls, month, year): wiki_url = cls.get_wiki_url(month, year) + ".json" headers = ...
50
37.66
85
16
443
python
[{"finding_id": "codeql_py/overly-large-range_014f809d76fcb8ad_4d31ea63", "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\\]." ]
[ 42 ]
[ null ]
[ 73 ]
[ 76 ]
2024-11-18T23:11:14.375443+00:00
1,637,350,974,000
edbf1713e27efd0f806161726632ce472ad049dd
3
{ "blob_id": "edbf1713e27efd0f806161726632ce472ad049dd", "branch_name": "refs/heads/master", "committer_date": 1637350974000, "content_id": "8e9e9a372d6b513b36dc4c2586a1816df8d8631f", "detected_licenses": [ "MIT" ], "directory_id": "dd7c7ad89512ce333c8abb1140a980ce649966ef", "extension": "py", "fi...
3.125
stackv2
from Crypto.Cipher import AES import hashlib import sys import binascii plaintext = "hello how are you?" password = "qwerty123" if len(sys.argv) > 1: plaintext = sys.argv[1] if len(sys.argv) > 2: password = sys.argv[2] def encrypt(plaintext, key, mode): encobj = AES.new(key, AES.MODE_GCM) cipherte...
46
22.39
62
10
295
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_21d9162f1c64060b_8bead6ad", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-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.\nThis expression logs [sensitive data (password)](2) as clear text.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sens...
[ 33, 29 ]
[ null, null ]
[ 19, 22 ]
[ 27, 39 ]
2024-11-19T00:38:41.055116+00:00
1,570,258,245,000
3eecefd72e8f1fec01e12338e21e596d7bd66b10
2
{ "blob_id": "3eecefd72e8f1fec01e12338e21e596d7bd66b10", "branch_name": "refs/heads/master", "committer_date": 1570258245000, "content_id": "34016b30ad3a6fcd2549c3238af0b17da204f5ea", "detected_licenses": [ "MIT" ], "directory_id": "3cca0255af2c529ccceea8016d39475c44fcb8c1", "extension": "py", "fi...
2.375
stackv2
#!/usr/bin/env python import ConfigParser import boto.sqs import json import logging import re from boto.sqs.message import Message from flask import Flask from flask import request formatter = logging.Formatter( '{"timestamp": "%(asctime)s", "progname":' + ' "%(name)s", "loglevel": "%(levelna...
90
30.93
90
15
724
python
[{"finding_id": "codeql_py/reflective-xss_34002f83367fb268_51500b48", "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...
6
true
[ "CWE-079", "CWE-079", "CWE-117", "CWE-117", "CWE-117", "CWE-117" ]
[ "py/reflective-xss", "py/reflective-xss", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided valu...
[ 80, 85, 49, 51, 54, 57 ]
[ null, null, null, null, null, null ]
[ 12, 12, 15, 19, 19, 19 ]
[ 28, 28, 27, 24, 23, 23 ]
2024-11-19T01:21:46.489662+00:00
1,416,988,401,000
ed8f45e71a64d8d9a6d02fd731a4a1cc2d533713
4
{ "blob_id": "ed8f45e71a64d8d9a6d02fd731a4a1cc2d533713", "branch_name": "refs/heads/master", "committer_date": 1416988401000, "content_id": "ba94ce1524a08549e0797743b3b8e8b14c671ba5", "detected_licenses": [ "MIT" ], "directory_id": "a917e764595d889833d2869e1f237c965807e97b", "extension": "py", "fi...
4.28125
stackv2
# -*- coding:utf-8 -*- print("Let's practice enerything.") print( "You\'d need to know \' bout escapes with\ \\ that do \n newlines and \t tabes.'") poem = """ \t The lovely world With logic so firmly planted can't discern \t the needs of love nor comprehend passion from intuition and requires and explanatio...
40
26.6
78
10
295
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_aef3fe644b696e19_eee24c69", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text." ]
[ 34, 38 ]
[ 35, 40 ]
[ 7, 7 ]
[ 25, 78 ]
2024-11-19T00:11:40.639844+00:00
1,549,897,512,000
07799cfdfddb9167f5eef7458982e11a996428c7
2
{ "blob_id": "07799cfdfddb9167f5eef7458982e11a996428c7", "branch_name": "refs/heads/master", "committer_date": 1549897512000, "content_id": "9e5d6b15a345ef97f12faedaa12de571fbd72610", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b6796a9613f093b3afe68b81cdbdfaa3a257d1c8", "extension": "py"...
2.375
stackv2
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softw...
155
32.26
83
14
1,177
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_c692c8f42ab465b7_93612fef", "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." ]
[ 147 ]
[ null ]
[ 20 ]
[ 62 ]
2024-11-19T00:11:42.043590+00:00
1,624,815,167,000
e51bceb2c1cb2f7fa7e13b5d991751587eff3df4
3
{ "blob_id": "e51bceb2c1cb2f7fa7e13b5d991751587eff3df4", "branch_name": "refs/heads/main", "committer_date": 1624815167000, "content_id": "1b42629e4d82f12d376b28e2a878da5aecbd7a51", "detected_licenses": [ "MIT" ], "directory_id": "30e18e1f821a9a2bd7c3fb23fe92b194d4e22f52", "extension": "py", "file...
2.6875
stackv2
import os import secrets from configparser import ConfigParser from typing import Optional import pycurl import requests from fastapi import FastAPI, Header, HTTPException from pydantic import BaseModel, Field from tractus import Tracer, TraceResult # Config file path CONFIG_PATH = "config/config.cfg" def get_confi...
112
31.7
114
20
861
python
[{"finding_id": "codeql_py/stack-trace-exposure_a40e97cf908b4fe0_d4dc253d", "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." ]
[ 106 ]
[ null ]
[ 16 ]
[ 57 ]
2024-11-19T00:24:55.544360+00:00
1,476,108,484,000
793db31c8be325ad137b48d882ab49d2af75ff74
4
{ "blob_id": "793db31c8be325ad137b48d882ab49d2af75ff74", "branch_name": "refs/heads/master", "committer_date": 1476108484000, "content_id": "d4a4e558b40071a3a16aa4cbbd87fcaf71af3434", "detected_licenses": [ "Apache-2.0" ], "directory_id": "76e62ddbfdfba19c80b37e855a4df67672ef0808", "extension": "py"...
4.09375
stackv2
# Задача 4. Вариант 8 # Напишите программу, которая выводит имя, под которым # скрывается Алексей Максимович Пешков. Дополнительно # необходимо вывести область интересов указанной личности, # место рождения, годы рождения и смерти (если человек умер), # вычислить возраст на данный момент (или момент смерти). Для хранен...
58
31.76
96
13
652
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c06196c257c14e1a_840663a5", "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." ]
[ 42 ]
[ null ]
[ 11 ]
[ 18 ]
2024-11-19T00:36:47.671033+00:00
1,628,926,608,000
3a9c2eb8b2ca8491afb3023635e468c55a7ce113
3
{ "blob_id": "3a9c2eb8b2ca8491afb3023635e468c55a7ce113", "branch_name": "refs/heads/master", "committer_date": 1628926608000, "content_id": "2de1307c8f59dd06575e199b2d6a35dd308e4611", "detected_licenses": [ "MIT" ], "directory_id": "48936d6904940ffcdd69aa7d4c2cb0b57701f472", "extension": "py", "fi...
2.59375
stackv2
import urllib.request,json from .models import Article, Source api_key = None source_url = None cat_url = None def configure_request(app): global api_key,source_url,cat_url api_key = app.config['NEWS_API_KEY'] source_url = app.config['NEWS_API_BASE_URL'] def get_source(): get_source_url = ...
94
30.82
103
12
588
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3dcc13aa4b0eb483_2fab65f6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 45, 78 ]
[ null, null ]
[ 11, 11 ]
[ 29, 28 ]
2024-11-19T01:02:07.391218+00:00
1,692,172,308,000
465362f76279bf1cb16acc9c2c10d2923a5657a0
4
{ "blob_id": "465362f76279bf1cb16acc9c2c10d2923a5657a0", "branch_name": "refs/heads/master", "committer_date": 1692172308000, "content_id": "bec74d6accaddea38296b066fdeb37cae4cf93c6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d0479ecf52f22cd9811b8c5c680fd42a5f5308a3", "extension": "py"...
4.40625
stackv2
# 定义类 class Persion: # 定义类属性 name = "" age = 0 # 定义私有属性 __sex__ = "" __weight__ = 0 # 构造函数 def __init__(self, name, age, sex, weight): self.name = name self.age = age self.__sex__ = sex self.__weight__ = weight # 定义方法 def speak(self): pr...
27
18.7
107
12
210
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_efcb1c3ece59a83e_e9d8e324", "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." ]
[ 20 ]
[ null ]
[ 15 ]
[ 107 ]
2024-11-19T01:02:16.970371+00:00
1,519,625,345,000
daa5de22c4dffb15e52c4511aa26729c7bdb5abc
3
{ "blob_id": "daa5de22c4dffb15e52c4511aa26729c7bdb5abc", "branch_name": "refs/heads/master", "committer_date": 1519625345000, "content_id": "2d3bb6fba7fa0e1b59206402794e578d4a1ffd06", "detected_licenses": [ "MIT" ], "directory_id": "1713233ef66f31f8d7be891c7924e59f11e3cf28", "extension": "py", "fi...
2.53125
stackv2
''' Example of an LSTM model with GloVe embeddings along with magic features Tested under Keras 2.0 with Tensorflow 1.0 backend Single model may achieve LB scores at around 0.18+, average ensembles can get 0.17+ ''' ######################################## ## import # packages ####################################...
309
29.3
109
16
2,359
python
[{"finding_id": "codeql_py/overly-large-range_e211db29e58a9fdf_3cecf472", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+,\\-.\\/0-9:;<=\\]." ]
[ 116 ]
[ null ]
[ 39 ]
[ 42 ]
2024-11-19T01:51:49.694447+00:00
1,492,511,199,000
4e27ebe34e7c81f8ce4a78d6a0792062410fc560
3
{ "blob_id": "4e27ebe34e7c81f8ce4a78d6a0792062410fc560", "branch_name": "refs/heads/master", "committer_date": 1492511199000, "content_id": "e793f117e9f28fc4640fc8fb583fd58e1f3b0296", "detected_licenses": [ "MIT" ], "directory_id": "0c9611a0ec6e77e8546dde8f7aaf1e2bc548ef4d", "extension": "py", "fi...
3.03125
stackv2
import requests from urllib.request import urlopen import re import chardet import numpy as np import matplotlib.pylab as plt import urllib import time from bs4 import BeautifulSoup class webarticle(object): def __init__(self, url='', keyword='', num=1): self.url = url self.keyword = keyword ...
229
30.89
113
23
1,725
python
[{"finding_id": "codeql_py/bad-tag-filter_c44f57f219627488_bd614028", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match upper case <SCRIPT> tags.", "remediation": "", "location": {"file_path": ...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression does not match upper case <SCRIPT> tags." ]
[ 33 ]
[ null ]
[ 28 ]
[ 56 ]
2024-11-19T01:52:06.137687+00:00
1,601,484,075,000
0e91bc155f5476a205f13578505cb1c73fc3c455
3
{ "blob_id": "0e91bc155f5476a205f13578505cb1c73fc3c455", "branch_name": "refs/heads/master", "committer_date": 1601484075000, "content_id": "b636b49474af4f30811c50dabee0cab859a2439e", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "04d923b4486ea4bce31b716cdc261f6b6d9e9341", "extension": "p...
3.09375
stackv2
#!/usr/local/bin/python __author__ = 'Walshman23' import sys sys.path.insert(1, "../common") # Want to locate modules in our 'common' directory # CBC mode is a block cipher mode that allows us to encrypt irregularly-sized messages, despite the fact that a block # cipher natively only transforms individual blocks. # #...
68
33.94
118
14
577
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_c526047445896777_bdaa9fd6", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used.", "[The block mode ECB](1) is broken or weak, and should not be used." ]
[ 43, 62 ]
[ null, null ]
[ 15, 15 ]
[ 69, 69 ]
2024-11-19T00:55:24.574945+00:00
1,676,139,610,000
a2fa8ccb96351035d55d0ad1a2ecbb9af52492b5
3
{ "blob_id": "a2fa8ccb96351035d55d0ad1a2ecbb9af52492b5", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "9be1d12042cc49b1aa1eac8a175011ab8371abba", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
3.3125
stackv2
""" Scrape a user's Netflix movie ratings by automating a Safari browsing session (with the user already logged in). The ratings are written as tab-delimited UTF-8 encoded text in a plain text file. This Python script is for terminal-savvy Mac users. To use ====== 0. The script requires the Python lxml XML parsin...
222
38.24
131
18
2,154
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_7b9e71c0d3084cfc_6aa19aee", "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." ]
[ 140 ]
[ 148 ]
[ 14 ]
[ 5 ]
2024-11-19T01:39:55.323954+00:00
1,488,552,830,000
7c544f148cab7a9bdc41a13ad56373e30ef8e4f2
2
{ "blob_id": "7c544f148cab7a9bdc41a13ad56373e30ef8e4f2", "branch_name": "refs/heads/master", "committer_date": 1488552830000, "content_id": "af308fd56a0bfefe2f3ae73685046b36149adad2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "69511aad769327c84e3b6b58aa4a6a71cfaad636", "extension": "py"...
2.4375
stackv2
# Copyright (c) 2017 HH Partners, Attorneys-at-law Ltd # SPDX-License-Identifier: Apache-2.0 # Author: Henri Tanskanen from urllib.parse import urlparse import codecs import csv from datetime import datetime import xml.etree.ElementTree as etree import hashlib import json import os import re import tarfile import zip...
346
32.82
97
20
2,636
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_e3e7d216218dc141_c6848ef5", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [://registry.npmjs.org/](1) may be at an arbitrary posi...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [://registry.npmjs.org/](1) may be at an arbitrary position in the sanitized URL." ]
[ 282 ]
[ null ]
[ 12 ]
[ 43 ]
2024-11-19T00:33:06.646519+00:00
1,570,823,036,000
50ee52e3d6170e9247d53cc32db4eb4917c54659
3
{ "blob_id": "50ee52e3d6170e9247d53cc32db4eb4917c54659", "branch_name": "refs/heads/master", "committer_date": 1570823036000, "content_id": "51aafd5a9ee39f35d8a66d423cb6dd9f06435250", "detected_licenses": [ "Apache-2.0" ], "directory_id": "988f547188714391f55c239acb52280aa6054b37", "extension": "py"...
2.875
stackv2
""" Utilities to connect to nodes with SSH. """ import subprocess from ipaddress import IPv4Address from pathlib import Path from shlex import quote from typing import Any, Dict, List import paramiko from dcos_e2e._node_transports._base_classes import NodeTransport from dcos_e2e._subprocess_tools import run_subproce...
243
31.8
79
16
1,696
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_30e06abb9177be2a_ac5807c3", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/paramiko-missing-host-key-validation", "py/paramiko-missing-host-key-validation" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe.", "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 199, 232 ]
[ null, null ]
[ 13, 13 ]
[ 77, 77 ]
2024-11-19T00:25:33.916889+00:00
1,564,165,832,000
0941d13e5f054ab8c9c77e87b1b9771e41d9828d
3
{ "blob_id": "0941d13e5f054ab8c9c77e87b1b9771e41d9828d", "branch_name": "refs/heads/master", "committer_date": 1564165832000, "content_id": "521e563f43f000d8e94e45eaae9a8571782690f5", "detected_licenses": [ "Apache-2.0", "MIT" ], "directory_id": "b6f7b027c23b09430f4d2e12a13fa9b1444788c8", "exten...
2.703125
stackv2
"""Upload a genome to an existing project. """ import argparse import os import requests from requests.auth import HTTPBasicAuth import sys import simplejson as json # Load environment variables for request authentication parameters if "FABRIC_API_PASSWORD" not in os.environ: sys.exit("FABRIC_API_PASSWORD environm...
104
36.71
89
17
890
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_471f440da7bc98a7_d5365ef4", "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...
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 (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (p...
[ 54, 64, 96, 99 ]
[ null, null, null, null ]
[ 26, 26, 26, 30 ]
[ 44, 44, 61, 84 ]
2024-11-19T00:25:39.497839+00:00
1,630,594,635,000
8be78e4cddb68f556d25014044b5f424d0f9d0e9
3
{ "blob_id": "8be78e4cddb68f556d25014044b5f424d0f9d0e9", "branch_name": "refs/heads/main", "committer_date": 1630594635000, "content_id": "7865bedb606b04f100232487a1bc7fc7f53c8414", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9105cf9df0db2481cec261a537fb304921a802c1", "extension": "py", ...
2.78125
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import requests from flask import Flask, Response, request app = Flask(__name__) parser = argparse.ArgumentParser(description='Web server that publishes the output of Shelly Plug power for Prometheus') parser.add_argument('--shelly_user', ...
70
27.46
120
13
434
python
[{"finding_id": "codeql_py/full-ssrf_5f7ae4f488d8be93_87673689", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
1
true
[ "CWE-918" ]
[ "py/full-ssrf" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1)." ]
[ 45 ]
[ null ]
[ 9 ]
[ 92 ]
2024-11-19T01:02:50.059195+00:00
1,610,537,605,000
fea4b4f0587df01bd77bdbd0eafd7d832b8bd674
3
{ "blob_id": "fea4b4f0587df01bd77bdbd0eafd7d832b8bd674", "branch_name": "refs/heads/main", "committer_date": 1610537605000, "content_id": "fc7eaa1bf5096e01a5f99ecb55ceaea8f93ca00c", "detected_licenses": [ "MIT" ], "directory_id": "1f46ad43cb53b886162e8e4d70e706135ecac6f0", "extension": "py", "file...
2.6875
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import requests from lxml import html import unicodecsv as csv import argparse def parse_listing(keyword, place,page): """ Function to process yellowpage listing page : param keyword: search query : param place : place name """ url = "https://ww...
140
48.15
155
24
1,479
python
[{"finding_id": "codeql_py/request-without-cert-validation_ea7e10540bcb904b_0dca14b8", "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)." ]
[ 34 ]
[ null ]
[ 24 ]
[ 72 ]
2024-11-19T01:39:19.517325+00:00
1,688,449,912,000
15ebdeb6c2a11b5374f7050c57c3c4c6965e2381
3
{ "blob_id": "15ebdeb6c2a11b5374f7050c57c3c4c6965e2381", "branch_name": "refs/heads/master", "committer_date": 1688453376000, "content_id": "2b635913cbdf794f8f75ae8e79a9d8106a97d7df", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3d7dece5254e42059e8a2cb1e72b295460284983", "extension": "py"...
2.640625
stackv2
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- ''' @File : cloudAI.py @Description: 云端AI @Author : jiangyu @version : 1.0 ''' from aliyunIoT import Device import utime # 延时函数在utime库中 import ujson as json class CloudAI : def __gesture_cb(self, dict) : ''' Reply lis...
294
35.23
143
19
2,383
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4f67179350c13619_fe6d6f41", "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." ]
[ 94 ]
[ null ]
[ 23 ]
[ 40 ]
2024-11-19T00:28:34.299571+00:00
1,558,360,540,000
0a46cce343bb4e4e639cbc3db7ff2e6644e1b6a9
2
{ "blob_id": "0a46cce343bb4e4e639cbc3db7ff2e6644e1b6a9", "branch_name": "refs/heads/master", "committer_date": 1558360540000, "content_id": "d496ad5b252d7cc6590cd91932fdef171693156f", "detected_licenses": [ "MIT" ], "directory_id": "061a8aef9feefafe6ca7dd8e647a0a8c5dc067b4", "extension": "py", "fi...
2.453125
stackv2
import os from flask import Flask, request, g, redirect, url_for, render_template, flash import models from matplotlib import pyplot as plt import seaborn as sns import pandas as pd import time import io from flask_sqlalchemy import SQLAlchemy from datetime import datetime from sklearn import decomposition from sklearn...
152
29.45
82
17
1,176
python
[{"finding_id": "codeql_py/url-redirection_7bb65aefd8c77e5b_c199d837", "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)." ]
[ 84 ]
[ null ]
[ 29 ]
[ 40 ]
2024-11-19T00:28:49.448656+00:00
1,493,294,884,000
e7123944abc402977b344e3753d0ddd101913e40
3
{ "blob_id": "e7123944abc402977b344e3753d0ddd101913e40", "branch_name": "refs/heads/master", "committer_date": 1493294884000, "content_id": "b5c70a00626eb39fbc9be20cf142c75db3d024e5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6866bbce6189c7923152fa2bb913bca7d04722c2", "extension": "py"...
2.671875
stackv2
#!/usr/bin/env python from st2actions.runners.pythonrunner import Action import zipfile import tarfile class UnknownArchive(Exception): pass class ExtractArchive(Action): def __init__(self, config): super(ExtractArchive, self).__init__(config=config) def untar(self, archive, directory, files=F...
38
21.03
59
14
170
python
[{"finding_id": "codeql_py/tarslip_037b469f93698238_1fb0d7aa", "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)." ]
[ 18 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-19T00:50:15.275906+00:00
1,681,474,492,000
ec88221d99108fbd9bfc384cb8c75f8e5f7c903c
3
{ "blob_id": "ec88221d99108fbd9bfc384cb8c75f8e5f7c903c", "branch_name": "refs/heads/main", "committer_date": 1681474492000, "content_id": "e6b59d1fe914136c8ea75e6edc76daf9f5bf7b8a", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "16e3bda8d377753f14aaa58812fd36d6a7abb7cf", "extension": "py"...
2.765625
stackv2
"""batou templating support Currently we support one templating engine: Jinja2:: {% for server in servers %} server {{ server.name }} {% endfor %} """ # There is a weird bug going on with Jinja2 on Python3.6 where this # test fails if Jinja tries to import ctypes itself ... o_O import ctypes import io ...
76
30.96
78
13
533
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_d5c92dc9204ef747_d97988ff", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 51 ]
[ 55 ]
[ 20 ]
[ 10 ]
2024-11-19T00:51:38.097045+00:00
1,684,750,603,000
6c36b5138987654139dbdec807db70346b21c8fe
4
{ "blob_id": "6c36b5138987654139dbdec807db70346b21c8fe", "branch_name": "refs/heads/master", "committer_date": 1684750603000, "content_id": "06231e114f1ac8889c7c42152a395c1c85afc272", "detected_licenses": [ "CC0-1.0" ], "directory_id": "5d32d0e65aa3bfa677fd1b8c92569e07e9b82af1", "extension": "py", ...
4.15625
stackv2
# Event: LCCS Python Fundamental Skills Workshop # Date: Dec 2018 # Author: Sinead Crotty, PDST # eMail: computerscience@pdst.ie # Solution: Programming Exercises 6.3 Q4 # Purpose: A program to validate a password # A valid password is one which is .... # a) between 9 and 12 characters in length and # b) contains only ...
39
32.33
78
10
331
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cef49fb7dfee354c_da89588b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 37, 39 ]
[ null, null ]
[ 11, 11 ]
[ 45, 48 ]
2024-11-19T00:04:16.732562+00:00
1,604,571,079,000
a4067bfc54f9bf8d9c57e5c4b55756b2e24a895e
2
{ "blob_id": "a4067bfc54f9bf8d9c57e5c4b55756b2e24a895e", "branch_name": "refs/heads/master", "committer_date": 1604571079000, "content_id": "4d61bba86bcc422f72517608a7bf862b9e10869b", "detected_licenses": [ "MIT", "Unlicense" ], "directory_id": "2eeeb78f2afc9056d04ec7d04350f4d0b0911a21", "extens...
2.5
stackv2
import mimetypes import hashlib import shutil import os from .userio import UserIO from .helper import cpp_str_esc, cpp_img_esc, get_files_rec, shorten from jinja2 import Template from rich.traceback import install as install_traceback from rich.progress import Progress, BarColumn, TextColumn def get_template_path()...
268
35.52
101
25
1,960
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_3913bd658eb5f61e_2adecd83", "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." ]
[ 196 ]
[ null ]
[ 28 ]
[ 55 ]
2024-11-19T00:04:34.454723+00:00
1,568,658,193,000
f43aad88c8f0e74e6030e5b70119a8197caeaddb
3
{ "blob_id": "f43aad88c8f0e74e6030e5b70119a8197caeaddb", "branch_name": "refs/heads/master", "committer_date": 1568658193000, "content_id": "260b13e5f1c9eaf44c6ff51121ba8a54be8965c6", "detected_licenses": [ "MIT" ], "directory_id": "aa8fca5a420e202e3b3553504446e9a6309d6311", "extension": "py", "fi...
3.390625
stackv2
class CarSeat: def __init__(self, serial_number): self.serial_number = serial_number; self.latitude = "" self.longitude = "" def __delete__(self, instance): del instance def __get__(self, instance, owner): return instance def set_gps_location(self, latitude, l...
21
23.95
52
10
106
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d8abd1a902571c0d_3945033a", "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." ]
[ 20, 21 ]
[ null, null ]
[ 15, 15 ]
[ 28, 29 ]
2024-11-19T00:27:18.710719+00:00
1,528,986,638,000
84d020cea5c789d4194b9e923dbf1cd0bc04bf4d
3
{ "blob_id": "84d020cea5c789d4194b9e923dbf1cd0bc04bf4d", "branch_name": "refs/heads/master", "committer_date": 1528986638000, "content_id": "2acd53bf4586fdf0984944808b21dc06f40f6018", "detected_licenses": [ "MIT" ], "directory_id": "c157ea784cf8c69992f54da1f9347163a1eef2ba", "extension": "py", "fi...
3.1875
stackv2
"""Allocation of things to resources.""" import random import click import pandas as pd import jinja2 ALLOCATION_TABLE_HTML = './templates/allocation_table.html' ALLOCATION_ROW_HTML = './templates/allocation_row.html' @click.group() def allocate(): """Allocation of things to resources.""" pass @allocate....
98
26.47
96
17
588
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_a149bce6749de571_cc7e8801", "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." ]
[ 79, 82 ]
[ null, null ]
[ 26, 24 ]
[ 51, 49 ]
2024-11-19T00:40:19.186225+00:00
1,534,727,082,000
5cc933c749512586fc79726b1794f577d4726a64
3
{ "blob_id": "5cc933c749512586fc79726b1794f577d4726a64", "branch_name": "refs/heads/master", "committer_date": 1534727082000, "content_id": "b42cd281a688b5543bc0655c8ffef8e449fffc9c", "detected_licenses": [ "Apache-2.0", "MIT" ], "directory_id": "3d39d3914aaf15d9bc30a13b968bf1508afb8e29", "exten...
2.890625
stackv2
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from folium.plugins.marker_cluster import MarkerCluster from folium.utilities import _validate_coordinates from jinja2 import Template class FastMarkerCluster(MarkerCluster): """ Add marker clusters to a map using in...
80
38.74
79
22
653
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_75514f4fdc6ab133_dd386c93", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 42 ]
[ 59 ]
[ 17 ]
[ 31 ]
2024-11-19T00:40:21.283482+00:00
1,496,767,389,000
459ad7e9849f7595d3f6192b97b8ca68097512e1
3
{ "blob_id": "459ad7e9849f7595d3f6192b97b8ca68097512e1", "branch_name": "refs/heads/master", "committer_date": 1496767389000, "content_id": "c28245ca5622425512bb60c4d3002624e883581d", "detected_licenses": [ "MIT" ], "directory_id": "f5ac7a06292e357c750b923f216dfaaee7011341", "extension": "py", "fi...
2.671875
stackv2
from flask import url_for, redirect, request, flash from flask_login import login_user from passlib.hash import sha256_crypt def log_in(user, password): try: if user is None: flash('Invalid Credentials.') return redirect(request.url) else: pwd = user.password ...
23
30.57
67
18
144
python
[{"finding_id": "codeql_py/url-redirection_05a61ce3816db841_5d961fea", "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_...
3
true
[ "CWE-601", "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 10, 17, 20 ]
[ null, null, null ]
[ 29, 33, 33 ]
[ 40, 67, 44 ]
2024-11-19T01:06:13.140950+00:00
1,483,108,055,000
666439c1889c3595f42163bf531525e851d02326
3
{ "blob_id": "666439c1889c3595f42163bf531525e851d02326", "branch_name": "refs/heads/master", "committer_date": 1483108055000, "content_id": "98d4299266d21630870650ecd111073f732df733", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1e7558b749d700ff5ce36f0c9f64fb648524d9fe", "extension": "py"...
2.625
stackv2
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import sys import time import json, requests from argparse import ArgumentParser from flask import Flask, request, abort from linebot import ( LineBotApi, WebhookParser, WebhookHandler ) from linebot.exceptions import ( InvalidSignatu...
193
28.09
89
19
1,578
python
[{"finding_id": "codeql_py/log-injection_db0d7bdc0fc9b382_6659b76b", "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)." ]
[ 49 ]
[ null ]
[ 21 ]
[ 44 ]
2024-11-19T01:17:22.069723+00:00
1,624,070,519,000
e138d2ab75f63324cbc831ea1e70e9143cfaf4a8
2
{ "blob_id": "e138d2ab75f63324cbc831ea1e70e9143cfaf4a8", "branch_name": "refs/heads/main", "committer_date": 1624070519000, "content_id": "bcc0e9d698d3c8d6903fe3dfed0120c0ba3bc64a", "detected_licenses": [ "MIT" ], "directory_id": "3522e6452ef2609bf4d74f4df7e2c08fef5e1da0", "extension": "py", "file...
2.375
stackv2
import os, random, string, random from os import path from pyftpdlib.authorizers import DummyAuthorizer from pyftpdlib.handlers import FTPHandler from pyftpdlib.servers import FTPServer length = 8 chars = string.ascii_letters + string.digits random.seed = (os.urandom(1024)) def generate_uuid(): random_string...
71
31.44
96
18
556
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e613706a837c372b_f24d57e2", "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." ]
[ 65 ]
[ null ]
[ 28 ]
[ 36 ]
2024-11-19T01:17:32.785541+00:00
1,395,873,378,000
6ce0f44abbb6f29ef594b46b8f8191ea382cbc55
2
{ "blob_id": "6ce0f44abbb6f29ef594b46b8f8191ea382cbc55", "branch_name": "refs/heads/master", "committer_date": 1395873378000, "content_id": "717ce3f5af029504dab29cc4df1c1261007ca352", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5b9fb21e700a0a7f2bff241affd5f028a5414815", "extension": "py"...
2.34375
stackv2
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
148
39.21
80
14
1,218
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8ba9e91d5d24683d_4d14efe1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 121, 148 ]
[ null, null ]
[ 57, 58 ]
[ 76, 78 ]
2024-11-19T01:17:53.743729+00:00
1,635,186,031,000
38ac245489e37467615a88909a196d715d181713
3
{ "blob_id": "38ac245489e37467615a88909a196d715d181713", "branch_name": "refs/heads/master", "committer_date": 1635186031000, "content_id": "c986b55832f01d9fa10cb79fcc0b3c058520cf71", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "220a3b8af1f89b2c775d5894d15dfca5405f900f", "extension": "p...
2.75
stackv2
#!/usr/bin/env python # -*- coding: UTF-8 -*- def remove_html_tags(line, htmlsequences): newline = line for sequence in htmlsequences: newline = newline.replace(sequence, htmlsequences[sequence]) return newline def unicode_to_ascii(line, conversions): newline = line for sequence in conve...
203
29.51
78
14
2,072
python
[{"finding_id": "codeql_py/bad-tag-filter_05c9ebe2d6399f67_ace3bbea", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression does not match comments containing newlines." ]
[ 39 ]
[ null ]
[ 22 ]
[ 32 ]
2024-11-19T01:15:21.225498+00:00
1,634,080,094,000
fb2f3a30b643df85137e4a282f0ac3d7adc86863
2
{ "blob_id": "fb2f3a30b643df85137e4a282f0ac3d7adc86863", "branch_name": "refs/heads/master", "committer_date": 1634309531000, "content_id": "c4f7c5f1b6844bc9d1bdc91591c5dd8633c30b25", "detected_licenses": [ "MIT" ], "directory_id": "ee37a7856ca61b4fa11569104d2eef60a9a45920", "extension": "py", "fi...
2.484375
stackv2
import cv2 import re import os import argparse import pytesseract import requests import getpass from glob import glob from datetime import datetime from .emis import authenticate, submit_expenses # todo params: # --no-image-process # --dry-run # --after-process move/delete/nothing # --move-path class colors: BLU...
289
31.37
153
22
2,211
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f019cff9dc534740_2be3cefe", "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."...
5
true
[ "CWE-312", "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", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data ...
[ 96, 179, 182, 194, 199 ]
[ null, null, null, null, null ]
[ 24, 11, 15, 11, 15 ]
[ 31, 76, 80, 100, 83 ]
2024-11-19T00:43:45.303566+00:00
1,623,049,226,000
f0d4b0cb3efa057c66076c0fa2d50d29b7ded73d
3
{ "blob_id": "f0d4b0cb3efa057c66076c0fa2d50d29b7ded73d", "branch_name": "refs/heads/main", "committer_date": 1623049226000, "content_id": "6fb88deaec62bc34279285e19dcc03f25dacc721", "detected_licenses": [ "MIT" ], "directory_id": "66072f6014b3085bf0aa05d6b388dcbdda764cde", "extension": "py", "file...
2.6875
stackv2
#---------------------------------------------- import sys import requests BASE_URL = "http://127.0.0.1:8000" FRONTEND_URL = "http://127.0.0.1:3000" USER_PAYLOAD = { 'username': 'dasein2', 'email': 'dasein3@gmail.com', 'password1': 'Hello@123', 'password2': 'Hello@123', 'first...
185
25.82
116
12
1,258
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d1f93042bbfecf2f_63cfb6ad", "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)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text." ]
[ 158 ]
[ null ]
[ 18 ]
[ 116 ]
2024-11-19T01:32:05.869417+00:00
1,482,890,449,000
d45a691ea4521cc63bfd912da5ba2deb9a5977cb
2
{ "blob_id": "d45a691ea4521cc63bfd912da5ba2deb9a5977cb", "branch_name": "refs/heads/master", "committer_date": 1482890449000, "content_id": "d3ba211e18605ada93f98b4c3452853b62f5a9b0", "detected_licenses": [ "MIT" ], "directory_id": "1398d524f8fe7cd9c8ea6c051b661af0b53d5438", "extension": "py", "fi...
2.453125
stackv2
from flask import Flask, make_response, jsonify, request, abort, render_template, request import requests from lxml import html app = Flask(__name__) @app.route("/", methods=['POST']) def index(): data = request.json if data is None: return make_response(jsonify({"success": False, "message": "The body must be a ...
38
31.92
147
17
330
python
[{"finding_id": "codeql_py/flask-debug_892893ef0b330d72_73450f20", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-918" ]
[ "py/flask-debug", "py/partial-ssrf" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 38, 19 ]
[ null, null ]
[ 2, 13 ]
[ 37, 43 ]
2024-11-19T01:32:25.144732+00:00
1,624,976,676,000
05e7b2b7e4ec75d220c995013b3e5a0a58026eec
3
{ "blob_id": "05e7b2b7e4ec75d220c995013b3e5a0a58026eec", "branch_name": "refs/heads/main", "committer_date": 1624976676000, "content_id": "82a1bb8d584ef7e095f612a1d60848b76504891a", "detected_licenses": [ "MIT" ], "directory_id": "11d91d443ee701eaebf6d8253f573de0659c8b30", "extension": "py", "file...
2.609375
stackv2
import requests from requests.exceptions import Timeout import config from aws_actions import InstanceState credentials = config.CredentialsConfig() class MacawState: instance_stopped = 0 stopped = 1 starting = 2 running = 3 stopping = 4 macaw_starting = 5 macaw_stopping = 6 macaw_st...
113
33.71
116
20
810
python
[{"finding_id": "codeql_py/request-without-cert-validation_e6d29dacca3f899e_69f99cb2", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
4
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation becau...
[ 37, 60, 73, 96 ]
[ 39, 62, 77, 98 ]
[ 23, 23, 23, 23 ]
[ 49, 49, 34, 49 ]
2024-11-19T01:32:30.366301+00:00
1,690,122,817,000
30693705eca6a0665a3e53f5b09603cdcaf80e36
3
{ "blob_id": "30693705eca6a0665a3e53f5b09603cdcaf80e36", "branch_name": "refs/heads/master", "committer_date": 1690122817000, "content_id": "a14b1a3f5bee310b23f5b2c1a0886210bf475957", "detected_licenses": [ "MIT" ], "directory_id": "e5a975daa117699a1403f05c15710dc89d0efd01", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/env python3 import argparse import json import os import sys import urllib.parse import requests # Options and arguments parser = argparse.ArgumentParser() parser.add_argument("-u", "--url", help="URL to summarize", required=True) parser.add_argument("-k", "--key", help="API key", required=False) args = p...
41
25.15
95
14
262
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_31af1bb677ed3aa0_da7e98b9", "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." ]
[ 41 ]
[ null ]
[ 15 ]
[ 42 ]
2024-11-19T01:32:32.559983+00:00
1,581,644,656,000
3917bacb7e5ccf4d9b87893959fd467fcc3338ee
3
{ "blob_id": "3917bacb7e5ccf4d9b87893959fd467fcc3338ee", "branch_name": "refs/heads/master", "committer_date": 1581644656000, "content_id": "d2b1eb18696ab876ac433f23f34af65ae7ea61b3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "12efb1806725e3aadc5136cebae2a6beec2410bf", "extension": "py"...
2.796875
stackv2
""" Environment management """ import pydoc import logging from itertools import chain from pathlib import Path from glob import iglob from io import StringIO import getpass import platform from functools import partial from inspect import getfullargspec from collections.abc import Mapping from ploomber.FrozenJSON imp...
319
30.92
84
20
2,189
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_e50f5a8ad07fc15a_db27b720", "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." ]
[ 255 ]
[ null ]
[ 9 ]
[ 30 ]
2024-11-19T02:20:05.583801+00:00
1,633,301,253,000
90ff97bc87c3e61e6fc5206996f7a3613a09c4e9
3
{ "blob_id": "90ff97bc87c3e61e6fc5206996f7a3613a09c4e9", "branch_name": "refs/heads/main", "committer_date": 1633301253000, "content_id": "2ada255763055d16cd92e1ad2d217d867ac758ad", "detected_licenses": [ "MIT" ], "directory_id": "9f85dff7a96f77575265df02071e8c6c8d7ab5c7", "extension": "py", "file...
2.90625
stackv2
# Authors: Antonia Ritter and Kai Johnson # CS257 # Feb-Mar 2021 import flask import json import sys import psycopg2 from config import database, user, password from collections import defaultdict api = flask.Blueprint('api', __name__) @api.route('/menus/') def get_menus(): '''Returns a JSON dictionary of with...
215
41.44
144
15
1,821
python
[{"finding_id": "codeql_py/sql-injection_25f23ad0b6ab1ab2_8da5fe20", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2).\...
2
true
[ "CWE-089", "CWE-089" ]
[ "py/sql-injection", "py/sql-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This SQL query depends on a [user-provided value](1).\nThis SQL query depends on a [user-provided value](2).\nThis SQL query depends on a [user-provided value](3).\nThis SQL query depends on a [user-provided value](4).\nThis SQL query depends on a [user-provided value](5).\nThis SQL query depends on a [user-provid...
[ 200, 202 ]
[ null, null ]
[ 28, 28 ]
[ 38, 38 ]
2024-11-19T00:59:30.319882+00:00
1,622,851,342,000
6ea000fda5092cb169f07107f2ee023e0b75946b
4
{ "blob_id": "6ea000fda5092cb169f07107f2ee023e0b75946b", "branch_name": "refs/heads/master", "committer_date": 1622851342000, "content_id": "ced832e0e86e9421c30f8099ec633dc914adeb1d", "detected_licenses": [ "MIT" ], "directory_id": "2c95632b1bde0001d3b8386bf57914789cf18da8", "extension": "py", "fi...
4.3125
stackv2
#!/usr/bin/env python3 """ Encrypt and decrypt secret messages using the 'Gartenzaun' method. The method proceeds by separating the letters into two groups according to whether their position in the sentence is even or odd. After that, both groups of letters are concatenated to form the secret encypted version of the ...
80
28.8
90
17
579
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fe639efcfb90b5c1_1e2ea683", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text." ]
[ 80 ]
[ null ]
[ 15 ]
[ 48 ]
2024-11-19T00:59:42.178383+00:00
1,693,753,660,000
3bf6f868866ccf88e62cf75c4b3f493b56f29ba3
2
{ "blob_id": "3bf6f868866ccf88e62cf75c4b3f493b56f29ba3", "branch_name": "refs/heads/master", "committer_date": 1693753660000, "content_id": "7d51309ad822c01d2e49f3d4b030ab4cb9a18638", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "9ed3b16b3da72e4c47a04f2f2e3ef395e9fd9f20", "extension": "p...
2.390625
stackv2
# the logic here is largely adapted from xbps-src, since writing this stuff # from scratch is a pain; it is adapted to use less cursed regexes than PCRE # (mainly having verbose regex really helps readability) and allows for custom # hooks inside update.py files import builtins import importlib import importlib.util i...
510
26.6
78
26
3,576
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_254c135ea65a07f0_5b42da1d", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [ftp.gnome.org](1) may be at an arbitrary position in t...
19
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitizatio...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The string [ftp.gnome.org](1) may be at an arbitrary position in the sanitized URL.", "The string [chimera-linux.org](1) may be at an arbitrary position in the sanitized URL.", "The string [launchpad.net](1) may be at an arbitrary position in the sanitized URL.", "The string [pythonhosted.org](1) may be at a...
[ 135, 158, 161, 163, 164, 166, 167, 170, 171, 172, 257, 260, 267, 276, 284, 293, 293, 303, 329 ]
[ null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null ]
[ 16, 13, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 40, 18, 18, 44, 18, 18 ]
[ 36, 39, 38, 41, 35, 38, 38, 37, 34, 37, 40, 43, 37, 65, 40, 40, 71, 39, 49 ]
2024-11-19T01:00:02.400310+00:00
1,693,493,010,000
5b4672be00d4e7590bdcb7149dc0b3b18a794c3e
3
{ "blob_id": "5b4672be00d4e7590bdcb7149dc0b3b18a794c3e", "branch_name": "refs/heads/master", "committer_date": 1693493010000, "content_id": "cd2a957cf79a78413e46f040ea5650f20be9ecaf", "detected_licenses": [ "MIT" ], "directory_id": "8ed2700f29e669a05e324c23fc3cced361c25dd1", "extension": "py", "fi...
2.96875
stackv2
"""Standard script to collect all the logs from ceph cluster through and place it in directory provided Through installer node get all other nodes in the cluster, generate sosreport for all the nodes obtained. then upload all the collected logs to magna/directory(run_dir) provided Typical usage example: python s...
128
36.08
109
14
1,091
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_9b62f7651162d0eb_fb3c4dd2", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/paramiko-missing-host-key-validation", "py/paramiko-missing-host-key-validation" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe.", "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 52, 103 ]
[ null, null ]
[ 9, 5 ]
[ 68, 70 ]
2024-11-19T01:00:02.547808+00:00
1,550,091,895,000
8a26f36a648de23a3b01892f6b22bca57b5678bd
2
{ "blob_id": "8a26f36a648de23a3b01892f6b22bca57b5678bd", "branch_name": "refs/heads/master", "committer_date": 1550091895000, "content_id": "e44b4048bb867bfcfdc8d6458ae0c6cd7c6da4fb", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "e405846b2ef13a8c19e39187feb9167d23bc6fd8", "extension": "p...
2.421875
stackv2
#!/usr/bin/env python """ Demonstrate a controller firmware upgrade using the Embedded Web Services API. """ import json import logging import sys import time from pprint import pformat import requests import urllib3 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # Configurable Parameters # An ...
172
34.84
114
18
1,340
python
[{"finding_id": "codeql_py/request-without-cert-validation_a9fe45990bb411d8_503a7077", "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)." ]
[ 95, 130 ]
[ null, 131 ]
[ 20, 28 ]
[ 82, 115 ]
2024-11-19T01:11:42.627534+00:00
1,693,470,036,000
120c0f6ea8ee1fe24670bc6660e4e41cbb2c12b9
3
{ "blob_id": "120c0f6ea8ee1fe24670bc6660e4e41cbb2c12b9", "branch_name": "refs/heads/main", "committer_date": 1693470036000, "content_id": "743790963d15ca4ae61247f0b234d3772a3d7a81", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "af20739e34a39f0a0a99537ce047f502a3531ea5", "extension": "py"...
2.71875
stackv2
"""API handlers for the Jupyter Server example.""" from jupyter_server.base.handlers import JupyterHandler from jupyter_server.extension.handler import ExtensionHandlerJinjaMixin, ExtensionHandlerMixin from jupyter_server.utils import url_escape class ParameterHandler(ExtensionHandlerMixin, JupyterHandler): """A ...
47
31.34
94
14
332
python
[{"finding_id": "codeql_py/reflective-xss_8095abcc8dbc6039_05923dfb", "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)." ]
[ 17 ]
[ null ]
[ 20 ]
[ 54 ]
2024-11-19T01:22:04.340578+00:00
1,584,344,247,000
1772ede87d90dc857d37862926ea1914236c1307
3
{ "blob_id": "1772ede87d90dc857d37862926ea1914236c1307", "branch_name": "refs/heads/master", "committer_date": 1584344247000, "content_id": "6fc7b693b5537642069194d4371ea8accd9dd7fe", "detected_licenses": [ "MIT" ], "directory_id": "4dbd1795b925b5b2071c1b09c471a5c1dceb5184", "extension": "py", "fi...
2.734375
stackv2
import jinja2 import yaml # Where's the folder with my templates (or my folders, if multiple) template_loader = jinja2.FileSystemLoader(searchpath="./templates") # Instance of the Environment class. Gives the loader (above), optionally parameters like # block strings, variable strings etc. template_env = jinja2.Envir...
27
34.89
89
9
212
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_2dbffc69493c52a8_f9aa6f20", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 9 ]
[ null ]
[ 16 ]
[ 58 ]
2024-11-19T01:56:34.143057+00:00
1,624,729,934,000
e3d3fd7f9ca5fe8cedbf8e73e7eb05cb1f540e08
3
{ "blob_id": "e3d3fd7f9ca5fe8cedbf8e73e7eb05cb1f540e08", "branch_name": "refs/heads/master", "committer_date": 1624729934000, "content_id": "cf203427d3e9b157e617ef7c2bda9af42af0dcfd", "detected_licenses": [ "MIT" ], "directory_id": "527595f5dea7cb3746c4b204798d02078a1dfeb1", "extension": "py", "fi...
2.90625
stackv2
import base64 from Crypto.Cipher import AES from Crypto.Util import Padding import itertools #English language character frequency analysis CHARACTER_FREQ = { 'a': 0.0651738, 'b': 0.0124248, 'c': 0.0217339, 'd': 0.0349835, 'e': 0.1041442, 'f': 0.0197881, 'g': 0.0158610, 'h': 0.0492888, 'i': 0.0558094, 'j': 0.0...
133
28.29
161
15
1,300
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_eea94df287040a75_29afd0d1", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ...
1
true
[ "CWE-327" ]
[ "py/weak-cryptographic-algorithm" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used." ]
[ 119 ]
[ null ]
[ 17 ]
[ 44 ]
2024-11-19T01:56:45.250689+00:00
1,547,542,996,000
f274799133523871d31c61456e46ba36b3e774f6
3
{ "blob_id": "f274799133523871d31c61456e46ba36b3e774f6", "branch_name": "refs/heads/master", "committer_date": 1547542996000, "content_id": "39c5b7a7079bca0b00d3e2e602bb7c983f0c06f4", "detected_licenses": [ "MIT" ], "directory_id": "1084f447c9bf545cb7b9c4a7b5bdae0227865966", "extension": "py", "fi...
2.890625
stackv2
import glob import pandas as pd import re class TranscriptReader: @staticmethod def transcripts_to_dataframe(directory): rows_list = [] path = directory + '**/*TRANSCRIPT.csv' for filename in glob.iglob(path, recursive=True): transcript = pd.read_csv(filename, sep='\t') ...
40
35.08
94
23
298
python
[{"finding_id": "codeql_py/redos_f813aaa499d28b48_80e4bcf7", "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/'." ]
[ 15 ]
[ null ]
[ 32 ]
[ 34 ]
2024-11-19T02:10:26.724925+00:00
1,474,563,442,000
501ef87141fcb2260fe99b994a9ed9ab0c2af9af
3
{ "blob_id": "501ef87141fcb2260fe99b994a9ed9ab0c2af9af", "branch_name": "refs/heads/master", "committer_date": 1474563442000, "content_id": "32a5c8e39191e4e409723fa53f39698e1ae8d018", "detected_licenses": [ "MIT" ], "directory_id": "a75968524cf62d57a846e26797248280a498e246", "extension": "py", "fi...
2.671875
stackv2
import os,sys import hashlib import multiprocessing def md5(key): m = hashlib.md5() m.update(key) return m.hexdigest() current_path = os.getcwd() print current_path def process_one(input_file, output_file): test = None train = None print "input[%s] output[%s]" % (input_file,output_file) ...
79
29.03
99
17
712
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_e7973526959e51b1_b04e3b9f", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
8
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data", "py/clear-text-storage...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](1) as clear text.", "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](1) as clear text.", "This expression stores [sensiti...
[ 57, 59, 60, 61, 62, 54, 55, 56 ]
[ null, null, null, null, null, null, null, null ]
[ 22, 23, 23, 23, 23, 22, 22, 22 ]
[ 57, 58, 58, 58, 58, 57, 57, 57 ]
2024-11-19T02:10:28.037739+00:00
1,610,248,689,000
7f283a7e3c49da97f27c65e651859e7ba6d6f57a
3
{ "blob_id": "7f283a7e3c49da97f27c65e651859e7ba6d6f57a", "branch_name": "refs/heads/master", "committer_date": 1610248689000, "content_id": "e9dd2260be8b95622e944b547f23e28fad279abd", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "6f3b5ce1294984fe45c77e5cdb06bcb3cffede0c", "extension": "p...
3.140625
stackv2
import base64 import requests import hashlib import os BLUE, RED, WHITE, YELLOW, MAGENTA, GREEN, END = '\33[94m', '\033[91m', '\33[97m', '\33[93m', '\033[1;35m', '\033[1;32m', '\033[0m' # Please Enter Full URL With Protocal i.e. http:// or https:// SERVER_URL = "http://localhost/chat" #Replace This With Your URL ...
154
32.52
130
23
1,186
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_245b65ef2f6f6ce9_981fdc22", "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.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi...
[ 13 ]
[ null ]
[ 26 ]
[ 56 ]
2024-11-19T02:10:36.543625+00:00
1,554,440,842,000
c8ae47955554384884564eede365872de42a5bf3
3
{ "blob_id": "c8ae47955554384884564eede365872de42a5bf3", "branch_name": "refs/heads/master", "committer_date": 1554440842000, "content_id": "e23f3663e691b251cc72e2486e10311cdfb32ef3", "detected_licenses": [ "MIT" ], "directory_id": "d84f37361ce1903cec4f4438cdba9b8691c604a2", "extension": "py", "fi...
2.546875
stackv2
#!/home/dlmachine/.conda/envs/resume_env/bin/python from flask import Flask import jinja2 import markdown import yaml import os import pdfkit app = Flask(__name__) @app.route('/') def main(): config = yaml.safe_load(open("config.yml")) # Read in Markdown Content md = open(config["md_template"]).read(...
30
26.7
87
15
198
python
[{"finding_id": "codeql_py/flask-debug_c48ab1383dd8ce89_32c1ccf0", "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/jinja2/autoescape-false" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 30, 22 ]
[ null, null ]
[ 5, 17 ]
[ 24, 51 ]
2024-11-19T02:45:21.438300+00:00
1,554,962,925,000
6cce8326177724409d7c99ec2a100808008b9b8b
2
{ "blob_id": "6cce8326177724409d7c99ec2a100808008b9b8b", "branch_name": "refs/heads/master", "committer_date": 1554962925000, "content_id": "15f6a88ea29b0603826e4ce268519870846e1283", "detected_licenses": [ "MIT" ], "directory_id": "85e1e47240827b40b2941faac6ba1f9b17189ae6", "extension": "py", "fi...
2.5
stackv2
#! /usr/local/bin/python3.5 import socket import struct import threading import textwrap TAB_1 = '\t - ' TAB_2 = '\t\t - ' TAB_3 = '\t\t\t - ' TAB_4 = '\t\t\t\t - ' DATA_TAB_1 = '\t ' DATA_TAB_2 = '\t\t ' DATA_TAB_3 = '\t\t\t ' DATA_TAB_4 = '\t\t\t\t ' def run(id): conn = socket.socket(socket.AF_PACKET,...
114
32.71
132
18
1,112
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_98467ed3a30fb21f_e6d1b56a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
3
true
[ "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (priva...
[ 28, 36, 37 ]
[ null, null, null ]
[ 19, 23, 23 ]
[ 107, 108, 96 ]
2024-11-19T02:45:46.164764+00:00
1,382,335,943,000
c10e0c124de375201d7b946f360c30edda6e2224
3
{ "blob_id": "c10e0c124de375201d7b946f360c30edda6e2224", "branch_name": "refs/heads/master", "committer_date": 1382335943000, "content_id": "513ebcc1e4ec4a0e62efd977f58c01d307794eb0", "detected_licenses": [ "MIT" ], "directory_id": "72341c25fee4149d03f00a5d3a768953867f2761", "extension": "py", "fi...
2.53125
stackv2
##--Michael duPont ##--v2.0.1 [2013-10-21] ##--Function order: ##--Main functions: sendData , sendFile , recvFile , viewFileAndSend , startUp ##--Minor functions: saltHash , getFileSize , getKeyString , hashFile , saveStorage , getUnPw , compareVersions , ProgressBar , stringToList from socket import * import hashlib ...
286
39.08
151
23
3,162
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_a696f29546e7e2d8_bb112c02", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally e...
[ 181 ]
[ null ]
[ 35 ]
[ 50 ]
2024-11-19T02:45:48.117482+00:00
1,516,778,853,000
2835c99e0f55a7ef92ee17b3733d5dec92c9c66a
3
{ "blob_id": "2835c99e0f55a7ef92ee17b3733d5dec92c9c66a", "branch_name": "refs/heads/master", "committer_date": 1516778853000, "content_id": "7db0131fa5b0eaeddae546bf58f57dca874f94f4", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a08e0cc46841693394aaabe3df7084dd48e51a2e", "extension": "p...
2.875
stackv2
#!/usr/bin/env python3 import xml.etree.ElementTree as eTree from socket import gethostbyname from sys import exc_info from hashlib import md5 from urllib import request from urllib.error import URLError from argparse import ArgumentParser from json import dumps def get_skey(storage, login, password): """ :p...
279
43.01
119
18
2,924
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_b5999079aa292eaf_b1b6f52d", "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.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi...
[ 30 ]
[ null ]
[ 22 ]
[ 41 ]
2024-11-19T02:45:49.672459+00:00
1,629,955,375,000
636edcdba442d8a54c76bdf984d36d577b365c51
3
{ "blob_id": "636edcdba442d8a54c76bdf984d36d577b365c51", "branch_name": "refs/heads/master", "committer_date": 1629955375000, "content_id": "4155ab539ea505159fbf1f2d7771f93a1aab9f63", "detected_licenses": [ "MIT" ], "directory_id": "4d0c0ddc28d6a86cc0ce988514e60d6819caaa05", "extension": "py", "fi...
2.65625
stackv2
from base64 import b64encode import requests import json message = "username" + ':' + "password!" message_bytes = message.encode('UTF-8') basic_token = b64encode(message_bytes) payload = json.dumps({ "grant_type": "client_credentials" }) # Base token is obtained by computing base64 encoding of username and passwor...
21
30.52
78
11
166
python
[{"finding_id": "codeql_py/request-without-cert-validation_f06467acd3ff4b47_52c0714f", "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)." ]
[ 18 ]
[ 19 ]
[ 8 ]
[ 52 ]
2024-11-19T02:45:53.588972+00:00
1,618,626,585,000
093116958f98aa6e3f29ab4296ec8313a81cabef
3
{ "blob_id": "093116958f98aa6e3f29ab4296ec8313a81cabef", "branch_name": "refs/heads/main", "committer_date": 1618626585000, "content_id": "a1bdaf2f2848add08f19d6f2eeade6f5105c2895", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ef729e41a97418732de01c97194599b5b30368d2", "extension": "py", ...
2.6875
stackv2
#!/usr/local/bin/python3 from dotenv import load_dotenv load_dotenv() from contextlib import redirect_stdout import requests, smtplib, ssl, os, time, datetime, json, sys from datetime import datetime with open('./config.json') as config: config_data = json.load(config) def send_email(stockandprice): password = o...
59
33.41
113
15
501
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_52e0546ad36557b9_335b03d7", "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." ]
[ 45 ]
[ null ]
[ 9 ]
[ 12 ]