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-18T18:05:45.004802+00:00
1,553,968,313,000
3d4e3f0ca608cdd90cf10c1b9ff48162f1894a9c
3
{ "blob_id": "3d4e3f0ca608cdd90cf10c1b9ff48162f1894a9c", "branch_name": "refs/heads/master", "committer_date": 1553968313000, "content_id": "a401326a18810b96c3f274a9ca12b3d5b36fbe8f", "detected_licenses": [ "MIT" ], "directory_id": "8f501d223fa7942a7994cd5b7788626386bbe1ea", "extension": "py", "fi...
2.765625
stackv2
# source: https://github.com/django/django/blob/master/django/utils/crypto.py """ Django's standard crypto functions and utilities. """ import hashlib import hmac import random import time from .encoding import force_bytes # Use the system PRNG if possible try: random = random.SystemRandom() using_sysrandom ...
51
31.86
80
11
389
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_5c97c29f46b37af3_d1c117d7", "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." ]
[ 40 ]
[ null ]
[ 24 ]
[ 41 ]
2024-11-18T17:59:50.046779+00:00
1,615,907,232,000
01084f06b39e2d2826c60957ddea543d9fa415b8
2
{ "blob_id": "01084f06b39e2d2826c60957ddea543d9fa415b8", "branch_name": "refs/heads/main", "committer_date": 1615907232000, "content_id": "21d166092b92f28e40e5a9c7662af377182a072a", "detected_licenses": [ "MIT" ], "directory_id": "092e765a9b389c664dca59380ebe54b9c6f06eb9", "extension": "py", "file...
2.34375
stackv2
from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, g...
100
45.97
126
18
917
python
[{"finding_id": "codeql_py/url-redirection_18d5d6f3944ca351_9d8e58df", "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_...
4
true
[ "CWE-601", "CWE-601", "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection", "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 31, 42, 54, 60 ]
[ null, null, null, null ]
[ 37, 45, 45, 37 ]
[ 83, 67, 67, 59 ]
2024-11-18T18:15:57.272236+00:00
1,691,805,577,000
c584aeb9eee7152f7013f4c60283abb4aa4596b1
2
{ "blob_id": "c584aeb9eee7152f7013f4c60283abb4aa4596b1", "branch_name": "refs/heads/main", "committer_date": 1691805577000, "content_id": "098abe8f9a366ea7291b5f2863e0f7e2b5417407", "detected_licenses": [ "Unlicense" ], "directory_id": "3eaef0fa3c0be14c47c6aa1e1fcfc51ccebe65c7", "extension": "py", ...
2.390625
stackv2
r"""Duplicate sensor detection and removal. ______ __ __ __ ______ __ __ | _ \ .--.--.-----| |__.----.---.-| |_.-----. | _ \ .-----| |_.-----.----| |_.-----.----. |. | \| | | _ | | | __| _ | _| -__| |. | \| -__| _| -__| __| _| ...
203
40.79
99
18
1,857
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_ff59f3c6883db191_d086784b", "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." ]
[ 93 ]
[ null ]
[ 29 ]
[ 39 ]
2024-11-18T18:16:00.896196+00:00
1,586,974,776,000
47b319fa4a07e0dad76820e360420cfbdcc7997b
3
{ "blob_id": "47b319fa4a07e0dad76820e360420cfbdcc7997b", "branch_name": "refs/heads/master", "committer_date": 1586974776000, "content_id": "52f4b1c998369de71a9d8a92e708d54f8849d700", "detected_licenses": [ "MIT" ], "directory_id": "72f1cb7b9aed9ab1e56265c845597f3340dcfe13", "extension": "py", "fi...
2.859375
stackv2
import glob import re import jinja2 import ruamel.yaml as yaml import config _CREDITS_TEMPLATE = """\ # {{country.flag}} Photo credits for flags of {{country.name}} ({{country.code}}) {% if photos is iterable -%} {% for photo in photos %} - `{{photo.filename}}` by {{photo.author}}, licensed under the {{photo.l...
40
28.3
116
12
293
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_3087dcf1815ccec3_7bf127fe", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 34 ]
[ null ]
[ 20 ]
[ 54 ]
2024-11-18T18:16:04.377861+00:00
1,502,960,296,000
cecf676ef046a59b8886f2aa61056d5b8398dc2e
2
{ "blob_id": "cecf676ef046a59b8886f2aa61056d5b8398dc2e", "branch_name": "refs/heads/master", "committer_date": 1502960296000, "content_id": "6b184b19b9e5ab5f01e13c3a4939dc38e5999d42", "detected_licenses": [ "MIT" ], "directory_id": "36f9164a673978f204640ee0111fe694a938f2f4", "extension": "py", "fi...
2.4375
stackv2
from scapy.all import * import paho.mqtt.client as paho import ssl import configparser import sys #Variables confFile = "/home/matt/amazondash/amazonDash.conf" stateFile = "/home/matt/amazondash/amazonDash.state" ca_certs = "/etc/ssl/certs/ca-certificates.crt" #Read details from the config file config = configparser...
123
25.29
149
18
843
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_96c9761245ced203_67323f10", "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." ]
[ 35 ]
[ null ]
[ 18 ]
[ 26 ]
2024-11-18T19:31:08.589377+00:00
1,556,187,390,000
c75b7931bc71cc98f4846d61b353a6ee9d0daa4b
4
{ "blob_id": "c75b7931bc71cc98f4846d61b353a6ee9d0daa4b", "branch_name": "refs/heads/master", "committer_date": 1556187390000, "content_id": "1ed90b3772dc1989722f87d0a02e928feae5d9c3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "66bacb0f67d6fa46159f33597b93d5a6eda48bd0", "extension": "py"...
3.578125
stackv2
class Viewer(): """ 유저 인터페이스 출력 클래스 """ # 고객 정보 조회 출력 함수 def get_inform(self, information, index=0): print('') print('이 름 : ', information[index].get('name')) print('성 별 : ', information[index].get('gender')) print('이 메 일 : ', information[index].get('email'))...
103
21.17
61
15
713
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c999f8ed37b0f282_e212fdcf", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 12 ]
[ null ]
[ 28 ]
[ 60 ]
2024-11-18T20:08:54.565073+00:00
1,525,089,413,000
753d20872d14751e0a88dc11fc6d9394161b6e8d
3
{ "blob_id": "753d20872d14751e0a88dc11fc6d9394161b6e8d", "branch_name": "refs/heads/master", "committer_date": 1525089413000, "content_id": "012f84964862b2fb88742c9fb0890024be4660ed", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "3e5bd6d7e6c595dfcdc47f811a91a8bc6c09711b", "extension": "p...
2.859375
stackv2
import requests import logging logger = logging.getLogger('oofy') class GeoInfo(): def __init__(self, listing): self.listing = listing self.latitude = self.listing.latitude self.longitude = self.listing.longitude self.loc_info = self.geo_reverse() # given latitude and longitu...
83
30.86
114
17
606
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3cb95cd71c59be18_f8b64d36", "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." ]
[ 78 ]
[ null ]
[ 27 ]
[ 113 ]
2024-11-18T18:59:38.100234+00:00
1,427,123,616,000
42b1bcd91a708b49b2ad414881d1e79f7dc3dc7f
2
{ "blob_id": "42b1bcd91a708b49b2ad414881d1e79f7dc3dc7f", "branch_name": "refs/heads/master", "committer_date": 1427123616000, "content_id": "978f944bfcdb6128a3733a00f63c8db5ccd84235", "detected_licenses": [ "MIT" ], "directory_id": "4ebbee444bc2f3592e240976297f118bb3bcabd2", "extension": "py", "fi...
2.5
stackv2
import requests import ssl import os.path import json from requests.adapters import HTTPAdapter from requests.packages.urllib3.poolmanager import PoolManager from google import search from urlparse import urlparse from bs4 import BeautifulSoup from blessings import Terminal state_file = 'mdid_stats.json' requests.pac...
138
29.9
77
17
965
python
[{"finding_id": "codeql_py/request-without-cert-validation_4536c9ea5f52b291_07475525", "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)." ]
[ 44 ]
[ null ]
[ 17 ]
[ 41 ]
2024-11-18T19:11:48.379666+00:00
1,600,207,697,000
09b53a5530feee41a34389a7c71fb7ec060a9e98
2
{ "blob_id": "09b53a5530feee41a34389a7c71fb7ec060a9e98", "branch_name": "refs/heads/master", "committer_date": 1600207697000, "content_id": "96bb09aac4bb8c1f06759a557a1248c22e370917", "detected_licenses": [ "MIT" ], "directory_id": "65811f371a448a1a1d94255588d71db537621e4c", "extension": "py", "fi...
2.375
stackv2
import praw from dotenv import load_dotenv; load_dotenv() import os import time from scraping import get_images from processing import detect_image_repost def main(): reddit = praw.Reddit(client_id=os.getenv('CLIENT_ID'), client_secret=os.getenv('CLIENT_SECRET'), user_agent=...
26
34.58
88
13
193
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_8c43bc9952a16b4b_b30863b6", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://i.redd.it](1) may be at an arbitrary position ...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [https://i.redd.it](1) may be at an arbitrary position in the sanitized URL.", "The string [https://i.imgur.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 22, 22 ]
[ null, null ]
[ 12, 51 ]
[ 47, 88 ]
2024-11-18T19:34:37.555042+00:00
1,669,146,016,000
89ce2347f47b3d5fd85ba9774a91355bd6af1c7c
2
{ "blob_id": "89ce2347f47b3d5fd85ba9774a91355bd6af1c7c", "branch_name": "refs/heads/main", "committer_date": 1669146016000, "content_id": "4984acc3f8eff05966855f8307a380cf27c038ea", "detected_licenses": [ "MIT" ], "directory_id": "895a7638653a191d704d4740672a7f6211eb9d1d", "extension": "py", "file...
2.4375
stackv2
""" Build SSW scripts from Jinja 2 templates """ import os import datetime import pathlib import subprocess import tempfile import jinja2 from scipy.io import readsav from .filters import string_list_filter from .read_config import defaults from .util import SSWIDLError, IDLLicenseError from .filters import * class...
204
40.01
97
19
1,833
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_ca0fddc699b84e91_a6288152", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 58 ]
[ null ]
[ 20 ]
[ 89 ]
2024-11-18T19:34:37.612903+00:00
1,625,573,774,000
798dfb6381a0d5ba653f52d20b559d6d11a9ecb8
3
{ "blob_id": "798dfb6381a0d5ba653f52d20b559d6d11a9ecb8", "branch_name": "refs/heads/master", "committer_date": 1625573774000, "content_id": "c4e8c3fd0f7118239452679411db41c635295609", "detected_licenses": [ "MIT" ], "directory_id": "c822c02381fd78198cbd79fdd729efe83ccf3bde", "extension": "py", "fi...
2.828125
stackv2
import json # to encode items as JSON from source.models.EventModel import EventModel from source.models.NewsModel import NewsModel import jinja2 from icalendar import Calendar, Event from datetime import datetime from source.Constants import * class NewsFeedView: def __init__(self): self.loader = jinja...
223
43.31
115
16
1,955
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_d488871e9984e8ff_740d00eb", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/jinja2/autoescape-false", "py/jinja2/autoescape-false" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 15, 16 ]
[ null, null ]
[ 21, 20 ]
[ 64, 58 ]
2024-11-18T18:39:58.363900+00:00
1,555,870,617,000
8d1319617a21056d10a7a03ded42bc33c885d286
3
{ "blob_id": "8d1319617a21056d10a7a03ded42bc33c885d286", "branch_name": "refs/heads/master", "committer_date": 1555870617000, "content_id": "04a988be77e065fe450ea4932b1da47d9e987504", "detected_licenses": [ "MIT" ], "directory_id": "475cd7f3d823a8f896c7919c045348b21c7726a8", "extension": "py", "fi...
2.71875
stackv2
#!/usr/bin/env python3 import re import sys from svg.path import parse_path # Limit decimals. The OP-1 supports up to 4 decimals def fix_decimals(pat): text = pat.group(1) text = "." + text[:4] return text # Inkscape (and others) store SVG properties in the style attribute instead of # using a real at...
163
22.95
109
13
1,099
python
[{"finding_id": "codeql_py/bad-tag-filter_396c81f6c59b06d3_2c7160c7", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression does not match comments containing newlines." ]
[ 133 ]
[ null ]
[ 25 ]
[ 35 ]
2024-11-18T18:40:06.036367+00:00
1,433,633,162,000
632d14442cc5f1699354fcb47a5ba3e4ea665846
2
{ "blob_id": "632d14442cc5f1699354fcb47a5ba3e4ea665846", "branch_name": "refs/heads/master", "committer_date": 1433633162000, "content_id": "f660326dee20552b40634553ac416309aea101f6", "detected_licenses": [ "MIT" ], "directory_id": "56c338ec0f98f81886be140513b623ee0af55377", "extension": "py", "fi...
2.453125
stackv2
__author__ = 'beast' import base64, hashlib, random from signals import post_save_activity import redis class Store(object): def __init__(self, host="localhost", port=6379): self.r = redis.StrictRedis(host=host, port=port, db=0) self.user_id = None def close(self): pass def logi...
137
23.55
105
19
787
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_fc1d8d2e0361c8d5_d909f0fd", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 41 ]
[ null ]
[ 71 ]
[ 86 ]
2024-11-18T18:40:08.684886+00:00
1,556,970,572,000
d1423e864da501f4846914b8d872647553c9b197
3
{ "blob_id": "d1423e864da501f4846914b8d872647553c9b197", "branch_name": "refs/heads/master", "committer_date": 1556970572000, "content_id": "83a7ee297ff6d9dc32cfb3c18ed864e642f745f2", "detected_licenses": [ "MIT" ], "directory_id": "043ec7d1a8e2959e8d322f67129143a159d8bad1", "extension": "py", "fi...
2.609375
stackv2
import requests import tarfile import os import json def download_pkg(pkg): print('==> Collecting %s' % pkg) url = "https://pypi.org/pypi/%s/json" % pkg meta_data = requests.get(url).json() link = meta_data['urls'][0]['url'] pkg_name = link.split('/')[-1] print(' -> Downloding %s' % link) ...
36
24.53
65
16
264
python
[{"finding_id": "codeql_py/tarslip_cd423f153df73bcd_f96ee9ca", "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)." ]
[ 25 ]
[ null ]
[ 5 ]
[ 6 ]
2024-11-18T20:52:24.111939+00:00
1,557,245,733,000
ac2cb1b3a7bc417b8ab830a034b708d295381570
3
{ "blob_id": "ac2cb1b3a7bc417b8ab830a034b708d295381570", "branch_name": "refs/heads/master", "committer_date": 1557245733000, "content_id": "6ef04a4dc867b62716e0e49d5c858477f881cea8", "detected_licenses": [ "MIT" ], "directory_id": "91839aae0e9bd4d150159c668d866e21e68f0732", "extension": "py", "fi...
2.515625
stackv2
#!/usr/bin/env python3 #------------------------------------------------------------------------------- # Name: Nalanda Downloader # Purpose: Download course files from BITS Pilani's LMS # Author: Naveen Unnikrishnan # Created: 19/07/2018 #-----------------------------------------------------------...
396
30.66
139
29
3,126
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c7630697852696cb_35a3dc77", "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." ]
[ 95 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T20:15:50.343566+00:00
1,587,765,242,000
5d30fa798aa3b3caf28272339b88a2de9d4db2a0
2
{ "blob_id": "5d30fa798aa3b3caf28272339b88a2de9d4db2a0", "branch_name": "refs/heads/master", "committer_date": 1587765242000, "content_id": "917fddc92d60d9548c5565b63834f38db019c421", "detected_licenses": [ "MIT" ], "directory_id": "cc94882f11e75a1c889113280eb9a28dd52552f7", "extension": "py", "fi...
2.5
stackv2
import mechanize import re import requests import time import random def saveEmail(email): file = open('emailCreation.txt','w') file.write(email) file.close() def openEmail(): file = open('emailCreation.txt','r') email = file.read() file.close() return email def getRandomName(): global randomLastName...
140
26.59
131
13
1,123
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_83b5eb33d4a0c474_1a1ec9cb", "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." ]
[ 119 ]
[ null ]
[ 14 ]
[ 22 ]
2024-11-18T20:16:04.232702+00:00
1,612,386,638,000
27331ce4bbab87c74f07b4919230a3dff37aeb34
3
{ "blob_id": "27331ce4bbab87c74f07b4919230a3dff37aeb34", "branch_name": "refs/heads/main", "committer_date": 1612386638000, "content_id": "0705e5a312970e6ea02c8c491eac86765fe0e701", "detected_licenses": [ "MIT" ], "directory_id": "3a62e9067d3b99d9b9532807a5b7d4fd0b30cbee", "extension": "py", "file...
2.828125
stackv2
import os import sys from colorama import Fore, Style from pyzotero import zotero from pyzotero.zotero_errors import UserNotAuthorised from utils.common import File class Zotero(): def __init__(self, dir, zot_library_id, zot_api_key): """ Initialize the zotero instance Args: ...
195
27.06
87
23
1,139
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_bdfa5bb6aacf8b21_58100f58", "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." ]
[ 30 ]
[ 35 ]
[ 19 ]
[ 34 ]
2024-11-18T19:23:09.479390+00:00
1,496,648,854,000
efe833cf459b6801d9d8c15baf0728665639624c
2
{ "blob_id": "efe833cf459b6801d9d8c15baf0728665639624c", "branch_name": "refs/heads/master", "committer_date": 1496648854000, "content_id": "e8d92ed530db013117060a685f46547852a0d717", "detected_licenses": [ "MIT" ], "directory_id": "7f6e6caabf391b74638a983cc0337c62c98766de", "extension": "py", "fi...
2.4375
stackv2
#!/usr/bin/env python3 from flask import * import sqlite3 from functools import wraps import hashlib import logging import os import subprocess OS_USER = subprocess.check_output(["whoami"], universal_newlines=True).splitlines()[0] DATABASE = '/home/' + OS_USER + '/SmartSlam/DB/smartSlamDB.sqlite' DATABASEUSERS = '/ho...
201
28.86
135
17
1,405
python
[{"finding_id": "codeql_py/flask-debug_0cfa7caac72253f5_490e0397", "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-327" ]
[ "py/flask-debug", "py/weak-sensitive-data-hashing" ]
[ "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.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (passwor...
[ 201, 198 ]
[ null, null ]
[ 5, 39 ]
[ 50, 77 ]
2024-11-18T19:38:02.954570+00:00
1,496,267,201,000
f00653f779d1d1634346d4744cdbbbb3bbc6bb14
4
{ "blob_id": "f00653f779d1d1634346d4744cdbbbb3bbc6bb14", "branch_name": "refs/heads/master", "committer_date": 1496267201000, "content_id": "bf5dc18bb91563b81c29494eb5fec8ace28b1bb2", "detected_licenses": [ "MIT" ], "directory_id": "657acc5069b28d2b8c0e554eba7969de0f63a68c", "extension": "py", "fi...
3.546875
stackv2
import requests import math import random print('#################################') print('######### MOVIE TRIVIA ##########') print('#################################') print('\n') class MyGame: score = 0 # end of MyGame def get_popular_actors(strict): if strict: random_page = int(math.ceil((MyGam...
104
22.46
113
16
641
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5eacbdf216bb37dc_599103ef", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
4
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 63, 75, 86, 89 ]
[ null, null, null, null ]
[ 19, 15, 15, 15 ]
[ 33, 24, 89, 71 ]
2024-11-18T19:38:12.772400+00:00
1,498,835,232,000
2854953d735b5f50628d46f58e81492eb8f61e82
3
{ "blob_id": "2854953d735b5f50628d46f58e81492eb8f61e82", "branch_name": "refs/heads/master", "committer_date": 1498835232000, "content_id": "0581dd403f68a2a87f970063212df0a00b236e2b", "detected_licenses": [ "MIT" ], "directory_id": "bf7fd38f2962da3f92f6c2a13ec5c8ae6235daa0", "extension": "py", "fi...
2.546875
stackv2
from bottle import static_file, run, template, route, get, post, request, error, redirect from fuelCalculator import * from fcStartDB import * from fcCreateAccount import * import json, sqlite3, os.path @error(404) #Error in routing handling def error404(error): return template('error.html') @route('/static/<file...
126
27.57
122
14
837
python
[{"finding_id": "codeql_py/reflective-xss_d77ecaf498346f2e_5a534410", "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)." ]
[ 64, 124 ]
[ null, null ]
[ 12, 12 ]
[ 26, 26 ]
2024-11-18T19:38:19.065197+00:00
1,511,963,562,000
61f8940688838f823965645b6edab2acb5f56f7a
3
{ "blob_id": "61f8940688838f823965645b6edab2acb5f56f7a", "branch_name": "refs/heads/master", "committer_date": 1511963562000, "content_id": "b86fd254efa616eaeae5abf85cf28b1b61d3b259", "detected_licenses": [ "Apache-2.0" ], "directory_id": "31bbd75b53ce575d38d865c8a843b2e14800688f", "extension": "py"...
2.546875
stackv2
# Copyright (c) 2013 Yogesh Panchal, yspanchal@gmail.com # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law ...
113
31.56
78
19
810
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_c9ecf6de36db859f_a58cb0e1", "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." ]
[ 76 ]
[ null ]
[ 25 ]
[ 60 ]
2024-11-18T20:10:37.216362+00:00
1,542,791,635,000
c5f12bef94441d49f1823a5c69f5b7c4bdefff24
3
{ "blob_id": "c5f12bef94441d49f1823a5c69f5b7c4bdefff24", "branch_name": "refs/heads/master", "committer_date": 1542791635000, "content_id": "721dd049cf7cb2d3fa9bbb6fbcb66fd5dcd214c6", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e080405e09e1bd386f306b23ac6308b7d3fc84f2", "extension": "py"...
2.625
stackv2
# -*- coding: utf-8 -*- import json import os import re from logging import getLogger from pytz import timezone from dateutil import parser from pymongo import MongoClient from flask import request, render_template, jsonify, current_app, url_for from flask.views import MethodView from werkzeug.exceptions import BadR...
113
35.35
116
21
924
python
[{"finding_id": "codeql_py/log-injection_331dbe1352c66aec_e9c754da", "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)." ]
[ 65 ]
[ null ]
[ 21 ]
[ 73 ]
2024-11-18T20:10:53.017104+00:00
1,617,466,003,000
3bd43c9c170b623aabe439026e1ac850ded7e393
3
{ "blob_id": "3bd43c9c170b623aabe439026e1ac850ded7e393", "branch_name": "refs/heads/master", "committer_date": 1617466003000, "content_id": "310b9325972cfb69759665e18a1cb70dd70bb3b1", "detected_licenses": [ "MIT" ], "directory_id": "6e5e9a060f914e4fe8d3464a4fdb85e10fe94f36", "extension": "py", "fi...
2.65625
stackv2
import requests import keys import json from types import SimpleNamespace import logging # Enable logging logging.basicConfig( filename="../log.txt", filemode='a', format=u'%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO, ) logger = logging.getLogger(__name__) API_KEY = keys...
51
26.88
100
13
347
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cfbaeed6c120427f_875b3b6e", "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 ]
[ 33 ]
[ 36 ]
2024-11-18T20:26:04.201678+00:00
1,537,524,307,000
7484cef7fc9c9eaa75ffc09a4aeebc54bd03919b
3
{ "blob_id": "7484cef7fc9c9eaa75ffc09a4aeebc54bd03919b", "branch_name": "refs/heads/master", "committer_date": 1537524307000, "content_id": "7a8851a6d4405ab15b6ce0354bbc89ac99be7fd3", "detected_licenses": [ "MIT" ], "directory_id": "664be60f0ba57674ccc30d4f79d6a7c353ca40f9", "extension": "py", "fi...
2.9375
stackv2
from phone import Phone import pymysql class PhoneData: """按照运营商批量生成手机号,并根据归属地存储到数据库""" def __init__(self, host, port, user, database, password): self.p = Phone() self.db = pymysql.connect(host=host, port=port, user=user, database=database, password=password) self.cursor = self.db.cur...
99
31.85
118
23
1,017
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_db39bf3e89105d01_6012f8a6", "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.",...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-storage-sensitive-data", "py/clear-text-storage-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.", "This expression stores [sensitive data (private)](1) as clear text." ]
[ 40, 44 ]
[ null, null ]
[ 37, 33 ]
[ 53, 49 ]
2024-11-18T20:26:12.910256+00:00
1,587,005,714,000
aeb43ae55218921cb15c53d67ae1dd185d811094
3
{ "blob_id": "aeb43ae55218921cb15c53d67ae1dd185d811094", "branch_name": "refs/heads/master", "committer_date": 1587005714000, "content_id": "d02c94d856682fa8e45b209533061b580cf1e51d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "47893c9e014aead9218f60d5ab637e1b9f18ea02", "extension": "py"...
2.765625
stackv2
"""Allows acquisition of Internet weather data. """ import urllib.request import urllib.error import urllib.parse import time import json import urllib.request import urllib.parse import urllib.error from django.conf import settings from metar import Metar from .cache import Cache # cache for storing NWS observations...
180
32.69
93
19
1,386
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c772bf43a20a40bb_bab1c547", "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." ]
[ 178 ]
[ null ]
[ 15 ]
[ 18 ]
2024-11-18T20:26:33.842138+00:00
1,540,577,205,000
1c0d7987a9b2b99728a6da182b02737094ba07f7
2
{ "blob_id": "1c0d7987a9b2b99728a6da182b02737094ba07f7", "branch_name": "refs/heads/master", "committer_date": 1540577205000, "content_id": "548fbb254ed9088f946010e98ff3c9a38c26ab17", "detected_licenses": [ "Apache-2.0" ], "directory_id": "819b60419bd112b97c3af25933a2e9eadb2e094c", "extension": "py"...
2.375
stackv2
# coding: utf-8 # Импортирует поддержку UTF-8. from __future__ import unicode_literals # Импортируем модули для работы с JSON и логами. import json import logging import Database import os import random # Импортируем подмодули Flask для запуска веб-сервиса. from flask import Flask, request, send_from_directory app = ...
373
35.83
125
21
3,113
python
[{"finding_id": "codeql_py/reflective-xss_60f5b524650d9f74_7efdadb0", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
3
true
[ "CWE-079", "CWE-117", "CWE-117" ]
[ "py/reflective-xss", "py/log-injection", "py/log-injection" ]
[ "HIGH", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 85, 70, 83 ]
[ 89, null, null ]
[ 12, 33, 34 ]
[ 6, 45, 42 ]
2024-11-18T20:26:34.797835+00:00
1,626,007,233,000
b744de18eaf0c23980323ac1db49205ac81c03a8
3
{ "blob_id": "b744de18eaf0c23980323ac1db49205ac81c03a8", "branch_name": "refs/heads/main", "committer_date": 1626007233000, "content_id": "df0a04f047e65af3c01419d5855a934f662d352b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "33f89e3f76a5988cb4b9360a12d6202b46283414", "extension": "py"...
2.703125
stackv2
import random import os import requests from flask import Flask, render_template, abort, request from QuoteEngine import Ingestor from MemeEngine import MemeGenerator app = Flask(__name__) meme = MemeGenerator('./static') def setup(): """ Load all resources """ quote_files = ['./_data/DogQuotes/DogQuotesT...
76
23.45
75
12
445
python
[{"finding_id": "codeql_py/full-ssrf_0aaf7f67345935e2_a379e415", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
1
true
[ "CWE-918" ]
[ "py/full-ssrf" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1)." ]
[ 60 ]
[ null ]
[ 16 ]
[ 52 ]
2024-11-18T20:26:44.423667+00:00
1,622,421,401,000
aa95fc34ec5a434af9075d3a4f5cbbb903abbcc2
3
{ "blob_id": "aa95fc34ec5a434af9075d3a4f5cbbb903abbcc2", "branch_name": "refs/heads/main", "committer_date": 1622421401000, "content_id": "5b1939433a5859ae536fd795ca2fff9602e2b8be", "detected_licenses": [ "MIT" ], "directory_id": "df07014d2519dd085fbd78240e7a46aa9240be19", "extension": "py", "file...
2.703125
stackv2
"""Main functions for the use by end users. """ import pandas as pd from pathlib import Path from wbib import queries, render from wikidata2df import wikidata2df from jinja2 import Environment, PackageLoader env = Environment( loader=PackageLoader("wbib", "templates"), ) DEFAULT_QUERY_OPTIONS = { "map of in...
232
31.71
124
14
1,770
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_cadea1ef27b7dff1_e065822e", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 11 ]
[ 13 ]
[ 7 ]
[ 2 ]
2024-11-18T20:26:51.962289+00:00
1,693,339,200,000
133931037738b972fea8a90b09b3be13d6122a4e
2
{ "blob_id": "133931037738b972fea8a90b09b3be13d6122a4e", "branch_name": "refs/heads/master", "committer_date": 1693339200000, "content_id": "e8a7271e2a58439a9c1171f53befcc34a999c7c6", "detected_licenses": [ "Unlicense" ], "directory_id": "0fa00ecf2dd671515dc001d4b14049ec6a0c1f1c", "extension": "py",...
2.453125
stackv2
""" Use Jinja and data from Home Assistant to generate your README.md file For more details about this component, please refer to https://github.com/custom-components/readme """ from __future__ import annotations import asyncio import json import os from shutil import copyfile from typing import Any, Dict, List impo...
251
28.04
91
20
1,537
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_425c69c4b6bc98a9_93e0a0c9", "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." ]
[ 166 ]
[ null ]
[ 20 ]
[ 37 ]
2024-11-18T20:26:53.556773+00:00
1,598,377,201,000
15cc8a34ef80c3af2906b04bc2cf5c11aebba0cd
2
{ "blob_id": "15cc8a34ef80c3af2906b04bc2cf5c11aebba0cd", "branch_name": "refs/heads/master", "committer_date": 1598377201000, "content_id": "9fda682785b6dd22f1ec99f9539828cca9cb0354", "detected_licenses": [ "MIT" ], "directory_id": "1ddb3af252da9fad3ef5e58d9cd27bdcb0365bdb", "extension": "py", "fi...
2.4375
stackv2
from flask import Flask from flask import request from artsci2019.displaybackend.backend import Backend import pickle def create_app(stack_size, thread_count, stable_points, directory): """Returns a flask app provinding two api endpoints. The server communicates with the RemoteBackend in client.py.""" app...
31
31.65
73
13
216
python
[{"finding_id": "codeql_py/unsafe-deserialization_a83acc0afbd9d31d_2470c298", "tool_name": "codeql", "rule_id": "py/unsafe-deserialization", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Unsafe deserialization depends on a [user-provided value](1).", "remediation": "", "locatio...
1
true
[ "CWE-502" ]
[ "py/unsafe-deserialization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Unsafe deserialization depends on a [user-provided value](1)." ]
[ 22 ]
[ null ]
[ 41 ]
[ 55 ]
2024-11-18T20:26:54.071886+00:00
1,386,855,355,000
69b90f47dfbf9205e60e26c105b91d21f40fc6ab
2
{ "blob_id": "69b90f47dfbf9205e60e26c105b91d21f40fc6ab", "branch_name": "refs/heads/master", "committer_date": 1386855355000, "content_id": "a63a0b99905ee3554372fe65b694095e5a602a44", "detected_licenses": [ "MIT" ], "directory_id": "2734dfdb47f00628c3f815cfe553a2861fd179b7", "extension": "py", "fi...
2.328125
stackv2
#!/usr/bin/env python import web, redis, shelve, hashlib, json,urllib2 from Pubnub import Pubnub import time pubnub = Pubnub( "pub-56806acb-9c46-4008-b8cb-899561b7a762", ## PUBLISH_KEY "sub-26001c28-a260-11e1-9b23-0916190a0759", ## SUBSCRIBE_KEY "sec-MGNhZWJmZmQtOTZlZS00ZjM3LWE4ZTYtY2Q3OTM0MT...
94
32.02
108
17
973
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_44abd125daa0bde2_5ffc122a", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.", "[Sensitive data (secret)](1) is used in a hashing algorithm...
[ 55, 87 ]
[ null, null ]
[ 29, 29 ]
[ 72, 72 ]
2024-11-18T20:52:06.917085+00:00
1,568,049,696,000
6945b44b0e5060e959b04ce20f39f5f2cf39320d
2
{ "blob_id": "6945b44b0e5060e959b04ce20f39f5f2cf39320d", "branch_name": "refs/heads/master", "committer_date": 1568057341000, "content_id": "b23ccde98ba26d049e5f10c090ea9c462605afb2", "detected_licenses": [ "MIT" ], "directory_id": "6518a84c14716b405a50d6d45e4746ca3da1d4d4", "extension": "py", "fi...
2.3125
stackv2
import json from flask import request, Flask from flask_api import exceptions from ws_service import ACTIVE_ZONES, DEVICES from ws_service.crontab import add_zone_crontab, remove_zone_crontab, get_zone_crontab app = Flask(__name__) @app.route('/zone/<zone_id>/on') def zone_on(zone_id): if not int(zone_id) in A...
53
25.17
86
14
349
python
[{"finding_id": "codeql_py/flask-debug_901aa90533c9232c_1000f32f", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
5
true
[ "CWE-215", "CWE-079", "CWE-079", "CWE-079", "CWE-079" ]
[ "py/flask-debug", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "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 ...
[ 53, 18, 27, 44, 49 ]
[ null, null, null, null, null ]
[ 5, 12, 12, 16, 16 ]
[ 24, 49, 50, 61, 66 ]
2024-11-18T20:52:29.600926+00:00
1,590,497,969,000
1d7fe510e4b3160b5dbde94deb94e28b4cd86945
2
{ "blob_id": "1d7fe510e4b3160b5dbde94deb94e28b4cd86945", "branch_name": "refs/heads/master", "committer_date": 1590497969000, "content_id": "5ad52f572abdd15f518f4e338f80425b27ee4b61", "detected_licenses": [ "MIT" ], "directory_id": "fed95e7f190b5db8802f65b526db6c4cb83ba252", "extension": "py", "fi...
2.421875
stackv2
from flask import Blueprint, render_template, redirect, session, request, url_for, abort import bcrypt from user.models import User from user.forms import RegisterForm, LoginForm, EditForm user_app = Blueprint('user_app', __name__) # To call this module @user_app.route('/register', methods=('GET', 'POST')) def regist...
93
36.43
97
21
697
python
[{"finding_id": "codeql_py/url-redirection_a5d13acb1c6fb8d3_929e3661", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
1
true
[ "CWE-601" ]
[ "py/url-redirection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 43 ]
[ null ]
[ 37 ]
[ 41 ]
2024-11-18T20:52:30.777317+00:00
1,642,954,764,000
42fbc65cf87ad477506c9a25a33964d13dfe5a0b
3
{ "blob_id": "42fbc65cf87ad477506c9a25a33964d13dfe5a0b", "branch_name": "refs/heads/master", "committer_date": 1642955980000, "content_id": "64afc05f82ebfe45830d8b65887be3dd542d80d1", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7b1793f277fbaef6a7d51608d336e2d3fc546fec", "extension": "py"...
2.65625
stackv2
#! /usr/bin/python """Tiny init tool. """ from __future__ import print_function import argparse import errno import fcntl import logging import os import os.path import signal import sys import psutil cli = argparse.ArgumentParser() cli.add_argument('--debug', action='store_const', dest='loglevel'...
134
29.58
75
19
938
python
[{"finding_id": "codeql_py/overly-permissive-file_9a569bb4eb3d41f0_2a397915", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in open sets file to world writable.", "remediation": "", "location": {...
1
true
[ "CWE-732" ]
[ "py/overly-permissive-file" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Overly permissive mask in open sets file to world writable." ]
[ 58 ]
[ null ]
[ 23 ]
[ 71 ]
2024-11-18T20:52:33.657198+00:00
1,645,597,713,000
ac2d1d387b2b89b51182d3009e6ac56e9e22564a
3
{ "blob_id": "ac2d1d387b2b89b51182d3009e6ac56e9e22564a", "branch_name": "refs/heads/master", "committer_date": 1645597713000, "content_id": "08af6e0413f92246506118e6b14b8b775bea23e0", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "0f6e57bf2e9a1c35551625c199d998fdc2d326b4", "extension": "p...
2.515625
stackv2
import datetime import StringIO import json import re from boltons.iterutils import chunked_iter from unicodecsv import DictReader import requests import rdb from labs import get_files, get_file_info REMOTE_UTILS_URL = 'https://montage.toolforge.org/v1/utils/' GSHEET_URL = 'https://docs.google.com/spreadsheets/d/%...
262
28.95
118
18
1,825
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_4e73e368f02d215b_c2f5d548", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [google.com](1) may be at an arbitrary position in the ...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [google.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 145 ]
[ null ]
[ 8 ]
[ 31 ]
2024-11-18T20:52:34.933221+00:00
1,509,591,253,000
db2548330c5130888363d3cb599a2d823d594f39
2
{ "blob_id": "db2548330c5130888363d3cb599a2d823d594f39", "branch_name": "refs/heads/master", "committer_date": 1509591253000, "content_id": "3567865d6c3f159f6e776de913d69b7baf5c2b3e", "detected_licenses": [ "MIT" ], "directory_id": "54e38d6fa2f7f9d618f50e6ab1e4e1468e8dcaf8", "extension": "py", "fi...
2.375
stackv2
# -*- coding: UTF-8 -*- import hashlib import datetime import base64 import json import requests import random from config import Config class YzxAPI: baseUrl = Config.YZX_URL version = Config.YZX_VERSION accountSid = Config.YZX_ACCOUNTSID token = Config.YZX_TOKEN appId = Config.YZX_APPID @s...
269
25.08
110
17
1,998
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_98fe121e3f090ad8_a84dcedf", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.",...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure." ]
[ 36 ]
[ null ]
[ 28 ]
[ 56 ]
2024-11-18T20:52:39.220153+00:00
1,574,804,954,000
bef91368af1912f6aab8a18f2111f2d71b79f7b4
2
{ "blob_id": "bef91368af1912f6aab8a18f2111f2d71b79f7b4", "branch_name": "refs/heads/master", "committer_date": 1574804954000, "content_id": "18e7078d77ac654724cf2d9d3f81d6467f4b074a", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "b7218c8e9c5538defaa9ef48825e36955296ca5e", "extension": "p...
2.359375
stackv2
from django.http import HttpResponse from django.shortcuts import render, redirect from django.http import JsonResponse from django.contrib.auth.models import User # STEP 1: Import the user from foundation.models import Instrument,TimeSeriesDatum,Sensor from rest_framework import status, response, views from res...
207
22.84
90
14
966
python
[{"finding_id": "codeql_py/stack-trace-exposure_0ce403d4ef462b7e_04e95cc9", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
1
true
[ "CWE-209" ]
[ "py/stack-trace-exposure" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user." ]
[ 79 ]
[ 82 ]
[ 29 ]
[ 10 ]
2024-11-18T19:02:47.176977+00:00
1,631,268,839,000
22d1ce3411974ecf9a422fbb8bfc2000b4e8128b
2
{ "blob_id": "22d1ce3411974ecf9a422fbb8bfc2000b4e8128b", "branch_name": "refs/heads/master", "committer_date": 1631268839000, "content_id": "afe45e756d1c8f9819381f1ad4ad6e83e6386bf7", "detected_licenses": [ "MIT" ], "directory_id": "cbc19e418882a9b707dd21c8364fda8108469b01", "extension": "py", "fi...
2.5
stackv2
import urllib.request import json def setupController(controller_url, secret, ups): # ask for stats (not yet implementet) return sendCommand(controller_url + "api/start", {"token": secret, "update_per_second": ups}) def sendCommand(url, data): print("Sending command: ", url) req = urllib.request.Reques...
17
36
95
10
155
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d78138b2da7c0b4c_3805df2f", "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." ]
[ 16 ]
[ null ]
[ 10 ]
[ 25 ]
2024-11-18T19:02:54.140951+00:00
1,605,409,630,000
c765db3c8032c59d70782fc1618b0c6f05eab5df
3
{ "blob_id": "c765db3c8032c59d70782fc1618b0c6f05eab5df", "branch_name": "refs/heads/main", "committer_date": 1605409630000, "content_id": "f8453fdcc4b13e2b49ecab1e04518ab88e20d90e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2b8872fa0a93ac02b56229cefcc405a3ded2983e", "extension": "py", ...
2.59375
stackv2
#------------------------------------# # CREATED BY: 0x0a λ # # time: 10/11/2020 # # python version: 3.8 # #------------------------------------# import requests as reqs from time import sleep import os import fileinput class Collors: Preto1 = '\033[1;30m' Pr...
130
21.41
131
16
1,079
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ff29b31100dba6e5_456444bf", "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." ]
[ 109 ]
[ 129 ]
[ 19 ]
[ 8 ]
2024-11-18T19:14:35.702405+00:00
1,653,370,210,000
79c58ceac61d7a39a522fa26f2e651b831300a4c
2
{ "blob_id": "79c58ceac61d7a39a522fa26f2e651b831300a4c", "branch_name": "refs/heads/master", "committer_date": 1653370210000, "content_id": "b5bd718a6a57a5f6fb4850c4a408a5a638163610", "detected_licenses": [ "MIT" ], "directory_id": "1540223e9badb5f75f281b81cb475d0ea499c260", "extension": "py", "fi...
2.46875
stackv2
from requests import Session, get as RequestsGet from io import BytesIO from line2.utils import IsEmpty, Lock def ReadContent(content): b = bytes() for chunk in content.iter_content(): b = b + bytes(chunk) return b def ReadStream(stream): return stream.read() def Download(url, headers...
162
26.1
104
18
1,021
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_0313048436177d0e_c9d64af9", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://i.imgur](1) may be at an arbitrary position in...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [https://i.imgur](1) may be at an arbitrary position in the sanitized URL." ]
[ 151 ]
[ null ]
[ 42 ]
[ 82 ]
2024-11-18T19:14:40.182068+00:00
1,630,944,333,000
a6f4dcb21c92f5ebe93dd060857ecc2694faaa7d
2
{ "blob_id": "a6f4dcb21c92f5ebe93dd060857ecc2694faaa7d", "branch_name": "refs/heads/master", "committer_date": 1630944333000, "content_id": "d52172d8a19218b4f8ad8ca5f0c2c12fc77800d1", "detected_licenses": [ "MIT" ], "directory_id": "2bac949499515c749011d4d2f93a08e4535eeeac", "extension": "py", "fi...
2.421875
stackv2
import json import random from django.http import JsonResponse from django.shortcuts import render from django.utils.decorators import method_decorator from django.views import View from .models import UserProfile import hashlib from tools.logging_dec import logging_check from django.core.cache import cache from tools...
134
30.61
111
17
1,146
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_c4c8de4e83743ed3_3a44ff16", "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." ]
[ 64 ]
[ null ]
[ 20 ]
[ 39 ]
2024-11-18T19:14:43.015892+00:00
1,679,251,903,000
c5cd0ac0af38ac5b954b43ec81a7dccbd2a04bdd
2
{ "blob_id": "c5cd0ac0af38ac5b954b43ec81a7dccbd2a04bdd", "branch_name": "refs/heads/master", "committer_date": 1679251903000, "content_id": "541caf6f079ed79c99e31993c98abd0eb90757cd", "detected_licenses": [ "Apache-2.0" ], "directory_id": "995cb3a14ea2fee05b3afd06413f0eb65d065296", "extension": "py"...
2.390625
stackv2
#!/usr/bin/env python import os import sys from multiprocessing import cpu_count from getpass import getpass # check python version if sys.version_info[0] != 3: print("") print("========================================================================") print("|BioQueue requires Python 3.x ...
305
36.26
112
21
2,407
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_a3ea2cbed9cfa3c0_8e8e61fe", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (secret)](1) as clear text.\nT...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (secret)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.\nThis expression stores [sensitive data (password)](3) as clear text." ]
[ 268 ]
[ null ]
[ 31 ]
[ 43 ]
2024-11-18T19:14:53.055439+00:00
1,557,866,939,000
38b04bde1569bd4aa1bc4cd3964ad9afe2179004
3
{ "blob_id": "38b04bde1569bd4aa1bc4cd3964ad9afe2179004", "branch_name": "refs/heads/master", "committer_date": 1557866939000, "content_id": "abf20775577f7b02a06faa9e40d68b51f7d560bb", "detected_licenses": [ "MIT" ], "directory_id": "b1142eb20adcd8be5ea193ae0632ece73e375363", "extension": "py", "fi...
2.515625
stackv2
import re import xmlsec from lxml import etree def parse_tbk_error_message(raw_message): message_match = re.search(r"<!--(.+?)-->", raw_message) if message_match: message = message_match.group(1).strip() match = re.search(r"(.+?)\((\d+?)\)", message) if match: error = matc...
40
26.95
82
14
267
python
[{"finding_id": "codeql_py/bad-tag-filter_a7bf71ad7bfce9b5_593b066e", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match comments containing newlines.", "remediation": "", "location": {"file_pat...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression does not match comments containing newlines." ]
[ 8 ]
[ null ]
[ 33 ]
[ 45 ]
2024-11-18T19:27:26.582688+00:00
1,651,158,990,000
329cbcf5cb17267cd8fdf4413c4d8488ac553e80
3
{ "blob_id": "329cbcf5cb17267cd8fdf4413c4d8488ac553e80", "branch_name": "refs/heads/master", "committer_date": 1651158990000, "content_id": "1421e815557b5c7c596ac11ef6d498def19ec1e9", "detected_licenses": [ "MIT" ], "directory_id": "0daa8c16e5ed33632f68267b785e1625b87bf5b4", "extension": "py", "fi...
2.53125
stackv2
from ponyge.representation.grammar import Grammar import re import math import copy def compute_MCC(fname): # For each production rule mcc = 0 with open(fname, 'r') as f: productions = f.readlines() for production in productions: # production = f.readline() if production.rstrip...
170
29.83
89
19
1,451
python
[{"finding_id": "codeql_py/redos_6f3807935021c59a_dad5edbe", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '(' and containing many repetition...
1
true
[ "CWE-1333" ]
[ "py/redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with '(' and containing many repetitions of 'a'." ]
[ 47 ]
[ null ]
[ 45 ]
[ 48 ]
2024-11-18T19:27:29.475899+00:00
1,517,252,792,000
9f35b64ec0dcb2d50ed48db17215725580c2ebb5
3
{ "blob_id": "9f35b64ec0dcb2d50ed48db17215725580c2ebb5", "branch_name": "refs/heads/master", "committer_date": 1517252792000, "content_id": "3bcafc9891de20dac11b4f098cf12b6662a2f286", "detected_licenses": [ "MIT" ], "directory_id": "d970c6c64b5d06efd2571bfe6bc25acb6a22eeba", "extension": "py", "fi...
2.59375
stackv2
""" Takes images from Bing maps, stores them in an S3 bucket Based off Matt's script in github.com/ArnholdInstitute/ATLAS-data """ from multiprocessing import JoinableQueue import psycopg2 import os import math import geopy import geopy.distance import json import argparse import requests import boto3 from shapely....
201
34.93
79
22
1,731
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_e53695c1abb4cad8_a0b450d4", "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." ]
[ 123 ]
[ null ]
[ 34 ]
[ 39 ]
2024-11-18T19:27:36.860784+00:00
1,683,743,253,000
f0c06666098be0c37ad303ccca3351776142d402
3
{ "blob_id": "f0c06666098be0c37ad303ccca3351776142d402", "branch_name": "refs/heads/master", "committer_date": 1683743253000, "content_id": "3b2f6377f697acd8d740009f7497f68dd36a26ba", "detected_licenses": [ "MIT" ], "directory_id": "db5cc66ffe6ce1eb4ddb056f17878ad158463732", "extension": "py", "fi...
2.828125
stackv2
"""Helper funtions to get information about ACI encapsulations""" from os import system, name import time import ACI_Policies as GetPolicies import requests import warnings def clear() -> None: """Clears terminal""" if name == 'nt': _ = system('cls') else: _ = system('clear') def apic...
93
28.67
120
14
673
python
[{"finding_id": "codeql_py/request-without-cert-validation_4c2ad569da98c512_30de566b", "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)." ]
[ 36 ]
[ null ]
[ 13 ]
[ 59 ]
2024-11-18T19:27:39.297533+00:00
1,664,793,997,000
5c78f1b50038a07bda7d0ed61bbf443e55c1e0a2
2
{ "blob_id": "5c78f1b50038a07bda7d0ed61bbf443e55c1e0a2", "branch_name": "refs/heads/master", "committer_date": 1664793997000, "content_id": "ead70fde5b158627abbdc0f3f68571ce83559697", "detected_licenses": [ "MIT" ], "directory_id": "5e8343bbb6e269cdc7c06d4dbeb61256304ac115", "extension": "py", "fi...
2.46875
stackv2
import collections import functools import json import os import re import textwrap from collections import OrderedDict import simple_yaml as yaml from flask import abort as flask_abort from flask import Flask, jsonify, request from jinja2 import Template from markdown import markdown as origin_markdown from validr im...
245
27.21
78
19
1,556
python
[{"finding_id": "codeql_py/stack-trace-exposure_d3ff57ad28a67229_99b3cd26", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
2
true
[ "CWE-209", "CWE-079" ]
[ "py/stack-trace-exposure", "py/jinja2/autoescape-false" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 69, 22 ]
[ null, null ]
[ 24, 17 ]
[ 31, 35 ]
2024-11-18T19:27:49.919264+00:00
1,469,531,285,000
01ae2212e1801bb1cd7657452e0905344fde93bd
3
{ "blob_id": "01ae2212e1801bb1cd7657452e0905344fde93bd", "branch_name": "refs/heads/master", "committer_date": 1469531285000, "content_id": "b19da45a17045b7cbc671556ffc430b1c80a5a3a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "85550d94a02496dbe6720e53b2f40fb8cbc28a74", "extension": "py"...
2.609375
stackv2
# coding: utf-8 """ flask_weixin ~~~~~~~~~~~~ Weixin implementation in Flask. :copyright: (c) 2013 by Hsiaoming Yang. :license: BSD, see LICENSE for more detail. """ import time import hashlib try: from lxml import etree except ImportError: from xml.etree import cElementTree as etree exc...
334
28.39
75
16
2,172
python
[{"finding_id": "codeql_py/xxe_dc4f41a99babf976_9257ed21", "tool_name": "codeql", "rule_id": "py/xxe", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "XML parsing depends on a [user-provided value](1) without guarding against external entity expansion.", "remediation": "", "locat...
2
true
[ "CWE-611", "CWE-776" ]
[ "py/xxe", "py/xml-bomb" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "XML parsing depends on a [user-provided value](1) without guarding against external entity expansion.", "XML parsing depends on a [user-provided value](1) without guarding against uncontrolled entity expansion." ]
[ 89, 89 ]
[ null, null ]
[ 33, 33 ]
[ 40, 40 ]
2024-11-18T19:38:43.972031+00:00
1,561,163,955,000
040bceaab5115965a91af203d31ac3b62eeb5026
3
{ "blob_id": "040bceaab5115965a91af203d31ac3b62eeb5026", "branch_name": "refs/heads/master", "committer_date": 1561163955000, "content_id": "1e9517aaf26636a9cd129b7849590b3bf47e6d05", "detected_licenses": [ "MIT" ], "directory_id": "096005c562b90dfb509595915c0bd001f2b82cd7", "extension": "py", "fi...
3.1875
stackv2
import json import os from jinja2 import Template import yaml def _load_template(template_str): """ Loads jinja template object from string """ return Template(template_str) def _render_template(template, **params): """ Render a jinja template object """ return template.render(**params) def rende...
61
24.62
75
12
353
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_88a72110ea2ea50f_b29821f0", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 10 ]
[ null ]
[ 12 ]
[ 34 ]
2024-11-18T20:06:00.216446+00:00
1,532,029,427,000
8c75a7246c91a89ad7867b933b60d27eb8e4fecc
3
{ "blob_id": "8c75a7246c91a89ad7867b933b60d27eb8e4fecc", "branch_name": "refs/heads/master", "committer_date": 1532029427000, "content_id": "81e258a271668b510e1c87b8abbf4cfc2df6f951", "detected_licenses": [ "MIT" ], "directory_id": "9735cc981cb6f114402195959585583d2e23d3f1", "extension": "py", "fi...
2.921875
stackv2
import datetime from enum import Enum import attr from diana.utils.orthanc_id import orthanc_hash import hashlib def hash2int(h, digits): return int(h.hexdigest(), 16) % (10 ** digits) def hash_str(s, digits=2): return str( hash2int(hashlib.sha1(str(s).encode("UTF8")), digits) ) class SuffixStyle(Enum): ...
157
31.13
109
16
1,568
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_dd725dbcaac45426_0aa00a33", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (private)](1) is used in a hashing algorithm (SHA1) that is insec...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (private)](1) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](2) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (id)](4) is used in a hashing algorithm (SHA1) t...
[ 11 ]
[ null ]
[ 39 ]
[ 60 ]
2024-11-18T20:06:00.752805+00:00
1,612,123,580,000
3646392b6bcc8c6d461d56be1d51f57cb190b3f7
3
{ "blob_id": "3646392b6bcc8c6d461d56be1d51f57cb190b3f7", "branch_name": "refs/heads/master", "committer_date": 1612123580000, "content_id": "19194b3e0f2962132b5ec73564359c39feecf4c8", "detected_licenses": [ "MIT" ], "directory_id": "2c03fe3ecadcb5f290a8daf1809618185f157cee", "extension": "py", "fi...
2.5625
stackv2
from http.server import HTTPServer,BaseHTTPRequestHandler import signal import sys class Server(BaseHTTPRequestHandler) : def _set_response(self): self.send_response(200) self.send_header('Content-type', 'text/html') self.end_headers() def do_POST(self): content_length = int(self.headers['Co...
61
25.39
58
18
403
python
[{"finding_id": "codeql_py/path-injection_035a3548191f3974_fe2721e5", "tool_name": "codeql", "rule_id": "py/path-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This path depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown", ...
2
true
[ "CWE-022", "CWE-022" ]
[ "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 25, 34 ]
[ null, null ]
[ 17, 15 ]
[ 28, 26 ]
2024-11-18T20:06:13.569926+00:00
1,661,254,586,000
8ffb8f1b0330aed33ef9bc3456d013e0461846e7
2
{ "blob_id": "8ffb8f1b0330aed33ef9bc3456d013e0461846e7", "branch_name": "refs/heads/master", "committer_date": 1661254586000, "content_id": "0184580e8cbf75aa4e5e8a05a9ed88528aa2694a", "detected_licenses": [ "MIT" ], "directory_id": "a94cd16477c10fea0e6f0f744859a42460cc868c", "extension": "py", "fi...
2.390625
stackv2
import json from flask import Flask, jsonify, request, abort from Routing.Pathfinder import SmartPathfinder from Scheduling.Scheduler import FCFSScheduler app = Flask(__name__) # run the scheduler scheduler = FCFSScheduler() scheduler.start() # create a pathfinder pathfinder = SmartPathfinder() @app.route('/') def...
58
26.05
73
15
379
python
[{"finding_id": "codeql_py/flask-debug_b9bbffc5a05f55e7_b001fea0", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-117" ]
[ "py/flask-debug", "py/log-injection" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This log entry depends on a [user-provided value](1)." ]
[ 58, 47 ]
[ null, null ]
[ 5, 26 ]
[ 35, 42 ]
2024-11-18T20:18:23.963237+00:00
1,435,114,510,000
2d21dea80bae0cd7e6a12f11cc100683bc621581
3
{ "blob_id": "2d21dea80bae0cd7e6a12f11cc100683bc621581", "branch_name": "refs/heads/master", "committer_date": 1435114510000, "content_id": "76ea1aae1d7d4dab8fe556f60cce6394e7731d4e", "detected_licenses": [ "MIT" ], "directory_id": "ae5e5dd12a927484f2f26dd0bf29ba39e1a52515", "extension": "py", "fi...
2.65625
stackv2
# coding=utf-8 import re import hashlib from functools import partial import requests from baidumap import address2geo from utils import gen_attachment description = """ [大众点评]查找附近美食: "[城市名(默认北京市, 要带`市`)] xx有什么美食|xx附近美食 [带图] [私聊]",比如: * 酒仙桥附近美食 * 上海市 宜山路455号有什么美食(上海uber) """ API_URL = 'http://api.dianping.com/v1/{0...
145
35.26
96
14
1,469
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_77dd248afca1dd26_2ed3579f", "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." ]
[ 38 ]
[ null ]
[ 26 ]
[ 31 ]
2024-11-18T20:18:32.665741+00:00
1,544,435,409,000
d2b5cae11045d8cff85a1abd82d774461d5b7678
3
{ "blob_id": "d2b5cae11045d8cff85a1abd82d774461d5b7678", "branch_name": "refs/heads/master", "committer_date": 1544435409000, "content_id": "8e1f9210890759dc06cdf91b7b18007c88c01eee", "detected_licenses": [ "CC0-1.0" ], "directory_id": "39da9d79069d5650ce004e3a0cdadd12e00c5189", "extension": "py", ...
2.71875
stackv2
#Special thanks to www.kenny.nil for the art and kcc.com for the template # Explosion by https://freesound.org/people/tommccann/sounds/235968/ and https://freesound.org/people/EFlexTheSoundDesigner/sounds/388528/ # Laser by https://freesound.org/people/kafokafo/sounds/128349/ #This will work for all pygame projects imp...
281
27.47
138
16
2,367
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f4cedfc6f08fabaa_140b3842", "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." ]
[ 281 ]
[ null ]
[ 38 ]
[ 44 ]
2024-11-18T20:31:32.465637+00:00
1,691,176,312,000
56bd889513a9c4a2ff03e35baf5fd06336fa5519
3
{ "blob_id": "56bd889513a9c4a2ff03e35baf5fd06336fa5519", "branch_name": "refs/heads/master", "committer_date": 1691176312000, "content_id": "88de737f3aa3f7a979faa6844a6fe9e766dd87ee", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f3dd3d441e2aa52a645f0d8b4eb502bfbd15fa74", "extension": "py"...
2.671875
stackv2
import os import re import tarfile import zipfile from webdriver_manager.core.archive import Archive, LinuxZipFileWithPermissions from webdriver_manager.core.os_manager import OperationSystemManager class File(object): def __init__(self, stream, file_name): self.content = stream.content self.__st...
94
37.61
122
23
763
python
[{"finding_id": "codeql_py/tarslip_a09b7d64ce05d036_cb6b73f5", "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).\nThis file extraction depends on a [potentially un...
1
true
[ "CWE-022" ]
[ "py/tarslip" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This file extraction depends on a [potentially untrusted source](1).\nThis file extraction depends on a [potentially untrusted source](2)." ]
[ 92 ]
[ null ]
[ 9 ]
[ 12 ]
2024-11-18T20:31:33.687832+00:00
1,539,173,471,000
2e39fe843092f42a023a1f2330975a8f0b522b4e
3
{ "blob_id": "2e39fe843092f42a023a1f2330975a8f0b522b4e", "branch_name": "refs/heads/master", "committer_date": 1539173471000, "content_id": "bb43de26f80b38a04c4fc68e976241d3348772da", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f596991c223d9fd3e57736ceb076d1eae29b0c48", "extension": "py"...
2.8125
stackv2
""" This module is used to manage the connection using the CSO with NGINX. """ import base64 import json import hashlib import datetime from flask import Blueprint, redirect, request, session, abort from models import Application csoNginx = Blueprint('csoNginx', __name__) @csoNginx.route('/checkAuth', methods=['POST'...
100
31.24
131
17
721
python
[{"finding_id": "codeql_py/url-redirection_eb4e27b5856dc5d1_03887bc4", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
1
true
[ "CWE-601" ]
[ "py/url-redirection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 91 ]
[ null ]
[ 21 ]
[ 29 ]
2024-11-18T20:31:33.843906+00:00
1,626,115,926,000
5f717f9447527588363b84e1124d7cb0a94c2203
3
{ "blob_id": "5f717f9447527588363b84e1124d7cb0a94c2203", "branch_name": "refs/heads/main", "committer_date": 1626115926000, "content_id": "fef7f32c2da62ca704eeb1dd1a9175404adccf59", "detected_licenses": [ "MIT" ], "directory_id": "20108f1468f3230ebf33c3713dbc6581e7fadf68", "extension": "py", "file...
2.875
stackv2
import json import requests import xlsxwriter workbook = xlsxwriter.Workbook("data.xlsx") sheet = workbook.add_worksheet() sheet.write("A1", "Name") sheet.write("B1", "Physical Address") sheet.write("C1", "Telephone Number") sheet.write("D1", "Email") sheet.write("E1", "Position") response = requests.get("https://d...
42
33.14
83
11
358
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_e6000722b73a277f_a783076d", "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." ]
[ 30 ]
[ null ]
[ 11 ]
[ 36 ]
2024-11-18T20:43:21.598736+00:00
1,441,387,775,000
eb21c8e328853293cc0325ab77eba3c5a3170b26
2
{ "blob_id": "eb21c8e328853293cc0325ab77eba3c5a3170b26", "branch_name": "refs/heads/master", "committer_date": 1441387963000, "content_id": "b380d4b112661d9635b0a24c16c332fd04ca8f6e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "41ddb05de9de486f41de9ead0f90b6fc21664407", "extension": "py"...
2.359375
stackv2
"""General utilities.""" import urlparse import logging def ConstantTimeIsEqual(a, b): """Securely compare two strings without leaking timing information.""" if len(a) != len(b): return False acc = 0 for x, y in zip(a, b): acc |= ord(x) ^ ord(y) return acc == 0 # TODO(hjfreyer): Pull into some kin...
41
37.44
78
22
368
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_7d69da226b8e0f77_94f08fd0", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [lessigforpresident.com](1) may be at an arbitrary posi...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [lessigforpresident.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 30 ]
[ null ]
[ 13 ]
[ 54 ]
2024-11-18T20:43:27.169363+00:00
1,654,066,172,000
9cca9498a338bb3cd64b6ddce626016d915791b6
3
{ "blob_id": "9cca9498a338bb3cd64b6ddce626016d915791b6", "branch_name": "refs/heads/master", "committer_date": 1654066172000, "content_id": "48ae18a6ade1bfc64a05e8031adfe3c9e8031a40", "detected_licenses": [ "MIT" ], "directory_id": "4b8013544bd89210d60a140b82828fabc6399959", "extension": "py", "fi...
2.703125
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- # # The code example provided here is for reference only to illustrate # sample workflows and may not be appropriate for use in actual operating # environments. # Support will be provided by Tintri for the Tintri APIs, but theses # examples are for illustrative purposes on...
222
36.96
159
14
2,029
python
[{"finding_id": "codeql_py/request-without-cert-validation_48c378697b6cf346_b88c8b9c", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
4
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation becau...
[ 210, 153, 119, 81 ]
[ null, null, null, null ]
[ 5, 3, 3, 9 ]
[ 67, 63, 66, 84 ]
2024-11-18T20:43:27.852843+00:00
1,573,745,025,000
9ad0b0963a6870be47fb6002b3432f4315d63ea0
3
{ "blob_id": "9ad0b0963a6870be47fb6002b3432f4315d63ea0", "branch_name": "refs/heads/master", "committer_date": 1573745025000, "content_id": "a0b54bbe2523bc43ac8f336aa23ce09182702932", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "5d3f8f615ffbfa85588ceffc8b8f7a8b800f2ff8", "extension": "p...
2.6875
stackv2
print ("import caffe...") import caffe print ("import caffe done") import time def LoadLabel(filename): List = [] file = open(filename, 'r') while True : line = file.readline() line = line.rstrip('\r\n') if line=='': break else: List.append(line) file.close() return List def LoadMean(filename...
82
28.49
148
12
642
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_40cd19730ab26e00_3a6d4c14", "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." ]
[ 49, 80 ]
[ null, null ]
[ 9, 30 ]
[ 20, 55 ]
2024-11-18T20:43:40.741314+00:00
1,513,539,361,000
ac11dd9c1ec5ed8972d07414db7e484b608a6f49
3
{ "blob_id": "ac11dd9c1ec5ed8972d07414db7e484b608a6f49", "branch_name": "refs/heads/master", "committer_date": 1513539361000, "content_id": "bf54c37a1afc344bfe8e5602199f8b31df44de03", "detected_licenses": [ "MIT" ], "directory_id": "f0dbd873d1cf1052bc988d06d7d8fbbb26b42e08", "extension": "py", "fi...
2.734375
stackv2
#server # TCP Server Code from Crypto.Cipher import AES from Crypto.Cipher import DES from Crypto.Cipher import DES3 from Crypto.Cipher import Blowfish from Crypto.Cipher import ChaCha20 import hashlib from hashlib import blake2s import pickle import random import sys import Crypto from ecc import getcurvebyname from a...
149
23.01
116
14
1,061
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_f826ef47fc86e604_f0752cc8", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptograph...
1
true
[ "CWE-327" ]
[ "py/weak-cryptographic-algorithm" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used.\n[The cryptographic algorithm DES](2) is broken or weak, and should not be used.\n[The cryptographic algorithm DES3](3) is broken or weak, and should not be used.\n[The block mode ECB](4) is broken or weak, and should not be used.\n[The cryptograph...
[ 110 ]
[ null ]
[ 29 ]
[ 48 ]
2024-11-18T20:43:50.025118+00:00
1,578,078,250,000
930623e3b8b1fa520f42ddbdc02dc57de3d3a4d1
3
{ "blob_id": "930623e3b8b1fa520f42ddbdc02dc57de3d3a4d1", "branch_name": "refs/heads/master", "committer_date": 1578078250000, "content_id": "89fd8c6ae06abbf3436053688ed28208f6d7974b", "detected_licenses": [ "MIT" ], "directory_id": "4b3c79472718fb54a6832927205efb7548af80a5", "extension": "py", "fi...
2.640625
stackv2
"""Flask app to manage interactions with the blockchain network.""" from transaction import Transaction import json import binascii from flask import Flask, render_template, request, jsonify, redirect import Crypto app = Flask(__name__) @app.route('/') def index(): return render_template('index.html') @app.ro...
57
29.25
91
19
380
python
[{"finding_id": "codeql_py/weak-crypto-key_5b717d7acbd8a36f_3316d866", "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." ]
[ 42 ]
[ null ]
[ 16 ]
[ 69 ]
2024-11-18T20:43:50.934454+00:00
1,656,108,672,000
78ad8ff0956f705b8765060b716ed163ed02c27c
3
{ "blob_id": "78ad8ff0956f705b8765060b716ed163ed02c27c", "branch_name": "refs/heads/master", "committer_date": 1656108672000, "content_id": "a67638bd8c0efa9177d5db68d2516b6dbce9e59b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b456b4784bc5e6362c1985ee28a9dfe1908645b0", "extension": "py"...
3.15625
stackv2
""" ********************************************************************************** © 2019 Arizona Board of Regents on behalf of the University of Arizona with rights granted for USDOT OSADP distribution with the Apache 2.0 open source license. ***************************************************************...
111
47.64
151
15
1,186
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_0fb38f8c9e1ea02d_c048d31d", "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...
8
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (p...
[ 83, 84, 87, 92, 93, 94, 105, 106 ]
[ null, null, null, null, null, null, null, null ]
[ 64, 9, 11, 70, 9, 9, 72, 9 ]
[ 99, 43, 28, 108, 46, 35, 111, 47 ]
2024-11-18T20:44:17.127628+00:00
1,619,554,240,000
384f2234ac226a1f39a61ca4edec3d208e163407
3
{ "blob_id": "384f2234ac226a1f39a61ca4edec3d208e163407", "branch_name": "refs/heads/master", "committer_date": 1619554240000, "content_id": "3e848fde2ee28e85df566a703650c0fe2549e86b", "detected_licenses": [ "MIT" ], "directory_id": "8e0abca772890da81304b1d3ebffd527bfff43e0", "extension": "py", "fi...
2.640625
stackv2
from threading import Thread import time import datetime import json import requests import csv # Create keys.py in same directory and include API keys from keys import METRA_USER, METRA_PASS, WEATHER_KEY import logging as log # Setup logging log.basicConfig(filename='data/data_collection.log', filem...
168
38.02
100
28
1,498
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_424b8fe39594a34f_020f480e", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.\nThis expression logs [sensitive data (priva...
[ 121, 143 ]
[ null, null ]
[ 17, 17 ]
[ 40, 43 ]
2024-11-18T20:57:33.415151+00:00
1,555,260,515,000
ec1ad42b635035e9b557c99dbffd42eb67f3c218
3
{ "blob_id": "ec1ad42b635035e9b557c99dbffd42eb67f3c218", "branch_name": "refs/heads/master", "committer_date": 1555260515000, "content_id": "27faf65f47fde9ad0fa387625084938c6a2016c8", "detected_licenses": [ "MIT" ], "directory_id": "9ed3dd85e93f1a868795169ddd61cc7daefa5b39", "extension": "py", "fi...
2.65625
stackv2
from flask import Flask from flask import request import requests from flask import Response from server import create_app, db from server.model.college import CollegeModel from flask import json import numpy as np """ benchmark on 2 things 1) server response time 2) server load """ api_key = "RTfzWBrrZbwSHNhtqHVFRZ...
47
26.13
133
17
342
python
[{"finding_id": "codeql_py/reflective-xss_b51f491d4f98b7e2_db93f5ad", "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-918" ]
[ "py/reflective-xss", "py/partial-ssrf" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 33, 24 ]
[ null, null ]
[ 29, 9 ]
[ 35, 26 ]
2024-11-18T20:58:12.531014+00:00
1,658,096,889,000
1a475966ba90fb6328445ee10ca4fe9b548cf034
2
{ "blob_id": "1a475966ba90fb6328445ee10ca4fe9b548cf034", "branch_name": "refs/heads/master", "committer_date": 1658096889000, "content_id": "c4569e33f8e0e793bc13f71c71e795932c39ff0e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e90d5f8f5dfadd4451ef7801fd28da96393bb3a0", "extension": "py"...
2.390625
stackv2
#! /usr/bin/python # -*- coding: utf-8 -*- """YOLOv4 for MS-COCO. # Reference: - [tensorflow-yolov4-tflite]( https://github.com/hunglc007/tensorflow-yolov4-tflite) """ import tensorflow as tf import numpy as np import tensorlayer as tl from tensorlayer.activation import mish from tensorlayer.layers import Conv2d...
244
39.73
116
17
3,359
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_25303ab5f4dbdbf2_6e747981", "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." ]
[ 237 ]
[ null ]
[ 71 ]
[ 94 ]
2024-11-18T21:10:32.863702+00:00
1,634,374,628,000
ed346e5c571c287cd58cce71f2d0281879bfef79
3
{ "blob_id": "ed346e5c571c287cd58cce71f2d0281879bfef79", "branch_name": "refs/heads/main", "committer_date": 1634374628000, "content_id": "e0bc8eb9a5400d831bf125290fdf53195a1131bc", "detected_licenses": [ "MIT" ], "directory_id": "663cb99ddb124f6445c8e8697ca0f98e1d9b9d48", "extension": "py", "file...
3.234375
stackv2
import random, os r = random def Occur(type, len): temp = len // type if not temp: return 1 return temp def PassGen(Len, Ultra=True): # الحروف المستعملة - Used characters CharBank = ['abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '*!@#$%^&|+?', '123456789'] Password = '' #...
50
27.36
103
20
419
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_49d6a38a2bb58af9_9546665b", "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." ]
[ 50 ]
[ null ]
[ 7 ]
[ 11 ]
2024-11-18T21:10:58.117612+00:00
1,444,418,289,000
76a57d72af50b5ed3cbaf91ae0ceda9898f4cfde
3
{ "blob_id": "76a57d72af50b5ed3cbaf91ae0ceda9898f4cfde", "branch_name": "refs/heads/master", "committer_date": 1444418289000, "content_id": "eeece7d72d3451a7937fa07999eb12125a29c224", "detected_licenses": [ "MIT" ], "directory_id": "81e65d59136dfbf78f192b02c5241dbeee07c10a", "extension": "py", "fi...
3.15625
stackv2
#!/usr/bin/env python from __future__ import print_function import argparse from random import choice, shuffle from string import ( ascii_letters, ascii_lowercase, ascii_uppercase, digits, punctuation ) LEGNTH = 10 MIN_LOWERCASE = 2 MIN_UPPERCASE = 2 MIN_DIGITS = 2 MIN_SPECIAL = 1 def mkpasswd(...
75
29.35
70
10
460
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b186bc6a829baf76_662ad236", "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." ]
[ 71 ]
[ 72 ]
[ 11 ]
[ 49 ]
2024-11-18T21:11:03.458634+00:00
1,600,208,766,000
3d38739238091efb3b6ad713eed7cec59b0a1554
2
{ "blob_id": "3d38739238091efb3b6ad713eed7cec59b0a1554", "branch_name": "refs/heads/master", "committer_date": 1600208766000, "content_id": "f70cc5a1bcdac716b4c8be3c121f38829038f099", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0f58bcae13be4d9f5d1be2cbd6fc3d19a6529745", "extension": "py"...
2.4375
stackv2
# # 2020 ExpertSystem # '''Script for generating predictions for the coinform250 dataset using the acred predictor See https://github.com/co-inform/Datasets See also scripts/fetch-data.sh, which should download the input json file and place it in the `data/evaluation/` folder. ''' import argparse import time import ...
143
30.61
98
16
1,131
python
[{"finding_id": "codeql_py/request-without-cert-validation_3bfd6a6299d9c740_fafbd5ba", "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)." ]
[ 55 ]
[ 57 ]
[ 12 ]
[ 51 ]
2024-11-18T19:03:21.429777+00:00
1,506,181,918,000
9f2d0b9e316d50b9991fe9ae45256547c69cbb27
2
{ "blob_id": "9f2d0b9e316d50b9991fe9ae45256547c69cbb27", "branch_name": "refs/heads/master", "committer_date": 1506181918000, "content_id": "c9aa45504e3b2986a0d918ad31e26db6d1bddffa", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e1e16d689210bb11fae46b1c1a3a91244edab18c", "extension": "py"...
2.3125
stackv2
from __future__ import print_function from future.standard_library import install_aliases install_aliases() from urllib.parse import urlparse, urlencode #from urllib.request import urlopen, Request from urllib.error import HTTPError import urllib.request import json import os import datetime from flask import Flask f...
86
25.22
93
11
565
python
[{"finding_id": "codeql_py/reflective-xss_d79c98c200b3ad18_b82d6a9b", "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-918" ]
[ "py/reflective-xss", "py/partial-ssrf" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 33, 46 ]
[ null, null ]
[ 23, 15 ]
[ 26, 48 ]
2024-11-18T19:03:28.687890+00:00
1,522,292,554,000
bb153d4eb9e895ca002bd1e8dd99e7c9ec867563
3
{ "blob_id": "bb153d4eb9e895ca002bd1e8dd99e7c9ec867563", "branch_name": "refs/heads/master", "committer_date": 1522292554000, "content_id": "9cc493914db0f58d061cd7f89f5ab14ff33cc285", "detected_licenses": [ "MIT" ], "directory_id": "43c554e10d57059a5b4d0defaf76a2d7ae3c72e9", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib import requests from sign import Sign class Request: timeout = 10 version = 'SDK_PYTHON_1.1' def __init__(self, secretId, secretKey): self.secretId = secretId self.secretKey = secretKey def generateUrl(self, requestHost, requestU...
56
31.96
101
15
455
python
[{"finding_id": "codeql_py/request-without-cert-validation_216316d6b8e4c7b0_1436805e", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 34, 38 ]
[ null, null ]
[ 19, 19 ]
[ 90, 102 ]
2024-11-18T19:03:31.210634+00:00
1,549,638,588,000
2a5951d4d64473aba067036776bd9e8a1c09af98
3
{ "blob_id": "2a5951d4d64473aba067036776bd9e8a1c09af98", "branch_name": "refs/heads/master", "committer_date": 1549638588000, "content_id": "6a802ee31135ec1a99d1534f746c936e24330642", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "a2b7e4d364c66e8f2fb54a9ee4d247099310251f", "extension": "p...
2.5625
stackv2
import os import pandas as pd import pymongo import redis import socket import tempfile import cPickle import subprocess import shutil import vislab def zero_results(collection, query): return collection.find(query).limit(1).count() == 0 def exclude_ids_in_collection(image_ids, collection): """ Exclude ...
202
26.52
95
17
1,330
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_4599d30ce0f657ff_d307ac4a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [ICSI.Berkeley.EDU](1) may be at an arbitrary position ...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [ICSI.Berkeley.EDU](1) may be at an arbitrary position in the sanitized URL." ]
[ 53 ]
[ null ]
[ 12 ]
[ 62 ]
2024-11-18T19:28:36.222394+00:00
1,574,213,604,000
d867fb467cd5376b7fb1a01e918a731f4e0435df
3
{ "blob_id": "d867fb467cd5376b7fb1a01e918a731f4e0435df", "branch_name": "refs/heads/master", "committer_date": 1574213604000, "content_id": "87fd15aac0b05b9c2de3767136fb7c247fb3797a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "affd00484342e6a6486adcb5a12cdb7e98816f8d", "extension": "py"...
2.578125
stackv2
#!/usr/bin/env python2 import io from io import open import fcntl import string import time import datetime import logging import json import os import socket import sys import lib.iw_motor import lib.iw_acc import lib.iw_hot import lib.iw_rgb import lib.iw_sal # Change per well well_num = 9 sleep_between_trials = 5...
381
29.22
154
21
2,924
python
[{"finding_id": "codeql_py/request-without-cert-validation_c968db4121de2972_bdad49a2", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
1
true
[ "CWE-295" ]
[ "py/request-without-cert-validation" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1)." ]
[ 37 ]
[ null ]
[ 11 ]
[ 155 ]
2024-11-18T19:28:38.436235+00:00
1,629,712,876,000
f6fedc08348e0b678d61dc76834b27a812cb6111
2
{ "blob_id": "f6fedc08348e0b678d61dc76834b27a812cb6111", "branch_name": "refs/heads/master", "committer_date": 1629712876000, "content_id": "63a0d25ab61380d409d57eb4780548d0a0712dd7", "detected_licenses": [ "Python-2.0", "MIT" ], "directory_id": "968e8269d4c33717d708df38ecd18bf5d49c61e7", "exten...
2.34375
stackv2
# -*- coding: utf-8 -*- from flask import flash, request, url_for from flask_login import current_user from functools import wraps from sqlalchemy import exc from flask import jsonify from app.exceptions import UserError from app.model_api_log import HSApiLog from flask import current_app from app import db def respo...
111
30.1
97
21
776
python
[{"finding_id": "codeql_py/stack-trace-exposure_ffabb28e57a11380_73a3478b", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
3
true
[ "CWE-209", "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "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." ]
[ 50, 54, 58 ]
[ null, null, null ]
[ 34, 34, 34 ]
[ 81, 76, 78 ]
2024-11-18T19:28:48.286293+00:00
1,686,794,745,000
231e7d5c7ffe24d261569df007170edf99de10dd
3
{ "blob_id": "231e7d5c7ffe24d261569df007170edf99de10dd", "branch_name": "refs/heads/master", "committer_date": 1686794745000, "content_id": "fce7ea009dbbfd7df01fc5e799bcef329e41c30d", "detected_licenses": [ "MIT" ], "directory_id": "11fb0bbdc98da7c0879290cc0665b451ab0facbc", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/python3 """ Search for Unicode Descriptions uni binary from: https://github.com/arp242/uni """ import sys import re import subprocess import json import csv if len(sys.argv) >= 2: query = sys.argv[1] try: out: str = subprocess.check_output( ["./uni", "-q", "search", query, "-...
76
22.37
93
15
482
python
[{"finding_id": "codeql_py/redos_92f1e8136521d08a_0053bd4e", "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 '0'.", "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 '0'." ]
[ 28 ]
[ null ]
[ 26 ]
[ 38 ]
2024-11-18T19:28:55.606904+00:00
1,535,259,147,000
14b39c5aa0d7b720fb39e52bf3468e934173115c
3
{ "blob_id": "14b39c5aa0d7b720fb39e52bf3468e934173115c", "branch_name": "refs/heads/master", "committer_date": 1535259147000, "content_id": "35c983627754ff911d2b73b6e541ffc4b991e941", "detected_licenses": [ "MIT" ], "directory_id": "ddf8483da3e847398d0c7bcdbfa4baafd4765bce", "extension": "py", "fi...
2.625
stackv2
from flask import Flask, jsonify, request, Blueprint, send_from_directory import Database.queries as queries import Database.parsing as parsing from config import config import Database.Connection app = Blueprint("CrudApp", __name__, static_folder="../static") dbconn = Database.Connection.DatabaseConnection(config.da...
297
31.28
105
17
1,980
python
[{"finding_id": "codeql_py/stack-trace-exposure_8f9e9d1ae04ac59b_39eef76f", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.\n[S...
1
true
[ "CWE-209" ]
[ "py/stack-trace-exposure" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.\n[Stack trace information](2) flows to this location and may be exposed to an external user.\n[Stack trace information](3) flows to this location and may be exposed to an external user.\n[Stack trace information](4) flows t...
[ 70 ]
[ null ]
[ 20 ]
[ 28 ]
2024-11-18T19:28:58.218600+00:00
1,394,295,773,000
29ac27cf785cf7a0ae9f0352022eeb4ce014877d
2
{ "blob_id": "29ac27cf785cf7a0ae9f0352022eeb4ce014877d", "branch_name": "refs/heads/master", "committer_date": 1394295773000, "content_id": "2e9a8cb3fed889742f20c637ba181d844840d53d", "detected_licenses": [ "MIT" ], "directory_id": "3afcb7ad543948ce44dea59660f6fea04e5189d2", "extension": "py", "fi...
2.5
stackv2
# -*- coding: utf-8 -*- """ hyper/tls ~~~~~~~~~ Contains the TLS/SSL logic for use in hyper. """ import ssl import os.path as path # Right now we support draft 9. SUPPORTED_PROTOCOLS = ['http/1.1', 'HTTP-draft-09/2.0'] # We have a singleton SSLContext object. There's no reason to be creating one # per connection. ...
67
22.03
79
10
365
python
[{"finding_id": "codeql_py/insecure-protocol_d363eac04385b715_1ec44001", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/insecure-protocol", "py/insecure-protocol" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl.SSLContext](1).", "Insecure SSL/TLS protocol version TLSv1 allowed by [call to ssl.SSLContext](1).\nInsecure SSL/TLS protocol version TLSv1_1 allowed by [call to ssl....
[ 37, 39 ]
[ null, null ]
[ 16, 12 ]
[ 24, 20 ]
2024-11-18T19:28:58.610836+00:00
1,536,338,868,000
a239b0fd19438b51f591d9cf6c0faa38ba46b69e
3
{ "blob_id": "a239b0fd19438b51f591d9cf6c0faa38ba46b69e", "branch_name": "refs/heads/master", "committer_date": 1536338868000, "content_id": "4edd90963d634e1afa047f704ac5d9824e41004a", "detected_licenses": [ "MIT" ], "directory_id": "0eb8704e39a1c04c27dc15a4791273b1d6e34af0", "extension": "py", "fi...
2.734375
stackv2
import logging import os import pkgutil import re import sys from pathlib import Path import attr import jinja2 @attr.s class Template(object): """Jinja-driven template for documentation. Args: filename (str): Path to Jinja template. Attributes: filename (str): Path to Jinja template. ...
131
31.86
118
16
970
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_ce8f81c63b1f7d45_4930c51d", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
2
true
[ "CWE-079", "CWE-079" ]
[ "py/jinja2/autoescape-false", "py/jinja2/autoescape-false" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 41, 63 ]
[ null, 65 ]
[ 20, 20 ]
[ 100, 63 ]
2024-11-18T19:39:55.943862+00:00
1,690,364,049,000
67d8e687366e0275636046ab781365eeca49e73e
3
{ "blob_id": "67d8e687366e0275636046ab781365eeca49e73e", "branch_name": "refs/heads/master", "committer_date": 1690364049000, "content_id": "48fc158310c21be74be0484c4f3aa33b1043916a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "fa3f6d4e9169fb95f828013d179d03accdff381b", "extension": "py"...
2.953125
stackv2
#!/usr/bin/env python """An LL(1) lexer. This lexer is very tolerant of errors and can resync.""" import logging import re from typing import Text from grr_response_core.lib import utils from grr_response_core.lib.util import precondition from grr_response_core.lib.util import text class Token(object): """A toke...
480
28.47
80
19
3,380
python
[{"finding_id": "codeql_py/overly-large-range_8eef24f16a9eb1a9_6e271078", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with \\w in the same character class.", "remediation": "", "loc...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that overlaps with \\w in the same character class." ]
[ 334 ]
[ null ]
[ 33 ]
[ 36 ]
2024-11-18T19:39:57.951775+00:00
1,566,361,004,000
6fde1d32faebda62b44545a84653e8d39658a60f
2
{ "blob_id": "6fde1d32faebda62b44545a84653e8d39658a60f", "branch_name": "refs/heads/master", "committer_date": 1566361004000, "content_id": "795741f60e2bd257b13060349288c5251cf83a8a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "14bc683e13436e89aa0708908b47259ee3820c0f", "extension": "py"...
2.390625
stackv2
import logging import flask_restplus import synonyms.models.synonym as synonym __all__ = ['api'] api = flask_restplus.Namespace('Synonyms', description='Work with synonyms used in Solr') @api.route('/<col>/<term>', methods=['GET']) class _Synonyms(flask_restplus.Resource): @staticmethod def get(col, te...
35
25.83
94
18
209
python
[{"finding_id": "codeql_py/log-injection_792731ab2c15dead_f642dbc2", "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)." ]
[ 20 ]
[ null ]
[ 23 ]
[ 67 ]
2024-11-18T20:18:19.278714+00:00
1,435,275,128,000
5310a73dcad8c1518e67c80ebff51974a8cec870
3
{ "blob_id": "5310a73dcad8c1518e67c80ebff51974a8cec870", "branch_name": "refs/heads/master", "committer_date": 1435275128000, "content_id": "a087e266ee25a612f37920dcdc5d328c4f49ffcf", "detected_licenses": [ "MIT" ], "directory_id": "f367f43d35beb48b2601d26d1e09731d3e8122e5", "extension": "py", "fi...
2.78125
stackv2
from flask import Flask, request import json import urllib2 app = Flask(__name__) ##Base URL for Giphy. Embeds rating, limit, and the beta API key. giphyurl = "http://api.giphy.com/v1/gifs/search?api_key=dc6zaTOxFJmzC&limit=5&rating=g&q=" ##Slack variables to edit. Token from slash command and hook url from inco...
63
32.7
101
17
577
python
[{"finding_id": "codeql_py/partial-ssrf_774179b94634f72c_26d42439", "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)." ]
[ 35 ]
[ null ]
[ 14 ]
[ 38 ]
2024-11-18T20:18:19.330274+00:00
1,556,015,787,000
f9347a15443d0c989288c9d98701c8d0f95f22b9
3
{ "blob_id": "f9347a15443d0c989288c9d98701c8d0f95f22b9", "branch_name": "refs/heads/master", "committer_date": 1556015787000, "content_id": "3daf5922376df0b991487ef0e64aeab26f130761", "detected_licenses": [ "Apache-2.0" ], "directory_id": "aafb74eb25ffbae242b2f8947bc3804bb04f7707", "extension": "py"...
2.765625
stackv2
#!/usr/bin/env python import requests from urllib3.exceptions import InsecureRequestWarning import os """ Retrieve a list of all the devices in NetBox. This will require authentication. As in the previous task, create your headers manually and pass them into your request""" # Set the token based on the NETBOX_TOKEN e...
33
33
78
13
265
python
[{"finding_id": "codeql_py/request-without-cert-validation_0cc1bba15969a63e_2255c13c", "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)." ]
[ 20 ]
[ null ]
[ 8 ]
[ 66 ]
2024-11-18T20:18:37.335199+00:00
1,612,272,271,000
addd90cff1b18e9477c94de8b0e9e20f82ef815b
3
{ "blob_id": "addd90cff1b18e9477c94de8b0e9e20f82ef815b", "branch_name": "refs/heads/master", "committer_date": 1612272271000, "content_id": "bab07044841c4e7d43dfb2787483e754996a07fe", "detected_licenses": [ "Apache-2.0" ], "directory_id": "25a7064cd2ffead71cd77bc4db3a3fe1e227d7c9", "extension": "py"...
2.796875
stackv2
import json from crdt import CRDT from collections import Counter """ operation | item in external set | item not in external set ----------------+----------------------+-------------------------- ('a', 'd', 'd') | delete item | delete item (no op) ('d', 'a', 'd') | delete item | delete item (n...
87
30.01
79
19
649
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_73dad27fff90e62e_70ccc002", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [cloudant.com](1) may be at an arbitrary position in th...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [cloudant.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 79 ]
[ null ]
[ 12 ]
[ 38 ]
2024-11-18T20:18:45.805838+00:00
1,518,811,082,000
50eda0c291098b34d013066aaccb8588de6e5810
3
{ "blob_id": "50eda0c291098b34d013066aaccb8588de6e5810", "branch_name": "refs/heads/master", "committer_date": 1518811895000, "content_id": "ac91e9bf01205b61cdbc8df3767a02887e373167", "detected_licenses": [ "Apache-2.0" ], "directory_id": "44e2d237db1bea6752f7e45c8c41bac93e1fe53d", "extension": "py"...
2.578125
stackv2
from param import ParamTree from jinja2 import Environment, FileSystemLoader import os import logging class RenderError(Exception): pass def get_system_params(prefix="J2RENDER_"): system = {} env = os.environ for variable, value in os.environ.items(): if variable.startswith(prefix): ...
75
26.93
98
17
403
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_cb2719d8d034a8a7_ba37b361", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 46 ]
[ null ]
[ 17 ]
[ 69 ]
2024-11-18T20:18:47.628255+00:00
1,633,878,448,000
b17c09853376a0139ad914baf46370b23e7ef8f8
2
{ "blob_id": "b17c09853376a0139ad914baf46370b23e7ef8f8", "branch_name": "refs/heads/master", "committer_date": 1633878448000, "content_id": "a623f5f580f583533fde03080f308cca2e0e2d41", "detected_licenses": [ "MIT" ], "directory_id": "b947d7de8f7f01469fbf3a4996905f97fa940eab", "extension": "py", "fi...
2.4375
stackv2
from flask import Flask, render_template, request, flash, redirect, jsonify, send_from_directory, url_for import base64 from predictions import predict_malaria, predict_pneumonia from werkzeug.utils import secure_filename import os import uuid app = Flask(__name__) UPLOAD_FOLDER = './uploads' app.config['UPLOAD_FOLDER...
94
35.3
105
19
633
python
[{"finding_id": "codeql_py/flask-debug_fd81f5ce1f38d603_f2e2ce29", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
5
true
[ "CWE-215", "CWE-601", "CWE-601", "CWE-601", "CWE-601" ]
[ "py/flask-debug", "py/url-redirection", "py/url-redirection", "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided ...
[ 94, 35, 41, 67, 73 ]
[ null, null, null, null, null ]
[ 5, 29, 29, 29, 29 ]
[ 24, 40, 40, 40, 40 ]
2024-11-18T20:18:53.022236+00:00
1,487,722,784,000
6ec34b4ca24dc63cde584efba003b3ce3e915203
3
{ "blob_id": "6ec34b4ca24dc63cde584efba003b3ce3e915203", "branch_name": "refs/heads/master", "committer_date": 1487722784000, "content_id": "8e73e8e406ff0d5f6df33549bfd8a615af72b301", "detected_licenses": [ "MIT" ], "directory_id": "47a321db3d04d4eeabbd0953db26a78316190cca", "extension": "py", "fi...
2.515625
stackv2
import json import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) googleAPIHost = "https://www.googleapis.com" key = "AIzaSyC7QHmUMZPSOa_ggF3x86VdwXWEjOq-eAM" queryString = "hello world" requestURL = googleAPIHost + "...
20
30.1
93
10
165
python
[{"finding_id": "codeql_py/request-without-cert-validation_cdd006fd90b0a994_062e71e2", "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 ]
[ 12 ]
[ 50 ]
2024-11-18T20:18:55.528690+00:00
1,609,010,542,000
98808c5a22fbaec41aa26982d4348a45ded76b36
3
{ "blob_id": "98808c5a22fbaec41aa26982d4348a45ded76b36", "branch_name": "refs/heads/main", "committer_date": 1609010542000, "content_id": "bd71c1e37e5c8abed8fb942d438cdfc1233b8569", "detected_licenses": [ "MIT" ], "directory_id": "f4ddb351f003abdb4172beec2278ecd1e921a94b", "extension": "py", "file...
2.578125
stackv2
from flask import Blueprint, request, jsonify from .classes.connection import ConnectionWrapper from .utils.read_table import readtable api_routes = Blueprint('api',__name__) connections = [] def get_connection_by_id(id): conns = [conn for conn in connections if conn.id == id] if len(conns) > 0: retu...
75
26.8
91
15
472
python
[{"finding_id": "codeql_py/reflective-xss_89f91391d7edf0f7_fa6caf0c", "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)." ]
[ 63 ]
[ 65 ]
[ 16 ]
[ 10 ]
2024-11-18T20:29:38.786607+00:00
1,579,659,137,000
aa78e592aaba433471f22e87f78283e6dc35aa55
2
{ "blob_id": "aa78e592aaba433471f22e87f78283e6dc35aa55", "branch_name": "refs/heads/master", "committer_date": 1579659935000, "content_id": "4a4ae1df368fb6af9f3264b951f9783f33faddf9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e523ef8b8713ad1861651fa338f9c3c34c27ee92", "extension": "py"...
2.4375
stackv2
import sys from cptv import CPTVReader filename = sys.argv[1] with open(filename, "rb") as f: reader = CPTVReader(f) print("version:", reader.version) print("device name:", reader.device_name) print("device id:", reader.device_id) print("time:", reader.timestamp) print("dims:", reader.x_resol...
23
31.57
149
14
191
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_3d93396a695bf0b1_5468c430", "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." ]
[ 14, 14 ]
[ null, null ]
[ 24, 41 ]
[ 39, 57 ]
2024-11-18T20:29:40.064158+00:00
1,599,280,970,000
afbb1a9fc99115fc7762554a319cd3332723771f
4
{ "blob_id": "afbb1a9fc99115fc7762554a319cd3332723771f", "branch_name": "refs/heads/master", "committer_date": 1599280970000, "content_id": "a7cd9a38f2c292995e86ca9c3244f16f1437d8d0", "detected_licenses": [ "MIT" ], "directory_id": "269be690e4385dcc97539320c7a435b94a505eac", "extension": "py", "fi...
3.609375
stackv2
# python的hashlib提供了常见的摘要算法, 如MD5, SHA1等等 # 摘要算法称为哈希算法, 散列算法, 它通过一个函数, 把任意长的数据 # 转化成一个长度固定的数据串(通常用16进制的字符串表示) # 摘要函数是一个单项函数, 计算f(data)很容易, 但通过digest反推data却非常困难 import hashlib md5 = hashlib.md5() md5.update() print(md5.hexdigest()) print(md5) print(md5.__sizeof__()) md51 = hashlib.md5() md51.update() print(md51.hexdig...
83
21.7
78
15
764
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_fef23b059fb60104_cd935488", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (id)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (password)](2) 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)](3) is used in a hashing algorithm (MD5)...
[ 63 ]
[ null ]
[ 24 ]
[ 41 ]
2024-11-18T20:29:50.085728+00:00
1,493,601,763,000
789e8d0b5d83ef59fac251ce3ea19c8e4794bb50
3
{ "blob_id": "789e8d0b5d83ef59fac251ce3ea19c8e4794bb50", "branch_name": "refs/heads/master", "committer_date": 1493601763000, "content_id": "224390557f44866b13186defdc343fa1a461761f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "42f1f8cef60ef24894be18cfff0eb5bb31549174", "extension": "py"...
3.421875
stackv2
class Employee: def __init__(self, name, base_salary, phone_number): self.name = name self.base_salary = base_salary self.phone_number = phone_number @property def name(self): return self.__name @property def base_salary(self): return self.__base_salary ...
97
26.25
107
13
705
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_254e143ed6c3f3ee_05c18523", "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.\nThis expression logs [sensitive data (private)](4) as clear text." ]
[ 85 ]
[ null ]
[ 15 ]
[ 24 ]
2024-11-18T20:29:57.714139+00:00
1,289,598,109,000
1366ca7a23df310d58454c9a0d1a4d8f24aa5146
2
{ "blob_id": "1366ca7a23df310d58454c9a0d1a4d8f24aa5146", "branch_name": "refs/heads/master", "committer_date": 1289598109000, "content_id": "219db6f7baa4b4e523f5ff19b0f2458efafba1cb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0908947bd2d75051479689ad817c5dda67cd7793", "extension": "py"...
2.3125
stackv2
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
191
37.55
80
16
1,665
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dad43a1644c3f587_0d420e0e", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text." ]
[ 65 ]
[ null ]
[ 49 ]
[ 57 ]
2024-11-18T20:51:18.828785+00:00
1,650,368,125,000
f45418c9d28889cf1b176d9528ab31e30914c145
2
{ "blob_id": "f45418c9d28889cf1b176d9528ab31e30914c145", "branch_name": "refs/heads/master", "committer_date": 1650368125000, "content_id": "a1b2c817ca4c13faa288b67ef8833e6872721316", "detected_licenses": [], "directory_id": "c0514bfdd9a62c8974107f93b1f01dbd6a8ed18a", "extension": "py", "filename": "aut...
2.390625
stackv2
import json import logging from datetime import datetime, timedelta import dateutil.parser import pytz import requests from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth import logout as auth_logout from django.contrib.auth.models import User from django.shortcuts im...
276
37.99
120
18
2,141
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2a8e153b0d47c07d_f6faec6e", "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." ]
[ 242 ]
[ null ]
[ 22 ]
[ 117 ]
2024-11-18T20:51:20.870298+00:00
1,537,878,837,000
ce4b7356d4f50983f68ec3dfd017ec622ba46042
2
{ "blob_id": "ce4b7356d4f50983f68ec3dfd017ec622ba46042", "branch_name": "refs/heads/master", "committer_date": 1537878837000, "content_id": "c044b18b88b20576cf4ba2680aefa19e9a33b700", "detected_licenses": [ "MIT" ], "directory_id": "1128969ca03c1e8112a6f8eb4f9fdc89508143de", "extension": "py", "fi...
2.5
stackv2
from time import time from django.http import HttpResponse from django.shortcuts import render from django.views import View from SKR.google_speech import get_text # Create your views here. class TextView(View): def get(self, request): return render(request, "text.html") def post(self, request): ...
26
25.77
53
14
146
python
[{"finding_id": "codeql_py/path-injection_ba324ebdd8d0f927_e9bd185a", "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)." ]
[ 22 ]
[ null ]
[ 19 ]
[ 23 ]
2024-11-18T20:51:24.863454+00:00
1,546,809,900,000
b8e3fa6ad075ac61373231c9b6999a5988d4e33e
3
{ "blob_id": "b8e3fa6ad075ac61373231c9b6999a5988d4e33e", "branch_name": "refs/heads/master", "committer_date": 1546809900000, "content_id": "327b519b74a86a2847083561783479c3b8e935b6", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "2947ea45618a449e1d229250d8eb0af53d991a46", "extension": "p...
2.953125
stackv2
import argparse import os import sys import shutil import markdown2 from markdown2 import Markdown from pathlib import Path from shutil import copytree, ignore_patterns import re def debug(str): print("[DEBUG]", str) def md_sort(list_input_file): markfiles = [] for file in list_input_file: exten...
127
32.17
113
16
916
python
[{"finding_id": "codeql_py/overly-large-range_f4ba3af82305f6cf_4b187464", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\]." ]
[ 89 ]
[ null ]
[ 40 ]
[ 43 ]
2024-11-18T20:51:27.388023+00:00
1,449,519,642,000
abb56bd6fda8df332b17108fe6ad3fdc6160974e
3
{ "blob_id": "abb56bd6fda8df332b17108fe6ad3fdc6160974e", "branch_name": "refs/heads/master", "committer_date": 1449519642000, "content_id": "b770e92618e982fcb019b355d5fe1499f2e6a594", "detected_licenses": [ "MIT" ], "directory_id": "4a3942ab759761d30d114eec8aa11115e50281fc", "extension": "py", "fi...
2.53125
stackv2
""" Application factory """ import logging.config import os from mc.models import db from celery import Celery import jinja2 from flask import Flask, current_app from flask.ext.restful import Api from mc.views import GithubListener def create_app(name="mission-control"): """ Create the application :para...
114
27.66
79
17
745
python
[{"finding_id": "codeql_py/flask-debug_c1550980654df096_286be260", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-079" ]
[ "py/flask-debug", "py/jinja2/autoescape-false" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 114, 91 ]
[ null, null ]
[ 5, 12 ]
[ 44, 45 ]
2024-11-18T20:51:44.408848+00:00
1,683,650,508,000
3b3a60154f9651793a3f694aea2a4dba6cad4d07
3
{ "blob_id": "3b3a60154f9651793a3f694aea2a4dba6cad4d07", "branch_name": "refs/heads/master", "committer_date": 1683650508000, "content_id": "a23da97f9b9261128ca1afb287db78820e94d444", "detected_licenses": [ "MIT" ], "directory_id": "eb21b79c503b07fd54e100d22f489eb5f7693367", "extension": "py", "fi...
3
stackv2
# FILENAME: wlan_manager.py import network, time, json class WLAN_Manager(): def __init__(self): self.file = 'wlan_manager.json' self.wlan = None def setup(self, ssid=None, password=None, append=False): self.mode(network.AP_IF) self.stop() self.mode(network.STA_IF) self.stop() i...
128
25.49
77
17
861
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_447c1e536ec482b9_0e812ebf", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.\nT...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text." ]
[ 71, 76 ]
[ null, null ]
[ 35, 17 ]
[ 46, 28 ]
2024-11-18T20:51:45.298884+00:00
1,540,184,349,000
14e713d741d9b865778955707f3cf20d5d2dff9f
3
{ "blob_id": "14e713d741d9b865778955707f3cf20d5d2dff9f", "branch_name": "refs/heads/master", "committer_date": 1540184349000, "content_id": "6db6a30d5404bf3a801a5c473f5946bb4252fd98", "detected_licenses": [ "MIT" ], "directory_id": "ab0dfb3ac0ffb2aaba2f658bf487d76a421d01c7", "extension": "py", "fi...
3.078125
stackv2
#This script replaces a string in a specific file and copies the data to a temp file. #arg1:Location of source script #arg2:Location of temp script #arg3:String to replace with #arg4:String to be replaced import sys import os import glob import os from shutil import copyfile arg1=sys.argv[1] arg2=sys.argv[2] arg3=sys.a...
28
21.96
85
9
195
python
[{"finding_id": "codeql_py/overly-permissive-file_14d5fcda161e0462_2359f7c7", "tool_name": "codeql", "rule_id": "py/overly-permissive-file", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Overly permissive mask in chmod sets file to world readable.", "remediation": "", "location": ...
1
true
[ "CWE-732" ]
[ "py/overly-permissive-file" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Overly permissive mask in chmod sets file to world readable." ]
[ 25 ]
[ null ]
[ null ]
[ 20 ]
2024-11-18T19:07:00.298272+00:00
1,571,619,614,000
cf4431034a38e2a835279debe48011216cb2a94a
2
{ "blob_id": "cf4431034a38e2a835279debe48011216cb2a94a", "branch_name": "refs/heads/master", "committer_date": 1571619614000, "content_id": "b9cc4227d08c134005ce3c4731f020308900e569", "detected_licenses": [ "Apache-2.0" ], "directory_id": "2efa86c671ff87be1efa5492761296abb70de0ff", "extension": "py"...
2.328125
stackv2
# Celery Dependencies from __future__ import absolute_import, unicode_literals from celery import task # App Core Models from .models import DataSet, SiteManifest, DataReport # JSON Difference Detector from jsondiff import diff # Backend Email Dependencies from django.core.mail import EmailMultiAlternatives from django...
146
36.43
87
24
1,093
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ec65ef68c4e40f4c_b337948b", "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." ]
[ 54 ]
[ null ]
[ 22 ]
[ 86 ]
2024-11-18T19:07:05.577610+00:00
1,599,853,494,000
55ab39c90bb59df3de73f705271f69866b414b03
4
{ "blob_id": "55ab39c90bb59df3de73f705271f69866b414b03", "branch_name": "refs/heads/master", "committer_date": 1599853494000, "content_id": "50a7bdb1117ce87ac31db282b2fceda771aa3a96", "detected_licenses": [ "MIT" ], "directory_id": "1dd71a32748b66572d258f278da81e7b944415f4", "extension": "py", "fi...
3.640625
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Aug 27 10:30:25 2020 @author: Phoenix """ import random import sys WELCOME = "\nWelcome to Password Generator\n" START = "Enter \"OK\" to generate your unique password.\nEnter \"QUIT\" to exit the program.\n" CONTINUE = ["ok", "okay", "yes", "yep", ...
149
25.95
102
15
1,156
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_979c3c312a35a060_5492cc74", "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." ]
[ 58 ]
[ null ]
[ 11 ]
[ 19 ]
2024-11-18T19:07:05.783769+00:00
1,559,370,082,000
ee829966635a0cc515fc308f0485167ae26d285b
3
{ "blob_id": "ee829966635a0cc515fc308f0485167ae26d285b", "branch_name": "refs/heads/master", "committer_date": 1559370082000, "content_id": "90fa62ff733bed285df5de1e2d26a3d6b5b9d613", "detected_licenses": [ "Apache-2.0" ], "directory_id": "7b3f41424c9cfa0e34470065d2e4185b0cfa8530", "extension": "py"...
2.96875
stackv2
import re import os import sys import json import requests import traceback import url_normalize sys.path.append("utils") sys.path.append("extraction") from page import Page from urlutility import URLUtility # Disable insecure warning import requests from requests.packages.urllib3.exceptions import InsecureRequestWar...
81
31.35
145
22
593
python
[{"finding_id": "codeql_py/request-without-cert-validation_152d7490186cfacd_f65d72e6", "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)." ]
[ 52 ]
[ null ]
[ 23 ]
[ 87 ]