added
stringlengths
32
32
created
int64
1,244B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.25
source
stringclasses
1 value
text
stringlengths
324
20.1k
num_lines
int64
16
598
avg_line_length
float64
15.1
58.3
max_line_length
int64
33
179
ast_depth
int64
8
39
length
int64
101
3.8k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
1.1k
265k
sast_codeql_findings_count
int64
1
45
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
cwe_ids
listlengths
1
45
rule_ids
listlengths
1
45
confidences
listlengths
1
45
severities
listlengths
1
45
messages
listlengths
1
45
line_starts
listlengths
1
45
line_ends
listlengths
1
45
column_starts
listlengths
1
45
column_ends
listlengths
1
45
2024-11-19T01:55:52.047780+00:00
1,564,683,823,000
6fea9daedf2392d540d687a6bcb49670d942ef94
3
{ "blob_id": "6fea9daedf2392d540d687a6bcb49670d942ef94", "branch_name": "refs/heads/master", "committer_date": 1564683823000, "content_id": "0689898173b1e3745bbe3bce910505ffd02ecb73", "detected_licenses": [ "MIT" ], "directory_id": "ae6042978489b559f538a57f9590091c3d4676f4", "extension": "py", "fi...
3.015625
stackv2
from __future__ import absolute_import import jinja2 import pandas as pd from .base import ViewportInterface from ..data_utils.viewport_helpers import autocompute_viewport view_state_template = jinja2.Template(''' var INITIAL_VIEW_STATE = { {% if position %} position: {{ position }}, {% else %} latitude: {{ la...
91
32.03
115
12
696
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_3b74a0892306c886_7f014d4a", "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." ]
[ 11 ]
[ 22 ]
[ 23 ]
[ 14 ]
2024-11-19T02:08:00.943294+00:00
1,624,628,118,000
fbae09ab14033d1715ba3e226cb88a7ba208c4db
3
{ "blob_id": "fbae09ab14033d1715ba3e226cb88a7ba208c4db", "branch_name": "refs/heads/master", "committer_date": 1624628118000, "content_id": "470ecddfdf26272d7fd3c38b6bccd81fd72223b0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "244f6720b1112e4b756f42f9d716c3343580da8b", "extension": "py"...
2.953125
stackv2
""" The Result class contains the results of the CRDS algorithm between two submissions. It renders the similarity and reordering User Interfaces as HTML files. It can also print similarity scores to the command line or to a file. """ import filecmp from jinja2 import Template class Result(): """ The Result...
216
37.96
106
21
1,944
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_b1dd64d652ee051b_e2b036bd", "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." ]
[ 84, 137 ]
[ null, null ]
[ 24, 24 ]
[ 42, 42 ]
2024-11-19T02:17:21.488118+00:00
1,564,239,716,000
52a1dd92f6a90aef6f0d5e04ea10d26456482b75
3
{ "blob_id": "52a1dd92f6a90aef6f0d5e04ea10d26456482b75", "branch_name": "refs/heads/master", "committer_date": 1564239716000, "content_id": "e01b50b66bb0fe0886ccd7246e7d4f5e2ca8b9ae", "detected_licenses": [ "MIT" ], "directory_id": "b591231690c20ff1cab6cb26b8f34c8a4fd63c6c", "extension": "py", "fi...
2.625
stackv2
############################################################################### # Written by: Aleks Lambreca # Creation date: 24/03/2018 # Last modified date: 20/08/2018 ############################################################################### from __future__ import absolute_import from __fut...
140
27.99
98
15
966
python
[{"finding_id": "codeql_py/request-without-cert-validation_24188fa78e12e3eb_c69290ef", "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)." ]
[ 122 ]
[ null ]
[ 9 ]
[ 66 ]
2024-11-19T02:17:26.632803+00:00
1,555,765,471,000
df4d535ef71cffa98d1e472172092184a575ae44
3
{ "blob_id": "df4d535ef71cffa98d1e472172092184a575ae44", "branch_name": "refs/heads/master", "committer_date": 1555765471000, "content_id": "3dce4fe3e7754bbaba26813cc1488aa9f222cddd", "detected_licenses": [ "MIT" ], "directory_id": "4affbe7c09450650909a48fb2335a3541cbc6891", "extension": "py", "fi...
3.109375
stackv2
# imports import os import re import sys import fnmatch class ProcessData: def __init__(self, repo_root): """ :param repo_root: repository path Ex: ../Desktop/repos/myrepository """ self.repo_root = repo_root def count_lines(self): """ count lines of c...
83
33.37
98
19
635
python
[{"finding_id": "codeql_py/overly-large-range_48d82b9aee977b40_b4ab681a", "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\\\\[\\\\\\\\]^_\\]." ]
[ 46 ]
[ null ]
[ 48 ]
[ 51 ]
2024-11-19T02:17:48.045935+00:00
1,505,147,975,000
61fefb771f0e40de429b7aa252a45bcabeae6a9c
3
{ "blob_id": "61fefb771f0e40de429b7aa252a45bcabeae6a9c", "branch_name": "refs/heads/master", "committer_date": 1505147975000, "content_id": "4fc55516abbed985d2e948ae9dd7f3348dab9129", "detected_licenses": [ "MIT" ], "directory_id": "125452749a4f3987fcf8be3c93651ccae3fe1684", "extension": "py", "fi...
2.671875
stackv2
#!/usr/bin/env python3 import boto3 from sys import argv from jinja2 import Template cf = boto3.resource('cloudformation') def get_stack_output(stack_name, key): iterator = filter(lambda x: x['OutputKey'] == key, cf.Stack(stack_name).outputs) res = next(iterator, None) if not res: ...
29
22.55
78
13
159
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_9e918054bc19ec29_43668633", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 20 ]
[ null ]
[ 12 ]
[ 30 ]
2024-11-19T02:18:03.310141+00:00
1,433,714,586,000
7bcafa85b9e780338cb31147fc9e437dd770e28b
3
{ "blob_id": "7bcafa85b9e780338cb31147fc9e437dd770e28b", "branch_name": "refs/heads/master", "committer_date": 1433714586000, "content_id": "25b78f760d760cb3e0356ea98a91c7e30d2d7e8f", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "4907c9609af9e053556b4167a267296dc81dc1fc", "extension": "p...
2.953125
stackv2
"""Make a config file, or update a cookie secret in a settings file, or just print out a cookie secret. """ from __future__ import print_function import os from magpy.management import BaseCommand from magpy.server.utils import make_cookie_secret from magpy.server.config import MagpyConfigParser class Command(BaseCo...
38
31.39
78
13
258
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1a3781f970546260_db14824d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text." ]
[ 25 ]
[ null ]
[ 20 ]
[ 33 ]
2024-11-19T02:29:50.908203+00:00
1,627,599,405,000
412d472e29ff49ba872a332ed2fd44995089a5e1
3
{ "blob_id": "412d472e29ff49ba872a332ed2fd44995089a5e1", "branch_name": "refs/heads/master", "committer_date": 1627599405000, "content_id": "16ad1e902102f19b5a104d4b0037cdf70c354314", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "32d31220ea973244620a0471dcee7ec8080bcc7c", "extension": "p...
2.75
stackv2
#import all necessary packages import requests import bs4 import time import pandas as pd import csv import os import re import lxml import datetime import random import sys def get_sitemap(): #gets the sitemap and full list of links of MD profiles sitemap1 = 'https://doctors.cpso.on.ca/sitemaps/sitemap-1.txt'...
317
38.84
140
17
3,101
python
[{"finding_id": "codeql_py/overly-large-range_044ff1026c6a54a7_37ead3e2", "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\\\\[\\\\\\\\]^_\\].", ...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]." ]
[ 30, 31 ]
[ null, null ]
[ 58, 58 ]
[ 61, 61 ]
2024-11-19T02:30:05.064135+00:00
1,562,838,285,000
c0984935bfb4856ffd2412b5a1f8100ab28c7396
2
{ "blob_id": "c0984935bfb4856ffd2412b5a1f8100ab28c7396", "branch_name": "refs/heads/master", "committer_date": 1562838285000, "content_id": "b8afa31b2c842a39544387e7d9f7b356e3f94084", "detected_licenses": [ "MIT" ], "directory_id": "efb518c57ce7ecb86d228b28fccc4eeea7c11b44", "extension": "py", "fi...
2.359375
stackv2
import json import os import socketserver from http.server import BaseHTTPRequestHandler import urllib3 from knack.log import get_logger from egor.meta import MetaDataHandler logger = get_logger(__name__) task_meta = None def extract_name(task_name: str): return task_name.replace(' ', '').replace('.', '') d...
96
31.18
85
16
696
python
[{"finding_id": "codeql_py/path-injection_6e2c6de193327f73_f1c9aab3", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
5
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 43, 44, 45, 67, 70 ]
[ null, null, null, null, null ]
[ 17, 17, 17, 19, 19 ]
[ 30, 31, 32, 34, 35 ]
2024-11-19T02:30:05.460713+00:00
1,524,323,850,000
f16185cc5c0f93af480281074cce411d2a48a81a
3
{ "blob_id": "f16185cc5c0f93af480281074cce411d2a48a81a", "branch_name": "refs/heads/master", "committer_date": 1524323850000, "content_id": "85d8a47507e996db68a248a7573226148529c2a4", "detected_licenses": [ "MIT" ], "directory_id": "f2488f09af1b0aa147cbc7dfb08fc9ef382bc708", "extension": "py", "fi...
2.8125
stackv2
import os, re from src.codingfix import fix_coding def parse_file(path): question_pattern = r'P\n' \ '%(?P<category>.*?)%\n' \ '(\$(?P<image>([^\$]|\n)*?)\$\n)?' \ '@(?P<question>([^@]|\n)*?)@\n' \ '@(?P<answers>([^@]|\n)...
42
34.83
117
14
336
python
[{"finding_id": "codeql_py/redos_483a8c4398545454_e4433ca7", "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 'P\\n%%\\n$' and containing many r...
3
true
[ "CWE-1333", "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos", "py/redos" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with 'P\\n%%\\n$' and containing many repetitions of '\\n'.", "This part of the regular expression may cause exponential backtracking on strings starting with 'P\\n%%\\n@' and containing many repetitions of '\\n'.", "Thi...
[ 9, 10, 11 ]
[ null, null, null ]
[ 37, 36, 33 ]
[ 49, 47, 44 ]
2024-11-19T02:30:37.187300+00:00
1,577,700,063,000
b0cbd81ca9c5b17d28d5f5aba1f988120ce784a3
4
{ "blob_id": "b0cbd81ca9c5b17d28d5f5aba1f988120ce784a3", "branch_name": "refs/heads/master", "committer_date": 1577700063000, "content_id": "e2b297db7165335a7e81bdc69a41cd236512b96c", "detected_licenses": [ "MIT" ], "directory_id": "299b225a1deef2a621fed8a41a99dadc8d432ced", "extension": "py", "fi...
3.59375
stackv2
import requests, json # Begin by getting the Google Maps API key. You can get this by going to: https://developers.google.com/maps/gmp-get-started f = open("maps_api_key.txt", "r") apiKey = f.read() f.close # Convert the input location to coordinates, using the geocode Maps API. def Get_Coordinates(apiKey, address): ...
63
33.89
129
15
560
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cee5efc331ef7959_90fc0b09", "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." ]
[ 59 ]
[ null ]
[ 7 ]
[ 83 ]
2024-11-19T02:41:43.599216+00:00
1,543,466,043,000
b8ec1bfdc8708f7c1fa4cf99e95e1c642434fa9e
2
{ "blob_id": "b8ec1bfdc8708f7c1fa4cf99e95e1c642434fa9e", "branch_name": "refs/heads/master", "committer_date": 1543466043000, "content_id": "9b8c8c3b7b9babf01168fba74d04b2f2aae157d7", "detected_licenses": [ "MIT" ], "directory_id": "74a08ebeb092a87bcfee759acb55c37d6827806e", "extension": "py", "fi...
2.421875
stackv2
#!/usr/bin/env python3 import sys from git import Repo import os import pdb from unidiff import PatchSet from twilio.rest import Client client = Client() def process_commits_between(old, new): repo = Repo(os.environ["GIT_REPO_PATH"]) thiscommit = repo.commit(new) if thiscommit.message.startswith("I...
57
28.72
117
20
394
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9fca09a4fd2fbf14_87ca586d", "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." ]
[ 32 ]
[ null ]
[ 27 ]
[ 69 ]
2024-11-19T02:42:22.660522+00:00
1,504,804,179,000
5504639ea284d61242d8e57af7737eba6a14374b
3
{ "blob_id": "5504639ea284d61242d8e57af7737eba6a14374b", "branch_name": "refs/heads/master", "committer_date": 1504804179000, "content_id": "192584d5f05cd65ff67b8e562baa3917d2c37d5a", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "c9eae28d9d8cd1b1381bbc1efbd097d53a8fec11", "extension": "p...
2.5625
stackv2
from flask import Flask, url_for, request, render_template from redis import Redis redis = Redis() app = Flask(__name__) @app.route("/") def index(): name = None website_links = None website_links = get_website_links() return render_template("main.html", name=name, website_links=website_links) @app...
84
25.98
107
10
546
python
[{"finding_id": "codeql_py/flask-debug_fd26665d609d846b_affff60a", "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)." ]
[ 83, 42 ]
[ null, null ]
[ 5, 12 ]
[ 40, 32 ]
2024-11-19T02:42:28.799735+00:00
1,533,184,330,000
46f609efdaa39c1757552bb5fe043c17e29cc026
3
{ "blob_id": "46f609efdaa39c1757552bb5fe043c17e29cc026", "branch_name": "refs/heads/master", "committer_date": 1533184330000, "content_id": "5577a68b07b05a079a3e8baad3b15cc5451e4ee8", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "172995d1a005687186d7da4a3973ed0c49b119e1", "extension": "p...
2.515625
stackv2
# -*- coding: utf-8 -*- """Public section, including homepage and signup.""" from flask import Blueprint, redirect, render_template, request, url_for from flask_login import login_required, login_user, logout_user from StupidMart.extensions import login_manager from StupidMart.admin.models import User blueprint = Blu...
76
26.58
76
15
452
python
[{"finding_id": "codeql_py/url-redirection_1b420d9830d2c9aa_c7e38c87", "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)." ]
[ 54 ]
[ null ]
[ 29 ]
[ 41 ]
2024-11-18T18:05:51.745849+00:00
1,693,803,372,000
ee3d77b2276fe344371fa69bd41e0d757ec28947
2
{ "blob_id": "ee3d77b2276fe344371fa69bd41e0d757ec28947", "branch_name": "refs/heads/main", "committer_date": 1693803372000, "content_id": "d794d100c3e3450257f52e67753450fb6d409ff2", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "48ba30b160e58bcd3587ff03693242f7b08755ad", "extension": "py"...
2.3125
stackv2
import os import pandas import numpy as np from shutil import rmtree from distutils.dir_util import copy_tree import tarfile from pyiron_base.project.archiving.shared import getdir from pyiron_base.utils.instance import static_isinstance from pyiron_base.state import state def update_id_lst(record_lst, job_id_lst): ...
99
33.27
85
15
778
python
[{"finding_id": "codeql_py/tarslip_c969a286af432fc3_81e54235", "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)." ]
[ 26 ]
[ null ]
[ 5 ]
[ 8 ]
2024-11-18T18:15:58.217214+00:00
1,549,262,509,000
a2a1262174609faf8004012745cce4dafaba74e7
3
{ "blob_id": "a2a1262174609faf8004012745cce4dafaba74e7", "branch_name": "refs/heads/master", "committer_date": 1549262509000, "content_id": "62a83ac354569a1a494df6a7c53793f463c50e29", "detected_licenses": [ "MIT" ], "directory_id": "68016bfc3aa1d449bc74f670bd3a4bee3bcbe9d8", "extension": "py", "fi...
2.546875
stackv2
#!flask/bin/python import sqlite3 from flask import Flask, jsonify, make_response, g, render_template from flask_httpauth import HTTPBasicAuth from flask_sqlalchemy import SQLAlchemy # See important note below from model import Event app = Flask(__name__) app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////home/ravi...
166
27
94
14
1,077
python
[{"finding_id": "codeql_py/flask-debug_0242dae2664c98c1_75963c17", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-089" ]
[ "py/flask-debug", "py/sql-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This SQL query depends on a [user-provided value](1)." ]
[ 166, 141 ]
[ null, null ]
[ 5, 28 ]
[ 24, 33 ]
2024-11-18T18:16:14.809733+00:00
1,576,856,000,000
e34f5b8715301683ccb76fb65f835e52e458e3c0
2
{ "blob_id": "e34f5b8715301683ccb76fb65f835e52e458e3c0", "branch_name": "refs/heads/master", "committer_date": 1576856000000, "content_id": "97ba29d0412cd35751636e97221771524ff5e31c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a6bf5221d75a0af80d04672b0131f0d984af0663", "extension": "py"...
2.359375
stackv2
#!/usr/bin/env python3 import boto3 import jinja2 import argparse from re import match module_source="./modules/aws_iam_group" import_path="module.us-east-1.module" def generate_terraform_code(iam_group, module_source, template): return template.render( iam_policy = iam_policy, safe_name = iam_po...
111
42.76
113
16
1,041
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_2579363e17de90ad_cea77bba", "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." ]
[ 78 ]
[ 80 ]
[ 16 ]
[ 6 ]
2024-11-18T18:16:21.180409+00:00
1,688,659,531,000
5846d5611adc8a80433610b38c85d663a26b66f9
2
{ "blob_id": "5846d5611adc8a80433610b38c85d663a26b66f9", "branch_name": "refs/heads/master", "committer_date": 1688659531000, "content_id": "e36f19800cf4acfe0ceeb7b34c9994052abca4a7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d28c5a2993f5ba6133845ee724c188e0b3c3775a", "extension": "py"...
2.359375
stackv2
import requests import logging import logging.config import json import holidays from datetime import datetime, timedelta from iso8601 import parse_date from unicodedata import normalize from python.common.config import Config import base64 logging.config.dictConfig(Config.LOGGING) def list_of_weekdays_dates_between...
355
38.22
127
17
3,348
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_af6c1cde06ce12cc_bb7d6d13", "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-295" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/request-without-cert-validation" ]
[ "HIGH", "HIGH", "HIGH", "MEDIUM" ]
[ "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 request may run without certificate validation because [it is disabled](1)." ]
[ 139, 226, 348, 235 ]
[ null, null, 354, null ]
[ 18, 18, 18, 20 ]
[ 78, 66, 8, 95 ]
2024-11-18T18:59:38.412151+00:00
1,607,597,697,000
0605002cc4c7ac6d670b4e5bdf4712a258fc4f6c
2
{ "blob_id": "0605002cc4c7ac6d670b4e5bdf4712a258fc4f6c", "branch_name": "refs/heads/master", "committer_date": 1607597697000, "content_id": "dec99c324aa6417d9493110dc068c96b13fb2e60", "detected_licenses": [ "MIT" ], "directory_id": "0bd4ab35148886d2052bf5ccce963fa8bc199fbb", "extension": "py", "fi...
2.34375
stackv2
#!/usr/bin/python3 # =================================================================================== # Project: TropPo # v. 1.0 2020-03-01, ICTP Wireless Lab # Programmer: Marco Rainone - ICTP Wireless Lab # Specifications, revisions and verifications: # Marco Zennaro, Ermanno Pietros...
145
35.64
85
15
1,306
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_5ca0bdd7db80e753_965d5750", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text." ]
[ 144 ]
[ null ]
[ 27 ]
[ 31 ]
2024-11-18T18:59:40.671644+00:00
1,610,248,997,000
bc1de34386febd277a4d291e6c472bd326fab015
2
{ "blob_id": "bc1de34386febd277a4d291e6c472bd326fab015", "branch_name": "refs/heads/main", "committer_date": 1610248997000, "content_id": "9b02a6cfd41dc22a925cc18b559d9b62071e1835", "detected_licenses": [ "MIT" ], "directory_id": "c0d1f205a671fbce7755393ea3da3ccbdddbb09f", "extension": "py", "file...
2.421875
stackv2
import hashlib from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() class Users(db.Model): __tablename__ = "users" user_id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(120), nullable=False) phone = db.Column(db.String(40), nullable=False) location = db.Column(db.Str...
64
30.81
88
15
485
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_9bf20eae29e9adaf_3877c71f", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational...
[ 21, 24 ]
[ null, null ]
[ 40, 31 ]
[ 69, 59 ]
2024-11-18T19:11:52.906879+00:00
1,358,553,110,000
8f967be394403cfe49cd3b9c74a313b69ebb2fbd
3
{ "blob_id": "8f967be394403cfe49cd3b9c74a313b69ebb2fbd", "branch_name": "refs/heads/master", "committer_date": 1358553110000, "content_id": "1c3f8d4b6ab42e61b6be190a5306361d150422da", "detected_licenses": [ "MIT" ], "directory_id": "0683d4deb66a41ae63739965e40f876fa4f69ca7", "extension": "py", "fi...
2.65625
stackv2
import codecs from datetime import date, datetime, timedelta from jinja2 import FileSystemLoader, Template, Environment import logging from pprint import pprint\ month_blocks = [] class Utils: @classmethod def date_to_julian_day(cls, my_date): """Returns the Julian day number of a date.""" ...
76
33.58
119
19
676
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_39667376b04bd35b_b42837a7", "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." ]
[ 44 ]
[ null ]
[ 11 ]
[ 51 ]
2024-11-18T19:58:37.609515+00:00
1,418,772,087,000
4f151c577e43b1ffbae84de99de77b920703220d
2
{ "blob_id": "4f151c577e43b1ffbae84de99de77b920703220d", "branch_name": "refs/heads/master", "committer_date": 1418772087000, "content_id": "01b9d7dc154431a26b4570b999f80029323f0699", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c7b4dbe2a3621ce8d2e4aad21f2a42a1c7ba7253", "extension": "py"...
2.3125
stackv2
# -*- coding: utf-8 -*- import re import io import email import sys import signal import asyncio import hashlib import traceback import logging from http import client from jinja2 import Environment, FileSystemLoader from websockets.server import WebSocketServerProtocol from websockets.exceptions import InvalidHandsha...
275
31.5
97
19
1,912
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_51a9e4cccbe68111_da22746c", "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." ]
[ 207 ]
[ 209 ]
[ 38 ]
[ 10 ]
2024-11-18T18:39:26.991132+00:00
1,651,247,347,000
08b3ce3b5247fd016c5306c22fa6e82dafe34ec5
3
{ "blob_id": "08b3ce3b5247fd016c5306c22fa6e82dafe34ec5", "branch_name": "refs/heads/main", "committer_date": 1651247347000, "content_id": "6e6f3059165ba6747f6bcc4b2027f95c640cf58a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3b725351c87409443a614e7a217db76671dfddfe", "extension": "py", ...
2.953125
stackv2
''' A basic implementation of Sort-friendly URI Reordering Transforms Since SURTs are only used internally, we don't have to use the same algorithm as everyone else. However, the algorithm we pick governs how much duplicate crawling we might do, vs webpages we might never crawl because we thought we'd already seen the...
244
31.69
113
17
1,992
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c598e7288b49113d_17e92b46", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (p...
[ 131, 153 ]
[ null, null ]
[ 26, 22 ]
[ 80, 95 ]
2024-11-18T18:39:29.084283+00:00
1,415,897,847,000
a7e73364bbe5fbdf5d5cacbb05adb11f37bf7fbd
2
{ "blob_id": "a7e73364bbe5fbdf5d5cacbb05adb11f37bf7fbd", "branch_name": "refs/heads/master", "committer_date": 1415897847000, "content_id": "98c6db41125f1c345bab056d5adb85beefcb421e", "detected_licenses": [ "MIT" ], "directory_id": "1e40d9799cb99b7f32ad5fac58df5cc3813cd62d", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: DinoLai # @Date: 2014-11-08 23:06:56 # @Last Modified by: DinoLai # @Last Modified time: 2014-11-09 01:54:31 from AbstractNewsParseStrategy import AbstractNewsParseStrategy class StormMediaGroupParseStrategy(AbstractNewsParseStrategy): def isURLMatch(...
27
33.78
74
12
252
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_d0b05414785a9da3_d21cda2d", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [.stormmediagroup.com](1) may be at an arbitrary positi...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [.stormmediagroup.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 14 ]
[ null ]
[ 16 ]
[ 45 ]
2024-11-18T18:39:49.401617+00:00
1,514,807,649,000
65aa9317c3d4160ec3a2e5c47230130b9947f2ca
2
{ "blob_id": "65aa9317c3d4160ec3a2e5c47230130b9947f2ca", "branch_name": "refs/heads/master", "committer_date": 1514807649000, "content_id": "4f1585cd4e212e67d55b49cc7b48b87d649814c7", "detected_licenses": [ "MIT" ], "directory_id": "4a064d33da333171c2954b858e14d0c49b2db064", "extension": "py", "fi...
2.46875
stackv2
import json import sys import uuid import requests from flask import Flask, redirect, url_for, session, request, render_template, jsonify from flask_oauthlib.client import OAuth import msgraph from drive import FileItem client_id, client_secret, *_ = open('_PRIVATE.txt').read().split('\n') if (client_id.startswith('*'...
170
31.46
91
19
1,247
python
[{"finding_id": "codeql_py/reflective-xss_71e9fea38a1fc902_8654727c", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
1
true
[ "CWE-079" ]
[ "py/reflective-xss" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 68 ]
[ 69 ]
[ 16 ]
[ 70 ]
2024-11-18T18:39:49.844131+00:00
1,604,656,552,000
a5c94cffac5488452645407c1a4f8ac52b28999c
3
{ "blob_id": "a5c94cffac5488452645407c1a4f8ac52b28999c", "branch_name": "refs/heads/main", "committer_date": 1604656552000, "content_id": "b348eb221aa225f0d5428fa0304cc582b2caab87", "detected_licenses": [ "Apache-2.0" ], "directory_id": "89442da18163dbcb77ed43aa819d47a9f0d3f3d6", "extension": "py", ...
2.890625
stackv2
import os from datetime import datetime from flask import Flask, request, jsonify from data_study import DataStudy from data_getter import DataGetter from plot_manager import PlotManager from data_preprocess import DataPreprocess from analysis_manager import AnalysisManager app = Flask(__name__) # http://127.0.0.1:5...
53
38.49
155
15
452
python
[{"finding_id": "codeql_py/stack-trace-exposure_1ae9b4c3e19de2c7_98bd262d", "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." ]
[ 49, 53 ]
[ null, null ]
[ 24, 5 ]
[ 48, 24 ]
2024-11-18T18:39:52.870083+00:00
1,605,096,558,000
8706b7841ed0c2b9e11b476e3bd03beb42f9cee3
3
{ "blob_id": "8706b7841ed0c2b9e11b476e3bd03beb42f9cee3", "branch_name": "refs/heads/master", "committer_date": 1605096558000, "content_id": "f9eeca3bdf69a48da518423f04f4b2dadb3469c9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0038ed6ab16f73b23257f6be12a592811da34962", "extension": "py"...
3.15625
stackv2
from Crypto.Cipher import AES def add_padding_to_string(string): while len(string) % 16 != 0: string += ' ' return string def encrypt_block(key, msg): key_bytes = bytes(key, encoding='utf-8') cipher = AES.new(key_bytes, AES.MODE_ECB) ciphertext = cipher.encrypt(bytes(msg, encoding='utf-8'...
23
26.96
69
13
170
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_a956a9b79803b790_c0d86c51", "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." ]
[ 12, 19 ]
[ null, null ]
[ 18, 17 ]
[ 62, 36 ]
2024-11-18T18:39:58.370155+00:00
1,676,139,610,000
1fd289f4794a63e4fea520b7eed98431fcac9d74
3
{ "blob_id": "1fd289f4794a63e4fea520b7eed98431fcac9d74", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "0531f1c331ae34426cc36fa15bf345cc7265f117", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
2.65625
stackv2
from bs4 import BeautifulSoup import urllib import os import re qvod_link_reg = re.compile(ur'qvod://[0-9]{9}\|[A-Z0-9]{40}\|[\u4e00-\u9fa50-9]+\.') main_url = 'http://www.qvodzy.me' def matchURL(url): res = urllib.urlopen(url) print 'match ',url soup = BeautifulSoup(res.read().decode('gb2312','ignore')) ...
71
29.07
115
17
575
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_328d772b3699c058_c0d1e2fc", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://www.qvodzy.me](1) may be at an arbitrary positi...
3
true
[ "CWE-020", "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The string [http://www.qvodzy.me](1) may be at an arbitrary position in the sanitized URL.", "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "Suspicious character range that overlaps with a-z in the same character class, and ...
[ 35, 19, 42 ]
[ null, null, null ]
[ 16, 44, 44 ]
[ 67, 47, 47 ]
2024-11-18T20:52:23.899384+00:00
1,465,534,101,000
680307bf59d35f669568647eae8e5329f4bed134
3
{ "blob_id": "680307bf59d35f669568647eae8e5329f4bed134", "branch_name": "refs/heads/master", "committer_date": 1465534101000, "content_id": "72c8725c3ace1e30354a52e8a3e9aa1bcb54189d", "detected_licenses": [ "MIT" ], "directory_id": "c3ed7bc0ac9737e5e8f8e2535811402ed65373b8", "extension": "py", "fi...
2.75
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import bottle, requests from bottle import route, run, request, default_app import httplib import urlparse import json import urllib from sys import argv @route('/') def index(): return "To expand a link, send a GET request to <a href='/expand?url=http://goo.gl/i4NyPz...
75
24.53
135
15
471
python
[{"finding_id": "codeql_py/full-ssrf_6bbaf1f8ab136099_310f031a", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
2
true
[ "CWE-918", "CWE-079" ]
[ "py/full-ssrf", "py/reflective-xss" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 57, 42 ]
[ null, 47 ]
[ 9, 12 ]
[ 49, 6 ]
2024-11-18T20:52:25.257819+00:00
1,567,308,932,000
5ae455e1082b58866f82fa0747f245eef690528e
3
{ "blob_id": "5ae455e1082b58866f82fa0747f245eef690528e", "branch_name": "refs/heads/main-dev", "committer_date": 1567308932000, "content_id": "9242b6db2b3091b4a20f1477479d08d7662c1c01", "detected_licenses": [ "MIT" ], "directory_id": "17e3d903adc6c59f9fe5d5927a278902b2da0686", "extension": "py", "...
2.515625
stackv2
#!/usr/bin/python3 import argparse import json import requests import time import sys from datetime import datetime, timedelta # Only used for debugging. from pprint import pprint # Global vars for use by various functions. base_url = 'https://owner-api.teslamotors.com/api/1/vehicles' oauth_url = 'https://owner-api.t...
401
34.91
108
17
3,404
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a2b74a1086c0d72f_98271616", "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 (password)](2) as clear text." ]
[ 237 ]
[ null ]
[ 15 ]
[ 57 ]
2024-11-18T20:58:18.231441+00:00
1,556,019,251,000
a6c535b65756b51a937482af295a3a0bcc657e6a
3
{ "blob_id": "a6c535b65756b51a937482af295a3a0bcc657e6a", "branch_name": "refs/heads/master", "committer_date": 1556019251000, "content_id": "4cb55addfbcd2d19d5b83e9b1d33f303e338fdc9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "107f593a4bdf35899398fbb6b271741f5c54163a", "extension": "py"...
2.703125
stackv2
from flask import Flask, request, Response, make_response import json, requests, os from pprint import pprint app = Flask(__name__) # # Flask entry points # @app.route('/', defaults={'path': ''}, methods = ['GET', 'POST', 'PUT', 'DELETE']) def handle_all(path): r1 = 'Request method: {} {}'.format(request.method, p...
18
32.44
83
15
175
python
[{"finding_id": "codeql_py/reflective-xss_1f47d8ea0439c9a0_877f1d29", "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)." ]
[ 14 ]
[ null ]
[ 12 ]
[ 51 ]
2024-11-18T19:09:58.075464+00:00
1,481,215,846,000
4af0a1683ae7062c408e6d24c5f730380eea12d4
3
{ "blob_id": "4af0a1683ae7062c408e6d24c5f730380eea12d4", "branch_name": "refs/heads/master", "committer_date": 1481215846000, "content_id": "8f9834127f0e93251146842d4acde24c6c8e3ce1", "detected_licenses": [ "MIT" ], "directory_id": "dd833c867819af1f8a0f426e319829a5b698964f", "extension": "py", "fi...
2.84375
stackv2
import requests from requests import HTTPError from requests.exceptions import InvalidURL, SSLError, MissingSchema, ConnectionError from html.parser import HTMLParser import logging import re logging.getLogger(__name__) logging.getLogger("requests").setLevel(logging.WARNING) class LinkFinder(HTMLParser): def __ini...
162
25.33
129
20
1,267
python
[{"finding_id": "codeql_py/request-without-cert-validation_de7e0c7a912a2265_bf788448", "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)." ]
[ 39 ]
[ null ]
[ 7 ]
[ 67 ]
2024-11-18T19:49:13.251637+00:00
1,535,652,305,000
62f69daeea21c3041d70441852f308aa981837bd
2
{ "blob_id": "62f69daeea21c3041d70441852f308aa981837bd", "branch_name": "refs/heads/master", "committer_date": 1535652305000, "content_id": "ba9f545a676ec119c95cd06e0946815b207dd2ea", "detected_licenses": [ "MIT" ], "directory_id": "662c50ef33b11a8f80c2241dc895c01359eafad5", "extension": "py", "fi...
2.390625
stackv2
from datetime import datetime import json, glob, time, random import sys, os from six.moves import urllib sys.path.insert(0, os.path.dirname(__file__) + '../2_helpers') import re, nltk from User import User from bs4 import BeautifulSoup from GoogleScraper import scrape_with_config, GoogleSearchError SERVER_RUN = True ...
188
32.71
118
17
1,574
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a9070fe16de4ea38_34682863", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://t.co/](1) may be at an arbitrary position in t...
3
true
[ "CWE-020", "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The string [https://t.co/](1) may be at an arbitrary position in the sanitized URL.", "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]." ]
[ 76, 74, 119 ]
[ null, null, null ]
[ 12, 54, 54 ]
[ 34, 57, 57 ]
2024-11-18T19:49:15.539042+00:00
1,582,830,044,000
9c6b178711de9623e5f874723d429f6b2ba3c3d1
3
{ "blob_id": "9c6b178711de9623e5f874723d429f6b2ba3c3d1", "branch_name": "refs/heads/master", "committer_date": 1582830044000, "content_id": "4fb2dd2106244e3a5d6eb55bfba8341189f75677", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "4419f71d6f099daa98e044951e5e17d5e52a934c", "extension": "p...
2.671875
stackv2
''' Utilities useful for datasets ''' import pdb import os from functools import partial from urllib.request import urlretrieve import requests from tqdm import tqdm from torch.utils.data.dataloader import DataLoader from torch.utils.data.sampler import BatchSampler, RandomSampler, SequentialSampler from data.sample...
133
32.51
99
16
933
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_1c926943930feab7_5bac65bf", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [drive.google.com](1) may be at an arbitrary position i...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [drive.google.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 50 ]
[ null ]
[ 8 ]
[ 33 ]
2024-11-18T20:15:45.167328+00:00
1,623,735,484,000
0daa825c98b5037f4bbfe943c53771f85a6d1ebd
3
{ "blob_id": "0daa825c98b5037f4bbfe943c53771f85a6d1ebd", "branch_name": "refs/heads/main", "committer_date": 1623735484000, "content_id": "b48ab1be6040660e4c2f63bb7944229748027946", "detected_licenses": [ "MIT" ], "directory_id": "29ffccca8394b449c670742becad2ad5639422e6", "extension": "py", "file...
2.890625
stackv2
""" ------------------------------------- # -*- coding: utf-8 -*- # @Author : nomalocaris、Giyn、HZT # @File : extract_data.py # @Software: PyCharm ------------------------------------- """ import os import random import numpy as np from utils import ProgressBar from utils import cal_time_interval def extract_da...
133
28.47
95
21
1,005
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_a8a343ca0417666d_58e38951", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text." ]
[ 89 ]
[ null ]
[ 35 ]
[ 75 ]
2024-11-18T20:15:46.135914+00:00
1,625,382,940,000
cb2aa1adc7f6030d09e24049969ad95b6a2af40f
3
{ "blob_id": "cb2aa1adc7f6030d09e24049969ad95b6a2af40f", "branch_name": "refs/heads/main", "committer_date": 1625382940000, "content_id": "6eed68c45a4dc64830fc1a493b6aff6261f0af6c", "detected_licenses": [ "MIT" ], "directory_id": "d64708742e9c1376428de2043bd457ac5f159b15", "extension": "py", "file...
2.703125
stackv2
from flask import Flask, render_template, request, redirect, url_for, session from flask_mysqldb import MySQL import MySQLdb.cursors import re app = Flask(__name__) # Change this to your secret key (can be anything, it's for extra protection) app.secret_key = 'thisisverysecreteoryouarescrewd' # Enter your database c...
54
44
122
14
548
python
[{"finding_id": "codeql_py/polynomial-redos_8997725c95b03b13_6d816ee9", "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 '?'." ]
[ 39 ]
[ null ]
[ 50 ]
[ 55 ]
2024-11-18T20:16:00.157231+00:00
1,600,847,108,000
b4182c9366278c60e76b85e1097be7168122ec82
2
{ "blob_id": "b4182c9366278c60e76b85e1097be7168122ec82", "branch_name": "refs/heads/master", "committer_date": 1600847108000, "content_id": "6421056e2f463d2720c977bd5fc259dde17e5624", "detected_licenses": [ "MIT" ], "directory_id": "60d5f40f9d847f66b5cb9514b692f70ffd030fbf", "extension": "py", "fi...
2.359375
stackv2
# -*- coding: utf-8 -*- # ░░░░░░░░░░░░░░░░░░░░░░░░▄░░ # ░░░░░░░░░▐█░░░░░░░░░░░▄▀▒▌░ # ░░░░░░░░▐▀▒█░░░░░░░░▄▀▒▒▒▐ # ░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐ # ░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐ # ░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌ # ░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒ # ░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐ # ░▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄ # ░▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒ #...
156
32.51
114
21
1,433
python
[{"finding_id": "codeql_py/overly-large-range_2e96a70d2a83c3fe_ca1a7bd9", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A...
2
true
[ "CWE-020", "CWE-1333" ]
[ "py/overly-large-range", "py/polynomial-redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings with many repetitions of 'A'." ]
[ 91, 91 ]
[ null, null ]
[ 36, 58 ]
[ 39, 66 ]
2024-11-18T19:38:09.996088+00:00
1,626,099,973,000
368eb9e76ff359f997229e02142abdd38df20df6
3
{ "blob_id": "368eb9e76ff359f997229e02142abdd38df20df6", "branch_name": "refs/heads/master", "committer_date": 1626099973000, "content_id": "5b6bee3192af1b373757cdbbe704a4c0c306665e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a7b736174ab461b446c7f5970c02746fa62c9f81", "extension": "py"...
2.765625
stackv2
import paramiko from base64 import b64decode class MissingAuthInformation(Exception): pass class MissingSudoPassword(Exception): pass class SSHConnection: def __init__(self, host, port, user, password=None): self._host = host self._port = port self._user = user if passw...
43
32.26
90
18
287
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_5bbf8f1c3b7a4ce5_2d62e1ba", "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." ]
[ 29 ]
[ null ]
[ 13 ]
[ 71 ]
2024-11-18T19:38:13.183319+00:00
1,596,132,620,000
2fea92806a52e7ea4ca6f1d16acebbd383d13ba6
3
{ "blob_id": "2fea92806a52e7ea4ca6f1d16acebbd383d13ba6", "branch_name": "refs/heads/master", "committer_date": 1596132620000, "content_id": "27237d23fb47d0b3cf260fea21eb78b21d7fba48", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e87524319ee0e610c451f1777a5a90883f508fe3", "extension": "py"...
2.796875
stackv2
import requests import re from bs4 import BeautifulSoup import traceback import json import sys def get_html_text(url): try: headers = { 'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36', } r = re...
138
35.73
144
23
1,335
python
[{"finding_id": "codeql_py/incomplete-hostname-regexp_179c4211632e9c00_9d0cb223", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'cnwmz.com/html/', so it might match...
1
true
[ "CWE-020" ]
[ "py/incomplete-hostname-regexp" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression has an unescaped '.' before 'cnwmz.com/html/', so it might match more hosts than expected." ]
[ 81 ]
[ null ]
[ 39 ]
[ 72 ]
2024-11-18T19:38:20.580619+00:00
1,522,659,682,000
73664ba7f811b7af6a27cf52e5d5b7e352afa94c
2
{ "blob_id": "73664ba7f811b7af6a27cf52e5d5b7e352afa94c", "branch_name": "refs/heads/master", "committer_date": 1522659682000, "content_id": "5cf2f3de4fd839accd103dbaf35ba34b38693d8d", "detected_licenses": [ "MIT" ], "directory_id": "2d92442032df750e6d6172abe2d3b564862e19dd", "extension": "py", "fi...
2.34375
stackv2
import requests from hashlib import md5 import base64 import random import string import time with open("../test.jpg", "rb") as image_file: encoded_string = base64.b64encode(image_file.read()) app_key = '<your appKey>' app_secret = '<your appSecret>' nonstr = ''.join(random.choice(string.ascii_uppercase + string....
34
22.68
106
10
222
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_c95f388ccb7db802_70428150", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure." ]
[ 17 ]
[ null ]
[ 10 ]
[ 66 ]
2024-11-18T20:26:00.468479+00:00
1,611,859,231,000
e0934663805a8b7c5a3a76a1d9fbdf66ab9975d2
2
{ "blob_id": "e0934663805a8b7c5a3a76a1d9fbdf66ab9975d2", "branch_name": "refs/heads/master", "committer_date": 1611859231000, "content_id": "4d6c4f8308c4eb271fc441bd07e7a230b48f12b6", "detected_licenses": [ "MIT" ], "directory_id": "ba1d6cf4fa4ea0f605c8ad3771afd997970757bc", "extension": "py", "fi...
2.390625
stackv2
import os import logging from flask import Flask, jsonify from flask import abort from flask import request from flask_cors import CORS import tensorflow as tf from config import config from src.classifier.genre_mapper import GenreMapper from src.classifier.music_genre_classifier import MusicGenreClassifier from src...
71
31.24
79
13
487
python
[{"finding_id": "codeql_py/log-injection_2fb8bbf22c55738f_9d6ea545", "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...
3
true
[ "CWE-117", "CWE-117", "CWE-117" ]
[ "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "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 value](1)." ]
[ 47, 48, 54 ]
[ null, null, null ]
[ 18, 18, 18 ]
[ 48, 58, 40 ]
2024-11-18T20:26:45.323153+00:00
1,606,087,460,000
084f52ad740a4db9db4324f4c892ae4b514a35d5
2
{ "blob_id": "084f52ad740a4db9db4324f4c892ae4b514a35d5", "branch_name": "refs/heads/master", "committer_date": 1606087592000, "content_id": "45f49c89884ee895d2c7127242ae8e9d68b1c90c", "detected_licenses": [ "MIT" ], "directory_id": "6975c3f2ad38b4f1f0bc236906c3885a92880682", "extension": "py", "fi...
2.421875
stackv2
import configparser import hashlib import hmac import itertools import os import sys import pathlib import click import requests from flask import Flask, request, jsonify, render_template from committee.rules.apply_validation_result import apply_validation_result from committee.constants import RULE_OK, VALID_INPUT, ...
269
37.76
120
17
2,252
python
[{"finding_id": "codeql_py/partial-ssrf_1195d5003d75090e_71bdc392", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil...
1
true
[ "CWE-918" ]
[ "py/partial-ssrf" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 92 ]
[ 93 ]
[ 24 ]
[ 102 ]
2024-11-18T20:26:54.308328+00:00
1,683,015,988,000
f6943de6945d6fa8db2ef7ce4225ed4ad8eb894a
4
{ "blob_id": "f6943de6945d6fa8db2ef7ce4225ed4ad8eb894a", "branch_name": "refs/heads/master", "committer_date": 1683015988000, "content_id": "e194112bd3aeab19955244ef2b360348d182befa", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d3fca05b2e24dd222edc1f2b11167492db22b0ac", "extension": "py"...
3.6875
stackv2
#!/usr/bin/env python import random DICT_PATH = "dictionaries/" DICT_FILES = {"en": "american-english.txt", "it": "italian.txt"} SYMBOLS = "~!@#$%^&*()_-+=" def generate_password( language="en", spaces="0", symbol="1", uppercase="1"): # Handle users passing non-existent languages if language in DICT_F...
32
35.94
73
16
294
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cdf7778208573ff8_a5baaff8", "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.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw...
[ 32 ]
[ null ]
[ 51 ]
[ 70 ]
2024-11-18T20:26:55.176091+00:00
1,602,625,015,000
489a0251d7dff7fd7d066d4049a936f1099dbc07
2
{ "blob_id": "489a0251d7dff7fd7d066d4049a936f1099dbc07", "branch_name": "refs/heads/master", "committer_date": 1602625015000, "content_id": "4e31442329f086c7044e8b27055da1008d476a46", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c0a1e0eea772ba0a42e7af83c4e4e3385fe405d3", "extension": "py"...
2.375
stackv2
# ! /usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2019-, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/lice...
249
38.81
118
20
2,002
python
[{"finding_id": "codeql_py/tarslip_6637b26586747587_b9faf377", "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)." ]
[ 225 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T20:27:02.467097+00:00
1,516,622,382,000
5123d787209490568ef285771ca0b947fa658b5c
2
{ "blob_id": "5123d787209490568ef285771ca0b947fa658b5c", "branch_name": "refs/heads/master", "committer_date": 1516622382000, "content_id": "f26fa86039264f02425b8286f6f3079d9bc6ecca", "detected_licenses": [ "MIT" ], "directory_id": "fbff7c101f1741caec3f8e368db062efea3e84fe", "extension": "py", "fi...
2.4375
stackv2
from __future__ import print_function import hashlib import jinja2 from datetime import datetime from fabric.api import task, env, run, sudo, put, cd from os import unlink, path if path.exists(path.expanduser('~/.ssh/config')): env.use_ssh_config = True class Artifact(dict): def __init__(self, group_id='',...
125
25.66
84
16
781
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_5ce47bc30f4fabec_652c81f4", "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." ]
[ 46 ]
[ null ]
[ 24 ]
[ 49 ]
2024-11-18T20:27:04.821526+00:00
1,637,477,487,000
ae352955d57bea8836b1d68e6d7cdfe9c2004a29
3
{ "blob_id": "ae352955d57bea8836b1d68e6d7cdfe9c2004a29", "branch_name": "refs/heads/main", "committer_date": 1637477487000, "content_id": "dce52da35b3a6415d56eb8028fddce8db96cd2f7", "detected_licenses": [ "MIT" ], "directory_id": "5292b03998384c0d2bb5858058892d7e45c5365b", "extension": "py", "file...
2.53125
stackv2
#!/usr/bin/env python3.8 import random import requests import socket import string import subprocess from contextlib import closing def get_free_port(): with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: s.bind(('', 0)) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) ...
55
26.24
84
13
363
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_14ba7cfdadbc95d7_d6e4dbaf", "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." ]
[ 51 ]
[ null ]
[ 11 ]
[ 84 ]
2024-11-18T20:51:55.800243+00:00
1,591,892,941,000
bc0520e20ed469e955c27ddd09c10d45fe5d0dac
2
{ "blob_id": "bc0520e20ed469e955c27ddd09c10d45fe5d0dac", "branch_name": "refs/heads/master", "committer_date": 1591892941000, "content_id": "77c93d28b564f495ab81d01e28c0c209202927c6", "detected_licenses": [ "BSD-3-Clause-Clear" ], "directory_id": "24dccdd77ffec9d6a9e1df740d51af1a1f664abc", "extensio...
2.375
stackv2
#!/usr/bin/env python3 import os import urllib.parse import urllib.request from descriptions import ( install_description, install_long_description, search_description, search_long_description ) from pyln.client import Plugin from search import search_github from utils import ( create_dir, get_main_file, m...
139
39.93
82
19
1,209
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_b70defabecf0f2f2_bbcbdee6", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [api.github.com](1) may be at an arbitrary position in ...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [api.github.com](1) may be at an arbitrary position in the sanitized URL.", "The string [github.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 84, 86 ]
[ null, null ]
[ 8, 10 ]
[ 31, 29 ]
2024-11-18T20:52:06.325528+00:00
1,674,945,037,000
82991aa89150f5477e993f4ffd90c89747daad9f
3
{ "blob_id": "82991aa89150f5477e993f4ffd90c89747daad9f", "branch_name": "refs/heads/master", "committer_date": 1674945037000, "content_id": "782874bfe9254147a790fb04205f98c17ac141d0", "detected_licenses": [ "MIT" ], "directory_id": "a147cb3af5db19eb5d84351070500ad58f5ae802", "extension": "py", "fi...
2.765625
stackv2
"""Convert OneNote HTML to Markdown. Inspired by: https://github.com/matthewwithanm/python-markdownify/blob/develop/markdownify/__init__.py Future? * Try to figure out the language of code blocks (guesslang) """ import mimetypes import re import tempfile import textwrap import uuid from pathlib import Path from bs4...
257
29.55
89
16
1,862
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_5609e32f9da018dc_00e5eba5", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://graph.microsoft.com](1) may be at an arbitrary...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [https://graph.microsoft.com](1) may be at an arbitrary position in the sanitized URL.", "The string [https://graph.microsoft.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 170, 178 ]
[ null, null ]
[ 12, 12 ]
[ 57, 57 ]
2024-11-18T20:52:10.245837+00:00
1,541,688,491,000
cbe64e6810a5c69daa646a67cfe9baff8a833686
3
{ "blob_id": "cbe64e6810a5c69daa646a67cfe9baff8a833686", "branch_name": "refs/heads/master", "committer_date": 1541688491000, "content_id": "0f97bbce118f108ef3b88cca0160d08c038a17cf", "detected_licenses": [ "MIT" ], "directory_id": "0d615b409989e54885819d1b549ad8917807ac6a", "extension": "py", "fi...
2.84375
stackv2
import numpy as np import pandas as pd import math def readTrainFeatures(): return pd.read_csv('./dataset/question-4-train-features.csv', header=None) def readTrainLabels(): return pd.read_csv('./dataset/question-4-train-labels.csv', header=None) def readTestFeatures(): return pd.read_csv('./dataset/q...
162
28.2
103
15
1,224
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_61a825150e97f2f4_3d10fcf5", "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.",...
3
true
[ "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.", "This expression stores [sensitive data (private)](1) as clear text.", "This expression stores [sensitive data (private)](1) as clear text." ]
[ 44, 75, 136 ]
[ null, null, null ]
[ 25, 25, 25 ]
[ 68, 71, 63 ]
2024-11-18T20:52:26.520094+00:00
1,693,477,536,000
ba000b2b9dd332e1597155d0f2726afb6c7a81a0
2
{ "blob_id": "ba000b2b9dd332e1597155d0f2726afb6c7a81a0", "branch_name": "refs/heads/master", "committer_date": 1693477536000, "content_id": "fb88844a33c3657fb17e6a049b216c2bdb6f7040", "detected_licenses": [ "MIT" ], "directory_id": "c9500ad778b8521aaa85cb7fe3239989efaa4799", "extension": "py", "fi...
2.375
stackv2
import insightconnect_plugin_runtime from .schema import ConnectionSchema, Input # Custom imports below from jira import JIRA import requests from requests.auth import HTTPBasicAuth from insightconnect_plugin_runtime.exceptions import ConnectionTestException, PluginException from komand_jira.util.api import JiraApi ...
83
43
149
17
743
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_50364c8638d2c2bb_55f3b50a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [.atlassian.net](1) may be at an arbitrary position in ...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [.atlassian.net](1) may be at an arbitrary position in the sanitized URL.", "The string [.jira.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 45, 45 ]
[ null, null ]
[ 12, 44 ]
[ 40, 67 ]
2024-11-18T20:52:49.797993+00:00
1,503,432,286,000
60f88ddcd2b559c3df0859c45e6597f89724bac0
3
{ "blob_id": "60f88ddcd2b559c3df0859c45e6597f89724bac0", "branch_name": "refs/heads/master", "committer_date": 1503432286000, "content_id": "5094e4217fb7e6d5d81ed899fd03c6b4a1a4635a", "detected_licenses": [ "MIT" ], "directory_id": "59bb357f8a2a0235adc6654cdf4594db2eb783d1", "extension": "py", "fi...
3.125
stackv2
# -*- coding: utf-8 -*- """Manage Slovak addresses (district, city, locality) cleanup and comparison""" import re import logging from configparser import get_ungeocoded_coordinate from alphanumericker import (string_to_ascii, comparable_string, handle_dots, handle_dashes) #: ungeocod...
286
32.53
79
18
1,957
python
[{"finding_id": "codeql_py/overly-large-range_16f0beb92cd9194b_dff4ddb6", "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\\]." ]
[ 25 ]
[ null ]
[ 47 ]
[ 50 ]
2024-11-18T20:52:59.315315+00:00
1,669,808,013,000
7a5bc2bf0caa38c884d6aa30c0cd735688c30ef4
3
{ "blob_id": "7a5bc2bf0caa38c884d6aa30c0cd735688c30ef4", "branch_name": "refs/heads/master", "committer_date": 1669808013000, "content_id": "1950a42678d95c9e8ab3d36ceff2cb072b5eaa42", "detected_licenses": [ "MIT" ], "directory_id": "4240dddfb71c4b0ebfb1e12af8898865b3c0e4c7", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/python # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Run this script from the root of the repository to update all translations from transifex. It will do the follo...
66
34.36
101
15
537
python
[{"finding_id": "codeql_py/overly-large-range_4007dfd64d7a7b49_9b18c370", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[\\u000e\\u000f\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\...." ]
[ 53 ]
[ null ]
[ 30 ]
[ 33 ]
2024-11-18T19:02:37.137528+00:00
1,573,083,030,000
19a1167c83800a2db07113310d35a13c92b3a802
3
{ "blob_id": "19a1167c83800a2db07113310d35a13c92b3a802", "branch_name": "refs/heads/master", "committer_date": 1573083030000, "content_id": "0172af4a12adbf61cb968bf748a9ad4574883696", "detected_licenses": [ "MIT" ], "directory_id": "96481ee4a3463a78a421d881615053af473dd4e2", "extension": "py", "fi...
2.75
stackv2
# region imports from flask import Flask app = Flask(import_name=__name__) from flask import request # import to parse wildcard args from flask import render_template # import to render html pages from flask import redirect # to handle errors and reload the same resource from flask import flash # to flash messages on s...
240
34.71
115
22
1,924
python
[{"finding_id": "codeql_py/reflective-xss_9e27a3194e7a5fd5_a18a219d", "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...
7
true
[ "CWE-079", "CWE-079", "CWE-079", "CWE-601", "CWE-022", "CWE-918", "CWE-918" ]
[ "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/url-redirection", "py/path-injection", "py/partial-ssrf", "py/partial-ssrf" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "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).", "Cross-site scripting vulnerability due to a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1).", "This path depends on...
[ 60, 151, 160, 126, 157, 146, 154 ]
[ null, null, null, null, null, null, null ]
[ 12, 20, 20, 29, 23, 16, 20 ]
[ 27, 51, 55, 40, 63, 38, 50 ]
2024-11-18T19:14:28.095743+00:00
1,599,385,614,000
677bc26906cf1f8c261a266793dcd1e1003b82cc
3
{ "blob_id": "677bc26906cf1f8c261a266793dcd1e1003b82cc", "branch_name": "refs/heads/master", "committer_date": 1599385614000, "content_id": "4641f832195a6b7da608f9a9973d9d2bc50b88d9", "detected_licenses": [ "MIT" ], "directory_id": "7b9d6fc8c68460935fb39d5e880ac1b4f0d99e96", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/env python # # This illustrates the call-flow required to complete an OAuth request # against the discogs.com API. The script will download and save a single # image from the discogs.com API as an example. # See README.md for further documentation. # import json import sys from urllib import request from ur...
140
44.04
124
15
1,521
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b53f3a570d2c1dbb_3f0becaf", "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.", ...
5
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive d...
[ 50, 51, 59, 86, 87 ]
[ null, null, null, null, null ]
[ 7, 7, 7, 7, 7 ]
[ 67, 74, 103, 66, 73 ]
2024-11-18T19:14:37.674622+00:00
1,588,507,517,000
cd459ddc6b69e615827777a22954cfc9b4a73de6
2
{ "blob_id": "cd459ddc6b69e615827777a22954cfc9b4a73de6", "branch_name": "refs/heads/master", "committer_date": 1588507517000, "content_id": "8316d678a431ba0675a46c74a5f7558ce2929496", "detected_licenses": [ "MIT" ], "directory_id": "eef4f57659502d8d7d2fc1f6513808a638d1a25f", "extension": "py", "fi...
2.40625
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import print_function import argparse import os import re import string import textwrap TEXT_WIDTH = 78 SEP_LINE = "-" * TEXT_WIDTH def wrap_print(msg): print(textwrap.fill(msg, width=TEXT_WIDTH)) def wrap_input(msg): return input( te...
298
27.27
76
14
1,969
python
[{"finding_id": "codeql_py/overly-permissive-file_8b43e1d2537a57e4_841cd2e5", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ...
1
true
[ "CWE-732" ]
[ "py/overly-permissive-file" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Overly permissive mask in chmod sets file to world readable." ]
[ 254 ]
[ null ]
[ 5 ]
[ 27 ]
2024-11-18T19:14:38.881350+00:00
1,631,893,936,000
0d6fa9eaed195b85faf3d5a993803ae7789e39b9
2
{ "blob_id": "0d6fa9eaed195b85faf3d5a993803ae7789e39b9", "branch_name": "refs/heads/master", "committer_date": 1631893936000, "content_id": "3f999ce83163a487d9cb558b9aa882c91cb21a4d", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "8ff5fa5e94a55a12fae52e1d6eb84259a363a8b9", "extension": "p...
2.46875
stackv2
""" Author: YinMo Version: 0.0.1-beta Description: died """ import hashlib, json, os import axolotl_curve25519 as Curve25519 from cryptography.hazmat.primitives.ciphers.aead import AESGCM from Crypto.Cipher import AES class E2EE(): def generateSharedSecret(self, private_key, public_key): return Curve25519...
143
37.02
114
15
1,492
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_346ea0cf568de53e_27f4bb56", "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." ]
[ 33 ]
[ null ]
[ 16 ]
[ 39 ]
2024-11-18T19:27:52.573020+00:00
1,693,346,738,000
a08261303f50007298270dffff3fddb1b9cc8a51
3
{ "blob_id": "a08261303f50007298270dffff3fddb1b9cc8a51", "branch_name": "refs/heads/master", "committer_date": 1693346738000, "content_id": "86acac63d1652213d73e736cd1bb057550953f65", "detected_licenses": [ "MIT" ], "directory_id": "60d6b8501d0be546437b26a6ee1f9fab97ec3897", "extension": "py", "fi...
2.515625
stackv2
import json import os import requests from requests.auth import HTTPBasicAuth from typing import Optional, Union, Dict, List, Any from platypush.message.response.camera.android import AndroidCameraStatusResponse, AndroidCameraStatusListResponse, \ AndroidCameraPictureResponse from platypush.plugins import Plugin,...
260
37.63
117
21
2,313
python
[{"finding_id": "codeql_py/request-without-cert-validation_14cd2c5b359d28cd_4f7c3ba9", "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)." ]
[ 120, 212 ]
[ null, null ]
[ 20, 20 ]
[ 104, 76 ]
2024-11-18T19:38:50.285700+00:00
1,490,617,268,000
02e7e3d7d0fb74504e6b46024bb634d0c4919cde
3
{ "blob_id": "02e7e3d7d0fb74504e6b46024bb634d0c4919cde", "branch_name": "refs/heads/master", "committer_date": 1490617268000, "content_id": "55deb2ff63a1105e8c993e14f5805cf19ccf2682", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1ff638bdf476e62c390ab5cb8bd4f716f4c56b48", "extension": "py"...
2.921875
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- import os import warnings warnings.filterwarnings('ignore') try: import pandas as pd except ImportError, e: print '>> pandas Module is not found, please install it first' try: import numpy as np except ImportError, e: print '>> numpy Module is not found, please...
114
39.81
115
14
1,555
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_c217b8408768ec0a_6ae30f49", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [http://beijing.anjuke.com](1) may be at an arbitrary p...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [http://beijing.anjuke.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 71 ]
[ null ]
[ 18 ]
[ 88 ]
2024-11-18T20:06:07.517458+00:00
1,609,388,625,000
710bc8b00a40920111c5dd791ab306fa7502c120
3
{ "blob_id": "710bc8b00a40920111c5dd791ab306fa7502c120", "branch_name": "refs/heads/master", "committer_date": 1609388625000, "content_id": "28a052aaf3de22293a99ef17057ae5479caadb49", "detected_licenses": [ "MIT" ], "directory_id": "ee4d68c8462e4023e558d1f5faa002cd92f3ac64", "extension": "py", "fi...
2.78125
stackv2
"""A dynamic generator for Discolight documentation.""" from jinja2 import Environment, PackageLoader from .doc import make_all_doc_objects def markdown_escape_filter(text): """Escape special characters in Markdown.""" return text.replace("\\", "\\\\").replace("`", "\\`").replace( "*", "\\*").replace(...
89
35.18
77
39
667
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_eabbbd6dc00f4b7d_a74cd380", "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." ]
[ 70 ]
[ 71 ]
[ 20 ]
[ 61 ]
2024-11-18T20:06:12.943603+00:00
1,408,557,143,000
a52963d8ee43bbeae67b4079e6eb541f2be2679c
2
{ "blob_id": "a52963d8ee43bbeae67b4079e6eb541f2be2679c", "branch_name": "refs/heads/master", "committer_date": 1408557143000, "content_id": "fed04ecbbd79349c62383e36a2f6359ffaeb216c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4076cbced07fa1d62f8f947471899bdb19ce2624", "extension": "py"...
2.375
stackv2
from werkzeug.exceptions import BadRequest from jinja2 import Template class InvalidIdError(RuntimeError): def __init__(self, id_value): super(InvalidIdError, self).__init__() self.id = id_value class EC2ClientError(BadRequest): def __init__(self, code, message): super(EC2ClientError...
99
32.7
85
13
773
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_6edf899689554203_79af72b2", "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." ]
[ 99 ]
[ null ]
[ 27 ]
[ 51 ]
2024-11-18T20:18:18.634807+00:00
1,453,190,151,000
0202bc5c1bec6cbb4cb00b4417b0fa959bca503f
3
{ "blob_id": "0202bc5c1bec6cbb4cb00b4417b0fa959bca503f", "branch_name": "refs/heads/master", "committer_date": 1453190151000, "content_id": "15f4e2b0e247148c834d033dd2b42766d60d874c", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "a70da47d4a09865bf6c44b8d61069c2724cdc9a4", "extension": "p...
2.671875
stackv2
# -*- coding: utf-8 -*- import os import logging from enum import IntEnum from Crypto.Signature import PKCS1_v1_5 from Crypto.Hash import SHA from Crypto.PublicKey import RSA class Privacy(IntEnum): deny = 0 # don't verify regardless who asks friends = 1 # verify only friends everyone = 2 # verify fo...
111
29.47
86
14
756
python
[{"finding_id": "codeql_py/weak-crypto-key_7076eb0db612976e_715696af", "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." ]
[ 31 ]
[ null ]
[ 19 ]
[ 37 ]
2024-11-18T20:18:35.581269+00:00
1,682,540,576,000
d37c579ef99c7c39801acf328c9908d12283e122
3
{ "blob_id": "d37c579ef99c7c39801acf328c9908d12283e122", "branch_name": "refs/heads/master", "committer_date": 1682540576000, "content_id": "6184bc23995d9ca53d2ec47f3ee5373b7fe41fcd", "detected_licenses": [ "MIT" ], "directory_id": "8fc7d4a8d98e39bf38f2ddd9a42bac34847c4339", "extension": "py", "fi...
3.09375
stackv2
""" Simple application that logs on to the APIC-EM and displays all of the clients connected. Leverages the DevNet Sandbox - APIC-EM Always On Information at https://developer.cisco.com/docs/sandbox/#!networking """ # Import necessary modules import requests # Disable warnings requests.packages.urllib3...
75
26.05
85
12
479
python
[{"finding_id": "codeql_py/request-without-cert-validation_d80eac31a53a4978_4282b454", "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)." ]
[ 37, 52 ]
[ null, null ]
[ 16, 16 ]
[ 79, 64 ]
2024-11-18T20:18:41.996501+00:00
1,604,021,412,000
089821e98afce33906f106cbbb2083804138826a
3
{ "blob_id": "089821e98afce33906f106cbbb2083804138826a", "branch_name": "refs/heads/master", "committer_date": 1604021412000, "content_id": "65001fe0c6a3c702d7009037b6668399f1185ba6", "detected_licenses": [ "MIT" ], "directory_id": "47ce3e81bd3825cc02bdb7a94355509465a5d4a6", "extension": "py", "fi...
3.390625
stackv2
""" Signature.py Implementacion de firima digital usando el algoritmo de Elgamal """ from random import randint import random from math import pow from sha256 import hmacSha256 from elGamal import encrypt, decrypt, randomPrime , gen_key #limites min = pow(10, 5) max = pow(10, 6) MESSAGE = "Este es un mensaje de prueba...
44
26.91
80
9
367
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_51813e618be3704f_631f580e", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text." ]
[ 26 ]
[ null ]
[ 23 ]
[ 30 ]
2024-11-18T20:31:08.734863+00:00
1,438,113,866,000
2e7589e4e70bf585d583469954afdf5f5ec52afb
3
{ "blob_id": "2e7589e4e70bf585d583469954afdf5f5ec52afb", "branch_name": "refs/heads/master", "committer_date": 1438113866000, "content_id": "f8bb360a6f0848a18f94a2fcdc0086df36c00f31", "detected_licenses": [ "MIT" ], "directory_id": "87925ee00b593acf704b7b67c6cf7ae1cbaeb85d", "extension": "py", "fi...
2.78125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime as _dt import gpxpy import math from scipy import signal import yaml import jinja2 def floor_time(tm): """http://stackoverflow.com/questions/3463930/how-to-round-the-minute-of-a-datetime-object-python""" return tm - _dt.timedelta(minutes = tm.minute...
142
29.93
104
15
1,195
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_4744f71a44a6fddb_7ae56eac", "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." ]
[ 58 ]
[ null ]
[ 20 ]
[ 64 ]
2024-11-18T20:31:22.738502+00:00
1,327,418,443,000
c2c7b838e4006e3a87f114182918b608186d51d5
3
{ "blob_id": "c2c7b838e4006e3a87f114182918b608186d51d5", "branch_name": "refs/heads/master", "committer_date": 1327418443000, "content_id": "eb83066b534918883b4df2858de75550863e5c99", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "bfae1f4693cd39e228c1720b010fe06e1c84fa18", "extension": "p...
2.984375
stackv2
import random import hashlib import string from persistent import Persistent HASHCLASS = hashlib.sha512 HASHSIZE = 2 * HASHCLASS().digest_size SALTSIZE = HASHSIZE class User(Persistent): def __init__(self, name, email, password_hash, password_salt, parent=None): self.__name__ = name self.__parent...
31
28.35
90
14
204
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_785ee5ab09910323_c09361a4", "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...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computational...
[ 24, 30 ]
[ null, null ]
[ 29, 29 ]
[ 37, 53 ]
2024-11-18T20:43:19.475150+00:00
1,422,278,911,000
08e2ed7277cf83eb0652b8c1f7e5c228a382bd1e
2
{ "blob_id": "08e2ed7277cf83eb0652b8c1f7e5c228a382bd1e", "branch_name": "refs/heads/master", "committer_date": 1422278911000, "content_id": "5902e7e8094bdbcb49d031f9ac31054c0ad2a52d", "detected_licenses": [ "MIT" ], "directory_id": "b8884fb9f640f928ddf01668406e729304a41c1f", "extension": "py", "fi...
2.453125
stackv2
import bcrypt import datetime import hashlib import random from flask.ext.login import UserMixin from auth import db, login_manager class User(db.Model, UserMixin): id = db.Column(db.Integer, primary_key=True) username = db.Column(db.String(64), unique=True) email = db.Column(db.String(64), unique=True)...
85
30.28
142
19
561
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_d7aa2a54573960c4_c9e3130f", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure."...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure." ]
[ 59 ]
[ null ]
[ 44 ]
[ 53 ]
2024-11-18T20:43:31.850526+00:00
1,599,733,709,000
5f0731f38cd8f3034e8da07f98bae4082fd1e8de
3
{ "blob_id": "5f0731f38cd8f3034e8da07f98bae4082fd1e8de", "branch_name": "refs/heads/master", "committer_date": 1599733709000, "content_id": "19388de39e11bfaf9eb4c6077e933c2570435737", "detected_licenses": [ "MIT" ], "directory_id": "bea191ca44aaa259d9d60ee936a59c28b7732e4c", "extension": "py", "fi...
2.578125
stackv2
import os from flask import Flask, jsonify, request, send_file, abort from werkzeug.utils import secure_filename from flask_cors import CORS import glob import pandas as pd # configuration DEBUG = True UPLOAD_FOLDER = 'uploads/' ALLOWED_EXTENSIONS = {'csv'} # instantiate the app app = Flask(__name__) app.config.from...
104
28.95
93
16
764
python
[{"finding_id": "codeql_py/reflective-xss_21b8c8fdb72f467a_2c61154e", "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-022", "CWE-022" ]
[ "py/reflective-xss", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "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)." ]
[ 65, 64, 75 ]
[ null, null, null ]
[ 16, 16, 22 ]
[ 26, 69, 73 ]
2024-11-18T20:43:39.764256+00:00
1,587,375,754,000
ceee66e105ef097051fcdb60d132eb752d812d50
2
{ "blob_id": "ceee66e105ef097051fcdb60d132eb752d812d50", "branch_name": "refs/heads/master", "committer_date": 1587375754000, "content_id": "a7eebc50856a37290ea1459baec3b82c79b77af1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f83ad19b55efacb11480d1b351fb97e9469fd8f0", "extension": "py"...
2.390625
stackv2
import socket import ssl import dns.message from encrypted_dns.outbound import BaseOutbound class TLSOutbound(BaseOutbound): def __init__(self, domain, port, timeout, ip): super().__init__() self._domain = domain self._port = port self._timeout = timeout self._ip = ip ...
51
32.35
102
18
379
python
[{"finding_id": "codeql_py/insecure-protocol_6b2d03963abca581_5b7c201e", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol...
1
true
[ "CWE-327" ]
[ "py/insecure-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.SSLContext](1)." ]
[ 38 ]
[ null ]
[ 29 ]
[ 36 ]
2024-11-18T20:43:46.663733+00:00
1,637,086,350,000
7d099454b6795e8413da13a05cdda4db0be14366
2
{ "blob_id": "7d099454b6795e8413da13a05cdda4db0be14366", "branch_name": "refs/heads/master", "committer_date": 1637086350000, "content_id": "9acffca2562ad3832e0c936557a30d5ff5647364", "detected_licenses": [ "MIT" ], "directory_id": "d14c561a0083fd5d09093d66f71629796cfb377b", "extension": "py", "fi...
2.390625
stackv2
""" This is the main module of the application. It contains all flask handles as well as some helper functions """ import os import sys from flask import Flask, Blueprint, redirect, render_template, flash, request, session, url_for, abort from flask_login import login_required, logout_user, current_user, login_user fro...
327
31.16
116
17
2,385
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_942ee17e10e34d29_539072d9", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
3
true
[ "CWE-312", "CWE-312", "CWE-601" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/url-redirection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 307, 314, 234 ]
[ null, null, null ]
[ 11, 19, 29 ]
[ 50, 58, 64 ]
2024-11-18T20:43:48.409376+00:00
1,635,319,901,000
87872a344606738ca1135d378081fece8ebe59e3
3
{ "blob_id": "87872a344606738ca1135d378081fece8ebe59e3", "branch_name": "refs/heads/main", "committer_date": 1635319901000, "content_id": "2cf48f41fd4ab83a585b5a06f624a79a292a0c63", "detected_licenses": [ "MIT" ], "directory_id": "d23a17936d11c55056b98a6eaa1947cb0efb7daf", "extension": "py", "file...
3.234375
stackv2
from flask import Flask, request from morse import * # tworzymy główny obiekt aplikacji app = Flask("Morse Alphabet") # definiujemy akcję związaną z URL: "/" @app.route("/", methods=["POST", "GET"]) def code_form(): post = """ <h1> Morse coding </h1> <hr> <form method="POST" action="/"> Enter text to...
31
25.58
66
14
243
python
[{"finding_id": "codeql_py/reflective-xss_1a7a03ff32a2e759_b565d810", "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)." ]
[ 27 ]
[ null ]
[ 16 ]
[ 26 ]
2024-11-18T20:44:16.163258+00:00
1,680,032,345,000
8766ce9a6f200d57829667b02b229165e7bc6aa9
2
{ "blob_id": "8766ce9a6f200d57829667b02b229165e7bc6aa9", "branch_name": "refs/heads/main", "committer_date": 1680033272000, "content_id": "b0227fcdefcf02f6986d4ffa677f425ba7d95cbf", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3f5f2bad9f6ab4acd56c4e2929cee1af4a242e57", "extension": "py", ...
2.375
stackv2
# # _author_ = Mahendran P <Mahendran_P@Dell.com> # # Copyright (c) 2022 Dell EMC Corporation # # 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...
240
55.79
174
27
2,575
python
[{"finding_id": "codeql_py/request-without-cert-validation_b8ae3a700222a769_076a4381", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
3
true
[ "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 106, 130, 175 ]
[ 108, null, null ]
[ 24, 39, 38 ]
[ 54, 102, 100 ]
2024-11-18T20:44:17.568522+00:00
1,688,326,262,000
beffe967c69c39934deb030f72f8b8db276dbbe7
3
{ "blob_id": "beffe967c69c39934deb030f72f8b8db276dbbe7", "branch_name": "refs/heads/master", "committer_date": 1688326262000, "content_id": "0b21ca4864db6d80254691cac2ec3b9edbc3a831", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "030c7b88878b657605cc8b96ee2caf1e5de41b09", "extension": "p...
2.5625
stackv2
""" utils """ import json import tarfile from pathlib import Path from grabbit.extensions.writable import build_path from ...utils.db import put_record, dump_predictor_events from ...models import Analysis from ...schemas.analysis import AnalysisFullSchema, AnalysisResourcesSchema REPORT_PATHS = ['sub-{subject}_[ses-{...
104
31.38
79
14
798
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_2d3d7ea9486aa0fc_c7ecbf52", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [neuroscout.org](1) may be at an arbitrary position in ...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [neuroscout.org](1) may be at an arbitrary position in the sanitized URL." ]
[ 54 ]
[ null ]
[ 33 ]
[ 59 ]
2024-11-18T20:44:17.876666+00:00
1,692,212,839,000
ed5544916a0d14ff7f4e2eb7bd3c2022159f2867
2
{ "blob_id": "ed5544916a0d14ff7f4e2eb7bd3c2022159f2867", "branch_name": "refs/heads/master", "committer_date": 1692212839000, "content_id": "936959953bee0dcf899db277480adc11b845b6d1", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "578db86c51d44ebddd0dc7b1738985b3dc69eb74", "extension": "p...
2.4375
stackv2
import json from django.http import HttpRequest, HttpResponse from django.utils.functional import cached_property class AsyncHandlerMixin(object): """ To be mixed in with a TemplateView. todo write better documentation on this (biyeun) """ async_handlers = [] @property def handler_slug(s...
91
29.59
98
14
574
python
[{"finding_id": "codeql_py/stack-trace-exposure_d9cbf7048e997b60_471e8e8c", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.\n[S...
1
true
[ "CWE-209" ]
[ "py/stack-trace-exposure" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.\n[Stack trace information](2) flows to this location and may be exposed to an external user." ]
[ 91 ]
[ null ]
[ 29 ]
[ 37 ]
2024-11-18T21:10:13.349521+00:00
1,495,116,387,000
b1cb3648304c8694174ef1b40d278b67df5e30a2
3
{ "blob_id": "b1cb3648304c8694174ef1b40d278b67df5e30a2", "branch_name": "refs/heads/master", "committer_date": 1495116387000, "content_id": "b3305728d720c26fde80e2765d9ee78479113a63", "detected_licenses": [ "MIT" ], "directory_id": "db8192974c20d4825f407064e589235dda883325", "extension": "py", "fi...
2.515625
stackv2
#!/usr/bin/env python # Export emoji in a Slack team as files # https://github.com/smashwilson/slack-emojinator from __future__ import print_function from slacker import Slacker import argparse import os import requests import shutil def _argparse(): parser = argparse.ArgumentParser( description='Bulk ...
52
29.15
98
18
364
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_997342e5a46df145_3e80081c", "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." ]
[ 37 ]
[ null ]
[ 11 ]
[ 50 ]
2024-11-18T21:10:19.997400+00:00
1,635,739,454,000
3bd3f334fcf19fbc3d81d8b11fdd30e69ecea754
3
{ "blob_id": "3bd3f334fcf19fbc3d81d8b11fdd30e69ecea754", "branch_name": "refs/heads/master", "committer_date": 1635739454000, "content_id": "46b6bd3e11d08d8e05ea8964d6780ade84653a8e", "detected_licenses": [ "MIT" ], "directory_id": "165c493996d50242554cea98e64ab3f7dedd6583", "extension": "py", "fi...
2.546875
stackv2
#!/usr/bin/env python3 import difflib import json import pprint import click import re from jsondiff import diff as json_diff, JsonDumper from typing import Iterable, IO from rossum.lib import split_dict_params DIFF_TYPES = ["jsondiff", "difflib"] DIFF_RE = re.compile(r"^[+-^]") @click.command("compare", help="Com...
51
31.82
95
14
479
python
[{"finding_id": "codeql_py/overly-large-range_c0d7a1cd23d21332_44a5bc31", "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\\\\[\\\\\\\\]^\\].", "remedia...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^\\]." ]
[ 14 ]
[ null ]
[ 26 ]
[ 29 ]
2024-11-18T21:10:31.558158+00:00
1,512,765,663,000
6576f25339140e1f663979f0b599e7bd55019790
4
{ "blob_id": "6576f25339140e1f663979f0b599e7bd55019790", "branch_name": "refs/heads/master", "committer_date": 1512765663000, "content_id": "410c0894957b338eda1aaf00de16df893603402b", "detected_licenses": [ "MIT" ], "directory_id": "a01526cb0e867a3d8981c0f9224cbfb2b49fc68e", "extension": "py", "fi...
4.03125
stackv2
# To do this, he needs to find MD5 hashes which, in hexadecimal, start with at least five zeroes. # The input to the MD5 hash is some secret key (your puzzle input, given below) followed by a number in decimal. # To mine AdventCoins, you must find Santa the lowest positive number (no leading zeroes: 1, 2, 3, ...) # th...
64
22.27
112
15
396
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_52df115c7e585436_8d36c361", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure." ]
[ 22 ]
[ null ]
[ 35 ]
[ 56 ]
2024-11-18T21:10:47.476531+00:00
1,634,217,370,000
17580d869637e3fdadf9cb0bdcc291fe52fc975c
3
{ "blob_id": "17580d869637e3fdadf9cb0bdcc291fe52fc975c", "branch_name": "refs/heads/master", "committer_date": 1634217370000, "content_id": "e667cca12e176c39ecdee98a71fb83d0ff8b5bb6", "detected_licenses": [ "MIT" ], "directory_id": "e8f3ec89630aa5a5b5a4eeedacfac3e55f105264", "extension": "py", "fi...
2.640625
stackv2
import requests config_hosts_url = "/config/hosts/" content_type_header = "application/vnd.netbackup+json;version=3.0" accept_header = "application/vnd.netbackup+json;version=3.0" def get_host_uuid(base_url, jwt, host_name): headers = {'Accept': accept_header, 'Authorization': jwt} queryparams = {'filter':"ho...
50
50.62
129
13
580
python
[{"finding_id": "codeql_py/request-without-cert-validation_b6ccc18c2adcf89e_897d510b", "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...
[ 11, 28, 38, 48 ]
[ null, null, null, null ]
[ 16, 16, 16, 16 ]
[ 108, 76, 88, 87 ]
2024-11-18T21:11:06.241645+00:00
1,508,965,730,000
cacab456044b173a8f8e51a46f66f10f2d01399c
3
{ "blob_id": "cacab456044b173a8f8e51a46f66f10f2d01399c", "branch_name": "refs/heads/master", "committer_date": 1508965730000, "content_id": "6495ee8f7e7dff41750f571216d244ec1e89c398", "detected_licenses": [ "MIT" ], "directory_id": "edd11750c4df04032d2889d77a316b649abae03a", "extension": "py", "fi...
2.59375
stackv2
from aiohttp import web import aiohttp_cors # TODO see if uvloop helps at all import uvloop import asyncio import os from auth2Client import KBaseAuth2 asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) auth_client = KBaseAuth2() routes = web.RouteTableDef() @routes.get('/test-service') async def test_service(...
224
33.35
100
20
1,783
python
[{"finding_id": "codeql_py/path-injection_52f034b148a52f45_76661c80", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
4
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 78, 82, 87, 99 ]
[ null, null, null, null ]
[ 27, 43, 30, 29 ]
[ 36, 52, 63, 61 ]
2024-11-18T19:03:24.122895+00:00
1,619,721,671,000
94281162c3a22a9bf44875891ba9d378b6fedacc
3
{ "blob_id": "94281162c3a22a9bf44875891ba9d378b6fedacc", "branch_name": "refs/heads/master", "committer_date": 1619721671000, "content_id": "cc7a5a719c96877ca018563fb00718a7153ef6bc", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0e0a9bd1b85b11216a4a61fc17867a548e8a2ffc", "extension": "py"...
3.21875
stackv2
""" This Program help you to find origin country of a website and also provides you detail information of whois """ import socket import requests import os host = input("Please Enter a website to find it's origin: ") addra = socket.gethostbyname(host) url = 'http://ipinfo.io/{}'.format(addra) country = requests.get(...
19
26.84
72
9
134
python
[{"finding_id": "codeql_py/request-without-cert-validation_5c34d7794d7b42d7_9c1a95f5", "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)." ]
[ 14 ]
[ null ]
[ 11 ]
[ 42 ]
2024-11-18T19:28:38.327147+00:00
1,593,880,136,000
ef5c6470d48d5464d373086cb9746feb0b5350f0
3
{ "blob_id": "ef5c6470d48d5464d373086cb9746feb0b5350f0", "branch_name": "refs/heads/master", "committer_date": 1593880136000, "content_id": "86eedeb0adcebe9036ffa8b60399e228c328c50d", "detected_licenses": [ "MIT" ], "directory_id": "89e9c16ca7744a0f67484a6bb7660e5544f22cc9", "extension": "py", "fi...
2.578125
stackv2
import os import pandas as pd import sys from flask import Flask, request import json import pickle # import config # runs logger config, must import before app initialized from src.util import predict_timeseries app = Flask(__name__) # app.config.from_object(config.get_object()) # contruct the message including the ...
75
28.45
85
16
505
python
[{"finding_id": "codeql_py/stack-trace-exposure_e9a28dbe6e5297c7_8d4da612", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
3
true
[ "CWE-209", "CWE-215", "CWE-117" ]
[ "py/stack-trace-exposure", "py/flask-debug", "py/log-injection" ]
[ "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This log entry depends on a [user-provided value](1)." ]
[ 67, 75, 40 ]
[ null, null, null ]
[ 22, 5, 26 ]
[ 77, 49, 39 ]
2024-11-18T19:28:46.496764+00:00
1,631,823,931,000
6024bde238584f569242222c1053060f4a88f5b6
3
{ "blob_id": "6024bde238584f569242222c1053060f4a88f5b6", "branch_name": "refs/heads/main", "committer_date": 1631823931000, "content_id": "0eb9a2a75f1f3a16a95f41168bcf15831ca7fde2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "10a10029905306e41abfeef21188ba0e223972d7", "extension": "py", ...
2.640625
stackv2
#!/usr/bin/python3 import paramiko,sys from time import sleep if len(sys.argv) != 3: print("Modo de Uso: python3 brutessh.py 192.168.0.1 user") sys.exit() else: client = paramiko.SSHClient() client.load_system_host_keys() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) listpass = open('password.txt'...
32
32.31
125
20
296
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_ec1932bc62d0a36f_ad53f4d7", "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...
4
true
[ "CWE-295", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/paramiko-missing-host-key-validation", "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" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 11, 16, 27, 30 ]
[ null, null, null, null ]
[ 2, 115, 39, 38 ]
[ 62, 121, 45, 44 ]
2024-11-18T19:39:34.999869+00:00
1,482,643,683,000
055f583502665cd5f611022168f9091cd822a7ed
4
{ "blob_id": "055f583502665cd5f611022168f9091cd822a7ed", "branch_name": "refs/heads/master", "committer_date": 1482643683000, "content_id": "25768136a67e6b0075330dcdafdd2fbf23efa886", "detected_licenses": [ "MIT" ], "directory_id": "62bd94b5cabf06da7472eb14eff4de3a125f5cf3", "extension": "py", "fi...
3.578125
stackv2
from re import compile from itertools import chain swapPosRegex = compile(r'swap position (\d) with position (\d)') swapLetterRegex = compile(r'swap letter (\w) with letter (\w)') rotateRegex = compile(r'rotate (left|right) (\d) steps?') rotatePosRegex = compile(r'rotate based on position of letter (\w)') reverseRegex...
89
36.83
80
22
824
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7fce74cc47b7ef4e_0233c5f6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive data (password)](3) as clear text.\nThis expression logs [sensitive data (password)](4) as clear text.\nThis expression logs [sensitive data (passw...
[ 88, 89 ]
[ null, null ]
[ 7, 7 ]
[ 31, 31 ]
2024-11-18T19:39:59.477569+00:00
1,555,964,829,000
a3041057f1e96f308aaa8a737f45d9d7448a2721
2
{ "blob_id": "a3041057f1e96f308aaa8a737f45d9d7448a2721", "branch_name": "refs/heads/master", "committer_date": 1555964829000, "content_id": "6e053fe0ffef13c509a8e8654599da3501032fb6", "detected_licenses": [ "MIT" ], "directory_id": "d27a39aac271d0c6099610be0faaa62f604c9904", "extension": "py", "fi...
2.328125
stackv2
import collections import datetime from email.utils import parsedate_to_datetime import json import logging import os import urllib import re from jinja2 import Environment, FileSystemLoader from nested_lookup import nested_lookup from PIL import Image, ImageFile import requests import requests_cache from slugify impo...
456
26.77
147
16
2,969
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_3229424548973cce_79c5b873", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 29 ]
[ null ]
[ 7 ]
[ 38 ]
2024-11-18T20:18:34.538955+00:00
1,573,476,700,000
adcf9f9fca1c22a87b9b3781a51ba59134f356bc
2
{ "blob_id": "adcf9f9fca1c22a87b9b3781a51ba59134f356bc", "branch_name": "refs/heads/master", "committer_date": 1573476700000, "content_id": "2f8a4f2939fd19851411a2b7bfa363caf13ead0b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "276bad02b37cbaace842592a3cab7f342b7b3ff4", "extension": "py"...
2.34375
stackv2
#!/usr/bin/python # # # Copyright 2014 Justin Ribeiro. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
97
28.76
107
15
728
python
[{"finding_id": "codeql_py/log-injection_781dbb82a37d55b9_c5c9b69a", "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...
4
true
[ "CWE-117", "CWE-117", "CWE-117", "CWE-117" ]
[ "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "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 value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 55, 57, 83, 86 ]
[ null, null, null, null ]
[ 16, 16, 16, 16 ]
[ 49, 41, 49, 41 ]
2024-11-18T20:18:37.103144+00:00
1,635,965,430,000
d7646d01252223d70e39ff8d4131679b42f162b0
3
{ "blob_id": "d7646d01252223d70e39ff8d4131679b42f162b0", "branch_name": "refs/heads/master", "committer_date": 1635965430000, "content_id": "4c733df3e9c8b331706a3ef1a82f2f25cd3752df", "detected_licenses": [ "MIT", "Apache-2.0" ], "directory_id": "79e1d04867c4298b23c907f92c7119e4bea8ef02", "exten...
2.515625
stackv2
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import boto3 import os import json from datetime import datetime from botocore.exceptions import ClientError from botoc...
439
34.95
82
19
3,550
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_e6fbfd1a2379edd2_156c7cfd", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (secret)](1) as clear text." ]
[ 62 ]
[ null ]
[ 17 ]
[ 75 ]
2024-11-18T20:18:37.462311+00:00
1,565,594,288,000
4a98434462f76aa7c59f46fa2e111f422399c900
3
{ "blob_id": "4a98434462f76aa7c59f46fa2e111f422399c900", "branch_name": "refs/heads/master", "committer_date": 1565594288000, "content_id": "5f1f1609d078dc535235ec85ff309dcaf152e3f1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "58ecf21ba698b9e66653a0d13c545c765f3e543c", "extension": "py"...
2.671875
stackv2
# encoding=utf-8 import requests import hashlib import time import json from logger import log class Verify: """ 该验证码识别调用的是http://www.fateadm.com平台 识别率挺高的 需要注册,获取到pd_id和pd_key """ pd_id = "" pd_key = "" def __init__(self, pd_id, pd_key): self.pd_id = pd_id self.pd_key...
68
23.1
71
15
461
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_70b84cd0c6e8321c_ec34c707", "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." ]
[ 27 ]
[ null ]
[ 20 ]
[ 49 ]
2024-11-18T20:18:37.825851+00:00
1,609,417,427,000
c3ac57a0859cba293555fc68a8af168a627a5037
3
{ "blob_id": "c3ac57a0859cba293555fc68a8af168a627a5037", "branch_name": "refs/heads/master", "committer_date": 1609417427000, "content_id": "13a69d964df194bb1d7fd4c6da0b04fc9637b8c0", "detected_licenses": [ "MIT" ], "directory_id": "49e4dcb0bf187f5ecc756e34ceb84d90383440d1", "extension": "py", "fi...
2.6875
stackv2
# First let us import required Functions from FLASK from flask import Flask, render_template, Response, request, redirect, flash, url_for from werkzeug.utils import secure_filename # From the module "camera" let us import the VideoCamera Class from camera import VideoCamera # From the module "Graphical_Visualisation"...
144
30
96
16
961
python
[{"finding_id": "codeql_py/flask-debug_e3a3ae1fcf795c7e_1e1fbd68", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
4
true
[ "CWE-215", "CWE-918", "CWE-601", "CWE-601" ]
[ "py/flask-debug", "py/full-ssrf", "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "The full URL of this request depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provid...
[ 144, 128, 102, 110 ]
[ null, 129, null, null ]
[ 5, 11, 29, 29 ]
[ 24, 57, 40, 40 ]
2024-11-18T20:18:39.035127+00:00
1,319,316,102,000
ef942c26c2a8fb78ccba4d209315701584a8f204
2
{ "blob_id": "ef942c26c2a8fb78ccba4d209315701584a8f204", "branch_name": "refs/heads/master", "committer_date": 1319316102000, "content_id": "c83807112db4d24a2cd35046904def18e0832aa8", "detected_licenses": [ "ISC" ], "directory_id": "3398c7e6396cb10be3633ef9ac540d2a194791fd", "extension": "py", "fi...
2.5
stackv2
#-*- coding: utf-8 -*- """ requests.monkeys ~~~~~~~~~~~~~~~~ Urllib2 Monkey patches. """ import urllib2 import re class Request(urllib2.Request): """Hidden wrapper around the urllib2.Request object. Allows for manual setting of HTTP methods. """ def __init__(self, url, data=None, headers={}, origi...
148
30.05
106
17
1,103
python
[{"finding_id": "codeql_py/redos_e2de843c6dd997b9_b5b39bce", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ','.", "remediati...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of ','." ]
[ 71 ]
[ null ]
[ 25 ]
[ 28 ]
2024-11-18T20:18:43.914745+00:00
1,477,233,822,000
51b05eebdd006403b3458599a2e155d60a80e392
2
{ "blob_id": "51b05eebdd006403b3458599a2e155d60a80e392", "branch_name": "refs/heads/master", "committer_date": 1477233822000, "content_id": "7957aa94d5643dd7ff67c59ebef391b22de6d989", "detected_licenses": [ "MIT" ], "directory_id": "44d625504d263c37acbbeba6f897c6baccc6c766", "extension": "py", "fi...
2.40625
stackv2
from flask import Flask import os import hashlib import pickle import time import json app = Flask(__name__) mydir = "./mysite" registrationEnabled = True offlineAfterTime = 2 * 60 * 60 def checkIfTeamNameIsValid(teamName): return teamName.isalpha() @app.route("/") def home(): return os.getcwd() @app.ro...
86
27.23
92
16
627
python
[{"finding_id": "codeql_py/reflective-xss_cfdc64a7cc6cfe6d_7376a544", "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...
8
true
[ "CWE-079", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/reflective-xss", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "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 path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).\nThis path depends on a [user...
[ 38, 29, 39, 41, 49, 52, 72, 75 ]
[ null, null, null, null, null, null, null, null ]
[ 16, 23, 15, 15, 27, 15, 15, 15 ]
[ 93, 56, 46, 48, 58, 46, 48, 48 ]
2024-11-18T20:18:45.630577+00:00
1,636,450,549,000
8788c5b79cc26d7e2c055883cfd2e6f0d672bd35
3
{ "blob_id": "8788c5b79cc26d7e2c055883cfd2e6f0d672bd35", "branch_name": "refs/heads/main", "committer_date": 1636450549000, "content_id": "4223f0969d4d342b006ba0549cb820b5bf102f4e", "detected_licenses": [ "MIT" ], "directory_id": "db1274c8cb957540ae9e7520588226a2c4542f52", "extension": "py", "file...
2.875
stackv2
#!/usr/bin/env python3 from flask import (Flask, redirect, render_template, send_from_directory, url_for) from os import path from urllib.parse import unquote import os app = Flask(__name__) @app.route('/') def index(): return redirect(url_for('root')) # Display root('/') directory @app.rou...
93
31.18
79
18
647
python
[{"finding_id": "codeql_py/flask-debug_c7b1f447e3e1b0c7_fbd28a88", "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.", ...
5
true
[ "CWE-215", "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/flask-debug", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-pro...
[ 93, 43, 51, 64, 86 ]
[ null, null, null, null, null ]
[ 5, 35, 23, 23, 21 ]
[ 51, 42, 30, 39, 29 ]
2024-11-18T20:18:52.614674+00:00
1,575,613,957,000
6894fcaafaf1ea375903361aff667a58a82ebb88
3
{ "blob_id": "6894fcaafaf1ea375903361aff667a58a82ebb88", "branch_name": "refs/heads/master", "committer_date": 1575613957000, "content_id": "28d88be7bdfc40e99cd4d3786159fdaaa4d09c5c", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "b8a38d4fb260ddcc042759a2be589baf2e3ebc12", "extension": "p...
3.171875
stackv2
'''http://www.114la.com/other/rgb.htm 颜色对照表''' '''ff0000 红色''' '''访问主页得到Color viewer连接''' '''点击Color viewer进入localhost:8000/colors/''' '''点击/colors/ff0000 进入localhost:8000/colors/ff0000页面,此页面显示六位十六进制数代表的颜色''' '''访问localhost:8000/colors/六位十六进制数字 即可获得此代码代表的颜色''' from twisted.web import resource, static, server class...
111
26.82
117
16
814
python
[{"finding_id": "codeql_py/url-redirection_ff24957af457389f_f4df046e", "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)." ]
[ 42 ]
[ null ]
[ 26 ]
[ 64 ]
2024-11-18T20:51:26.835095+00:00
1,480,501,156,000
474feadbafe1ce8bef634197cc55237198784a2b
3
{ "blob_id": "474feadbafe1ce8bef634197cc55237198784a2b", "branch_name": "refs/heads/master", "committer_date": 1480501156000, "content_id": "58cd2c70bea3d0a15957212387b15caf18826240", "detected_licenses": [ "MIT" ], "directory_id": "81e129c4f88867e17f5d8e24f180df864902062b", "extension": "py", "fi...
3.140625
stackv2
# import pandas as pd import numpy as np import codecs, math, pickle, random from sklearn import model_selection, neural_network, svm, naive_bayes def nationality_trainer_v1(): # Load nationality list with codecs.open("nationalities.txt", "r", "utf-8") as f: nationalities = list(map(lambda x: x.strip()...
132
36.74
100
17
1,428
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_29ec14d031733cd6_4dfa5876", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 132 ]
[ null ]
[ 11 ]
[ 37 ]
2024-11-18T20:51:29.453673+00:00
1,690,333,301,000
b382922a451e48f115729dd533966b88a7185612
2
{ "blob_id": "b382922a451e48f115729dd533966b88a7185612", "branch_name": "refs/heads/master", "committer_date": 1690333301000, "content_id": "e57e4c8b680d51bb7206da908ca213311a6a35c0", "detected_licenses": [ "MIT" ], "directory_id": "914c7b46b10271729e8b35388906a092e6a6d42d", "extension": "py", "fi...
2.40625
stackv2
import flask import http import jsonref import os from jsonschema_scratch import config # An alternate way to serve static files is using static* params: # # Example: # flask.Flask(static_url_path="/schemas", static_folder="../schemas") # # This app uses `send_from_directory` for now. bp = flask.Blueprint("schemas",...
44
28.84
78
17
287
python
[{"finding_id": "codeql_py/path-injection_febef96201efc468_e3dd6aed", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
4
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 20, 35, 37, 38 ]
[ null, null, null, null ]
[ 19, 27, 26, 56 ]
[ 23, 31, 30, 60 ]
2024-11-18T19:07:05.441366+00:00
1,623,775,552,000
cb64888e8f1a7c36771a436c437d35b43a72a50f
3
{ "blob_id": "cb64888e8f1a7c36771a436c437d35b43a72a50f", "branch_name": "refs/heads/master", "committer_date": 1623775552000, "content_id": "2c96d14816d721ec0dda9e93f1ffc5caeca8c16e", "detected_licenses": [ "MIT" ], "directory_id": "c6ddbe40989609cd02fe9092339a14ef661ea882", "extension": "py", "fi...
3.03125
stackv2
from Crypto.PublicKey import RSA from Crypto.Signature import PKCS1_v1_5 from Crypto.Hash import SHA256 from Crypto.PublicKey.RSA import RsaKey from collections import Counter import Crypto.Random import binascii import hashlib import json import datetime import random import string def create_key() -> RSA.RsaKey: ...
96
27.72
78
14
638
python
[{"finding_id": "codeql_py/weak-crypto-key_9a59d1eb4a88fa91_c8dc3abf", "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." ]
[ 20 ]
[ null ]
[ 12 ]
[ 56 ]
2024-11-18T19:07:05.792573+00:00
1,587,380,285,000
eb9a2d93f0f06a84bc04f51df5495fd380d4fa75
3
{ "blob_id": "eb9a2d93f0f06a84bc04f51df5495fd380d4fa75", "branch_name": "refs/heads/master", "committer_date": 1587380285000, "content_id": "f66902c0670982cd3eb91b0a79d997284e73d1f2", "detected_licenses": [ "MIT" ], "directory_id": "c239a3b8ae8a20bc0380d3f80e5daceaae78c010", "extension": "py", "fi...
2.828125
stackv2
#!/usr/bin/env python3 import json import cgi import http.server import socketserver import sys import os requestHandler = http.server.BaseHTTPRequestHandler def delete_content(name): with open(name, "w"): pass class Server(requestHandler): # Set headers with content-type: 'application/json' def...
93
30.65
86
16
663
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_32cb7c6dfdc60078_e3d08a7c", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text." ]
[ 61 ]
[ null ]
[ 24 ]
[ 80 ]
2024-11-18T19:07:31.582236+00:00
1,692,968,959,000
bd2dd1c843c8e3f02483c1f1828b58f947ef0534
3
{ "blob_id": "bd2dd1c843c8e3f02483c1f1828b58f947ef0534", "branch_name": "refs/heads/main", "committer_date": 1692968959000, "content_id": "1141ac88d800d2e0204a32b9f07f1aed78f5e200", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8ff0cf76ddc987dde3ddc3554036f23c34cebcae", "extension": "py", ...
2.59375
stackv2
from fastapi import FastAPI,Request import trend_slope_computer as trend_slope_computer import logging import os import pandas as pd import json import sys from statistics import median app = FastAPI() logging.basicConfig(stream=sys.stdout, format="%(asctime)s %(levelname)s %(name)s: %(message)s")...
55
33.69
109
17
429
python
[{"finding_id": "codeql_py/log-injection_6d72fc4c48069293_ae6622d9", "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)." ]
[ 34 ]
[ null ]
[ 91 ]
[ 97 ]
2024-11-18T19:07:35.217431+00:00
1,625,562,011,000
d7c6c684499a6795370d0b56eac15f9d0a3e7306
2
{ "blob_id": "d7c6c684499a6795370d0b56eac15f9d0a3e7306", "branch_name": "refs/heads/master", "committer_date": 1625562011000, "content_id": "119796515644e3ace787ae5d4509e32cad4a2f2b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a18e4cb831e9dbc524d67ef4aab38df81b9c7727", "extension": "p...
2.3125
stackv2
# Modified version of the code originally implemented by Eustache Diemert <eustache@diemert.fr> # @FedericoV <https://github.com/FedericoV/> # with License: BSD 3 clause import os.path import re import tarfile from sklearn.datasets import get_data_home from six.moves import html_parser from six.moves import u...
189
34.3
113
18
1,611
python
[{"finding_id": "codeql_py/tarslip_60373e97bad6f473_be2713b9", "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)." ]
[ 151 ]
[ null ]
[ 13 ]
[ 47 ]
2024-11-18T19:07:59.802730+00:00
1,637,766,608,000
a87dbddc6016d2c4aaefd9e5a031d3f66939f576
3
{ "blob_id": "a87dbddc6016d2c4aaefd9e5a031d3f66939f576", "branch_name": "refs/heads/main", "committer_date": 1637766608000, "content_id": "0c2db8a1a5452cd23d42bb390d41bcc9a4cd8ded", "detected_licenses": [ "MIT" ], "directory_id": "0b7a6f2bbcd0be2ae3dc8a7ece87d8c8fd59a83b", "extension": "py", "file...
2.828125
stackv2
# -*- coding: utf-8 -*- # @Time : 2021/4/16 下午7:54 # @Author : anonymous # @File : parser.py # @Software: PyCharm # @Description: 测试数据解析模块 import re import importlib from types import FunctionType from typing import Any from rest_framework.serializers import ValidationError # 从字符串开始位置匹配该字符串是否以`http(s)://`开头 st...
175
43.14
118
22
2,058
python
[{"finding_id": "codeql_py/stack-trace-exposure_7d8cb5825592ac15_47acf290", "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." ]
[ 158 ]
[ null ]
[ 35 ]
[ 88 ]
2024-11-18T19:18:20.001084+00:00
1,534,176,133,000
610ba63d24a3f24e21d091c4bd2289b6e79bcd20
3
{ "blob_id": "610ba63d24a3f24e21d091c4bd2289b6e79bcd20", "branch_name": "refs/heads/master", "committer_date": 1534176133000, "content_id": "9dd15e0a63897737707f4d60319241c9e1f0c640", "detected_licenses": [ "Unlicense" ], "directory_id": "e9953288eeff202be9903f8b44c887168bfe1696", "extension": "py",...
2.96875
stackv2
from __future__ import print_function import argparse import getpass import os.path import os try: input = raw_input except NameError: pass parser = argparse.ArgumentParser(description='Stores and retrieves passwords through the use of a master key.') parser.add_argument('--list', '-l', '--ls', action='store_true',...
134
32.01
147
16
1,091
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_55e79fc47f9dbb05_3d1b1103", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 27, 32, 40, 45 ]
[ null, null, null, null ]
[ 9, 11, 9, 11 ]
[ 22, 40, 32, 50 ]
2024-11-18T19:18:26.512137+00:00
1,610,955,921,000
0cef019fb448a7ab7e96a94dd55bd70a702b9f5a
3
{ "blob_id": "0cef019fb448a7ab7e96a94dd55bd70a702b9f5a", "branch_name": "refs/heads/master", "committer_date": 1610955921000, "content_id": "5021f5c9f972786bc3bc7d3a492cf579d3d95a92", "detected_licenses": [ "MIT" ], "directory_id": "0542a4488c98a62dd01ea5430566f6108941aa01", "extension": "py", "fi...
3.140625
stackv2
#!/usr/bin/env python3 from wsgiref.simple_server import make_server def page(content, *args): yield b'<html><head><title>wsgi_example.py</title></head><body>' yield (content % args).encode('utf-8') yield b'</body></html>' def application(environ, start_response): if environ['PATH_INFO'] == '/': ...
42
35.81
87
15
391
python
[{"finding_id": "codeql_py/code-injection_6a27089bc4bb8f43_3dc96b65", "tool_name": "codeql", "rule_id": "py/code-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This code execution depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "...
1
true
[ "CWE-094" ]
[ "py/code-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This code execution depends on a [user-provided value](1)." ]
[ 28 ]
[ null ]
[ 27 ]
[ 56 ]
2024-11-18T19:18:28.981866+00:00
1,494,311,884,000
002ce5cf46cb4594142797cf0c8b1f2e632194ae
3
{ "blob_id": "002ce5cf46cb4594142797cf0c8b1f2e632194ae", "branch_name": "refs/heads/master", "committer_date": 1494311884000, "content_id": "d6d7d612f6b9964a408940967cff0016982df519", "detected_licenses": [ "MIT" ], "directory_id": "bea5544c442be21955422e5fa5768e06c129209e", "extension": "py", "fi...
3
stackv2
""" This is the controller of the /employee endpoint The following functions are called from here: GET """ from sqlalchemy.exc import SQLAlchemyError from databasesetup import create_session, Employee from models.employee_api_model import EmployeeApiModel from models.employee_response import EmployeeResponse from help...
58
47.14
124
13
515
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_81ecd13691519558_afc3acdb", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
3
true
[ "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 28, 35, 50 ]
[ 29, null, 57 ]
[ 22, 22, 20 ]
[ 61, 124, 48 ]