added
stringlengths
32
32
created
int64
1,236B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.03
source
stringclasses
1 value
text
stringlengths
330
19.3k
num_lines
int64
16
648
avg_line_length
float64
15.5
59.3
max_line_length
int64
37
179
ast_depth
int64
8
38
length
int64
102
3.79k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
1.11k
276k
sast_codeql_findings_count
int64
1
33
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
cwe_ids
listlengths
1
33
rule_ids
listlengths
1
33
confidences
listlengths
1
33
severities
listlengths
1
33
messages
listlengths
1
33
line_starts
listlengths
1
33
line_ends
listlengths
1
33
column_starts
listlengths
1
33
column_ends
listlengths
1
33
2024-11-18T22:26:14.720178+00:00
1,360,452,377,000
472b4d423b4b62658890b628683c2753847cfa38
3
{ "blob_id": "472b4d423b4b62658890b628683c2753847cfa38", "branch_name": "refs/heads/master", "committer_date": 1360452377000, "content_id": "fde4a2441cb00bcec9fd3d6f4e3c39b93a807e8c", "detected_licenses": [ "MIT", "BSD-3-Clause" ], "directory_id": "8f38542a73ab9e8973232cdc65b6cff1c28bda84", "ext...
2.8125
stackv2
# # Copyright (c) 2013 Markus Eliasson, http://www.quarterapp.com/ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use...
74
35.73
85
18
662
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_2b97c383f7ebb0e7_d4bdc4b7", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 39 ]
[ null ]
[ 16 ]
[ 31 ]
2024-11-18T20:39:40.967806+00:00
1,556,001,248,000
8fd8c935fbf9e600942e454ee455f38df055f5ec
3
{ "blob_id": "8fd8c935fbf9e600942e454ee455f38df055f5ec", "branch_name": "refs/heads/master", "committer_date": 1556001248000, "content_id": "1bc497565fa62149d7a1b6621fb8c8c921b1bdb9", "detected_licenses": [ "MIT" ], "directory_id": "d704396522cd98bcc7050b32fb414691904128bb", "extension": "py", "fi...
3.109375
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Mar 30 16:57:19 2019 @author: gaurav """ ########################################################################################## # importing import re ########################################################################################## # G...
82
23.01
105
11
462
python
[{"finding_id": "codeql_py/overly-large-range_b8afdecd64ab4f89_4966e738", "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-020" ]
[ "py/overly-large-range", "py/overly-large-range" ]
[ "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\\].", "Suspicious character range that overlaps with a-z in the same character class, and is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]." ]
[ 49, 75 ]
[ null, null ]
[ 30, 30 ]
[ 33, 33 ]
2024-11-18T20:39:48.461112+00:00
1,592,839,466,000
8bfd334591157f4bc72e041ba890a0e8099d5433
3
{ "blob_id": "8bfd334591157f4bc72e041ba890a0e8099d5433", "branch_name": "refs/heads/master", "committer_date": 1592839466000, "content_id": "12dfe355be979fa4a57cf801d38a756f518c1aad", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6a2c63d27c4aee1b1f38eb3c28ad7f89c79ac89d", "extension": "py"...
2.703125
stackv2
import errno import getpass import logging import os import paramiko from libsubmit.channels.errors import * from libsubmit.utils import RepresentationMixin logger = logging.getLogger(__name__) class SSHChannel(RepresentationMixin): ''' SSH persistent channel. This enables remote execution on sites accessib...
229
32.73
101
19
1,617
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_df8474bbaa49a4c9_d1499559", "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." ]
[ 47 ]
[ null ]
[ 9 ]
[ 78 ]
2024-11-18T20:39:49.125172+00:00
1,545,644,019,000
9a781123846272109d639c38e15aa51b5b1c2d2a
3
{ "blob_id": "9a781123846272109d639c38e15aa51b5b1c2d2a", "branch_name": "refs/heads/master", "committer_date": 1545673727000, "content_id": "cb218bb6d33822d73000ae27b0e9ddbc6bb67566", "detected_licenses": [ "MIT" ], "directory_id": "2fcc3f7be07616767517fa71af226e305662eab2", "extension": "py", "fi...
2.53125
stackv2
import os import random import shutil import tarfile import warnings import requests import torchvision from torchvision.datasets.utils import check_integrity from tqdm import tqdm from utils.constants import DATA_DIR CALTECH_RAW = DATA_DIR / "Caltech_raw" CALTECH_256 = DATA_DIR / "Caltech256" CALTECH_10 = DATA_DIR ...
107
33.64
102
15
975
python
[{"finding_id": "codeql_py/tarslip_40429a05f8e4dfc2_b26fc370", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un...
1
true
[ "CWE-022" ]
[ "py/tarslip" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This file extraction depends on a [potentially untrusted source](1)." ]
[ 39 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T20:52:12.997374+00:00
1,606,931,670,000
58f959d0bbe85e91b952651435356e577cf3c479
2
{ "blob_id": "58f959d0bbe85e91b952651435356e577cf3c479", "branch_name": "refs/heads/master", "committer_date": 1606931670000, "content_id": "4ae565966377e0035d379dcf853da69f203950c4", "detected_licenses": [ "MIT" ], "directory_id": "888af64412c492b005d0463f37662b0f5730a57d", "extension": "py", "fi...
2.40625
stackv2
import asyncio import json import os from flask import Flask, g, session, redirect, request, url_for, jsonify from requests_oauthlib import OAuth2Session from urllib.parse import urlparse API_ENDPOINT = "https://discordapp.com/api/v6" API_AUTH_URL = API_ENDPOINT + "/oauth2/authorize" API_TOKEN_URL = API_ENDPOINT + "/o...
73
33.78
87
13
585
python
[{"finding_id": "codeql_py/reflective-xss_b1cf72d5aa9d7d29_5dbfabc4", "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)." ]
[ 54 ]
[ null ]
[ 16 ]
[ 39 ]
2024-11-18T20:52:15.936393+00:00
1,687,473,101,000
c227283bcacc19df81ff3522c75f4960c9a171e8
3
{ "blob_id": "c227283bcacc19df81ff3522c75f4960c9a171e8", "branch_name": "refs/heads/master", "committer_date": 1687473101000, "content_id": "d0ea82e1980af2f1d1ae1007bd5ae869ef997b64", "detected_licenses": [ "MIT" ], "directory_id": "bf0ae6bdc3c86a751a770698159bde0324daf326", "extension": "py", "fi...
3.03125
stackv2
#!/usr/bin/env python import json import sys import xapian import support def search(dbpath, querystring, offset=0, pagesize=10): # offset - defines starting point within result set # pagesize - defines number of records to retrieve # Open the database we're going to search. db = xapian.Database(dbpa...
93
34.03
77
18
799
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e7092f45d7d4dc03_1b11887a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 72 ]
[ 82 ]
[ 15 ]
[ 14 ]
2024-11-18T21:08:24.220789+00:00
1,584,163,310,000
de65f140fbe78665340fd5d02feb2b68e5a6bf8a
2
{ "blob_id": "de65f140fbe78665340fd5d02feb2b68e5a6bf8a", "branch_name": "refs/heads/master", "committer_date": 1584163417000, "content_id": "1f3e5e9ae613b97310747e1f8481b5f218b31301", "detected_licenses": [ "MIT" ], "directory_id": "41b64c3398671ba69395e761f7cc0121a665f280", "extension": "py", "fi...
2.390625
stackv2
import logging from typing import Tuple from django.http import Http404 from django.shortcuts import get_object_or_404 from django.views.generic.base import ContextMixin, TemplateView from ..menu import get_nav_menu_list from ..mixins import PreviewModeMixin from ..models import * class PageContextMixin(PreviewMode...
118
29.68
85
17
786
python
[{"finding_id": "codeql_py/log-injection_ce38656c7568b66c_745fedf6", "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)." ]
[ 41 ]
[ null ]
[ 29 ]
[ 69 ]
2024-11-18T21:08:33.183262+00:00
1,589,044,625,000
5901e40f75d06f881eb2ea76fedcda3ddbb7d66a
3
{ "blob_id": "5901e40f75d06f881eb2ea76fedcda3ddbb7d66a", "branch_name": "refs/heads/master", "committer_date": 1589044625000, "content_id": "815ef30841712fde0c62e848ac44e8ac32fd5d97", "detected_licenses": [ "MIT" ], "directory_id": "66fb882d84a521a72868c25b37b34fba6289dfb5", "extension": "py", "fi...
3.28125
stackv2
# Create API of ML model using flask ''' This code takes the JSON data while POST request an performs the prediction using loaded model and returns the results in JSON format. ''' # Import libraries import numpy as np from flask import Flask, render_template, request, jsonify import pickle from sklearn.preprocessing ...
82
31.11
154
15
608
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8dda736daf49bef1_8d259c61", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
2
true
[ "CWE-312", "CWE-215" ]
[ "py/clear-text-logging-sensitive-data", "py/flask-debug" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger." ]
[ 39, 82 ]
[ null, null ]
[ 15, 5 ]
[ 26, 24 ]
2024-11-18T21:32:11.237862+00:00
1,449,263,858,000
4adf9f1c608acd85ab15b1164a5a91364e706261
3
{ "blob_id": "4adf9f1c608acd85ab15b1164a5a91364e706261", "branch_name": "refs/heads/master", "committer_date": 1449263858000, "content_id": "91bb71106b95f180ab5a2174cac95e582910d3e5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "89fd8be09fea8c823d7d93f0641ce600236d4507", "extension": "py"...
2.515625
stackv2
import jinja2 import json import os import webapp2 from apiclient.discovery import build JINJA_ENVIRONMENT = jinja2.Environment( loader=jinja2.FileSystemLoader(os.path.dirname(__file__)), extensions=['jinja2.ext.autoescape']) REGISTRATION_INSTRUCTIONS = """ You must set up a project and get an API key to...
121
33.93
109
19
990
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_32498207f6b91019_2f69c6e0", "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." ]
[ 8 ]
[ 10 ]
[ 21 ]
[ 42 ]
2024-11-18T21:32:12.499607+00:00
1,586,373,819,000
e1d5f674451087336a650998cbc767f8bfdf5fc6
2
{ "blob_id": "e1d5f674451087336a650998cbc767f8bfdf5fc6", "branch_name": "refs/heads/master", "committer_date": 1586373819000, "content_id": "eb144376829d14c4d3019a1534d02eea663f5bc9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "69ec5bb0ef3f08f8e6ab968806b3fb187bf49cd0", "extension": "py"...
2.328125
stackv2
import subprocess import os import re import pwd from datetime import timedelta from time import sleep from ops.model import ModelError from ops.charm import CharmEvents from ops.framework import ( Object, StoredState, EventBase, EventSource, ) from jinja2 import Environment, FileSystemLoader class...
193
39.05
96
17
1,659
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_ab60bb804a6f1e48_e03a681f", "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." ]
[ 167 ]
[ null ]
[ 15 ]
[ 64 ]
2024-11-18T21:32:18.315363+00:00
1,585,640,582,000
3b1587e45105f7a85befd77b6191bdc3df763276
3
{ "blob_id": "3b1587e45105f7a85befd77b6191bdc3df763276", "branch_name": "refs/heads/master", "committer_date": 1585640582000, "content_id": "3ebb27543c6e3394dba4bb3b083b05dcf303ee65", "detected_licenses": [ "MIT" ], "directory_id": "f5a956b74a6a761a862e3bdfd0cb6cf8f4147f92", "extension": "py", "fi...
3.34375
stackv2
import os import argparse import requests from pathlib import Path from PIL import Image IMAGES_PATH = os.path.join("images",'') def get_image(url): response = requests.get(url, verify=False) response.raise_for_status() image = response.content return image def save_image(image, filename, image...
74
28.76
129
14
489
python
[{"finding_id": "codeql_py/request-without-cert-validation_7514bf3e5f190687_43217c5b", "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)." ]
[ 13 ]
[ null ]
[ 16 ]
[ 47 ]
2024-11-18T21:32:19.820545+00:00
1,591,296,913,000
d2607a964021dcca19435ac7bad538b450277d1b
2
{ "blob_id": "d2607a964021dcca19435ac7bad538b450277d1b", "branch_name": "refs/heads/master", "committer_date": 1591296913000, "content_id": "fb33bb0f0c4082b54acd49ed13f336292367c2b0", "detected_licenses": [ "MIT" ], "directory_id": "e03a152da29009949e9babecb10c6f214702f672", "extension": "py", "fi...
2.390625
stackv2
import rest_methods import json ##Import variables to get configuration config = json.loads(open("parameters.json").read()) log = open ("debug.log","w") ##Set Variables for use host = config["host"] port = config["port"] username = config["username"] password = config["password"] # output format either JSON or XML ...
43
26.4
89
11
281
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ce0db317bfc59f0f_9ea3faf5", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text." ]
[ 36 ]
[ null ]
[ 21 ]
[ 65 ]
2024-11-18T21:32:21.404506+00:00
1,613,491,362,000
e759a81b81582efbcdd8ccb85706138b2ee32dfe
2
{ "blob_id": "e759a81b81582efbcdd8ccb85706138b2ee32dfe", "branch_name": "refs/heads/master", "committer_date": 1613491362000, "content_id": "c2362b1a9e19c72e8a9c571633be8754222ae878", "detected_licenses": [ "MIT" ], "directory_id": "9e683bb61f3193875316950efb2f32b3b20cacc4", "extension": "py", "fi...
2.40625
stackv2
from django.shortcuts import render_to_response, render from django.http import HttpResponseRedirect from django.conf import settings from django.template import RequestContext import oauth2 as oauth import urlparse import urllib import slumber import logging logger = logging.getLogger(__name__) request_token_url ...
104
42.65
136
14
1,010
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6720b614a25268ab_4d021d42", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 75, 83 ]
[ null, null ]
[ 17, 21 ]
[ 64, 115 ]
2024-11-18T21:33:00.051060+00:00
1,624,537,000,000
8ca151153818848a5ccedc41f8cc18dc1616c426
3
{ "blob_id": "8ca151153818848a5ccedc41f8cc18dc1616c426", "branch_name": "refs/heads/master", "committer_date": 1624537000000, "content_id": "085bed688844adbc836c142d42e8627588a935cb", "detected_licenses": [ "MIT" ], "directory_id": "233591c9569c3594df2b6156b687ff3cd2022e00", "extension": "py", "fi...
2.875
stackv2
#!/usr/bin/env python3 import datetime import time from twilio.rest import Client import creds import number_list debug = True if not debug: client = Client(creds.creds['account_sid'], creds.creds['auth_token']) # This is the actual call method used. def make_call(n, client, t_number, s_number, twiml): cl...
67
33.63
120
16
595
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1b1561bb819aff27_c0e95a07", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (p...
[ 27, 33, 43, 46 ]
[ 28, 34, null, null ]
[ 9, 9, 15, 15 ]
[ 54, 52, 22, 22 ]
2024-11-18T21:49:01.843206+00:00
1,623,493,729,000
ea6f73d1d5300dd498c37a656bde8e19c95f16a2
2
{ "blob_id": "ea6f73d1d5300dd498c37a656bde8e19c95f16a2", "branch_name": "refs/heads/master", "committer_date": 1623493729000, "content_id": "7bd4fb2b95a134f3aa1822f756c9aea8af0aa4d5", "detected_licenses": [ "MIT" ], "directory_id": "bf8a0c0d11879f6a157182519b5a2bf213a7e334", "extension": "py", "fi...
2.453125
stackv2
""" Core functionality for roast.vim plugin. This module is inteded to be testable outside vim, so MUST NOT import the `vim` module. """ import shlex from itertools import takewhile from typing import List, Dict, Optional import json from pathlib import Path from xml.dom import minidom from xml.parsers.expat import Ex...
245
29.34
120
18
1,717
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_a6cc832335ce8580_77b426a7", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 55 ]
[ null ]
[ 16 ]
[ 30 ]
2024-11-18T21:49:02.486064+00:00
1,619,605,339,000
8d6292ad6bbe831e734ff0f10d4549e6f9ec10e8
4
{ "blob_id": "8d6292ad6bbe831e734ff0f10d4549e6f9ec10e8", "branch_name": "refs/heads/master", "committer_date": 1619605339000, "content_id": "1899d9e05de643d870fcb63a4d7c76f23174b3c0", "detected_licenses": [ "MIT" ], "directory_id": "c2fb6846d5b932928854cfd194d95c79c723f04c", "extension": "py", "fi...
4.40625
stackv2
#!/usr/bin/python3 class Employee: 'Common base class for all employees' empCount = 0 def __init__(self, name, salary): self.name = name self.salary = salary Employee.empCount += 1 def displayCount(self): print ("Total Employee %d" % Employee.empCount) def displayEmployee(se...
26
24.19
62
11
170
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_105d16198ad5f3f9_d24aa18a", "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." ]
[ 16 ]
[ null ]
[ 51 ]
[ 62 ]
2024-11-18T20:31:51.540553+00:00
1,602,043,766,000
d7072c971697f27a262bd9f63ac5ac6584e871d3
2
{ "blob_id": "d7072c971697f27a262bd9f63ac5ac6584e871d3", "branch_name": "refs/heads/main", "committer_date": 1602043766000, "content_id": "66f979b9dc590b742540203e39500e55b68922a7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "baf39bb8c7ec91b695c45de18ee65ee4fecb778f", "extension": "py", ...
2.34375
stackv2
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import sys import mechanize import cookielib import random import time os.system('clear') def runntek(s): for c in s + '\n': sys.stdout.write(c) sys.stdout.flush() time.sleep(10. / 100) if sys.platfor...
154
30.64
146
13
1,459
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c5b62e0538332384_76c7aeae", "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." ]
[ 112 ]
[ null ]
[ 26 ]
[ 83 ]
2024-11-18T20:53:26.552404+00:00
1,539,069,735,000
a14fb3e83be9ffd02c62e4fc766f85c76fd25593
3
{ "blob_id": "a14fb3e83be9ffd02c62e4fc766f85c76fd25593", "branch_name": "refs/heads/master", "committer_date": 1539069735000, "content_id": "773abfa93dfa70eb013de66bae6d1bb776fe5be2", "detected_licenses": [ "MIT" ], "directory_id": "3bd09e08a4acdc84699a9069fe709f5ee80fd6cf", "extension": "py", "fi...
2.578125
stackv2
# -*- coding: utf-8 -*- from __future__ import print_function import hashlib import logging import xml.dom.minidom from requests import Session from .errors import (InvalidError, LoginError) _LOGGER = logging.getLogger(__name__) def get_text(nodelist): """Get the value from a text node.""" value = [] f...
520
31.11
79
18
3,772
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_876590e08cc36b23_9c470600", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi...
[ 85 ]
[ null ]
[ 30 ]
[ 37 ]
2024-11-18T21:10:19.307330+00:00
1,499,268,965,000
df386705cff7af404bc823e3b27018380402b15a
2
{ "blob_id": "df386705cff7af404bc823e3b27018380402b15a", "branch_name": "refs/heads/master", "committer_date": 1499268965000, "content_id": "27b5be536cb11e749c383f2214b8e889a8a1d6ea", "detected_licenses": [ "MIT" ], "directory_id": "d91818f37dc6107c8730938ca98484d13453d075", "extension": "py", "fi...
2.5
stackv2
import re import tldextract import unicodedata import traceback from multiprocessing import Process, Manager def buildRexList(valuesList): """ """ rexList=[] for values in valuesList: rex="\\b"+"\\b|\\b".join([re.escape(v) for v in values])+"\\b" rexList.append(re.compile(rex, re.I)) ...
105
25.28
77
15
750
python
[{"finding_id": "codeql_py/redos_2d174e7dea4b5e76_7f5f5b80", "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 '-'." ]
[ 73 ]
[ null ]
[ 34 ]
[ 46 ]
2024-11-18T21:10:19.853113+00:00
1,488,314,252,000
c0a287188d203808ef5dd59e2359e4c81d92586a
2
{ "blob_id": "c0a287188d203808ef5dd59e2359e4c81d92586a", "branch_name": "refs/heads/master", "committer_date": 1488314252000, "content_id": "dbac4ca97320facc42f52ade67a570a4ef46d29f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e80f5af8ef3708997535d1347537c631eee89ea5", "extension": "py"...
2.421875
stackv2
#!/usr/bin/env python import os import json from flask import (Flask, request, jsonify) app = Flask(__name__) port = int(os.getenv("PORT", 18080)) def logMsg(args): print "[Instance: %s] %s" % (str(os.getenv("CF_INSTANCE_INDEX", 0)), args) # Handle JSON # Simulate adding a "sentiment" attribute @app.route('/', ...
28
22.71
78
12
196
python
[{"finding_id": "codeql_py/reflective-xss_a7ee4d7503bc8e8a_57884982", "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)." ]
[ 20 ]
[ null ]
[ 10 ]
[ 25 ]
2024-11-18T21:11:14.035149+00:00
1,551,985,749,000
a1f4b614e297eed2fc1c94cba3d3946a70bda9eb
2
{ "blob_id": "a1f4b614e297eed2fc1c94cba3d3946a70bda9eb", "branch_name": "refs/heads/master", "committer_date": 1551985749000, "content_id": "9720a387ae936dd4b60198675cff63efcb6145c4", "detected_licenses": [ "MIT" ], "directory_id": "8bc285848f77323ae26c9b5c4b19eae2b47784c8", "extension": "py", "fi...
2.328125
stackv2
from datetime import timedelta, datetime import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning from requests.auth import HTTPBasicAuth from pprint import pprint import yaml import json requests.packages.urllib3.disable_warnings(InsecureRequestWarning) def get_token(): url = 'https:/...
46
35.57
116
12
409
python
[{"finding_id": "codeql_py/request-without-cert-validation_b87a3fa5d709fca2_985bd4fa", "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)." ]
[ 14, 26, 43 ]
[ null, null, null ]
[ 6, 6, 5 ]
[ 117, 54, 65 ]
2024-11-18T21:46:33.561469+00:00
1,586,332,472,000
1dfcc9fbc4035d06113f8500a066162a7f30099b
3
{ "blob_id": "1dfcc9fbc4035d06113f8500a066162a7f30099b", "branch_name": "refs/heads/master", "committer_date": 1586332472000, "content_id": "9e8d42f5f71702f5ddd718ac21ff8787bf3b4e3e", "detected_licenses": [ "MIT" ], "directory_id": "1feff92d66a36b20bab6f736c72031f9a649228c", "extension": "py", "fi...
3.421875
stackv2
#!/usr/bin/python3 import argparse import random import string def generate_password( count, allow_lower=True, allow_upper=True, allow_digit=True, allow_punctuation=True): characters = "" if allow_lower: characters += string.ascii_lowercase if allow_upper: charac...
62
26.66
73
11
372
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c30bb8a088482292_e587ca7f", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive d...
[ 58, 62 ]
[ null, null ]
[ 17, 15 ]
[ 25, 23 ]
2024-11-18T21:46:35.123464+00:00
1,660,253,427,000
7410220b3ffea6acbf81ca293741e9e09c23fe5a
3
{ "blob_id": "7410220b3ffea6acbf81ca293741e9e09c23fe5a", "branch_name": "refs/heads/main", "committer_date": 1660253427000, "content_id": "f63c3d7754feb59a5727c534c5360496dc79b7c8", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b19b2fed48d7d4877150418c0d29e3e9e6581e30", "extension": "py", ...
2.53125
stackv2
# # AIS Gaps Training Set Pipeline # # **Last updated:** 2022-06-24 # # ## Overview # # This notebook executes the following query to produce a labeled training set of # 12+ hour AIS gaps using Exact Earth positions: # # `ais_gap_events_labeled.sql.j2`: This query calculates Exact Earth statistics # and produces a fi...
38
31.53
98
10
314
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_d12fd515d5f27fcd_4e84d0bf", "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." ]
[ 24 ]
[ null ]
[ 20 ]
[ 38 ]
2024-11-18T21:47:39.922067+00:00
1,511,936,419,000
53e3ecc43e9d8c4417dbb2f381f3f21ea91dfe5a
3
{ "blob_id": "53e3ecc43e9d8c4417dbb2f381f3f21ea91dfe5a", "branch_name": "refs/heads/master", "committer_date": 1511936419000, "content_id": "bcceae370e3d04d6c215cdef83672ea583a860c0", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "22dcec2862eda7885d69f8c5af46e7e9ca39cf10", "extension": "p...
2.796875
stackv2
#!/usr/bin/env python3 ############################################################################### # # # Copyright (c) 2017 Baidu Inc. All Rights Reserved # # ...
132
31.97
79
19
1,006
python
[{"finding_id": "codeql_py/insecure-default-protocol_fc927db5cefa912d_7dd6a5e2", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 129 ]
[ 130 ]
[ 16 ]
[ 47 ]
2024-11-18T22:28:55.249042+00:00
1,621,317,773,000
25a04a16c164670265111dc2866185573d23ba22
3
{ "blob_id": "25a04a16c164670265111dc2866185573d23ba22", "branch_name": "refs/heads/main", "committer_date": 1621317773000, "content_id": "b1904e5227e57049af89360071ea811b7f237b73", "detected_licenses": [ "MIT" ], "directory_id": "be2fb522249d9518f4c09782eca39ff777ee370f", "extension": "py", "file...
2.53125
stackv2
from collections import deque from typing import Optional from datetime import date import os import secrets from fastapi import APIRouter, Request, Response, Depends, Cookie, HTTPException, status from fastapi.security import HTTPBasic, HTTPBasicCredentials from fastapi.templating import Jinja2Templates from fastapi.r...
134
34.15
110
13
1,008
python
[{"finding_id": "codeql_py/url-redirection_f4af8e7c6e67fc86_f9fc33b9", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
2
true
[ "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 115, 126 ]
[ null, null ]
[ 33, 33 ]
[ 36, 36 ]
2024-11-18T22:29:01.855313+00:00
1,561,579,945,000
d0da1ab261d2e97cb4e15d13e58403675f9a79cb
3
{ "blob_id": "d0da1ab261d2e97cb4e15d13e58403675f9a79cb", "branch_name": "refs/heads/master", "committer_date": 1561579945000, "content_id": "c8c7e10d5c606f0a7a807f25ceede73f6590e7a9", "detected_licenses": [ "MIT" ], "directory_id": "610f02b520b5c3afc905ad74635dc0ef634be5f2", "extension": "py", "fi...
2.625
stackv2
from flask import Flask, jsonify, request from flask_reverse_proxy_fix.middleware import ReverseProxyPrefixFix from flask_cors import CORS import mysql.connector from mysql.connector import Error import json from sklearn.svm import SVR import pandas as pd import numpy as np import datetime # Setup the API to work Cr...
366
27.01
113
19
2,763
python
[{"finding_id": "codeql_py/flask-debug_9a0b58eff629bf1c_afbcd527", "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-089", "CWE-089", "CWE-089" ]
[ "py/flask-debug", "py/sql-injection", "py/sql-injection", "py/sql-injection" ]
[ "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.", "This SQL query depends on a [user-provided value](1).", "This SQL query depends on a [user-provided value](1).", "This SQL query depends on a [user-provided value](1).\nThis SQL query depend...
[ 366, 81, 96, 246 ]
[ null, 82, 97, null ]
[ 5, 22, 22, 22 ]
[ 39, 42, 42, 26 ]
2024-11-18T22:29:32.245058+00:00
1,572,320,739,000
45dd7e7fb02cace15e27bb96b08d3ac5ec26285e
2
{ "blob_id": "45dd7e7fb02cace15e27bb96b08d3ac5ec26285e", "branch_name": "refs/heads/master", "committer_date": 1572320739000, "content_id": "1d51aa3bf6a45cb8eb4ea52db336590259be3fa1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4b5a823927395c778fe6faedc12a8cee08acf014", "extension": "py"...
2.5
stackv2
#!/usr/bin/env python # -*- coding:utf-8 -*- # 腾讯 云解析DNS API # API文档 https://cloud.tencent.com/document/api/302/4032 import hashlib import requests import hmac import random import time import base64 import json class Sign(object): """请求签名""" def __init__(self, secretKey): self.secretKey = secr...
294
33.78
160
16
2,885
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_42996e5b4e4624ba_d1fa0b79", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecu...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (SHA1) that is insecure." ]
[ 27 ]
[ null ]
[ 58 ]
[ 79 ]
2024-11-18T22:41:22.571858+00:00
1,430,343,603,000
6aa80e3875e5300918d7dbdcf065d58ebcc49f19
2
{ "blob_id": "6aa80e3875e5300918d7dbdcf065d58ebcc49f19", "branch_name": "refs/heads/master", "committer_date": 1430343603000, "content_id": "ba893b84264891a90f8fd57abb49832092673687", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9db7a1a182f0265bce528e4dd61c27beaa12cad6", "extension": "py"...
2.46875
stackv2
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
58
34.76
93
13
453
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_7ed545f2afc7e8b7_204bce4a", "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." ]
[ 39 ]
[ null ]
[ 11 ]
[ 63 ]
2024-11-18T20:55:08.324583+00:00
1,527,200,130,000
117d1999ef146ccf90642d7f44bcbb2c9112f9bf
3
{ "blob_id": "117d1999ef146ccf90642d7f44bcbb2c9112f9bf", "branch_name": "refs/heads/master", "committer_date": 1527200328000, "content_id": "fd1b57d20145a7d5394e82a4371c25e2ed837d47", "detected_licenses": [ "Apache-2.0" ], "directory_id": "592cc6935e0e1da41d3a161b66f891895a7e4249", "extension": "py"...
2.609375
stackv2
#!/usr/bin/env python from jinja2 import Environment, FileSystemLoader import os import argparse import sys import re def doc_from_template(template, output, append=False, nvars=None): nvars = nvars or {} nvars.update(os.environ) template_abs_path = os.path.abspath(template) template_dir = os.path.di...
48
31.17
82
14
357
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_a1581b6b6718096f_988e3022", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 16 ]
[ 17 ]
[ 12 ]
[ 43 ]
2024-11-18T21:07:37.358952+00:00
1,586,866,925,000
7e187329c7bb70a81250158651709a1b74d092ed
2
{ "blob_id": "7e187329c7bb70a81250158651709a1b74d092ed", "branch_name": "refs/heads/master", "committer_date": 1586866925000, "content_id": "de5795204f991a8272210c834fa24950d0020978", "detected_licenses": [ "MIT" ], "directory_id": "17a05b0e22a69aad78b3b84fa3b65c035164d65c", "extension": "py", "fi...
2.390625
stackv2
from flask import Flask, jsonify, request, render_template, json from flask_pymongo import PyMongo from pymongo import ReturnDocument, MongoClient from bson import json_util, ObjectId from config import url from jsonschema import validate, ValidationError, SchemaError import jsonschema import jinja2 app = Flask(__name...
163
34.33
132
14
1,404
python
[{"finding_id": "codeql_py/flask-debug_743498d9c715204a_dbc24e9d", "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)." ]
[ 163, 124 ]
[ null, null ]
[ 5, 12 ]
[ 26, 24 ]
2024-11-18T21:07:37.870007+00:00
1,480,097,324,000
acbd08e7c24d32726894a8a7ba9668de5a59282a
3
{ "blob_id": "acbd08e7c24d32726894a8a7ba9668de5a59282a", "branch_name": "refs/heads/master", "committer_date": 1480097324000, "content_id": "903ddeb1d3f498092cbcac0b1d07e2ccf786ce86", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5ef733e7922dc52cd72af4fba7719e1cbe533982", "extension": "py"...
2.71875
stackv2
#!/usr/bin/env python3 import os import sys import requests import argparse from lxml import etree URL_BASE = 'https://www.reddit.com' def get_arg(): parser = argparse.ArgumentParser(description='Change your wallpaper by the last one posted in reddit') parser.add_argument('--sub', dest='subreddit', type=str, ...
106
30.1
131
20
828
python
[{"finding_id": "codeql_py/request-without-cert-validation_c9261d66c6a904b4_8b1cf893", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
1
true
[ "CWE-295" ]
[ "py/request-without-cert-validation" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1)." ]
[ 26 ]
[ null ]
[ 16 ]
[ 65 ]
2024-11-18T21:33:01.476767+00:00
1,657,718,381,000
3bf99a8aeffc9f8124ccd9469e878551736057da
3
{ "blob_id": "3bf99a8aeffc9f8124ccd9469e878551736057da", "branch_name": "refs/heads/master", "committer_date": 1657718381000, "content_id": "a347c1d00104ad78972af9267f83591c4bdc8fd2", "detected_licenses": [ "MIT" ], "directory_id": "a45dd33ba7068b1bba349dfa9ec61d632c016d16", "extension": "py", "fi...
3.015625
stackv2
import tornado.web import json class BaseRestHandler(tornado.web.RequestHandler): """ A request handler for a REST web interface, taking care of writing and reading JSON request/responses """ def data_received(self, chunk): raise NotImplementedError("Should be implemented by subclass!") ...
81
31.37
101
16
555
python
[{"finding_id": "codeql_py/reflective-xss_900fdc73d1407df0_26c50c6f", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability d...
1
true
[ "CWE-079" ]
[ "py/reflective-xss" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](2)." ]
[ 27 ]
[ null ]
[ 20 ]
[ 24 ]
2024-11-18T21:33:14.246812+00:00
1,592,090,453,000
e08d0717e954aab0978e43a075a8cfb379adb652
2
{ "blob_id": "e08d0717e954aab0978e43a075a8cfb379adb652", "branch_name": "refs/heads/master", "committer_date": 1592090453000, "content_id": "f14be42378c557860fee77c343e89a1f6eccecf9", "detected_licenses": [ "MIT" ], "directory_id": "d3c3987d98fbf7e7f61580370943b503f6c33233", "extension": "py", "fi...
2.390625
stackv2
# Standard library imports... import hashlib import hmac import requests import logging logger = logging.getLogger(__name__) def create_account(user, password, server_location, shared_secret, admin=False): """ creates account https://github.com/matrix-org/synapse/blob/master/synapse/_...
72
23.47
98
11
403
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_eeb34c54e6a0a9d4_0ab038d2", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 47 ]
[ null ]
[ 16 ]
[ 33 ]
2024-11-18T21:33:17.795323+00:00
1,635,605,323,000
9a8ddc076e5e4eaa8ddb9e625a0cb9443b276d63
3
{ "blob_id": "9a8ddc076e5e4eaa8ddb9e625a0cb9443b276d63", "branch_name": "refs/heads/main", "committer_date": 1635605323000, "content_id": "0fbbe5591907f14f0540afb4e64bdca4643303ae", "detected_licenses": [ "MIT" ], "directory_id": "0be983d132400e38c7df3aa4c1af7e395bea8560", "extension": "py", "file...
3.21875
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Emoji and URL Preprocessor masks are from: emoji: https://stackoverflow.com/questions/33404752/removing-emojis-from-a-string-in-python + https://gist.github.com/slowkow/7a7f61f495e3dbb7e3d767f97bd7304b url: https://stackoverflow.com/questions/11331982/ho...
87
30.99
100
13
748
python
[{"finding_id": "codeql_py/overly-large-range_76812148f970cd19_13dae075", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "remediatio...
9
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range ...
[ 44, 44, 44, 44, 44, 44, 45, 45, 45 ]
[ null, null, null, null, null, null, null, null, null ]
[ 35, 38, 41, 44, 47, 50, 35, 38, 47 ]
[ 39, 42, 45, 48, 51, 54, 39, 42, 51 ]
2024-11-18T21:33:33.294643+00:00
1,581,984,059,000
4d41352a810ce134691256add9d8bbcbf46e1638
3
{ "blob_id": "4d41352a810ce134691256add9d8bbcbf46e1638", "branch_name": "refs/heads/master", "committer_date": 1581984059000, "content_id": "fa52cb839d4408b37b99233290d3068502e1d346", "detected_licenses": [ "MIT" ], "directory_id": "46d5b0bca41cb6758750aee775d96941e1a23432", "extension": "py", "fi...
2.78125
stackv2
import os, sys import xml.etree.cElementTree as ET import re from collections import OrderedDict import json import string printable = set(string.printable) ## Reader: ToDo: use another file reader.py to import various formats, convert to txt and clean docs, here, below def read_document(filepath): f = open(filepa...
210
38.17
113
21
1,860
python
[{"finding_id": "codeql_py/overly-large-range_dd274d75751d1f44_afb4a332", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[....
2
true
[ "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[.\\/0-9:\\].", "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[.\\/0-9:\\]." ]
[ 74, 95 ]
[ null, null ]
[ 62, 62 ]
[ 65, 65 ]
2024-11-18T21:33:33.686379+00:00
1,629,133,421,000
6da5e386e5929224d0b68e21ed0367f5605137fc
2
{ "blob_id": "6da5e386e5929224d0b68e21ed0367f5605137fc", "branch_name": "refs/heads/main", "committer_date": 1629133421000, "content_id": "aa36d95a0efd92a44c864b6d48be6e0dadf25d6c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "cbcfed9d70b766a0baa7ecb3391e758d15771e63", "extension": "py", ...
2.421875
stackv2
import time import pycurl # from StringIO import StringIO import glob import os # this function will push the data to Splash-tiles.com slot slt # pushtyp = 0 (plaintext in datafnam) # = 1 (image file imgfnam + any text in datafnam) # = 2 (HTML5 in datafnam) # token must be set to your Splash-ti...
55
22
81
13
417
python
[{"finding_id": "codeql_py/request-without-cert-validation_14db2f9dc1e560bb_8a74c19e", "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) by [this value](2)." ]
[ 46 ]
[ null ]
[ 2 ]
[ 36 ]
2024-11-18T21:33:33.921006+00:00
1,530,982,991,000
7c465247eb078780a6dc9ee549e9ee8aa12c6929
4
{ "blob_id": "7c465247eb078780a6dc9ee549e9ee8aa12c6929", "branch_name": "refs/heads/master", "committer_date": 1530982991000, "content_id": "7c6d611143c539a6f49b844cba904a60628793a1", "detected_licenses": [ "MIT" ], "directory_id": "4b76a8e5d762917d4e738a85aaf6a2b2d1f2ee7a", "extension": "py", "fi...
3.515625
stackv2
#! /usr/bin/python3 import random def getWord(l): while True: try: word = random.choice(open(l).readlines()).split('\t')[-1] break except Exception: pass return word if __name__ == '__main__': easy = open('easy.txt', 'r') hard = open('hard.txt', '...
59
24.2
82
19
380
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dde0495209830b11_7f159073", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 55, 59 ]
[ null, null ]
[ 15, 15 ]
[ 21, 16 ]
2024-11-18T21:55:39.500256+00:00
1,552,153,901,000
f4eb1df3820fa953917c62ed5337535fb9647eb9
2
{ "blob_id": "f4eb1df3820fa953917c62ed5337535fb9647eb9", "branch_name": "refs/heads/master", "committer_date": 1552153901000, "content_id": "6423d43f348a3611aa981f9faa2b54728329d6d6", "detected_licenses": [ "MIT" ], "directory_id": "9895ae162be63a5a5f9331b00dee30bcbbe3384a", "extension": "py", "fi...
2.46875
stackv2
# coding=UTF-8 from __future__ import unicode_literals from flask import Flask, request import pprint import json import requests app = Flask(__name__) @app.route('/') def homepage(): return "Done" ############### # Line API ############### @app.route('/line', methods=['GET', 'POST']) def line(): url = "...
76
20.86
65
13
405
python
[{"finding_id": "codeql_py/stack-trace-exposure_1c696d7ee3afd93c_79619c16", "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." ]
[ 71, 76 ]
[ null, null ]
[ 16, 5 ]
[ 33, 43 ]
2024-11-18T21:55:55.227136+00:00
1,629,445,830,000
b8b47df6c3551352716398f303deb9048d80b714
3
{ "blob_id": "b8b47df6c3551352716398f303deb9048d80b714", "branch_name": "refs/heads/master", "committer_date": 1629445830000, "content_id": "ee7ee213e0a96fc9e07f504f4d8866250810c851", "detected_licenses": [ "MIT" ], "directory_id": "d0bf024aeaebf173b9db88f170e07332651fced0", "extension": "py", "fi...
2.828125
stackv2
# -*- coding: utf-8 -*- # MIT License # # Copyright(c) 2019 Aalborg University # Joakim Bruslund Haurum, May 2019 # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files(the "Software"), to deal # in the Software without restriction, inclu...
250
41.71
142
21
2,237
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2a33a70f805bcbec_ab7d2c43", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 166 ]
[ 174 ]
[ 19 ]
[ 104 ]
2024-11-18T21:56:06.890647+00:00
1,623,075,443,000
daf9dc18669a957852d3f652cacedcea5f436bea
3
{ "blob_id": "daf9dc18669a957852d3f652cacedcea5f436bea", "branch_name": "refs/heads/main", "committer_date": 1623075443000, "content_id": "9d4b44f7fb238bf6f9b82d68d8544b7f74a34095", "detected_licenses": [ "CC0-1.0" ], "directory_id": "62899c79067153573efd9deb20df30c0103f1490", "extension": "py", "...
3.328125
stackv2
from random import choice # Imports the choice function from random alpha = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"] # List of lowercase characters # from a to o alph_upper = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O"] # List of uppercase characters ...
25
41.84
120
9
332
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_a06ae5304b1659d0_abfdc116", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text."...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 18, 19 ]
[ null, null ]
[ 23, 11 ]
[ 40, 28 ]
2024-11-18T22:44:14.147758+00:00
1,489,715,211,000
aa2db5b0ac7b98dc122c1711c742a2f64a27d73b
2
{ "blob_id": "aa2db5b0ac7b98dc122c1711c742a2f64a27d73b", "branch_name": "refs/heads/master", "committer_date": 1489715211000, "content_id": "d68456993dab2b46290f535f3af29dae35b059ca", "detected_licenses": [ "MIT" ], "directory_id": "13df7270af82f314232a7f169ae08eb4d138385b", "extension": "py", "fi...
2.3125
stackv2
import ssl import socket import poplib POP3_SSL_PORT = 995 class POP3_SSL_WithProxy(poplib.POP3_SSL): """support http proxy for pop3 connection""" def __init__(self, host, port=POP3_SSL_PORT, keyfile=None, certfile=None, http_proxy=None): self.host = host self.port = port self.keyf...
43
33.07
95
18
335
python
[{"finding_id": "codeql_py/insecure-default-protocol_64f1dd88762be349_69b1d101", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 41 ]
[ null ]
[ 23 ]
[ 78 ]
2024-11-18T23:10:39.682646+00:00
1,664,218,587,000
163528d00619cf969bbcba440c642249adf4c948
3
{ "blob_id": "163528d00619cf969bbcba440c642249adf4c948", "branch_name": "refs/heads/master", "committer_date": 1664218587000, "content_id": "7a3c421a6652321042cfa5c9d38c09fbeba8c2d8", "detected_licenses": [ "MIT" ], "directory_id": "3d29a9ecd12c439141921945177c5226c789c671", "extension": "py", "fi...
3.25
stackv2
import json import requests import logging.config import pandas as pd from utils import longitude_east_to_west logging.config.fileConfig("logging.ini", disable_existing_loggers=False) logger = logging.getLogger(__name__) MILES_PER_HOUR_TO_KNOTS = 0.868976 # See https://en.wikipedia.org/wiki/Knot_(unit)#Definitions ...
54
33.19
113
15
482
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_912d934b719fb3dd_2f8fb091", "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." ]
[ 29, 30, 31 ]
[ null, null, null ]
[ 17, 17, 17 ]
[ 72, 48, 62 ]
2024-11-18T23:10:42.689906+00:00
1,587,831,285,000
453336f159138c489a3df8b596c53a5da23b4849
2
{ "blob_id": "453336f159138c489a3df8b596c53a5da23b4849", "branch_name": "refs/heads/master", "committer_date": 1587831285000, "content_id": "c8b5b8835a94ca25b094caf9119894bc881f2a6f", "detected_licenses": [ "Unlicense" ], "directory_id": "35da44b5daf05a04db7c6383968b8fba95c54d71", "extension": "py",...
2.46875
stackv2
import re import urllib import json from flask import request import requests __version__ = '0.0.10' __author__ = "borisliu" class IPInfo(object): """IP地址类.""" @property def browser(self): """获得访客浏览器类型.""" ua = request.headers.get('User-Agent') if (ua): browser = ua ...
96
31.55
133
18
796
python
[{"finding_id": "codeql_py/polynomial-redos_bc39bd95ad9a30c1_a524a5cf", "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 startin...
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 starting with 'rv:' and with many repetitions of 'rv:('." ]
[ 26 ]
[ null ]
[ 112 ]
[ 114 ]
2024-11-18T23:10:43.663356+00:00
1,560,162,839,000
cad2bb29d2163ef6f0c3b655c48b8769f36539ca
3
{ "blob_id": "cad2bb29d2163ef6f0c3b655c48b8769f36539ca", "branch_name": "refs/heads/master", "committer_date": 1560162839000, "content_id": "da049e70b7e0b84c4c9effe5f54f1e215c77b13c", "detected_licenses": [ "MIT" ], "directory_id": "c6979178d77a9ece44a5b4812b4cd6c95ad3a4ef", "extension": "py", "fi...
2.734375
stackv2
import os import urllib.request import uuid from bs4 import BeautifulSoup from flask import Flask, render_template, request, abort, session, redirect, \ url_for, jsonify from src.db import Firebase from src.about import about_blueprint from src.error import error_blueprint app = Flask(__name__) app.secret_key = ...
215
27.52
120
17
1,362
python
[{"finding_id": "codeql_py/flask-debug_640edb69444ebbde_af81aae3", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-918" ]
[ "py/flask-debug", "py/partial-ssrf" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 215, 194 ]
[ null, null ]
[ 5, 16 ]
[ 24, 43 ]
2024-11-18T23:10:45.049410+00:00
1,568,067,466,000
d84cf84bb1ea24d8ab986ffda707bf51780f3e03
4
{ "blob_id": "d84cf84bb1ea24d8ab986ffda707bf51780f3e03", "branch_name": "refs/heads/master", "committer_date": 1568067466000, "content_id": "07609df5db5d41d2a2e08ddff95b2ad0bbdd293a", "detected_licenses": [ "MIT" ], "directory_id": "eacc32eb4968e527c5c9a3817fb58b0c6db495f9", "extension": "py", "fi...
4.46875
stackv2
if __name__ == '__main__': ## creates the basis for how the program is going to intake and return data birthdays = { # creates the dictionary and labels it 'Quentin Tarantino': '03/27/1963', 'Kanye West': '06/08/1977', 'James Baldwin': '08/02/1924', 'Ingmar Bergman': '07/14/19...
25
49.8
102
14
333
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b8d3dd27554c31c0_4a7def29", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text." ]
[ 16, 22 ]
[ null, null ]
[ 15, 19 ]
[ 19, 73 ]
2024-11-18T23:10:50.656042+00:00
1,597,477,698,000
123f5aae1fddd9060d6b5e9e6291daf87b4fee78
2
{ "blob_id": "123f5aae1fddd9060d6b5e9e6291daf87b4fee78", "branch_name": "refs/heads/master", "committer_date": 1597477698000, "content_id": "6931d4b78ebb7e3959e4144156c7fc9b9c6e8dcf", "detected_licenses": [ "Apache-2.0" ], "directory_id": "eebc84dcedddd0dac5dbe5188e5b4e2e6bff09a9", "extension": "py"...
2.375
stackv2
import base64 import codecs import os from github import Github from jinja2 import Template from chanllenge.util.wayknew import * template = Template(''' ## {{api_name}} **description** ``` {{desc}} ``` **method** ``` {{method}} ``` **URL** ``` {{url}} ``` **parameters** ``` {{parameters}} ``` **response** ``` ...
101
22.64
101
20
578
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_240ede56c35ad861_5ef791d1", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 9 ]
[ 37 ]
[ 12 ]
[ 5 ]
2024-11-18T23:10:51.025509+00:00
1,626,496,077,000
7519be568b2d04f353a3a99f3ae0e812efc72224
3
{ "blob_id": "7519be568b2d04f353a3a99f3ae0e812efc72224", "branch_name": "refs/heads/main", "committer_date": 1626496077000, "content_id": "437d994c68585aa83cb06d1da6ed054ff1011519", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3d5b249e16ab97d31a53afcec936463bf502c20b", "extension": "py", ...
2.765625
stackv2
# -- coding: UTF-8 -- """ 此文件包含要执行的代码 a)加载预先训练好的分类器和相关文件。 (b)将新的输入数据转换为正确的分类器格式。 (c)对转换后的数据运行分类器,返回结果。 """ import io import re import pickle # 以序列化对象并保存到磁盘中,并在需要的时候读取出来,任何对象都可以执行序列化操作 import numpy as np import pandas as pd import os from sklearn.externals import joblib from sklearn.svm import LinearSVC from sklearn.lin...
244
31.57
110
16
2,423
python
[{"finding_id": "codeql_py/overly-large-range_baf794da937a027a_913c752e", "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\\\\[\\\\\\\\]^_\\]." ]
[ 52, 138 ]
[ null, null ]
[ 55, 55 ]
[ 59, 59 ]
2024-11-18T23:10:52.429411+00:00
1,538,842,636,000
e801efa01dbc159cb768cebe90147e1893fc8a64
3
{ "blob_id": "e801efa01dbc159cb768cebe90147e1893fc8a64", "branch_name": "refs/heads/master", "committer_date": 1538842636000, "content_id": "f9f20f54837970b578c1d27ab66bc567915f35f2", "detected_licenses": [ "MIT" ], "directory_id": "f06dc739239fe5efefdf11e49bef43dd44709a96", "extension": "py", "fi...
2.78125
stackv2
#!/usr/bin/env python """Use Paramiko to retrieve the entire 'show version' output.""" from __future__ import print_function, unicode_literals import paramiko import time from getpass import getpass """ 1. Use Paramiko to retrieve the entire 'show version' output from pynet-rtr2. 2. Use Paramiko to change the 'lo...
89
25.49
142
11
622
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_8693dd108f52954a_2d443a3b", "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." ]
[ 71 ]
[ null ]
[ 5 ]
[ 74 ]
2024-11-18T22:29:52.730859+00:00
1,693,411,605,000
6f4dda6fdd0c64f59c7b662b8a8fc9b9524d8fbf
3
{ "blob_id": "6f4dda6fdd0c64f59c7b662b8a8fc9b9524d8fbf", "branch_name": "refs/heads/master", "committer_date": 1693411605000, "content_id": "d3956e57a45b1bc479139b02385397100617f396", "detected_licenses": [ "MIT" ], "directory_id": "7ff20a286dde66b1ec7d11b3488f2ee1d9b8f44e", "extension": "py", "fi...
2.796875
stackv2
""" Use this script to render a Jinja template with variables read from JSON. This is mainly used to debug the prompt template required for the chat API. Each model has different requirements for the format of chat history. Please refer to the specific model's documentation for details. """ import json import sys impo...
21
27.33
75
10
133
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_0fff23fe326a7564_dddd5d96", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 16 ]
[ null ]
[ 16 ]
[ 44 ]
2024-11-18T22:30:01.794251+00:00
1,483,949,521,000
fdd9282e1310dfa3d48d2c102aa06ada0516b4a3
2
{ "blob_id": "fdd9282e1310dfa3d48d2c102aa06ada0516b4a3", "branch_name": "refs/heads/master", "committer_date": 1483949521000, "content_id": "71df791b12f76a4c9e8ae51469f6543c194e6c51", "detected_licenses": [ "MIT" ], "directory_id": "9ac9f35b41083d6b24a2865d196a627a778daaf9", "extension": "py", "fi...
2.390625
stackv2
from flask import render_template, Blueprint, request, make_response import logging, json from models import contact_email from home import app home_blueprint = Blueprint('home',__name__,url_prefix='/') @app.route('/', methods=['GET','POST']) def home(): logging.info("Loading home page...") return render_templ...
21
33
68
13
151
python
[{"finding_id": "codeql_py/log-injection_f3f8e24428310ee8_d0b4a12f", "tool_name": "codeql", "rule_id": "py/log-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This log entry depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unkno...
2
true
[ "CWE-117", "CWE-117" ]
[ "py/log-injection", "py/log-injection" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 15, 16 ]
[ null, null ]
[ 18, 18 ]
[ 30, 42 ]
2024-11-18T23:10:13.171658+00:00
1,595,066,858,000
66efe97b64716b862c6522cccb55b068ad11c32d
3
{ "blob_id": "66efe97b64716b862c6522cccb55b068ad11c32d", "branch_name": "refs/heads/master", "committer_date": 1595066858000, "content_id": "a196e0ab6bc96202ce19ad182d6db2a4fe2f1c4a", "detected_licenses": [ "MIT" ], "directory_id": "26ba5eec855163443fb8703429654618acdbcb98", "extension": "py", "fi...
2.984375
stackv2
from tkinter import * import os def register_user(): username_info = username.get() password_info = password.get() file = open(username_info, "w") file.write(username_info+"\n") file.write(password_info) file.close() #clear the fields username_entry.delete(0, END) password_entry....
237
28.45
100
12
1,833
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_00932f5696feb915_b467bb1e", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (password)](1) as clear text.\...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text." ]
[ 10 ]
[ null ]
[ 16 ]
[ 29 ]
2024-11-18T23:10:21.075579+00:00
1,478,775,195,000
596345abdfcf9934bbafe6c68b9372df309cfa86
2
{ "blob_id": "596345abdfcf9934bbafe6c68b9372df309cfa86", "branch_name": "refs/heads/master", "committer_date": 1478775195000, "content_id": "34a203c4e915b8c20aa54c4e83ecb95b26e94a39", "detected_licenses": [ "Apache-2.0" ], "directory_id": "594fb0ccd4b4b02809b115562fec707f40831942", "extension": "py"...
2.46875
stackv2
# Info # Start with: python SSLPiclient_V1_1.py -s localhost -p 10023 -c ../Cert/server.pem # python SSLPiclient_V1_1.py -s ineltro-halmer.firewall-gateway.net -p 10023 -c ../Cert/server.pem #Test Client for SSLPi # you can use it and modify it to your own needs. # It is tested to work together with SSLPi Se...
191
28.12
105
16
1,306
python
[{"finding_id": "codeql_py/insecure-default-protocol_6827fdd833d75049_912feaba", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 85 ]
[ 88 ]
[ 20 ]
[ 56 ]
2024-11-18T23:21:48.362493+00:00
1,607,551,213,000
6960317a3a54c4ffb6846b962e1f80cfe24fff69
3
{ "blob_id": "6960317a3a54c4ffb6846b962e1f80cfe24fff69", "branch_name": "refs/heads/master", "committer_date": 1607551213000, "content_id": "3d5830667cd9e06069b198833e1fe2db5dcdcfa2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dd55a4d8e3dae6e3e48c271be3855ed829a14a93", "extension": "py"...
3.421875
stackv2
#so far the code is able to print data for any movie title + year requested import requests, json my_key = 'f7d58ebc' def movie_search(query, year): api_key = my_key url = 'http://www.omdbapi.com/' title = query.replace(' ', '+') final_url = url + '?t=' + title + '&y=' + year + '&apikey=' + api_key ...
20
23.95
75
13
143
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e92018387897f29d_24298a7c", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 18, 18 ]
[ null, null ]
[ 15, 26 ]
[ 24, 31 ]
2024-11-18T23:21:56.923752+00:00
1,577,002,449,000
73f941ce41d59714ed7a1e39befe32cf6890c32e
3
{ "blob_id": "73f941ce41d59714ed7a1e39befe32cf6890c32e", "branch_name": "refs/heads/master", "committer_date": 1577002449000, "content_id": "05ef8be5acf092cef0c69e9210b802ede67b6417", "detected_licenses": [ "MIT" ], "directory_id": "2bd18a28000b13fd4e22fbc17319d777947c057c", "extension": "py", "fi...
2.703125
stackv2
#!/use/bin/env python """Fetch and sync reveal.js resources """ import shutil import sys from pathlib import Path from urllib.request import urlretrieve import tarfile def validate_dir_state(target: Path) -> bool: expected = [ 'sphinx_revealjs', ] actually = all([(target / e).exists() for e in exp...
60
25.47
74
13
396
python
[{"finding_id": "codeql_py/tarslip_a12cefdbe74db442_07eb6c8f", "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)." ]
[ 31 ]
[ null ]
[ 9 ]
[ 11 ]
2024-11-18T21:33:31.754800+00:00
1,558,095,902,000
036bc43e09cb8c7243eb4e701366bb57126e13bb
2
{ "blob_id": "036bc43e09cb8c7243eb4e701366bb57126e13bb", "branch_name": "refs/heads/main", "committer_date": 1558095902000, "content_id": "5678b9d5b81720ac0195e464556a9cb296f66f81", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7418d9871fb21d1386ca40f0a399a8783a887999", "extension": "py", ...
2.40625
stackv2
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- """password_recovery.py: A CGI endpoint for handling password recovery""" import json import os import sys import sqlite3 import auth import groups import sendemail from httperror import HTTPError RETURN_HEADERS = [] def __do_get(): raise HTTPError("This script i...
147
30.55
105
14
1,017
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0f7f270e26a92ca4_072fadb0", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](1) as clear text." ]
[ 147 ]
[ null ]
[ 11 ]
[ 19 ]
2024-11-18T21:33:35.594932+00:00
1,602,367,964,000
08f96ea394d528ec7c4c80f4ea02909b9bed6939
3
{ "blob_id": "08f96ea394d528ec7c4c80f4ea02909b9bed6939", "branch_name": "refs/heads/master", "committer_date": 1602367964000, "content_id": "55add69d3f8f1fa3812cad6bb893fb853658376e", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "373f46887a1d6b57b52fe4392e3df872f3f6f9da", "extension": "p...
2.6875
stackv2
# -- coding: utf-8 -- from datetime import datetime, timezone import glob import os import shutil import re import sys import xlrd import xlrd.sheet from xlrd.sheet import ctype_text import xml.etree.ElementTree as ET #not yet working with lxml from Generic import Generic verbose = 1 ''' Mainly convert export data ...
246
35.91
127
20
2,141
python
[{"finding_id": "codeql_py/overly-large-range_34f621516ceda741_d65d9fa1", "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\\...." ]
[ 146 ]
[ null ]
[ 41 ]
[ 44 ]
2024-11-18T21:33:41.717058+00:00
1,597,499,506,000
1041819d676c5138f1ffa1995d78796213c5980c
2
{ "blob_id": "1041819d676c5138f1ffa1995d78796213c5980c", "branch_name": "refs/heads/master", "committer_date": 1597499506000, "content_id": "2f93e80c94bbcb35161454536dac54fa21236765", "detected_licenses": [ "Apache-2.0" ], "directory_id": "eda246c1c15cafc7d0a5982d8bad1df0a4929d39", "extension": "py"...
2.375
stackv2
#!/usr/bin/env python """ Creates proxy file """ import argparse import zipfile import sys import AutomatedSearchHelperUtilities.configuration as configuration import logging manifest_json = """ { "version": "1.0.0", "manifest_version": 2, "name": "Chrome Proxy", "permissions": [ "proxy", ...
94
25
117
11
552
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5c37b709a087fb38_ccd1fc8d", "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." ]
[ 87 ]
[ null ]
[ 17 ]
[ 55 ]
2024-11-18T23:15:58.929551+00:00
1,625,173,779,000
a51381b2f8f88ecd643aaff189038b8d6e747edd
3
{ "blob_id": "a51381b2f8f88ecd643aaff189038b8d6e747edd", "branch_name": "refs/heads/main", "committer_date": 1625173779000, "content_id": "c5e989024918eef9b4132c10729231a97bc8e16e", "detected_licenses": [ "MIT" ], "directory_id": "8de75a6e4c6e79322c01728f0b3d123f63c346a5", "extension": "py", "file...
2.625
stackv2
from typing import Union, Optional import requests from ldcoolp_figshare import FigshareInstituteAdmin from fastapi import APIRouter, HTTPException router = APIRouter() api_key: Optional[str] = None stage_api_key: Optional[str] = None def figshare_metadata_readme(figshare_dict: dict) -> dict: """ Function...
164
34.18
83
24
1,219
python
[{"finding_id": "codeql_py/partial-ssrf_55219a9c7494ff75_6ab66636", "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).\nPart of the URL of this request depen...
1
true
[ "CWE-918" ]
[ "py/partial-ssrf" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depends on a [user-provided value](2)." ]
[ 103 ]
[ 105 ]
[ 32 ]
[ 37 ]
2024-11-18T22:30:20.884489+00:00
1,448,970,918,000
9c4a7d105008849598ad59ca9e7a217361a29784
3
{ "blob_id": "9c4a7d105008849598ad59ca9e7a217361a29784", "branch_name": "refs/heads/master", "committer_date": 1448970918000, "content_id": "86fb6b4b66a65842ac2fe220e4aa634d8430d831", "detected_licenses": [ "MIT" ], "directory_id": "ce008f1dc36fca446a2dc2f545c179c7440c65d3", "extension": "py", "fi...
2.578125
stackv2
# main.py # ------------------------- # Fall 2014; Alex Safatli # ------------------------- # Webapp interface. import webapp2, jinja2, os, cgi, hearthstone, json from drafter import drafter from gameMode import gameModeContext VERSIONTYPE = 'Beta' VERSION = 5 JINJA_ENVIRONMENT = jinja2.Environment( loader = jinj...
48
34.33
91
16
383
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_a750310efceb0a4f_22104edf", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 13 ]
[ 14 ]
[ 21 ]
[ 65 ]
2024-11-18T22:44:43.741491+00:00
1,583,888,932,000
0061284c42fc5330ee82cfcfdd19dd6b462b3371
3
{ "blob_id": "0061284c42fc5330ee82cfcfdd19dd6b462b3371", "branch_name": "refs/heads/master", "committer_date": 1583888932000, "content_id": "34f1c23b976642120df0f45b3683fd652fce4d3b", "detected_licenses": [ "MIT" ], "directory_id": "990191451f1c8fe2abec65dfccaf83bdbc34698e", "extension": "py", "fi...
2.859375
stackv2
#! /usr/bin/env python # -*- coding: utf-8 -*- # # >> # stencil-blog, 2020 # - blake # << """Define a valid configuration that a user's config file can be compared against.""" import os import toml import ujson as json from typing import Dict from jinja2 import Template DEFAULT = {"source": "", "destination": "...
41
24.56
85
12
270
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_2f0a039cd6db67bc_dc7be70e", "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." ]
[ 40 ]
[ null ]
[ 15 ]
[ 29 ]
2024-11-18T22:44:45.613185+00:00
1,607,682,402,000
ecc36979ca93e06d389f7c6c31150aaaa9d38291
3
{ "blob_id": "ecc36979ca93e06d389f7c6c31150aaaa9d38291", "branch_name": "refs/heads/main", "committer_date": 1607682402000, "content_id": "c9cb030aafa2153910e31b4a2109206ba46559a7", "detected_licenses": [ "MIT" ], "directory_id": "82d8a49b9c2aa8c90786b7f157730e4de6cc7fb3", "extension": "py", "file...
3.078125
stackv2
# doing necessary imports from flask import Flask, render_template, request import requests from bs4 import BeautifulSoup app = Flask(__name__) # initialising the flask app with the name 'app' @app.route('/',methods=['POST','GET']) # route with allowed methods as POST and GET def index(): if request.method == '...
51
44.37
160
22
496
python
[{"finding_id": "codeql_py/flask-debug_53f3f9eddf05fd75_919246a6", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-918" ]
[ "py/flask-debug", "py/partial-ssrf" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 51, 15 ]
[ null, null ]
[ 5, 23 ]
[ 34, 40 ]
2024-11-18T23:36:48.197257+00:00
1,589,232,551,000
7f5d009c988b64caf603c7d48254011442d629ff
3
{ "blob_id": "7f5d009c988b64caf603c7d48254011442d629ff", "branch_name": "refs/heads/master", "committer_date": 1589232551000, "content_id": "12e3eb8f1d8708e6d46e8e575c854b3a5c37bdf0", "detected_licenses": [ "MIT" ], "directory_id": "28685ca5dca4a69d4aaa16bd342a4b8a10da1828", "extension": "py", "fi...
2.59375
stackv2
from http.server import BaseHTTPRequestHandler, HTTPServer import json from optparse import OptionParser import threading import requests from tpg.trainer import Trainer from tpg.agent import Agent import numpy as np import datetime parser = OptionParser() # the address of this agent server parser.add_option("-i", "--...
266
31.78
85
20
1,860
python
[{"finding_id": "codeql_py/partial-ssrf_84c5ca2480628857_82124fc7", "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).\nPart of the URL of this request depen...
1
true
[ "CWE-918" ]
[ "py/partial-ssrf" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Part of the URL of this request depends on a [user-provided value](1).\nPart of the URL of this request depends on a [user-provided value](2)." ]
[ 112 ]
[ null ]
[ 28 ]
[ 56 ]
2024-11-18T23:36:53.024638+00:00
1,604,348,895,000
d7380cfe3bf6fe535140884b55364d8ab9db803c
3
{ "blob_id": "d7380cfe3bf6fe535140884b55364d8ab9db803c", "branch_name": "refs/heads/master", "committer_date": 1604348895000, "content_id": "a93bdf46aac044a105eeda76d012803584ce84dc", "detected_licenses": [ "MIT" ], "directory_id": "017f8fe77d628e5cae29d63b2298c163a4c82d13", "extension": "py", "fi...
3.1875
stackv2
# indeed_job_scraper.py # https://www.youtube.com/watch?v=eN_3d4JrL_w import csv from datetime import datetime import requests from bs4 import BeautifulSoup def get_url(position, location): """ Generate the URL using job title/position and location """ template = 'https://www.indeed.com/jobs?q={}&l={}...
81
29.01
125
18
619
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_6a5b051de4113d0a_84281644", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 65 ]
[ null ]
[ 15 ]
[ 25 ]
2024-11-18T23:36:59.470471+00:00
1,675,331,071,000
91edf68317cbe715270bad3b0357970ddcf3682e
2
{ "blob_id": "91edf68317cbe715270bad3b0357970ddcf3682e", "branch_name": "refs/heads/master", "committer_date": 1675331071000, "content_id": "64b03b1d8ab04815b72ade29098982320270ea7b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a0122a860e797efe16df86d37d236e8e8adb3ff7", "extension": "py"...
2.328125
stackv2
import datetime import webapp2 import jinja2 import os from google.appengine.api import users template_env = jinja2.Environment( loader = jinja2.FileSystemLoader(os.getcwd()) ) class MainPage(webapp2.RequestHandler): def get(self): current_time = datetime.datetime.now() user = users.get_curre...
29
27.14
68
12
169
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_8cabffea8ebc872b_3f9f9f73", "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." ]
[ 8 ]
[ 10 ]
[ 16 ]
[ 2 ]
2024-11-18T23:37:02.671870+00:00
1,633,268,969,000
3446d9ff77524bcdb8c43da278100c841b3651e5
2
{ "blob_id": "3446d9ff77524bcdb8c43da278100c841b3651e5", "branch_name": "refs/heads/main", "committer_date": 1633268969000, "content_id": "b5ae89379e271b27246a3b8bc3398cb85e2d601c", "detected_licenses": [ "MIT" ], "directory_id": "fba6bba262f0cdb7661ef30bdeb1e7f893647c8f", "extension": "py", "file...
2.375
stackv2
import json import os import redis from flask import Flask, render_template, request from light_emitting_desk.desk import Desk from light_emitting_desk.utils import conf app = Flask(__name__) app.redis = redis.Redis() desk_conf = conf["sectors"] if "TEST_SECTORS" in os.environ: desk_conf = json.loads(os.environ...
169
23.59
84
17
979
python
[{"finding_id": "codeql_py/flask-debug_fee5d9a4d3472e1f_9b0960ff", "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-079", "CWE-079", "CWE-079" ]
[ "py/flask-debug", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "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 ...
[ 169, 42, 44, 53 ]
[ null, null, null, null ]
[ 5, 16, 12, 12 ]
[ 40, 51, 40, 40 ]
2024-11-18T23:37:11.535879+00:00
1,675,622,937,000
c1d9912ab79056efcf908ef3017f6650de41d5a2
3
{ "blob_id": "c1d9912ab79056efcf908ef3017f6650de41d5a2", "branch_name": "refs/heads/master", "committer_date": 1675622937000, "content_id": "0bd4100f078db21396ce1e1023b96d626c73e8cd", "detected_licenses": [ "MIT" ], "directory_id": "6a730375ce4b5af3d832f9b81a9164edd2cd2880", "extension": "py", "fi...
2.578125
stackv2
# Reference: https://api-docs.igdb.com/#breaking-changes import json import time import requests from igdb_local_secrets import get_igdb_user_key_file_name, load_igdb_user_key def get_igdb_oauth_url(): igdb_oauth_url = "https://id.twitch.tv/oauth2/token" return igdb_oauth_url def load_client_params(verb...
116
20.82
78
13
599
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_12df70b4a15b19e5_c2669add", "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." ]
[ 27 ]
[ null ]
[ 15 ]
[ 60 ]
2024-11-18T21:14:06.473025+00:00
1,575,564,118,000
7e3ec74c0294db71150bf86130d81eb77decb62a
3
{ "blob_id": "7e3ec74c0294db71150bf86130d81eb77decb62a", "branch_name": "refs/heads/master", "committer_date": 1575564118000, "content_id": "2569c8e4faa5b35689822dc59462a73aaba06767", "detected_licenses": [ "MIT" ], "directory_id": "37a5537946ff60af0fe30486b716d6ac3106fdb5", "extension": "py", "fi...
2.875
stackv2
import pandas as pd import re class clean_col(): def clean_url(self, use_csv:str, col:str, result_csv:str): df = read_data(use_csv) url = df[col] pattern = r'\/\/[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b' new_link = [] for each in url: link = re.searc...
55
32.47
79
20
488
python
[{"finding_id": "codeql_py/overly-large-range_dbec459616f20d7a_90c3d675", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "remediatio...
4
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-020" ]
[ "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/overly-large-range" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range that overlaps with \\ufffd-\\ufffd in the same character class.", "Suspicious character range ...
[ 47, 47, 47, 47 ]
[ null, null, null, null ]
[ 31, 34, 37, 46 ]
[ 35, 38, 41, 50 ]
2024-11-18T21:14:45.790144+00:00
1,569,279,314,000
ea54d47d058438e81f9deeb70e47c4aab875e766
3
{ "blob_id": "ea54d47d058438e81f9deeb70e47c4aab875e766", "branch_name": "refs/heads/master", "committer_date": 1569279314000, "content_id": "17cf088714db05559d53db0f7308ea9efcf82f3f", "detected_licenses": [ "MIT" ], "directory_id": "b72238e9efe2c9971880ab3aea84202ce5e10ae8", "extension": "py", "fi...
2.75
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- from operator import itemgetter, attrgetter, methodcaller import csv import os import re genders = dict(men=0, woman=0) womens = ["MISS MAPLES", 'CHEERLEADERS', 'GIRL', 'LITTLE GIRL', 'NUNS', 'ROXANNE', 'TWIN GIRLS', 'LITTLE OLD LADY FROM PASADENA', 'LARGE WIFE', 'G...
40
31.85
158
16
370
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_62450b35a1b1d603_4a2b7a79", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.",...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text." ]
[ 37 ]
[ null ]
[ 22 ]
[ 50 ]
2024-11-18T21:57:26.884898+00:00
1,548,478,814,000
01a1ed9467425f5fd968f1225d6570a0a9cd33d3
3
{ "blob_id": "01a1ed9467425f5fd968f1225d6570a0a9cd33d3", "branch_name": "refs/heads/master", "committer_date": 1548478814000, "content_id": "76060c352f9cff595904de95d9bde131d7a12100", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7e839fbbfd6252a7c2131657b2dcb896ae26daeb", "extension": "py"...
2.609375
stackv2
#!/usr/bin/env python3 import cgi import cgitb import os import templates import secret cgitb.enable() # check cookie for login username = password = None cookies = os.environ.get("HTTP_COOKIE") cookies = cookies.split(';') for cookie in cookies: cookie = cookie.strip() if 'username' in cookie: usernam...
45
30.4
78
16
322
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e4b860b66f7116ce_91e46b34", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 34, 40 ]
[ null, null ]
[ 28, 19 ]
[ 50, 62 ]
2024-11-18T21:57:30.791843+00:00
1,630,657,546,000
c376d938df30d7519eee4d582eaca1ddee3c62c4
2
{ "blob_id": "c376d938df30d7519eee4d582eaca1ddee3c62c4", "branch_name": "refs/heads/main", "committer_date": 1630657546000, "content_id": "085e0a208b85253dd9632b51d87eedc3b2210eba", "detected_licenses": [ "MIT" ], "directory_id": "5d6b4de9b948a21609c7bf7f87d8f2919cd6e705", "extension": "py", "file...
2.484375
stackv2
import json import requests import pandas from flask import Flask, request from twilio.twiml.messaging_response import MessagingResponse from requests.structures import CaseInsensitiveDict from pytz import timezone from datetime import datetime # ========== From File import sendmsg as sd import googleapi app = Flask(...
234
45.53
154
33
2,381
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_76edaef6ded99161_86d46a3a", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text." ]
[ 56, 56 ]
[ null, null ]
[ 19, 29 ]
[ 27, 38 ]
2024-11-18T21:57:50.681823+00:00
1,686,752,332,000
389846b419f21b80e3845698511c0252e6cdb34e
3
{ "blob_id": "389846b419f21b80e3845698511c0252e6cdb34e", "branch_name": "refs/heads/main", "committer_date": 1686756129000, "content_id": "84068c675a58501aba8ecc07e8b3ff3830210f99", "detected_licenses": [ "Apache-2.0" ], "directory_id": "97380323256ff336beef001f4747f78a12375a76", "extension": "py", ...
2.71875
stackv2
#!/usr/bin/env python3 import os import pathlib import re from collections import defaultdict from typing import Dict, List, Optional, TypeVar import jinja2 MAJOR_VERSION = re.compile(r"(\d+)\.\d+\.\d+") MINOR_VERSION = re.compile(r"\d+\.(\d+)\.\d+") PATCH_VERSION = re.compile(r"\d+\.\d+\.(\d+)") MAJOR_MINOR_VERSION ...
146
37.34
118
22
1,397
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_f8642ec531a19a7a_b601a89d", "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." ]
[ 129 ]
[ null ]
[ 17 ]
[ 82 ]
2024-11-18T21:57:53.369090+00:00
1,578,218,424,000
0db5cae5b2ecdd88b0948c9b2869f05cb0bd8be9
3
{ "blob_id": "0db5cae5b2ecdd88b0948c9b2869f05cb0bd8be9", "branch_name": "refs/heads/master", "committer_date": 1578218424000, "content_id": "de7a2d835ccff88c765bb2ce1cc9fa6b3743265f", "detected_licenses": [ "MIT" ], "directory_id": "871fa971d4ee8aca58d2e48d4496331515aeb849", "extension": "py", "fi...
2.59375
stackv2
from flask import Flask, request from bs4 import BeautifulSoup import requests app = Flask(__name__) html = '''<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="UTF-8" /> <style> body{text-align:center} </style> </head> <body> </body> </h...
58
30.86
170
16
539
python
[{"finding_id": "codeql_py/partial-ssrf_467c02cfb7f3f3dd_37a04feb", "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)." ]
[ 26 ]
[ null ]
[ 16 ]
[ 80 ]
2024-11-18T21:58:14.856519+00:00
1,585,942,346,000
a898bd3408a21ff12ad7385c36c69e02f8e099c6
4
{ "blob_id": "a898bd3408a21ff12ad7385c36c69e02f8e099c6", "branch_name": "refs/heads/master", "committer_date": 1585942346000, "content_id": "3949de7bb93e49e34215e0e1b8655249924d169e", "detected_licenses": [ "MIT" ], "directory_id": "6ca9c12cbba3c0e1ac9ccaef3f05ce08f2100ea8", "extension": "py", "fi...
3.578125
stackv2
import crypt from sys import argv, exit chars = " abcdefghijklmnopqrstvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" def main(): # Check correct use if len(argv) != 2: print(f"Usage: python {argv[0]} password_hashed") exit(1) password_hashed = argv[1] password = crack(password_hashed) print(pa...
32
24.84
85
20
179
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_93eb5c33da52f0e6_af35b498", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text." ]
[ 15 ]
[ null ]
[ 11 ]
[ 19 ]
2024-11-18T21:58:15.809694+00:00
1,539,200,815,000
f6e6f9ab7a7c3b9e27f60f095a491f2d63a0c860
3
{ "blob_id": "f6e6f9ab7a7c3b9e27f60f095a491f2d63a0c860", "branch_name": "refs/heads/master", "committer_date": 1539200815000, "content_id": "26825aa4c1807f61f9ee9e3d13e42eaea7580b0f", "detected_licenses": [ "MIT" ], "directory_id": "691c4a5365606e145b5272320064d17ae6e6aef8", "extension": "py", "fi...
2.796875
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Output the documentation in a certain format.""" from jinja2 import Template import markdown def create_html_output(json_docs): """Create html output for the playbook by converting the docs to markdown and then converting to html.""" markdown_docs = create_ma...
94
32.47
166
11
727
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_1514e6c2f696a568_be74d256", "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." ]
[ 93 ]
[ null ]
[ 16 ]
[ 47 ]
2024-11-18T21:58:22.860718+00:00
1,370,793,555,000
17c04b671a95d4f82b812a08afa964f1922fb32a
2
{ "blob_id": "17c04b671a95d4f82b812a08afa964f1922fb32a", "branch_name": "refs/heads/master", "committer_date": 1370793555000, "content_id": "a6e00a67c39566cbd6c0dce7108889d9a82b67b9", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "4095c41db5606221de7ce75968d97c3e88cc23f5", "extension": "p...
2.390625
stackv2
import codecs import os import re import shutil import subprocess import tarfile import uuid import zipfile import settings from utils import working_directory class DoesNotExist(Exception): pass class InvalidCompressedFileError(Exception): def __init__(self, missing=None, extra=None): self.missi...
178
32.29
78
19
1,234
python
[{"finding_id": "codeql_py/tarslip_6a9c60ec7ae84970_a5ba5d11", "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)." ]
[ 114 ]
[ null ]
[ 13 ]
[ 28 ]
2024-11-18T22:10:52.184797+00:00
1,599,665,335,000
76198139954508ee46eb15a0b96cc8bf633d511e
3
{ "blob_id": "76198139954508ee46eb15a0b96cc8bf633d511e", "branch_name": "refs/heads/master", "committer_date": 1599665335000, "content_id": "00fffb5074bfef64d35d6cdd34e8740328ab0a63", "detected_licenses": [ "MIT" ], "directory_id": "e07234fc35e120cfcbf3ccb1ca5115180e03ef45", "extension": "py", "fi...
2.953125
stackv2
import os import sys from uuid import uuid1 from datetime import datetime, date import argparse from dotenv import load_dotenv from pprint import pprint import frontmatter from notion.client import NotionClient from notion.collection import NotionDate from md2notion.upload import upload from notion.block import TodoBlo...
138
31.21
101
15
1,092
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_11215caac51efc15_1856722f", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text." ]
[ 86 ]
[ null ]
[ 19 ]
[ 56 ]
2024-11-18T23:10:54.879744+00:00
1,535,714,385,000
25bd51e03b676176b9b9e1d19d4520a694580b4e
3
{ "blob_id": "25bd51e03b676176b9b9e1d19d4520a694580b4e", "branch_name": "refs/heads/master", "committer_date": 1535714385000, "content_id": "c4c34ce7d8768b235aa1e0912148ce63400810de", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "4aff2fb320f1a0e065352f6e7c9e70081f9b1af7", "extension": "p...
2.828125
stackv2
""" Copyright (c) 2018, Ankit R. Gadiya BSD 3-Clause License """ from flask import Flask, request, Response, redirect from random import sample import re from sqlite3 import connect from string import ascii_letters, digits # Configurations DB_NAME = "nnpy.db" VALID_CHARS = ascii_letters + digits ID_LEN = 5 URL_REGEX ...
60
28.9
95
19
445
python
[{"finding_id": "codeql_py/sql-injection_d23da80a8feebfc1_a8829225", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown...
1
true
[ "CWE-089" ]
[ "py/sql-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This SQL query depends on a [user-provided value](1)." ]
[ 48 ]
[ null ]
[ 34 ]
[ 91 ]
2024-11-18T22:35:59.178789+00:00
1,624,347,910,000
5f4bd3fe4dc9452fab61b30c189880b0bb97d21b
2
{ "blob_id": "5f4bd3fe4dc9452fab61b30c189880b0bb97d21b", "branch_name": "refs/heads/master", "committer_date": 1624347910000, "content_id": "49cc8fbf96aaf2bcd610f16d6e87ed3f11ec7886", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e73cf78346901f00193dbfda7098de32afa99091", "extension": "py"...
2.421875
stackv2
import os import logging import time from src.milvus_helpers import MilvusHelper from src.mysql_helpers import MySQLHelper from src.config import UPLOAD_PATH from src.logs import LOGGER from src.operations.load import do_load from src.operations.search import do_search from src.operations.count import do_count from src...
109
32.3
85
15
887
python
[{"finding_id": "codeql_py/stack-trace-exposure_c6b39463ce5b817f_3d4afc4f", "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.", "...
7
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-022" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information...
[ 48, 58, 69, 84, 95, 106, 45 ]
[ null, null, null, null, null, null, null ]
[ 16, 16, 16, 16, 16, 16, 29 ]
[ 48, 48, 48, 48, 48, 48, 39 ]
2024-11-18T23:26:02.747514+00:00
1,573,038,991,000
bb8e239e44948c262c42b024816bbff256c92d02
2
{ "blob_id": "bb8e239e44948c262c42b024816bbff256c92d02", "branch_name": "refs/heads/master", "committer_date": 1573038991000, "content_id": "43f023a5523028e2e242a97c7917c14f20df3ba0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b823511ec3b73364473bb90fcfbdfa7b28869a1a", "extension": "py"...
2.4375
stackv2
#!/usr/bin/python3 import json,requests,time,sys,os import urllib3 urllib3.disable_warnings() #Disable system-level proxy definition for requests os.environ['no_proxy'] = '*' class api_session: def __init__(self, api_url, username, password, port=4343, SSL=True, check_ssl=True, verbose=False, retrys=3, retry_wait=...
111
35.23
161
18
992
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3d5f520bb3f21437_f6045160", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text." ]
[ 36 ]
[ null ]
[ 16 ]
[ 80 ]
2024-11-18T21:51:39.619771+00:00
1,418,133,408,000
2ea4ca39916c68186da6ac6eb448e1c807cd57fa
2
{ "blob_id": "2ea4ca39916c68186da6ac6eb448e1c807cd57fa", "branch_name": "refs/heads/master", "committer_date": 1418133408000, "content_id": "e9d1eab250d078dfbd87a8df086faa2b0b9775f8", "detected_licenses": [ "MIT" ], "directory_id": "786b1ae976e36f123975613c950ca26d300cf35f", "extension": "py", "fi...
2.484375
stackv2
from __future__ import absolute_import import binascii import json import os from flask import Blueprint from flask import current_app from flask import request from scheduler.models import Task from scheduler.decorators import token_protected_endpoint scheduler = Blueprint('scheduler', __name__) @scheduler.route(...
96
22.8
77
16
535
python
[{"finding_id": "codeql_py/reflective-xss_40b73babc32026ed_e23d9847", "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)." ]
[ 93 ]
[ 96 ]
[ 10 ]
[ 5 ]
2024-11-18T22:15:01.260539+00:00
1,689,769,679,000
14a5fc475fc3577825fd9a74c768b859864565ed
2
{ "blob_id": "14a5fc475fc3577825fd9a74c768b859864565ed", "branch_name": "refs/heads/master", "committer_date": 1689769679000, "content_id": "e3b52b4672adf81d1a2150e52e82db3ec0ec7fea", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f49f3bfed3844e4b73832d25d8a5d4f3c6730be5", "extension": "py"...
2.453125
stackv2
# -*- coding: utf-8 -*- # Copyright© 1986-2019 Altair Engineering Inc. # pylint: disable=C0111,E1101,R0912,R0913 """Utils functions for pkr""" import base64 import hashlib from builtins import input from builtins import object from builtins import range from builtins import str from fnmatch import fnmatch from glob ...
409
29.23
98
21
2,739
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_2756d6a9ee26b0f9_e6226e40", "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." ]
[ 185 ]
[ 188 ]
[ 24 ]
[ 10 ]
2024-11-18T22:15:04.936357+00:00
1,593,260,115,000
54c614b935c0299b9ce4f0f44e11e49c98018158
3
{ "blob_id": "54c614b935c0299b9ce4f0f44e11e49c98018158", "branch_name": "refs/heads/master", "committer_date": 1593260115000, "content_id": "855dbe0980f10a2c20689027931faa936c85e72b", "detected_licenses": [ "MIT" ], "directory_id": "7c1572cff5c78b587ada922a25ccbbd23978def4", "extension": "py", "fi...
2.84375
stackv2
from Crypto.Cipher import PKCS1_OAEP from Crypto.PublicKey import RSA import base64 def genrateKeys(private_key_path, public_key_path): private_key = RSA.generate(1024) public_key = private_key.publickey() private_pem = private_key.exportKey().decode() public_pem = public_key.exportKey().decode() ...
44
31.77
75
15
394
python
[{"finding_id": "codeql_py/weak-crypto-key_fc8ce447c7b6081f_5c33d7fa", "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." ]
[ 7 ]
[ null ]
[ 19 ]
[ 37 ]
2024-11-18T22:55:41.042805+00:00
1,392,221,797,000
222b421d1905b9c2c2f80ad25583a469c55be7f4
3
{ "blob_id": "222b421d1905b9c2c2f80ad25583a469c55be7f4", "branch_name": "refs/heads/master", "committer_date": 1392221797000, "content_id": "446b3cec7a92bb8a7e8b4bf46a573a8981dca6dc", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "b430fd4a34c24798c99afdfa47aee38ed53e9e55", "extension": "p...
2.671875
stackv2
import admin, common, ircparser, logger, statekeeper import socket import random import string from ssl import wrap_socket, SSLError from time import sleep, time # run() should *never* for *any* reason throw any exceptions. # the absolute worst cases should be caught in here and # then 'reconnect' returned back to m...
206
34.73
130
22
1,672
python
[{"finding_id": "codeql_py/insecure-default-protocol_567266887cfbf0f6_302e1d54", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 171 ]
[ null ]
[ 20 ]
[ 34 ]
2024-11-19T00:07:19.085312+00:00
1,426,244,184,000
959235df1c09f1a8ed9fee474d4a109632382838
3
{ "blob_id": "959235df1c09f1a8ed9fee474d4a109632382838", "branch_name": "refs/heads/master", "committer_date": 1426244184000, "content_id": "034ccb18c9234b25f494e5bf6a81c6a18f040585", "detected_licenses": [ "Zlib" ], "directory_id": "a30582087f07f2ad0b50cd209c164c114a85df7d", "extension": "py", "f...
2.609375
stackv2
import ed25519 import binascii import socket import struct import time import hashlib # opcodes TIME_SYNC = chr(0) CERT_REQUEST_INIT = chr(1) CERT_REQUEST_CONFIRM = chr(2) CERT_REQUEST_INVALID_AUTH = chr(3) class CS(object): def __init__(self, port, keypair_seed): self.socket = socket.socket(socket.AF_I...
133
32.85
120
22
1,099
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_6329da654287082b_daeabc00", "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."...
2
true
[ "CWE-327", "CWE-200" ]
[ "py/weak-sensitive-data-hashing", "py/bind-socket-all-network-interfaces" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (id)](1) is used in a hashing algorithm (SHA1) that is insecure.", "'' binds a socket to all interfaces." ]
[ 107, 19 ]
[ null, null ]
[ 62, 9 ]
[ 96, 37 ]
2024-11-19T00:07:29.483152+00:00
1,629,125,097,000
bdff110e8124aad378384010f47c1ee241d684b8
3
{ "blob_id": "bdff110e8124aad378384010f47c1ee241d684b8", "branch_name": "refs/heads/master", "committer_date": 1629125097000, "content_id": "fa3d58713a087d8c3adf09ea45738342768f83c7", "detected_licenses": [ "Unlicense" ], "directory_id": "94d47a74d551d45618a1e30ba410805bfac878e2", "extension": "py",...
3.203125
stackv2
dictlen, descno = map(int, input().split()) salarydict = dict() dictkey = list() for i in range(dictlen): x, y = input().split() salarydict[x] = int(y) dictkey.append(x) for j in range(descno): desc = str() salary = 0 while True: desc = input() descl = desc.split() for k ...
19
23.95
47
14
125
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f3f7e3fb234a5f60_2fdeaba4", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (private)](3) as clear text." ]
[ 19 ]
[ null ]
[ 11 ]
[ 17 ]
2024-11-19T00:33:33.532337+00:00
1,608,115,350,000
27e32088033faf3920e95f6aed7be02791a3f697
3
{ "blob_id": "27e32088033faf3920e95f6aed7be02791a3f697", "branch_name": "refs/heads/master", "committer_date": 1608115350000, "content_id": "52822fa4ea344eabaf16879e33c4034d59daebbc", "detected_licenses": [ "Apache-2.0" ], "directory_id": "69d1767d7b2f7be7bc46f46fb72f81e1f293642c", "extension": "py"...
2.53125
stackv2
# coding:utf-8 # 【谷雨课堂】干货实战 No.033 网站开发之-上传并解析Excel文件 # 作者:谷雨 from flask import Flask,url_for,redirect,render_template,request,Response import time import os import io import mimetypes import xhtml2pdf.pisa as pisa from werkzeug.datastructures import Headers from urllib.parse import quote import xlrd,xlwt app = Flask...
100
22.36
73
12
710
python
[{"finding_id": "codeql_py/path-injection_fbe7a54c15c153d9_9ec0c6c6", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
1
true
[ "CWE-022" ]
[ "py/path-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This path depends on a [user-provided value](1)." ]
[ 58 ]
[ null ]
[ 12 ]
[ 47 ]
2024-11-18T23:39:44.595846+00:00
1,564,317,876,000
aa5e6de42bbc37aa0ea77173c0bede75871cdce5
2
{ "blob_id": "aa5e6de42bbc37aa0ea77173c0bede75871cdce5", "branch_name": "refs/heads/master", "committer_date": 1564325738000, "content_id": "453ee3aebca5a29af620c1bd0e85f17cda15fb23", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c8a4dac7827ce5dcd7946d0df7c70cb6a227ccf4", "extension": "py"...
2.3125
stackv2
import pycurl import zipfile from StringIO import StringIO import json import copy from importCommon import * ################################################################################################################################################################################# # ...
107
39.55
177
14
955
python
[{"finding_id": "codeql_py/request-without-cert-validation_bc9e4666f17be4e7_d91f4266", "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) by [this value](2)." ]
[ 57 ]
[ null ]
[ 13 ]
[ 42 ]
2024-11-18T23:39:45.438692+00:00
1,513,070,645,000
d65dcd3a968bdcb44f255faa835d52d2f3cf979c
2
{ "blob_id": "d65dcd3a968bdcb44f255faa835d52d2f3cf979c", "branch_name": "refs/heads/master", "committer_date": 1513070645000, "content_id": "fd2f928552b2d8ada24969055067cd64a1172c1d", "detected_licenses": [ "MIT" ], "directory_id": "92aafa467ce94ab20bfedf8c429b890951177946", "extension": "py", "fi...
2.359375
stackv2
""" Routes and views for the flask application. """ from flask import jsonify from flask import request from datetime import datetime from Interface import app, utility, logmgr, projectmgr, constants, modelcache from vis import objcls, objdet, cvmgr @app.route('/api/vis/create', methods=['POST']) def visioncreate():...
105
34.53
85
17
854
python
[{"finding_id": "codeql_py/stack-trace-exposure_abffac8ce66d4577_675c4c06", "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.", "...
4
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information...
[ 25, 39, 52, 100 ]
[ null, null, null, null ]
[ 20, 20, 20, 20 ]
[ 60, 60, 60, 78 ]
2024-11-18T23:40:00.510000+00:00
1,608,698,606,000
27e0b506f3322046f467cbaccef214db775ae2e0
3
{ "blob_id": "27e0b506f3322046f467cbaccef214db775ae2e0", "branch_name": "refs/heads/master", "committer_date": 1608698606000, "content_id": "25e6fb494fa147f041b1be60e19c90b8ddfce73a", "detected_licenses": [ "MIT" ], "directory_id": "ccfcbb85a02cec0bbcd05acf238c9e55e096c35b", "extension": "py", "fi...
2.65625
stackv2
import json import requests import xml.etree.ElementTree import pathlib from flask import render_template, request from app import app import mysql.connector # REST Api Constants HERE_COM_URL = 'https://places.api.here.com/places/v1/discover/explore'; YELP_URL = 'https://api.yelp.com/v3/businesses'; CURRENT_DIRECTORY...
184
29.2
97
14
1,461
python
[{"finding_id": "codeql_py/sql-injection_07606e41d54d68fa_4f241e2c", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown...
1
true
[ "CWE-089" ]
[ "py/sql-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This SQL query depends on a [user-provided value](1)." ]
[ 173 ]
[ null ]
[ 20 ]
[ 74 ]
2024-11-19T00:19:22.167717+00:00
1,662,744,030,000
7baf198b030eb294ec7a0a492d23f9161bae2ff3
3
{ "blob_id": "7baf198b030eb294ec7a0a492d23f9161bae2ff3", "branch_name": "refs/heads/master", "committer_date": 1662744030000, "content_id": "add8fc44f320d27ca3079508e15092ef854dac8c", "detected_licenses": [ "MIT" ], "directory_id": "1166a6b56390b72fc604943abe420c9712a3f19d", "extension": "py", "fi...
2.53125
stackv2
import argparse import hashlib import sys import os import Cryptodome.Cipher.AES as AES from getpass import getpass from itertools import chain from contextlib import ExitStack from functools import wraps from .src.cipher import EncryptionCipher, DecryptionCipher, configure_cipher from .. import __version__ as version ...
204
35.19
79
20
1,476
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_a15459236455e45c_25171539", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA512) that is insecure for password hashing, since it is not a computationally e...
[ 33 ]
[ null ]
[ 30 ]
[ 43 ]
2024-11-18T23:48:08.236510+00:00
1,633,514,014,000
8fcc19eb0c0e1148d9dece2a7b4c40213c690431
2
{ "blob_id": "8fcc19eb0c0e1148d9dece2a7b4c40213c690431", "branch_name": "refs/heads/master", "committer_date": 1633514014000, "content_id": "62e3b0b406af2680ee51063aae25275fb5711ac3", "detected_licenses": [ "MIT" ], "directory_id": "cdb49e49d3bf0a862c0aa2124695680abc9d8ffe", "extension": "py", "fi...
2.4375
stackv2
from dataclasses import asdict from flask import current_app as app, g, request, session, flash, redirect, url_for from flask_github import GitHub, GitHubError from werkzeug.exceptions import HTTPException from .models import User from .decorators import templated github = GitHub(app) @github.access_token_getter def...
105
27.32
118
14
649
python
[{"finding_id": "codeql_py/url-redirection_5a1d955944454625_f95762e2", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
2
true
[ "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 56, 68 ]
[ null, null ]
[ 25, 21 ]
[ 33, 29 ]
2024-11-18T23:48:22.044308+00:00
1,659,365,313,000
95e40aaa108e2c416b07d5d27adc2239467016aa
3
{ "blob_id": "95e40aaa108e2c416b07d5d27adc2239467016aa", "branch_name": "refs/heads/master", "committer_date": 1659365313000, "content_id": "709c04d7739a5b805b9564e3a0c67d5214d6954a", "detected_licenses": [ "MIT" ], "directory_id": "61673ab9a42f7151de7337608c442fa6247f13bb", "extension": "py", "fi...
3.046875
stackv2
# 2020.06.30 # https://stackoverflow.com/questions/62632892/extracting-table-data-from-wikipedia-api/ import urllib3 import requests from bs4 import BeautifulSoup import json urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) url = 'https://en.wikipedia.org/wiki/Rahul_Gandhi' #url = 'https://en.wik...
150
28
89
14
1,010
python
[{"finding_id": "codeql_py/request-without-cert-validation_e336a78a48b5d9ce_3527ed8c", "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)." ]
[ 17 ]
[ null ]
[ 8 ]
[ 38 ]
2024-11-19T00:29:32.172945+00:00
1,618,840,450,000
2441c064dd5aa9075e932d1b7d18554a5fd76aa1
2
{ "blob_id": "2441c064dd5aa9075e932d1b7d18554a5fd76aa1", "branch_name": "refs/heads/main", "committer_date": 1618840450000, "content_id": "a120e93781a739aac8586fddca639cbf1b74b1fe", "detected_licenses": [ "MIT" ], "directory_id": "248fd8a97fd3992114f560920bf1a1646095956e", "extension": "py", "file...
2.390625
stackv2
from fastapi import APIRouter, Query, HTTPException from typing import Optional from pydantic import ValidationError from .models import InsuranceModel, UserModel from app import controller from fastapi.responses import JSONResponse from app.config import settings import requests import json import logging logger = lo...
93
24.94
119
19
529
python
[{"finding_id": "codeql_py/partial-ssrf_2a29c7b083608b5e_560f504f", "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)." ]
[ 27 ]
[ null ]
[ 9 ]
[ 37 ]
2024-11-18T23:23:32.670076+00:00
1,546,467,934,000
4d0413370aa15ec3ac3cf7dc9db25d6adb9fa1ba
2
{ "blob_id": "4d0413370aa15ec3ac3cf7dc9db25d6adb9fa1ba", "branch_name": "refs/heads/master", "committer_date": 1546467934000, "content_id": "5ed070ef34ba92c7d0adf0e1cd59c7f545c7f12a", "detected_licenses": [ "MIT" ], "directory_id": "fd83396f89beea50823ecd15b4d609f9f8a8ccb9", "extension": "py", "fi...
2.5
stackv2
import h5py import os from collections import OrderedDict from flask import Flask, url_for, request, json, jsonify import pandas as pd import time from OpenSSL import SSL context = SSL.Context(SSL.SSLv23_METHOD) # context.use_privatekey_file('yourserver.key') # context.use_certificate_file('yourserver.crt') app = Fla...
161
33.81
130
33
1,359
python
[{"finding_id": "codeql_py/flask-debug_c0bf520f63840cc1_bb1f8a9f", "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)." ]
[ 161, 37 ]
[ null, null ]
[ 2, 18 ]
[ 32, 22 ]
2024-11-19T00:44:08.806537+00:00
1,579,722,239,000
ae66efaa8de70aa77b981023e54e65d2351dbc9f
3
{ "blob_id": "ae66efaa8de70aa77b981023e54e65d2351dbc9f", "branch_name": "refs/heads/master", "committer_date": 1579722239000, "content_id": "f7e703c5db4f450ca1fe891914c8ae05fe6bc2b3", "detected_licenses": [ "MIT" ], "directory_id": "b75017667468907d3c7d712e595a974de6105657", "extension": "py", "fi...
2.8125
stackv2
import json import time from django.views import View from django.urls import reverse from django.utils.datastructures import MultiValueDictKeyError from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseRedirect from django.template import loader from ..forms import PostureForm from ..controller...
212
32.66
119
23
1,357
python
[{"finding_id": "codeql_py/reflective-xss_02c9547c7c13be76_3e1aa5a7", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Cross-site scripting vulnerability due to a [user-provided value](1).\nCross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 165, 167 ]
[ null, null ]
[ 37, 47 ]
[ 44, 66 ]
2024-11-19T00:44:17.482098+00:00
1,559,480,884,000
6fbf386afb9e96cceeb9df587ad79378c1f1bc94
3
{ "blob_id": "6fbf386afb9e96cceeb9df587ad79378c1f1bc94", "branch_name": "refs/heads/master", "committer_date": 1559480884000, "content_id": "f45088c21c45a2a1843e5f4c5c448c21fb33049d", "detected_licenses": [ "MIT" ], "directory_id": "c9424e36dfed254c093881d8c5936edda17f73e1", "extension": "py", "fi...
2.6875
stackv2
import paramiko import fnmatch import os 'Connect' ssh_client = paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ssh_client.connect(hostname="bjth.itu.dk",username="fkp",password="") sftp = ssh_client.open_sftp() 'Execute command' cmd = "cd /30T/Music && ls" stdin,stdout,stderr=ss...
32
25.22
69
15
218
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_12da0a5453e36464_b61f5342", "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." ]
[ 7 ]
[ null ]
[ null ]
[ 65 ]
2024-11-18T23:05:26.412549+00:00
1,566,493,329,000
a319b7d79cbdfc3aa31643254aab11ec79f790c4
2
{ "blob_id": "a319b7d79cbdfc3aa31643254aab11ec79f790c4", "branch_name": "refs/heads/master", "committer_date": 1566493329000, "content_id": "591f1f62b96c684fbbdb3f66d3a14d9cf83c1799", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f76887b8ce5deb6db1066e01ccb175e861d64046", "extension": "py"...
2.453125
stackv2
#!/usr/bin/env python import ConfigParser import getpass import os import sys import xmlrpclib import ssl API_URL = "https://boot.planet-lab.org/PLCAPI/" PLC_CONFIG="/etc/planetlab.conf" SESSION_DIR=os.environ['HOME'] + "/.ssh" SESSION_FILE=SESSION_DIR + "/mlab_session" api = None def setup_global_session(url, debu...
176
29.27
80
14
1,260
python
[{"finding_id": "codeql_py/insecure-protocol_2bd4ae90b1558a9e_989e2290", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1).", "remediation": "", "lo...
1
true
[ "CWE-327" ]
[ "py/insecure-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)." ]
[ 140 ]
[ null ]
[ 19 ]
[ 53 ]
2024-11-18T23:11:09.023156+00:00
1,693,195,417,000
a71045f03fbf9c524b74c6ff08f38f6f237df8a4
3
{ "blob_id": "a71045f03fbf9c524b74c6ff08f38f6f237df8a4", "branch_name": "refs/heads/master", "committer_date": 1693195417000, "content_id": "89618692aa1280958ddab04833c19eb35a515cc2", "detected_licenses": [ "MIT" ], "directory_id": "deda1742a61225a8c7ecd1833ec388f72d8bcc4f", "extension": "py", "fi...
2.59375
stackv2
import logging from .models import User from .. import db logger = logging.getLogger() class UserService(): def __init__(self): pass def get_user_id(self, external_id, external_type): try: user = db.session.query(User).filter_by( external_id=external_id).filter...
52
29.96
77
19
336
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c983b8cd3bb91eb8_6db84f51", "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." ]
[ 34 ]
[ null ]
[ 19 ]
[ 44 ]
2024-11-19T01:21:37.044095+00:00
1,674,849,766,000
5a8db28922e730b0b46a065290de93ca5ef602eb
3
{ "blob_id": "5a8db28922e730b0b46a065290de93ca5ef602eb", "branch_name": "refs/heads/master", "committer_date": 1674849766000, "content_id": "8b01e11ae4260970bf17e02517a0e3404d4532de", "detected_licenses": [ "Apache-2.0" ], "directory_id": "c1175743befb0ecef55b863d04f46924b9380efa", "extension": "py"...
2.546875
stackv2
#------------------------------------------------------------------------------- # Name: Account Helper with user and role dictionaries # Purpose: Queries critical information from ArcGIS Online organization which # can be used in other scripts # # Author: Kelly Gerrow kgerrow@esri.com # # ...
163
33.94
159
17
1,304
python
[{"finding_id": "codeql_py/request-without-cert-validation_b70bb29d5c89a1d8_88dfe2c0", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
5
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation becau...
[ 78, 84, 96, 113, 144 ]
[ null, null, null, null, null ]
[ 16, 20, 24, 24, 20 ]
[ 59, 51, 61, 61, 67 ]
2024-11-19T01:21:42.098232+00:00
1,604,860,292,000
ba42cfed636965fb89a1e48e14566ed54db0266e
3
{ "blob_id": "ba42cfed636965fb89a1e48e14566ed54db0266e", "branch_name": "refs/heads/main", "committer_date": 1604860292000, "content_id": "61075889ffbf9a79e508707dcaf4bd09466d0d91", "detected_licenses": [ "MIT" ], "directory_id": "6519563d8aac85b9ffafafcd83bd175cbbbd56f4", "extension": "py", "file...
2.84375
stackv2
import smtplib import os import subprocess import sys def check_setup(): try: host = os.environ['EMAIL_HOST'] port = os.environ['EMAIL_PORT'] user = os.environ['EMAIL_USER'] password = os.environ['EMAIL_PASSWORD'] recipient = [os.environ['EMAIL_RECIPIENT']] return h...
99
24.45
87
15
643
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b8f106379dcf22ba_c26a509d", "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." ]
[ 20 ]
[ null ]
[ 15 ]
[ 64 ]