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-18T19:07:22.425023+00:00
1,510,323,362,000
256179a2703394499154522568e7233705a091d5
3
{ "blob_id": "256179a2703394499154522568e7233705a091d5", "branch_name": "refs/heads/master", "committer_date": 1510323362000, "content_id": "9dabf9a5a21e51d26f6a6ffcc1008bf8e3a62be1", "detected_licenses": [ "MIT" ], "directory_id": "02e4673b031f0196c9b91523e5868e531aec0829", "extension": "py", "fi...
2.65625
stackv2
import os from urllib.request import urlretrieve import sys import tarfile # import matplotlib.pyplot as plt import numpy as np from scipy import ndimage import tensorflow as tf import pdb FLAGS = tf.flags.FLAGS train_tfrecords_name = "train_data.tfrecords" valid_tfrecords_name = "valid_data.tfrecords" test_tfrecord...
247
37.11
117
19
2,217
python
[{"finding_id": "codeql_py/tarslip_d051ba3c08555632_08cda2bc", "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)." ]
[ 68 ]
[ null ]
[ 5 ]
[ 8 ]
2024-11-18T19:07:34.600652+00:00
1,634,217,370,000
f18682675aa8a7c5d73324f3ade08edf16eef58c
3
{ "blob_id": "f18682675aa8a7c5d73324f3ade08edf16eef58c", "branch_name": "refs/heads/master", "committer_date": 1634217370000, "content_id": "4ce3d38d6c4d9684ca8289f9266795873af52cb4", "detected_licenses": [ "MIT" ], "directory_id": "e8f3ec89630aa5a5b5a4eeedacfac3e55f105264", "extension": "py", "fi...
2.625
stackv2
## The script can be run with Python 3.5 or higher version. ## The script requires 'requests' library to make the API calls. The library can be installed using the command: pip install requests. import api_requests import argparse import requests def get_usage(): return ("\nThe command should be run from the par...
107
43.45
159
18
1,020
python
[{"finding_id": "codeql_py/request-without-cert-validation_ec0a8fdba24910a1_d83f86bd", "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)." ]
[ 66 ]
[ null ]
[ 27 ]
[ 108 ]
2024-11-18T19:07:36.770390+00:00
1,559,575,534,000
bae2512d78e650560f9f117ee3b72e87ebf1a675
2
{ "blob_id": "bae2512d78e650560f9f117ee3b72e87ebf1a675", "branch_name": "refs/heads/master", "committer_date": 1559575534000, "content_id": "dfb7ccd77fd6ad52c110268f23f5a9501edf81ac", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d4bf327aa47834f81a5a9631fc23ea9599719fa5", "extension": "py"...
2.34375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' py_sep_sdk - Symantec Endpoint Protection Manager API Client Library Copyright (C) 2019 Paul Greenberg @greenpau See LICENSE for licensing details ''' from __future__ import (absolute_import, division, print_function) import logging import json import requests import...
250
37.59
152
25
2,089
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_0cee6c454f24a251_7960871c", "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." ]
[ 216 ]
[ null ]
[ 34 ]
[ 67 ]
2024-11-18T19:07:45.344939+00:00
1,606,817,926,000
bb89e620c5e522a33dd829bac6ee1db628e710a7
3
{ "blob_id": "bb89e620c5e522a33dd829bac6ee1db628e710a7", "branch_name": "refs/heads/main", "committer_date": 1606817926000, "content_id": "c03cffbd2d149059c2407689c1ab1ed1b1d75a42", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d9fbdbdf21a6a7d39ff45189b5fbe913d0b03d4c", "extension": "py", ...
3.1875
stackv2
# -*- coding: utf-8 -*- import hmac import random import hashlib from struct import Struct _pack_int = Struct('>I').pack izip = zip from binascii import b2a_hex as _b2a_hex def b2a_hex(s): return _b2a_hex(s).decode('us-ascii') def binxor(a, b): return bytes([x ^ y for (x, y) in zip(a, b)]) def pbkdf2_h...
89
28.34
164
15
861
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_63790a67afb3a18c_22f1bcca", "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.", ...
3
true
[ "CWE-312", "CWE-312", "CWE-327" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "[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." ]
[ 84, 89, 75 ]
[ null, null, null ]
[ 11, 11, 28 ]
[ 32, 17, 60 ]
2024-11-18T19:07:55.331912+00:00
1,429,888,984,000
dbe481014350df5c42fab44bbbda1340f8a439c5
3
{ "blob_id": "dbe481014350df5c42fab44bbbda1340f8a439c5", "branch_name": "refs/heads/master", "committer_date": 1429888984000, "content_id": "6f02dd3a73acfbde6675e0097eb0dbd7f5187fd2", "detected_licenses": [ "Apache-2.0" ], "directory_id": "619523ac29f21e0f2e271947808674b3effa6f69", "extension": "py"...
2.78125
stackv2
""" A script to generate the schemas for the GA4GH protocol. We download the Avro definitions of the GA4GH protocol and use it to generate the C struct definitions in _protocol.h and the Jannson deserialisation code into _protocol.c """ from __future__ import division from __future__ import print_function from __future...
344
37.03
83
22
2,868
python
[{"finding_id": "codeql_py/tarslip_b7f732582ce260cb_8c56f73f", "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)." ]
[ 271 ]
[ null ]
[ 13 ]
[ 20 ]
2024-11-18T19:07:55.439942+00:00
1,584,502,881,000
5b0b48bdbafa7463e49006da617d731ddfe88ccb
3
{ "blob_id": "5b0b48bdbafa7463e49006da617d731ddfe88ccb", "branch_name": "refs/heads/master", "committer_date": 1584502881000, "content_id": "a5b78fea8819d9cac9f88463edb6c2a0697b7668", "detected_licenses": [ "MIT" ], "directory_id": "4e401474a06ccd7f675c4da47d5bc35116a0fed7", "extension": "py", "fi...
3.40625
stackv2
import socket import ssl def parsed_url(url): """ 解析 url 返回 (protocol host port path) 有的时候有的函数, 它本身就美不起来, 你要做的就是老老实实写 """ # 检查协议 # '://' 定位 然后取第一个 / 的位置来切片 protocol = 'http' if url[:7] == 'http://': u = url.split('://')[1] elif url[:8] == 'https://': protocol = 'htt...
194
21.12
113
13
1,387
python
[{"finding_id": "codeql_py/insecure-default-protocol_3de6241d7d38e853_98b1c932", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 78 ]
[ null ]
[ 13 ]
[ 45 ]
2024-11-18T19:08:00.758372+00:00
1,618,968,186,000
bf6848a50328625ec4bd38d041a044aef3b72028
3
{ "blob_id": "bf6848a50328625ec4bd38d041a044aef3b72028", "branch_name": "refs/heads/main", "committer_date": 1618968186000, "content_id": "1f03ec70f3ed6e93ee1bf962ecc62ff7d708ff0b", "detected_licenses": [ "MIT" ], "directory_id": "60a9c4395715253a62539a7b5773c4bfc4d37771", "extension": "py", "file...
2.546875
stackv2
import io import requests from urllib import parse import json # flask from flask import Flask, send_file, request # redirect, Response app = Flask(__name__) API_KEY = "4_MY_EYES_ONLY" map_types = ["satellite", "roadmap", "terrain", "hybrid"] def get_satellite_image(url, lat, lng, key, zoom=15, map_type=0, size="...
51
27.9
116
16
413
python
[{"finding_id": "codeql_py/path-injection_fe995fc0e3a976e6_4da0f747", "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-918" ]
[ "py/path-injection", "py/partial-ssrf" ]
[ "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "This path depends on a [user-provided value](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 51, 18 ]
[ null, null ]
[ 22, 9 ]
[ 38, 27 ]
2024-11-18T19:18:40.833194+00:00
1,612,373,074,000
319d8012284b4ef59af50b6bcab9e01e31573d52
4
{ "blob_id": "319d8012284b4ef59af50b6bcab9e01e31573d52", "branch_name": "refs/heads/master", "committer_date": 1612373074000, "content_id": "78613818c3805ed55cb0cc9d17a14f3f32c7bcfd", "detected_licenses": [ "MIT" ], "directory_id": "b313b54460d27467315f3be9e325aca2b129325d", "extension": "py", "fi...
3.71875
stackv2
# Altere o Programa 7.2, o jogo da forca # Dessa vez, utilize as funções de tempo para cronometrar a duração das partidas import time import sys import random FILE_SCOREBOARD = 'placar.txt' FILE_WORDS_LIST = 'palavras.txt' wordsList = [] scoreboardDict = {} def load_words(): try: file = open(FILE_WORDS...
132
22.56
123
14
803
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8b6c1aa14370dea1_dafd5f78", "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." ]
[ 84 ]
[ null ]
[ 11 ]
[ 19 ]
2024-11-18T19:18:48.752296+00:00
1,566,784,524,000
09c4da1400bf3a46ccce14b3c769b71937a50503
3
{ "blob_id": "09c4da1400bf3a46ccce14b3c769b71937a50503", "branch_name": "refs/heads/master", "committer_date": 1566784524000, "content_id": "8dee03510c0ac2b9c5008f158836e0b55eedc40e", "detected_licenses": [ "MIT" ], "directory_id": "5fc4d2a7ec69678b0292b7630de1ff85fd473c62", "extension": "py", "fi...
2.90625
stackv2
import requests from lxml import html import os import sys sys.path.append("..") header = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"} def adafruitScrape(link): link = link.strip() response = requests.get(link,headers=head...
44
36.89
141
14
461
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_faf888a012dc2417_7333fc56", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [https://www.amazon.com/](1) may be at an arbitrary pos...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [https://www.amazon.com/](1) may be at an arbitrary position in the sanitized URL.", "The string [https://www.adafruit.com/](1) may be at an arbitrary position in the sanitized URL." ]
[ 35, 37 ]
[ null, null ]
[ 12, 14 ]
[ 55, 59 ]
2024-11-18T19:18:57.313711+00:00
1,518,189,170,000
192c49e26d88f03efc3e883716e32b4e99afe957
3
{ "blob_id": "192c49e26d88f03efc3e883716e32b4e99afe957", "branch_name": "refs/heads/master", "committer_date": 1518189170000, "content_id": "f546c28db8a8e447c32e4a145a99fc0e080e2eb7", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "04335bab642039a95f58b174b9f843667ae5fbd3", "extension": "p...
2.5625
stackv2
import os import errno import numpy as np from PIL import Image import torch import torch.utils.data as data from .utils import download_url, check_integrity class HPatchesSeq(data.Dataset): """`HPatches: A benchmark and evaluation of handcrafted and learned local descriptors <https://hpatches.github.io/>`_ Da...
159
35.94
130
19
1,341
python
[{"finding_id": "codeql_py/tarslip_07c3c4b5dd1e1ffd_a741bef1", "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)." ]
[ 110 ]
[ null ]
[ 25 ]
[ 26 ]
2024-11-18T19:18:59.633487+00:00
1,435,580,900,000
1f3cfde9c6517323a74e05cff64676422943007f
3
{ "blob_id": "1f3cfde9c6517323a74e05cff64676422943007f", "branch_name": "refs/heads/master", "committer_date": 1435580900000, "content_id": "162be58a31460c280cbaeed4eff5de20b048c6ab", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "48894ae68f0234e263d325470178d67ab313c73e", "extension": "p...
2.671875
stackv2
# -*- coding: utf-8 -*- ##---------------------------------------------------------------------- ## PM Security scheme ##---------------------------------------------------------------------- ## Copyright (C) 2007-2009 The NOC Project ## See LICENSE for details ##--------------------------------------------------------...
20
35
72
12
228
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_61e5a40fbe7f46c0_2b27faf2", "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." ]
[ 20 ]
[ null ]
[ 17 ]
[ 18 ]
2024-11-18T19:19:07.717010+00:00
1,575,320,207,000
ad1d98c10d09ed7ba304d1596923703cf9069752
3
{ "blob_id": "ad1d98c10d09ed7ba304d1596923703cf9069752", "branch_name": "refs/heads/master", "committer_date": 1575320207000, "content_id": "038870b2ece825254e6afe67ea7606f51dd8462f", "detected_licenses": [ "Apache-2.0" ], "directory_id": "958f1094ff92241a09cb7597f61940d4f0248284", "extension": "py"...
3.03125
stackv2
""" Created by Saba khan: July 16 2019 """ import datetime import logging import requests import time logging.basicConfig(format='%(asctime)s %(levelname)s %(name)s: %(message)s', level=logging.DEBUG) logger = logging.getLogger(__file__) class Profiles: def __init__(self): self.url = "" def price_p...
203
39.76
144
27
1,924
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5328845ee0969428_42772084", "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." ]
[ 61 ]
[ null ]
[ 26 ]
[ 34 ]
2024-11-18T19:44:13.322814+00:00
1,501,788,482,000
b9c4023d7232488213c0794716ec40c9f2449236
2
{ "blob_id": "b9c4023d7232488213c0794716ec40c9f2449236", "branch_name": "refs/heads/master", "committer_date": 1501788482000, "content_id": "899cf240dd0d15f49876863a7c03fa75c51b31f4", "detected_licenses": [ "MIT" ], "directory_id": "8e423d9d197b7c1e30ef85b38b7a033a34b88fce", "extension": "py", "fi...
2.40625
stackv2
from django.conf import settings from django.shortcuts import render, redirect, get_object_or_404 from django.views import View from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponse, Http404 from .models import Post, Like, Comment from authorization.models import CustomUser from...
282
28.9
116
18
1,774
python
[{"finding_id": "codeql_py/url-redirection_9158987b308583ee_25ea1168", "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)." ]
[ 243 ]
[ null ]
[ 29 ]
[ 53 ]
2024-11-18T19:44:16.109079+00:00
1,367,953,487,000
99ebfbc700136e45c2fd8336c8d577c6479395f2
2
{ "blob_id": "99ebfbc700136e45c2fd8336c8d577c6479395f2", "branch_name": "refs/heads/master", "committer_date": 1368025082000, "content_id": "e98be3c0182e9a1224ec2396c3c155e27c6fa862", "detected_licenses": [ "MIT" ], "directory_id": "193a3e8cdb1f17f986525ad0450efbf54316df86", "extension": "py", "fi...
2.390625
stackv2
# vim: set fileencoding=utf-8 : from __future__ import absolute_import, division import os from pkg_resources import resource_filename from jinja2 import ( Environment, FileSystemLoader, StrictUndefined, UndefinedError, ) from ConfigParser import ( SafeConfigParser, ) import subprocess import tempf...
396
34.31
79
23
2,804
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_579a968537220755_e09ed7cb", "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." ]
[ 156 ]
[ 157 ]
[ 15 ]
[ 53 ]
2024-11-18T19:44:42.795661+00:00
1,610,637,214,000
1847a8c76aacc5597851d1e42b0e44ff95dd61ed
4
{ "blob_id": "1847a8c76aacc5597851d1e42b0e44ff95dd61ed", "branch_name": "refs/heads/main", "committer_date": 1610637214000, "content_id": "b6b6d44a6940dd7550c2b89ebf20e9e870511434", "detected_licenses": [ "Apache-2.0" ], "directory_id": "d9057702407fb52a34cfe7ed78b6bb40063b4fc2", "extension": "py", ...
4.03125
stackv2
import random print(''' Password Generator ──────────────────''') chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*().,?0123456789' number = input('Number of passwords? ') number = int(number) length = input('Password length? ') length = int(length) print('\nHere are your passwords: ') for pwd...
22
20.18
85
10
110
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f72991d748436ba4_b6d0be8f", "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." ]
[ 21 ]
[ null ]
[ 9 ]
[ 17 ]
2024-11-18T19:57:59.143913+00:00
1,455,109,567,000
c5c04624de0c431c6d415402299e69a0b4f41b94
3
{ "blob_id": "c5c04624de0c431c6d415402299e69a0b4f41b94", "branch_name": "refs/heads/master", "committer_date": 1455109567000, "content_id": "1d5e2830eaf484e4c9af5ee100750aacddac051f", "detected_licenses": [ "CC0-1.0" ], "directory_id": "6ea9bd4611a5e72c6413524ca631461ce1a68575", "extension": "py", ...
3.078125
stackv2
#!/usr/bin/env python3 from flask import Flask, render_template, url_for, request, redirect, abort import sqlite3, random, string, time, hashlib, base64 app = Flask(__name__) @app.route('/', methods=['GET', 'POST']) @app.route('/<shortLink>', methods=['GET', 'POST']) def short(shortLink=""): if request.method == "GET...
73
37.97
147
21
757
python
[{"finding_id": "codeql_py/reflective-xss_6eef481d505172fe_62a57568", "tool_name": "codeql", "rule_id": "py/reflective-xss", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Cross-site scripting vulnerability due to a [user-provided value](1).", "remediation": "", "location": {"fi...
1
true
[ "CWE-079" ]
[ "py/reflective-xss" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Cross-site scripting vulnerability due to a [user-provided value](1)." ]
[ 27 ]
[ null ]
[ 10 ]
[ 39 ]
2024-11-18T19:57:59.202507+00:00
1,588,267,420,000
387d447670e258891f41228d760232259e6a8d77
3
{ "blob_id": "387d447670e258891f41228d760232259e6a8d77", "branch_name": "refs/heads/master", "committer_date": 1588267420000, "content_id": "8557f41cc36c859f2c7addae876ae77e8f1b8a4e", "detected_licenses": [ "MIT" ], "directory_id": "803636293abe4b548ff26d4b0a68eabf2fa08bec", "extension": "py", "fi...
3.28125
stackv2
import json import sys import hashlib user_details = {} hasher = hashlib.sha256() with open('user_credentials.json', 'r') as f: user_details = json.load(f) while True: print("Welcome to the new and sophisticated login system!") choice = input("What would you like to do? \n [1]LOGIN \n [2]REGISTER \n")...
51
33.12
97
15
371
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_da6eb6d593c8ea1b_c09b8e5c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
2
true
[ "CWE-327", "CWE-327" ]
[ "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computational...
[ 23, 39 ]
[ null, null ]
[ 44, 13 ]
[ 58, 34 ]
2024-11-18T19:58:07.036728+00:00
1,582,409,604,000
b09378db649fc1ffc1e06e09c2fe8e70a64d1c63
3
{ "blob_id": "b09378db649fc1ffc1e06e09c2fe8e70a64d1c63", "branch_name": "refs/heads/master", "committer_date": 1582409604000, "content_id": "860d8b14c9785eba4e632a64730c66a3cb61e77e", "detected_licenses": [ "MIT" ], "directory_id": "88c889ab178389d310ebe78bb10a1179c7463c2c", "extension": "py", "fi...
3.140625
stackv2
""" Python script to generate a command parser given a configuration file. The generation will be template based, this way it won't depend on the language. """ import argparse import logging import os import subprocess import yaml import jinja2 import common_utils def check_me(): """ Function to format this...
150
30.53
84
19
910
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_33c790e37b50e61e_9430c070", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 44 ]
[ null ]
[ 29 ]
[ 71 ]
2024-11-18T19:58:23.813646+00:00
1,402,276,163,000
2b5ed58ccbf545a09d44fd1db6e5f4e6172dc65f
2
{ "blob_id": "2b5ed58ccbf545a09d44fd1db6e5f4e6172dc65f", "branch_name": "refs/heads/master", "committer_date": 1402276163000, "content_id": "1cd7831b430e8dea94cbe28c6cf991afcff9aa75", "detected_licenses": [ "MIT" ], "directory_id": "6bc0c08822c26163563f7f78c647971ebf253e2f", "extension": "py", "fi...
2.46875
stackv2
import http.server from collections import OrderedDict from urllib.parse import parse_qs from http.cookies import SimpleCookie class RequestHandler(http.server.BaseHTTPRequestHandler): get = OrderedDict() post = OrderedDict() put = OrderedDict() delete = OrderedDict() @staticmethod def ful...
147
39.03
153
18
1,160
python
[{"finding_id": "codeql_py/path-injection_e83bd87e65a808f8_294f2a9e", "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)." ]
[ 77 ]
[ null ]
[ 27 ]
[ 36 ]
2024-11-18T20:10:13.772104+00:00
1,684,909,633,000
81f949756237ca414f22278d902728d17d414a7f
3
{ "blob_id": "81f949756237ca414f22278d902728d17d414a7f", "branch_name": "refs/heads/master", "committer_date": 1684909633000, "content_id": "50c4527b3792850a7e42090742501d871183e93a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "316c473d020f514ae81b7485b10f6556cf914fc0", "extension": "py"...
2.859375
stackv2
import json from selenium import webdriver from selenium.webdriver import DesiredCapabilities from cookiespool.config import * from cookiespool.db import RedisClient from login.weibo.cookies import WeiboCookies class CookiesGenerator(object): def __init__(self, website='default'): """ 父类, 初始化一些对象 ...
122
29.54
178
19
846
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f63e881ff2225969_a8b1d348", "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." ]
[ 69 ]
[ null ]
[ 60 ]
[ 68 ]
2024-11-18T20:10:37.786286+00:00
1,692,976,388,000
f11911a93da97dc51a5996d8a1daea669ef0ceaa
2
{ "blob_id": "f11911a93da97dc51a5996d8a1daea669ef0ceaa", "branch_name": "refs/heads/master", "committer_date": 1692976388000, "content_id": "85fbc210d2cfb4c3d291b2d25d9f19b3ee20ce8a", "detected_licenses": [ "MIT" ], "directory_id": "7f0acb6ce41afb89ae526d3a699ad9570438215b", "extension": "py", "fi...
2.3125
stackv2
#!/usr/bin/env python3 from xml.dom import minidom import urllib3 import urllib.parse import requests # configure package (disable warning for self-signed certificate) urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # some consts WEBDAV_URL_HOST = 'http://localhost:8080' WEBDAV_URL_PATH = '/remot...
49
33.51
94
14
457
python
[{"finding_id": "codeql_py/request-without-cert-validation_c7adbbe1b8a209e0_49dc724f", "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)." ]
[ 27 ]
[ 28 ]
[ 5 ]
[ 52 ]
2024-11-18T20:23:21.460255+00:00
1,632,884,834,000
570436b4099ccd87596a582cdcc29dab086cd857
2
{ "blob_id": "570436b4099ccd87596a582cdcc29dab086cd857", "branch_name": "refs/heads/master", "committer_date": 1632884834000, "content_id": "4fe638ac2585b91178ec45f4b182d94476048c74", "detected_licenses": [ "MIT" ], "directory_id": "49849a84b0424ba9fb3d5218a43fb3867c489ddf", "extension": "py", "fi...
2.34375
stackv2
""" Copyright 2018 Autonomous Vision Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, dist...
169
32.72
129
17
1,540
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_edff608644c8f33f_8afd172c", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 71 ]
[ null ]
[ 32 ]
[ 56 ]
2024-11-18T20:23:21.995941+00:00
1,637,556,789,000
027d6fcfdcb0f974e2d4797a837b1e7cf8f9a5f4
3
{ "blob_id": "027d6fcfdcb0f974e2d4797a837b1e7cf8f9a5f4", "branch_name": "refs/heads/main", "committer_date": 1637556789000, "content_id": "8752500cf8e37ed4432c80f60d6406fcc85f081e", "detected_licenses": [ "MIT" ], "directory_id": "ed844534141b90cbd32f8248289dcc887addac4a", "extension": "py", "file...
2.96875
stackv2
# Download dataset JESC from website and extract it import requests import os from tqdm import tqdm import tarfile import paths def download_file(url, filepath): """ Download JESC dataset :param url: URL of file to download :type url: str :param filepath: Location to download file to :type...
64
29.22
69
14
423
python
[{"finding_id": "codeql_py/tarslip_7597434c684150d8_dd9cc106", "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)." ]
[ 60 ]
[ null ]
[ 5 ]
[ 13 ]
2024-11-18T20:49:15.091384+00:00
1,521,544,521,000
b8ef44dc2f3f103a97a0798c2c9ee153ffa47be7
3
{ "blob_id": "b8ef44dc2f3f103a97a0798c2c9ee153ffa47be7", "branch_name": "refs/heads/master", "committer_date": 1521544521000, "content_id": "51ae2f43f32dd2685a8c7f1702f62762989d54e8", "detected_licenses": [ "MIT" ], "directory_id": "811dee382e5c13e222557de7c7c75084fc5e0939", "extension": "py", "fi...
2.515625
stackv2
import cgi import io import glob import os import json from bottle import route, run, template, post, request from requests import get from nltk.corpus import stopwords from nltk.tokenize import word_tokenize from nltk.corpus import wordnet stop_words = [] files = [] fcontent = {} fildoclist = [] filwords =[] pptoken...
114
25.11
69
17
736
python
[{"finding_id": "codeql_py/reflective-xss_ee74221c75c4f0c6_92d9056c", "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)." ]
[ 37, 44 ]
[ null, null ]
[ 12, 12 ]
[ 15, 15 ]
2024-11-18T20:49:21.269816+00:00
1,610,475,046,000
dda32d54f8ced9af3a84d0469d9b1c7e46fe62b2
3
{ "blob_id": "dda32d54f8ced9af3a84d0469d9b1c7e46fe62b2", "branch_name": "refs/heads/main", "committer_date": 1610475046000, "content_id": "d9f06885c3894a6756e8e1cbd835328ede7da76e", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3a064e9e0673f0c72ca6e9b70381e26405a13d47", "extension": "py", ...
2.578125
stackv2
import speech_recognition as sr import pyttsx3 import os import pickle import time filename = 'Personalinfo' outfile = open(filename, 'wb') os.system('cls') listener = sr.Recognizer() engine = pyttsx3.init() voices = engine.getProperty('voices') engine.setProperty('voice', voices[0].id) def talk(text): engine.say...
90
32.42
178
13
771
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_6a0e117956a11b20_380927b2", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [gmail.com](1) may be at an arbitrary position in the s...
7
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitizatio...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The string [gmail.com](1) may be at an arbitrary position in the sanitized URL.", "The string [outlook.com](1) may be at an arbitrary position in the sanitized URL.", "The string [hotmail.com](1) may be at an arbitrary position in the sanitized URL.", "The string [yahoo.com](1) may be at an arbitrary positio...
[ 79, 79, 79, 79, 79, 79, 79 ]
[ null, null, null, null, null, null, null ]
[ 8, 32, 58, 84, 108, 130, 156 ]
[ 28, 54, 80, 104, 126, 152, 178 ]
2024-11-18T20:49:52.935081+00:00
1,636,755,968,000
7852cf0aa6d555adc95280057297024c223fec88
3
{ "blob_id": "7852cf0aa6d555adc95280057297024c223fec88", "branch_name": "refs/heads/main", "committer_date": 1636755968000, "content_id": "e11a07479dfd46b3f891281a9876c143b443cb50", "detected_licenses": [ "MIT" ], "directory_id": "976996da153762359857abca1cda142d3557b9a7", "extension": "py", "file...
2.578125
stackv2
import paramiko def get_ssh_client(target): client = paramiko.SSHClient() client.load_system_host_keys() client.set_missing_host_key_policy(paramiko.WarningPolicy) if 'password' in target: client.connect(hostname=target['host'], username=target['user_name'], ...
27
31.11
62
13
167
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_d326e1e2db164194_68996973", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to WarningPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to WarningPolicy may be unsafe." ]
[ 7 ]
[ null ]
[ 5 ]
[ 63 ]
2024-11-18T20:49:55.658091+00:00
1,600,811,507,000
61daba277d790ba60d9823e0ca02085887f12d86
3
{ "blob_id": "61daba277d790ba60d9823e0ca02085887f12d86", "branch_name": "refs/heads/master", "committer_date": 1600811507000, "content_id": "4e6ee779df0b6834b0215faa11d5c6529fc6c633", "detected_licenses": [ "Apache-2.0", "MIT-0" ], "directory_id": "40b1cecdf3bc74baa77749019667e129c094f967", "ext...
2.921875
stackv2
import os import json import iso8601 from hashlib import sha256 import requests from requests.compat import urlencode PYBOSSA_API_KEY = os.environ.get("PYBOSSA_API_KEY") SCISTARTER_API_KEY = os.environ.get("SCISTARTER_API_KEY") def retrieve_email(user_id): """ Input: A user_id mapping to some User Profile...
111
32.15
125
13
873
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9d8dbbc379f74708_3a4b6fe8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-327" ]
[ "py/clear-text-logging-sensitive-data", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 111, 91 ]
[ null, null ]
[ 11, 21 ]
[ 79, 41 ]
2024-11-18T20:50:06.386428+00:00
1,612,728,755,000
7f5b4f784b744985dee59082f77ac03d20afa177
3
{ "blob_id": "7f5b4f784b744985dee59082f77ac03d20afa177", "branch_name": "refs/heads/main", "committer_date": 1612728755000, "content_id": "707d038e47ceda0363aa673c128db239f00fd50b", "detected_licenses": [ "MIT" ], "directory_id": "a0b219af8b60e57922090ccbb5f56a6248d9991f", "extension": "py", "file...
2.8125
stackv2
""" PASSWORD RECOVERY USERS CAN RESET THEIR PASSWORDS IF THEY FORGET. CAN BE ACCESSED FROM THE LOGIN PAGE BY CLICKING ON "Forget Password?" 1. CHECKS FOR VALID USERNAME AND EMAIL ID 2. SENDS AN OTP VIA EMAIL 3. VERIFY THE OTP SUBMITTED BY THE USER 4. USER ALLOWED TO CHANGE PASSWORD (Should adhere the rules) 5. REDIREC...
153
33.65
113
15
1,268
python
[{"finding_id": "codeql_py/polynomial-redos_362747f8fdf5a28b_4d945f91", "tool_name": "codeql", "rule_id": "py/polynomial-redos", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings startin...
1
true
[ "CWE-1333" ]
[ "py/polynomial-redos" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This [regular expression](1) that depends on a [user-provided value](2) may run slow on strings starting with '0' and with many repetitions of '00'." ]
[ 67 ]
[ null ]
[ 35 ]
[ 40 ]
2024-11-18T20:50:53.259090+00:00
1,632,541,136,000
2567b6e3f65562d7c94c0343c6c3754b349428fb
3
{ "blob_id": "2567b6e3f65562d7c94c0343c6c3754b349428fb", "branch_name": "refs/heads/main", "committer_date": 1632541136000, "content_id": "75ee0529506d6e4fd54c58cba7294b5df6c98678", "detected_licenses": [ "MIT" ], "directory_id": "617760603a76c796d5099601c8cbaf0047527eff", "extension": "py", "file...
2.6875
stackv2
# -*- coding: utf-8 -*- """Fetch, verify and process third-party dependencies of OpenPype. Those should be defined in `pyproject.toml` in OpenPype sources root. """ import os import sys import toml import shutil from pathlib import Path from urllib.parse import urlparse import requests import enlighten import platfor...
160
29.76
98
18
1,181
python
[{"finding_id": "codeql_py/tarslip_92cfc0aef933ea5a_1c8a8d1d", "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)." ]
[ 154 ]
[ null ]
[ 13 ]
[ 21 ]
2024-11-18T20:51:08.956094+00:00
1,464,246,581,000
29d4d859c7141cf681161578125cb59c681794ca
2
{ "blob_id": "29d4d859c7141cf681161578125cb59c681794ca", "branch_name": "refs/heads/master", "committer_date": 1464246581000, "content_id": "51d162012c088a9d63bb7bef8b6789021581339c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a868f5f506df840bdb7119a9106331c19def4978", "extension": "py"...
2.5
stackv2
#!/usr/bin/env python from cStringIO import StringIO import requests import tarfile import sys install_dir = "/usr/local" print "Downloading a CheesePi install into "+install_dir+"..." # Location of the most recent release of the CheesePi code code_url = "http://cheesepi.sics.se/files/cheesepi.tar.gz" response = No...
44
26.18
86
10
306
python
[{"finding_id": "codeql_py/tarslip_cbe0154444d30b35_bfc47126", "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)." ]
[ 36 ]
[ null ]
[ 2 ]
[ 7 ]
2024-11-18T20:51:18.470518+00:00
1,620,270,450,000
ff6599f414aec9130915d19c1f1b9f69f788f6dc
2
{ "blob_id": "ff6599f414aec9130915d19c1f1b9f69f788f6dc", "branch_name": "refs/heads/main", "committer_date": 1620270450000, "content_id": "abfb7612cb3c2679dd58acd462d787f82104dc07", "detected_licenses": [ "MIT" ], "directory_id": "cc3fbaf75e44b801913554d25ce8a6dd7a7cec22", "extension": "py", "file...
2.40625
stackv2
# A very simple Flask Hello World app for you to get started with using a database # just save and display subscription notifications data from flask import Flask, request, Response, render_template, session import os from flask_sqlalchemy import SQLAlchemy import logging from datetime import datetime from json impor...
77
32.05
90
19
614
python
[{"finding_id": "codeql_py/flask-debug_41e87a3fc719c973_2dc6d92c", "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)." ]
[ 77, 56 ]
[ null, null ]
[ 5, 21 ]
[ 24, 33 ]
2024-11-18T20:51:22.982901+00:00
1,633,953,161,000
59d7f213a5f5a176aaf52c4f7ac09b154606e068
2
{ "blob_id": "59d7f213a5f5a176aaf52c4f7ac09b154606e068", "branch_name": "refs/heads/master", "committer_date": 1633953161000, "content_id": "aa408c413e8dc7cec46d5707f353b1be8b1648f1", "detected_licenses": [ "MIT" ], "directory_id": "2f1d50c313c7d7c90da0eddce3adf8d5b5bab080", "extension": "py", "fi...
2.421875
stackv2
import os import time import platform from hashlib import md5 import dotenv from dotenv import dotenv_values from urllib.request import getproxies logs = '' def md5_crypto(passwd: str) -> str: return md5(passwd.encode('utf8')).hexdigest() def show_info(tip, info): return "{}: {}".format(tip, info) def...
86
26.63
101
15
639
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_d277629abdf254ce_2d2c0cc4", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insec...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensi...
[ 16 ]
[ null ]
[ 16 ]
[ 37 ]
2024-11-18T20:51:23.196820+00:00
1,536,699,565,000
080a1731e5e61003843b9a33446e614915d8716e
3
{ "blob_id": "080a1731e5e61003843b9a33446e614915d8716e", "branch_name": "refs/heads/master", "committer_date": 1536699565000, "content_id": "a02e8f7f93fd7f866737decc3423dd16a11fb6b8", "detected_licenses": [ "MIT" ], "directory_id": "a76f9f91d777834f5d26aa893d659824991a4eb6", "extension": "py", "fi...
2.765625
stackv2
#!/usr/bin/env python import argparse import logging import logging.handlers logger = logging.getLogger("myLogger") logger.setLevel(logging.INFO) fh = logging.handlers.TimedRotatingFileHandler( filename="Torrent_dw_mv.log", when="W1", backupCount=2 ) fh.setLevel(logging.INFO) fh.setFormatter( logging...
277
24.52
92
16
1,731
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_4aada6ab657586a1_6d89414e", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 145 ]
[ null ]
[ 9 ]
[ 66 ]
2024-11-18T21:13:53.894247+00:00
1,567,014,199,000
648c0a30eafe6cb6377eea90e9548f575ba07514
5
{ "blob_id": "648c0a30eafe6cb6377eea90e9548f575ba07514", "branch_name": "refs/heads/master", "committer_date": 1567014199000, "content_id": "40a1a61a8cf58545ad1d689984460e98c960ed48", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0781bcab86c3d33e3a94b8825f259ce4e9bc8e0a", "extension": "py"...
5.03125
stackv2
# # python-classObject_b-cw # # Start with a main function and make each problem a function. Call those functions from your main function. # # ### Problem 1: # Create a class Dog. Make sure it has the attributes name, breed, color, gender. Create a function that will print all attributes of the class. # Create an objec...
79
32.33
144
12
640
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_ef1904b7cd30987e_4e0914f7", "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." ]
[ 15 ]
[ null ]
[ 15 ]
[ 59 ]
2024-11-18T21:13:55.528398+00:00
1,477,586,666,000
c864ff1670bcedaabb3bd2e07f0e799dc3e78fba
3
{ "blob_id": "c864ff1670bcedaabb3bd2e07f0e799dc3e78fba", "branch_name": "refs/heads/master", "committer_date": 1477586666000, "content_id": "e98dbb0bc75ea7aaf261bdc2c33ac8b167b7498c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1a3acb28ddbb0ca3a43663a1b2c4a85537f81414", "extension": "py"...
2.59375
stackv2
from http.server import BaseHTTPRequestHandler, HTTPServer import urllib.request import urllib.parse import time import json import ssl host_name = "localhost" host_port = 3000 """ This server will help in getting access and refresh tokens from Login with Amazon. Be sure to add https://host_name:host_port to your al...
104
33.5
173
19
741
python
[{"finding_id": "codeql_py/insecure-default-protocol_b7829228a59a3f8d_936eb6b4", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 86 ]
[ 90 ]
[ 20 ]
[ 28 ]
2024-11-18T21:13:57.632779+00:00
1,303,627,704,000
6bf2f8418500ffc2a8f8a1e8527c2a82f0dc85dd
2
{ "blob_id": "6bf2f8418500ffc2a8f8a1e8527c2a82f0dc85dd", "branch_name": "refs/heads/master", "committer_date": 1303627704000, "content_id": "9fbdda1bcb720081a2d6d49c0fa6d4f9866baf84", "detected_licenses": [ "MIT" ], "directory_id": "0cacc4500d7816ea9c22755b21d6fadc2c4f73c1", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/env python # import various dependencies import MySQLdb, sys, cgi, connection print "Content-type: text/html\n" The_Form = cgi.FieldStorage() if The_Form: columns = "(`date`" cells = "(CURRENT_TIMESTAMP" for i in The_Form: columns += ", `" + i + "`" cells += ", '" + The_Form.getvalue(i) + "'" ...
34
23.59
129
12
249
python
[{"finding_id": "codeql_py/sql-injection_75d22964986017e7_4550db17", "tool_name": "codeql", "rule_id": "py/sql-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This SQL query depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "unknown...
1
true
[ "CWE-089" ]
[ "py/sql-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This SQL query depends on a [user-provided value](1)." ]
[ 30 ]
[ null ]
[ 19 ]
[ 22 ]
2024-11-18T21:14:13.206471+00:00
1,584,200,841,000
ebdb4163d54ceeb0021c360f3e9e34c5dc10e6e2
3
{ "blob_id": "ebdb4163d54ceeb0021c360f3e9e34c5dc10e6e2", "branch_name": "refs/heads/master", "committer_date": 1584200841000, "content_id": "859ebf96df9404393ac6b87ff3fc4a50c3d66f08", "detected_licenses": [ "MIT" ], "directory_id": "b90946e03ae75a29543a9b144712c7da7d3ef5b1", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/env python3 # # The MIT License (MIT) # # Copyright (c) 2020 Lorenzo Villani # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the...
178
24.79
108
14
1,044
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2e206b41fcdd8ddc_c9f2b0bd", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text." ]
[ 58, 78 ]
[ null, null ]
[ 11, 15 ]
[ 17, 64 ]
2024-11-18T20:48:06.131006+00:00
1,551,962,330,000
4ae03ee2dcbd4b1f6bb0d3173822c3dfe9cbf32d
3
{ "blob_id": "4ae03ee2dcbd4b1f6bb0d3173822c3dfe9cbf32d", "branch_name": "refs/heads/master", "committer_date": 1551962330000, "content_id": "8430b3af0cf24cc8feab11a98529ec7d1d3266c5", "detected_licenses": [ "MIT" ], "directory_id": "ff84c1b107020358d9940579cddc4d0d822811b9", "extension": "py", "fi...
2.875
stackv2
"""Main application and routing logic for TwitOff.""" from decouple import config from flask import Flask, render_template, request from .models import DB, User from .predict import predict_user from .twitter import add_or_update_user def create_app(): """Create and configure and instance of the Flask application...
75
41.65
91
18
699
python
[{"finding_id": "codeql_py/reflective-xss_a8c76280e6cedcb1_7b608856", "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 ]
[ null ]
[ 20 ]
[ 50 ]
2024-11-18T20:48:25.501964+00:00
1,476,827,679,000
0e04077398831b7e8447fca32ab53e00dea0b489
3
{ "blob_id": "0e04077398831b7e8447fca32ab53e00dea0b489", "branch_name": "refs/heads/master", "committer_date": 1476827679000, "content_id": "a8ea8992126f79b8831eadd26ee24ea6ea390196", "detected_licenses": [ "MIT" ], "directory_id": "77b16dcd465b497c22cf3c096fa5c7d887d9b0c2", "extension": "py", "fi...
2.78125
stackv2
from flask import Flask, render_template, redirect, request, session, flash from mysqlconnection import MySQLConnector app = Flask(__name__) import re mysql = MySQLConnector(app,'full_friends') EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$') app.secret_key = "ThisIsSecret!" @app.route('/...
98
31.18
146
15
742
python
[{"finding_id": "codeql_py/flask-debug_7a7c1d2f5ca07eb8_a8eac1d1", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
2
true
[ "CWE-215", "CWE-601" ]
[ "py/flask-debug", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 98, 81 ]
[ null, null ]
[ null, 25 ]
[ 20, 54 ]
2024-11-18T21:25:57.014635+00:00
1,614,414,811,000
4a09a92ccb9a9e808a847368c824cef167775637
4
{ "blob_id": "4a09a92ccb9a9e808a847368c824cef167775637", "branch_name": "refs/heads/main", "committer_date": 1614414811000, "content_id": "4d573569611cfbb514d7e4629a793a0b51e92ac3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "a904e99110721719d9ca493fdb91679d09577b8d", "extension": "py", ...
3.671875
stackv2
# 员工列表(员工编号 部门编号 姓名 工资) dict_employees = { 1001: {"did": 9002, "name": "师父", "money": 60000}, 1002: {"did": 9001, "name": "孙悟空", "money": 50000}, 1003: {"did": 9002, "name": "猪八戒", "money": 20000}, 1004: {"did": 9001, "name": "沙僧", "money": 30000}, 1005: {"did": 9001, "name": "小白龙", "money": 15000},...
44
30.66
95
13
605
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dfd9b7c6a681e834_89e18403", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text." ]
[ 20, 26 ]
[ null, null ]
[ 11, 15 ]
[ 75, 79 ]
2024-11-18T21:26:10.936688+00:00
1,564,216,697,000
cdbd6e1de28bf20278ab048b7a1952decab9bec1
3
{ "blob_id": "cdbd6e1de28bf20278ab048b7a1952decab9bec1", "branch_name": "refs/heads/master", "committer_date": 1564216697000, "content_id": "6dc4664eda6c7ef1382b812ef460f8215803de63", "detected_licenses": [ "MIT" ], "directory_id": "e71667130c0f5f30c8b13978e4a7c5603dc586fc", "extension": "py", "fi...
2.765625
stackv2
import smtplib, ssl from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart def send_error_msg_via_email(port=587, smtp_server="smtp.gmail.com", sender_email="ai.insights.au@gmail.com", receiver_email="shane.zhong@gmail.com", ...
66
31.18
81
13
467
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_49769016fb10f1b0_6c3a13a6", "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." ]
[ 19 ]
[ null ]
[ 11 ]
[ 78 ]
2024-11-18T21:51:46.311613+00:00
1,479,464,640,000
37ea14d10fdea8ca8e229de1c9c4140a959c4a22
3
{ "blob_id": "37ea14d10fdea8ca8e229de1c9c4140a959c4a22", "branch_name": "refs/heads/master", "committer_date": 1479464640000, "content_id": "86ac9792fe6c1e98adf92e9e5634e80d17d0a81d", "detected_licenses": [ "MIT" ], "directory_id": "a7126829a60ab9ccdad45b38a8d1c49b3ea7bbf2", "extension": "py", "fi...
2.609375
stackv2
#!/usr/bin/env python import os, sys import datetime from pyhdf.SD import SD, SDC def extractEVDCData(fileAbsPath): inFile = SD(fileAbsPath, SDC.READ) outFileName = os.path.split(fileAbsPath)[1][0:-3] + 'xml' outFile = open(outFileName, 'w') siteName = inFile.attributes(True)['DATA_LOCATION'][0]...
61
37.74
140
21
641
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_b34dd050ef51c688_f499387a", "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." ]
[ 20, 21 ]
[ null, null ]
[ 19, 19 ]
[ 81, 84 ]
2024-11-18T21:52:05.416360+00:00
1,683,096,706,000
26135f1cfc7713bd5968938196cd09cdc833287a
3
{ "blob_id": "26135f1cfc7713bd5968938196cd09cdc833287a", "branch_name": "refs/heads/master", "committer_date": 1683096706000, "content_id": "489bc5984c0387292e4fc596038cc722fc2e13ed", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b18a25f75a471d083ad91a41aa118c3712dd630a", "extension": "py"...
2.8125
stackv2
"""Abstraction for sessions in various clouds.""" import logging import os from fiona.path import parse_path, UnparsedPath log = logging.getLogger(__name__) try: import boto3 except ImportError: log.debug("Could not import boto3, continuing with reduced functionality.") boto3 = None class Session: ...
648
26.59
90
17
3,547
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_b7002e9752f7d778_53d44229", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [amazonaws.com](1) may be at an arbitrary position in t...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [amazonaws.com](1) may be at an arbitrary position in the sanitized URL.", "The string [aliyuncs.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 103, 111 ]
[ null, null ]
[ 36, 38 ]
[ 64, 65 ]
2024-11-18T21:52:26.605193+00:00
1,616,570,316,000
9adc4559c531015ed0b2291fe528ecaaa725c02d
2
{ "blob_id": "9adc4559c531015ed0b2291fe528ecaaa725c02d", "branch_name": "refs/heads/master", "committer_date": 1616570316000, "content_id": "46771f8bd73b68407b254ca2337a47082a6912c6", "detected_licenses": [ "MIT" ], "directory_id": "d68076b7cd3d4e919f57402e230da2b64ff35def", "extension": "py", "fi...
2.5
stackv2
#!/usr/bin/python # -*- coding:utf-8 -*- import os import re import sys import thread import paramiko from multiprocessing.dummy import Pool as ThreadPool def delblankline(infile, outfile): """ Delete blanklines of infile """ infp = open(infile, "r") outfp = open(outfile, "w") lines = infp.readlines...
116
24.64
104
16
767
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_74b20630830e0ab5_e5ef5121", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 31 ]
[ null ]
[ 5 ]
[ 68 ]
2024-11-18T20:31:24.655956+00:00
1,692,828,071,000
5ef20746242421e85759f2d39a9d33e40840d97e
2
{ "blob_id": "5ef20746242421e85759f2d39a9d33e40840d97e", "branch_name": "refs/heads/main", "committer_date": 1692828071000, "content_id": "442257732080f528442ce75ed7ea091d25637eef", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a3d6556180e74af7b555f8d47d3fea55b94bcbda", "extension": "py"...
2.328125
stackv2
# Copyright 2019 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Templatize a file based on wayland specifications. The templating engine takes an input template and one or more wayland specifications (see third_party/wayland/src/protocol/wa...
250
29.21
80
14
1,800
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_b62d3ddcb95a09a2_a24c2783", "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." ]
[ 221 ]
[ 225 ]
[ 9 ]
[ 24 ]
2024-11-18T20:31:33.082189+00:00
1,571,995,546,000
71f92ccc0e752af6c7c1fc40a6b3a368358bf4c8
3
{ "blob_id": "71f92ccc0e752af6c7c1fc40a6b3a368358bf4c8", "branch_name": "refs/heads/master", "committer_date": 1571995546000, "content_id": "ede3cb8f48d34ffdfe2c13993fd66eb87d0c44ac", "detected_licenses": [ "MIT" ], "directory_id": "61dc18356763953c9a0e548ff8134bdc9341db97", "extension": "py", "fi...
2.671875
stackv2
from datetime import date, datetime, timedelta import json, time, requests, os, sys, shutil from markdown2 import markdown from jinja2 import Environment, FileSystemLoader import sass # Start the timer... startTime = time.time() def altConfig(configFile): defaultConfig = { "outputFolder": "site", ...
247
35.89
107
26
1,969
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_81541b47be46b1b2_d48562a8", "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." ]
[ 150 ]
[ null ]
[ 15 ]
[ 46 ]
2024-11-18T20:59:45.374625+00:00
1,602,135,949,000
2f6f4f0e1d9813d1a0c7b1684f6d61c094cf181b
3
{ "blob_id": "2f6f4f0e1d9813d1a0c7b1684f6d61c094cf181b", "branch_name": "refs/heads/main", "committer_date": 1602135949000, "content_id": "1275f1a1fb995a98a1d0167d6479fbc8ff133975", "detected_licenses": [ "Apache-2.0" ], "directory_id": "17c13b29b413429cdd121fa06ba2da724a5b3361", "extension": "py", ...
2.9375
stackv2
''' Script Name: encryption_decryption.py Path: \IPS_DecisionFabric\Control Framework\ Description: This script encrypts the provided password and writes it to the config_file.txt Author: Harshita Rai Revision History: ----------------------------------------------------------------------------...
58
38.36
118
19
500
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_dcf9d479c4066e54_ff21a4aa", "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." ]
[ 43 ]
[ null ]
[ 21 ]
[ 67 ]
2024-11-18T21:10:32.795086+00:00
1,478,460,013,000
45d60556c39ea26e9856908cb5d3cdd380b39d24
3
{ "blob_id": "45d60556c39ea26e9856908cb5d3cdd380b39d24", "branch_name": "refs/heads/master", "committer_date": 1478460013000, "content_id": "cb7989a854d194e1607c218d487afe1ca6bc2a33", "detected_licenses": [ "MIT" ], "directory_id": "995a2108f8e4e546b0e0df2936f12a3efdec050b", "extension": "py", "fi...
3.3125
stackv2
""" Generate master passwords for use with password managers This code takes inspiration from: Computerphile Password Cracking: https://www.youtube.com/watch?v=7U-RbOKanYs Computerphile Password Choice: https://www.youtube.com/watch?v=3NjQ9b3pgIg XKCD Password Strength: https://xkcd.com/936/ ...
245
31.64
106
16
1,743
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7db5b9cb0f2b3b1f_635adf55", "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.\nThis expression logs [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive...
[ 221, 225, 231, 242 ]
[ null, null, null, null ]
[ 11, 11, 15, 11 ]
[ 52, 65, 30, 56 ]
2024-11-18T21:10:53.854144+00:00
1,605,291,960,000
9d5d9c6c762dbe94f72c5f03c2f888047dd52aff
3
{ "blob_id": "9d5d9c6c762dbe94f72c5f03c2f888047dd52aff", "branch_name": "refs/heads/master", "committer_date": 1605291960000, "content_id": "613b299af5da28bd038aa5b24da8d943cc09ce52", "detected_licenses": [ "Apache-2.0" ], "directory_id": "11309c713c71bc99a11a84621357a0b77c86e16f", "extension": "py"...
2.578125
stackv2
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License ...
284
33.71
138
19
2,351
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_f5bba842cca8bb3c_88055aa1", "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 (secret)](2) as clear text.\nThis expression stores [sensitive data (secret)](3) as clear text.\nThis expression stores [sensitive data (secret)](4) as clear text.\nThis expression stores [sensitive data (sec...
[ 230 ]
[ null ]
[ 13 ]
[ 14 ]
2024-11-18T21:10:55.519008+00:00
1,512,627,386,000
49765b06ff0100f5ad8eb0a1ce9fd22c55facbbd
3
{ "blob_id": "49765b06ff0100f5ad8eb0a1ce9fd22c55facbbd", "branch_name": "refs/heads/master", "committer_date": 1512627386000, "content_id": "aafea146e29d69eb6374f664e62e913df7cee692", "detected_licenses": [ "MIT" ], "directory_id": "b083b82a962c51d6385eeda109e6203ea1d58cca", "extension": "py", "fi...
2.671875
stackv2
# -*- coding: utf-8 -*- # ---- # Server # ---- import os from flask import Flask, request, send_from_directory, jsonify from flask_cors import CORS from werkzeug import secure_filename import subprocess import socket from glob import glob from argparse import Namespace from os import getcwd, path from scenescoop impo...
94
30.77
97
15
750
python
[{"finding_id": "codeql_py/path-injection_0c67a8b0b8a3371b_5c347031", "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)." ]
[ 53 ]
[ null ]
[ 15 ]
[ 24 ]
2024-11-18T21:23:46.522413+00:00
1,611,578,269,000
368d4448e338efd6921e8e23f7dec108b21ae536
3
{ "blob_id": "368d4448e338efd6921e8e23f7dec108b21ae536", "branch_name": "refs/heads/main", "committer_date": 1611578269000, "content_id": "6b239c46210072f7283899283799014ed4b5da0d", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e6e3c1bc6d977a84f4bbf0a31b74b3d7646acddb", "extension": "py", ...
3.140625
stackv2
import re import requests import urllib3 import json # 忽略警告 urllib3.disable_warnings() def get_one_page(url, headers): """ 判断页面是否能正常访问,并得到页面转换成文本格式的内容 :param url: 页面URL地址 :param headers: 请求头 :return: 页面转换成文本的内容 """ try: response = requests.get(url, headers=headers, verify=False) ...
83
24.1
139
17
675
python
[{"finding_id": "codeql_py/request-without-cert-validation_f61bb2e8bf3e549e_ddb0b231", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
1
true
[ "CWE-295" ]
[ "py/request-without-cert-validation" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1)." ]
[ 18 ]
[ null ]
[ 20 ]
[ 68 ]
2024-11-18T21:24:00.100558+00:00
1,565,011,645,000
d1585eaf0773f0878b5a0747ac7c57412d1ecb94
3
{ "blob_id": "d1585eaf0773f0878b5a0747ac7c57412d1ecb94", "branch_name": "refs/heads/master", "committer_date": 1565011645000, "content_id": "77d02f74764126edd91603e01b93821092a55b91", "detected_licenses": [ "MIT" ], "directory_id": "d16a81c025ce84de4db1ca86a5f743eabb296b00", "extension": "py", "fi...
2.734375
stackv2
import argparse import os import requests import shutil import sys import zipfile ap = argparse.ArgumentParser() ap.add_argument("-a", "--auth-file", required=True, help="Path to file containing authentication information.") args = vars(ap.parse_args()) username_password_path = args["auth_file"] DATAD...
44
29.86
101
12
338
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_cf77ee5efc01b383_9517d9f5", "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." ]
[ 23 ]
[ null ]
[ 15 ]
[ 23 ]
2024-11-18T21:24:02.844299+00:00
1,608,896,264,000
db87a97446c5b06d7ce56ba02bbf9f2bc94cd046
3
{ "blob_id": "db87a97446c5b06d7ce56ba02bbf9f2bc94cd046", "branch_name": "refs/heads/main", "committer_date": 1608896264000, "content_id": "7c7d5206a77da650e1ee3f0366d52a75852226cf", "detected_licenses": [ "MIT" ], "directory_id": "3510de8733fff3411d784a2601d74347b08cec2b", "extension": "py", "file...
2.515625
stackv2
import hashlib import io import logging import re from xml.etree import ElementTree import requests from django.core.files import File from app.exceptions import PFPApiBadInputError from app.models import SchemaItemsID, Schema from settings.settings import PFP_API_URL_GET_SCHEMA logger = logging.getLogger(__name__)...
71
25.55
85
12
459
python
[{"finding_id": "codeql_py/overly-large-range_bcc4519d4ce77028_dbd7263a", "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." ]
[ 66 ]
[ null ]
[ 24 ]
[ 27 ]
2024-11-18T21:37:40.720108+00:00
1,586,374,910,000
cb74eeb1f2412ce4326467f561e38e8e65b8ca9e
3
{ "blob_id": "cb74eeb1f2412ce4326467f561e38e8e65b8ca9e", "branch_name": "refs/heads/master", "committer_date": 1586374910000, "content_id": "3cf837a263546b9d2768ee3bdec332af97462f25", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "739e0b860f5b0cbc7b0d71daecc738d0f101e950", "extension": "p...
2.65625
stackv2
import sys import string import hashlib from datetime import datetime from random import SystemRandom from django.conf import settings as django_settings from django.utils.http import int_to_base36, base36_to_int from django.conf import settings # Hex characters HEX_CHARS = string.ascii_lowercase[:6] + string.digits ...
121
31.36
95
15
864
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_a0012ee9edb87c1f_fd50d72d", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is inse...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA1) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (secret)](2) is used in a hashing algorithm (SHA1) that is insecure." ]
[ 71 ]
[ null ]
[ 31 ]
[ 36 ]
2024-11-18T21:59:04.288444+00:00
1,510,296,113,000
51fb6907286a8a954a865c7bf25f16c5718cf921
2
{ "blob_id": "51fb6907286a8a954a865c7bf25f16c5718cf921", "branch_name": "refs/heads/master", "committer_date": 1510296113000, "content_id": "8d88eb6e74ed92b07418c9f362686a9d4ffb57ae", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "1273a6345c16f1b2d82537c1ca2332d78a6ac126", "extension": "p...
2.328125
stackv2
#coding:utf-8 from flask import request from flask_restful import Resource from sigda.config.response import JsonResponse from sigda.config.common import ErrorCode from sigda.comment.forms import CommentForm from sigda.comment.services import CommentDbService from sigda.user.services import UserDbService import logg...
42
30.95
86
14
263
python
[{"finding_id": "codeql_py/log-injection_98c947a34fe72aee_c3797526", "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)." ]
[ 18 ]
[ null ]
[ 23 ]
[ 40 ]
2024-11-18T21:59:11.421343+00:00
1,611,159,064,000
97fb3518355e894ca2437255eb5e6af8b9774f7a
3
{ "blob_id": "97fb3518355e894ca2437255eb5e6af8b9774f7a", "branch_name": "refs/heads/master", "committer_date": 1611159064000, "content_id": "4bbb1340c0d1257fc690d87aec9552f8c7d55f67", "detected_licenses": [ "MIT" ], "directory_id": "fc36740690dc99e5cdd7d12f1725ff484962c488", "extension": "py", "fi...
2.546875
stackv2
import netCDF4 import numpy as np flux_foss_str_annuel = 0 flux_apri_bio_str_annuel = 0 flux_apri_ocean_str_annuel = 0 flux_apos_bio_str_annuel = 0 flux_apos_ocean_str_annuel = 0 flux_foss_kla_annuel = 0 flux_apri_bio_kla_annuel = 0 flux_apri_ocean_kla_annuel = 0 flux_apos_bio_kla_annuel = 0 flux_apos_ocean_kla_annue...
260
42.31
120
14
3,557
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_7908eb525756b686_224a58a6", "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.", "...
12
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "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", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive...
[ 66, 71, 75, 81, 85, 89, 181, 186, 190, 196, 200, 204 ]
[ null, null, null, null, null, null, null, null, null, null, null, null ]
[ 32, 32, 32, 31, 31, 31, 32, 32, 32, 31, 31, 31 ]
[ 46, 46, 60, 44, 44, 57, 46, 46, 60, 44, 44, 57 ]
2024-11-18T21:59:28.769585+00:00
1,596,013,463,000
4827e413090b65250cdeee0a4dd7eb5b868146aa
3
{ "blob_id": "4827e413090b65250cdeee0a4dd7eb5b868146aa", "branch_name": "refs/heads/master", "committer_date": 1596013463000, "content_id": "8eb9f0d1aafce75220fed28f4fd6da09f0c0a320", "detected_licenses": [ "MIT" ], "directory_id": "ebcf92e2c88517a99c6886a87f49f5923d524b35", "extension": "py", "fi...
2.8125
stackv2
import socket import struct import sys import threading import json import time import ssl PORT = 1234 HEADER_LENGTH = 2 ime = "" def setup_SSL_context(): #uporabi samo TLS, ne SSL context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) # certifikat je obvezen context.verify_mode = ssl.CERT_REQUIRED #nalozi svoje cer...
111
28.86
118
20
855
python
[{"finding_id": "codeql_py/insecure-protocol_a4911bcac7dcc4dc_0f85ed99", "tool_name": "codeql", "rule_id": "py/insecure-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1).", "remediation": "", "lo...
1
true
[ "CWE-327" ]
[ "py/insecure-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Insecure SSL/TLS protocol version TLSv1 specified by [call to ssl.SSLContext](1)." ]
[ 16 ]
[ null ]
[ 13 ]
[ 47 ]
2024-11-18T22:11:54.105920+00:00
1,628,065,341,000
99b78796c5b0d7dbf9d47575b68f065e2a38bd3e
3
{ "blob_id": "99b78796c5b0d7dbf9d47575b68f065e2a38bd3e", "branch_name": "refs/heads/master", "committer_date": 1628065341000, "content_id": "304efd7300e352590b2f845a123b6d85e9e5ac75", "detected_licenses": [ "MIT" ], "directory_id": "50d1b07cc77d314cfec6961bc984320e5076effd", "extension": "py", "fi...
2.625
stackv2
#!/usr/bin/env python # coding: utf-8 # <center><img src='https://www.intel.com/content/dam/develop/external/us/en/images/infosim-logo-746616.png' style="width:300px"></center> # <h1 align="center">StableNet® WeatherMap Handling </h1> # <h2>Introduction</h2> # This script gives a simple example on how to # <ol> # ...
108
37.31
144
16
1,104
python
[{"finding_id": "codeql_py/request-without-cert-validation_45173dd9edb963ab_921eee93", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
3
true
[ "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 45, 105, 71 ]
[ 46, 107, 73 ]
[ 8, 6, 7 ]
[ 100, 81, 79 ]
2024-11-18T22:24:10.759119+00:00
1,496,395,238,000
670a11f7e6e2cc86f2b6b8ac3aa499600e9bd51d
3
{ "blob_id": "670a11f7e6e2cc86f2b6b8ac3aa499600e9bd51d", "branch_name": "refs/heads/master", "committer_date": 1496395238000, "content_id": "bcb85b3fda9320783a9372c3b39974438d8f070e", "detected_licenses": [ "MIT" ], "directory_id": "9c794b182ec3e96fa0b403bd0f8c1c2cb74679df", "extension": "py", "fi...
2.640625
stackv2
#!/usr/bin/env python #-*- coding:utf-8 -*- import json import urllib api_key = '1932136763' keyfrom = 'aioiyuuko' query_url = 'http://fanyi.youdao.com/openapi.do?keyfrom=%s&key=%s&type=data&doctype=json&version=1.1&q=%s' cData = { 'errorCode':{ '0': u'success', '20': u'要求翻译的文本过长', '30': u'...
56
34.89
106
17
570
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c7bd49725cdb7b33_2632b19d", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text." ]
[ 32, 55 ]
[ null, null ]
[ 15, 15 ]
[ 44, 50 ]
2024-11-18T22:36:27.075137+00:00
1,562,569,826,000
ab4102236660042f52a006d5f09ca04a51fdf5ee
2
{ "blob_id": "ab4102236660042f52a006d5f09ca04a51fdf5ee", "branch_name": "refs/heads/master", "committer_date": 1562569826000, "content_id": "147030af57b66bdf56e441259f6ba805583b22d6", "detected_licenses": [ "MIT" ], "directory_id": "4991888dc48901a2d35c192516223003fafa7b6b", "extension": "py", "fi...
2.5
stackv2
import json import requests import warnings import logging from time import sleep, time from collections import defaultdict warnings.filterwarnings("ignore") with open("config.json", 'r') as f: config = json.load(f) refresh_interval_sec = config['check_interval_sec'] errors = defaultdict(int) def log_splunk(url,...
88
23.53
78
15
576
python
[{"finding_id": "codeql_py/request-without-cert-validation_c30c1df184286e08_ae3731b8", "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)." ]
[ 33, 56 ]
[ 38, null ]
[ 13, 14 ]
[ 3, 56 ]
2024-11-18T22:36:32.495403+00:00
1,524,563,958,000
3b9c2355b8138c6a5859786920a257e773196a64
3
{ "blob_id": "3b9c2355b8138c6a5859786920a257e773196a64", "branch_name": "refs/heads/master", "committer_date": 1524563958000, "content_id": "7427e88245ecc461bc39cb326e2553db81f308f9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "1ea299bf5e6c6ffb15b893cebc1f7121218422b2", "extension": "py"...
2.9375
stackv2
#!flask/bin/python from flask import Flask import os app = Flask(__name__) @app.route('/') def index(): return "Hello, World!" @app.route('/api/brew/<int:cups>', methods=['GET']) def brew_coffee(cups): #print(cups) if (cups >= 1 and cups <= 12): cmd = "start cmd /c python smarter.py brew " + str(cups) ret...
31
25.74
66
12
232
python
[{"finding_id": "codeql_py/command-line-injection_d65d604f6e1bbef7_37b9691b", "tool_name": "codeql", "rule_id": "py/command-line-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This command line depends on a [user-provided value](1).", "remediation": "", "location": {...
3
true
[ "CWE-078", "CWE-215", "CWE-079" ]
[ "py/command-line-injection", "py/flask-debug", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This command line depends on a [user-provided value](1).", "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)." ]
[ 16, 31, 19 ]
[ null, null, null ]
[ 30, 5, 10 ]
[ 33, 24, 58 ]
2024-11-18T22:36:33.883002+00:00
1,484,074,470,000
2fbb876ee7993ec080c192d7b3c0807a584555d2
2
{ "blob_id": "2fbb876ee7993ec080c192d7b3c0807a584555d2", "branch_name": "refs/heads/master", "committer_date": 1484074470000, "content_id": "94bd737cfdc6976b78905b3e2136b9765570bade", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e98efe2421e2f58c8550884cfd331a18fc993b9b", "extension": "py"...
2.453125
stackv2
# Copyright 2017 NeuStar, Inc.All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
60
30.28
74
14
474
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_2846fb50ec2d00f1_64055c29", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecur...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (secret)](1) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (password)](2) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally expensive hash function." ]
[ 36 ]
[ null ]
[ 13 ]
[ 35 ]
2024-11-18T22:36:36.276284+00:00
1,489,205,330,000
5187c00b808f8250483e8cbd35f873dffd561894
3
{ "blob_id": "5187c00b808f8250483e8cbd35f873dffd561894", "branch_name": "refs/heads/master", "committer_date": 1489205330000, "content_id": "7cf912499c7948e321f434d4ef99913aecdc5d57", "detected_licenses": [ "MIT" ], "directory_id": "548391ce5686504f582dceeeb54f7a38b90df496", "extension": "py", "fi...
3.28125
stackv2
__author__ = 'kbohlen' from crypto.algorithms.algorithminterface import AlgorithmInterface from Crypto.PublicKey import RSA ''' Description of RSAPublicKey RSA is a public key cryptosystem, also called asymmetric ctyptography. It uses a pair of keys, one public and one private for encryption. The benefit of this i...
58
36.26
79
12
454
python
[{"finding_id": "codeql_py/weak-crypto-key_214d7c4adab27f8a_0710adbd", "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." ]
[ 28 ]
[ null ]
[ 20 ]
[ 42 ]
2024-11-18T20:23:14.432119+00:00
1,630,690,568,000
e85930298df64db0365a44b5f6f467305817d977
3
{ "blob_id": "e85930298df64db0365a44b5f6f467305817d977", "branch_name": "refs/heads/main", "committer_date": 1630690568000, "content_id": "d65f821de71c27f036f7488addddfb4cf2cfe173", "detected_licenses": [ "MIT" ], "directory_id": "c623e570724c575d97559bc259b9f87a1ba8fadf", "extension": "py", "file...
2.8125
stackv2
from collections import Counter import argparse, json, os, time, re from bs4 import BeautifulSoup from selenium import webdriver from jinja2 import Environment, FileSystemLoader from utility import ext, setup_logger, login, update_table_json import config if __name__ == '__main__': logger = setup_logger() driver =...
123
33.9
135
23
1,162
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_607038877b907ecc_6824ae39", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 43 ]
[ null ]
[ 9 ]
[ 39 ]
2024-11-18T21:22:12.327109+00:00
1,575,382,349,000
e1ca9e04bfa683b30435d8f4e67593b96c572ee1
3
{ "blob_id": "e1ca9e04bfa683b30435d8f4e67593b96c572ee1", "branch_name": "refs/heads/master", "committer_date": 1575382349000, "content_id": "f72c86f6141b9e5ce714030b5766cf7cff25194c", "detected_licenses": [ "MIT" ], "directory_id": "c5b68f8d9939ec0eafa5a54e4aa724d90675bcd2", "extension": "py", "fi...
2.75
stackv2
import ast import re import pickle from Crypto.PublicKey import RSA from base64 import b64decode,b64encode from tkinter import messagebox def str2obj(s): return ast.literal_eval(s.replace('true', 'True').replace('false', 'False')) def trim_name(name): return name.replace('@','').replace('#','') def remove_sp...
63
20.08
117
13
365
python
[{"finding_id": "codeql_py/weak-crypto-key_b037bf6385f21e80_c61d2d3a", "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." ]
[ 55 ]
[ null ]
[ 8 ]
[ 26 ]
2024-11-18T21:22:28.008476+00:00
1,442,550,850,000
418f5e6f3bf10626cccaf10846bcc39865abe722
3
{ "blob_id": "418f5e6f3bf10626cccaf10846bcc39865abe722", "branch_name": "refs/heads/master", "committer_date": 1442783251000, "content_id": "597c15496aeb063d8c2ea95de68aa2e2fd2f8466", "detected_licenses": [ "MIT" ], "directory_id": "3cbe96a35a1139a60849341a259cff54ec3dcddd", "extension": "py", "fi...
2.78125
stackv2
import json import os import re from time import time import requests from sqlalchemy.orm import sessionmaker from constants import PDF_ROOT, TXT_ROOT from models import Email, engine from tasks import download from utils import get_foia_url Session = sessionmaker(bind=engine) session = Session() def get_records(c...
157
24.48
78
13
844
python
[{"finding_id": "codeql_py/request-without-cert-validation_cc9b2edb2e6c8091_ece25a7f", "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)." ]
[ 43 ]
[ null ]
[ 16 ]
[ 62 ]
2024-11-18T21:22:35.467652+00:00
1,457,437,943,000
e622bf36cb48438ffd0a309e5bbbe21ac1702b8d
2
{ "blob_id": "e622bf36cb48438ffd0a309e5bbbe21ac1702b8d", "branch_name": "refs/heads/master", "committer_date": 1457437943000, "content_id": "e5af24ec46e90ed573604858889faa63426fd893", "detected_licenses": [ "MIT" ], "directory_id": "06a89ca79318e4b88b0609c4559c37add886ce7b", "extension": "py", "fi...
2.34375
stackv2
import boto3 import socket import ssl import datetime import re import csv from le_config import * print('Loading function') s3 = boto3.client('s3') def lambda_handler(event, context): host = 'data.logentries.com' port = 20000 s_ = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s = ssl.wrap_socke...
95
42.48
115
23
984
python
[{"finding_id": "codeql_py/insecure-default-protocol_8e38b45a9a000bb0_7b9d9e81", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 18 ]
[ null ]
[ 9 ]
[ 82 ]
2024-11-18T21:22:46.560491+00:00
1,654,964,971,000
931718ce474d514503d4e67a823e7ed9dd8b24d5
2
{ "blob_id": "931718ce474d514503d4e67a823e7ed9dd8b24d5", "branch_name": "refs/heads/master", "committer_date": 1654964971000, "content_id": "d9f56166bee901e35985e0dcbe9c6124715d2608", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "3d673506e870b028bd3d3c977965d262dab823a7", "extension": "p...
2.40625
stackv2
#!/usr/bin/python # -*- coding: UTF-8 -*- # flake8: noqa import os import re import sys import logging import requests books_dir = "/data1/download/mebook/" done_path = "/data1/download/mebook-done.txt" book_path = "/data1/download/mebook-books.txt" site = 'http://mebook.cc' referer = 'http://mebook.cc/22360.html' N...
89
27.81
134
14
792
python
[{"finding_id": "codeql_py/incomplete-hostname-regexp_2736983ff6b76ae9_f352db26", "tool_name": "codeql", "rule_id": "py/incomplete-hostname-regexp", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression has an unescaped '.' before 'baidu.com/s/', so it might match mo...
3
true
[ "CWE-020", "CWE-312", "CWE-312" ]
[ "py/incomplete-hostname-regexp", "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This regular expression has an unescaped '.' before 'baidu.com/s/', so it might match more hosts than expected.", "This expression stores [sensitive data (password)](1) as clear text.\nThis expression stores [sensitive data (password)](2) as clear text.", "This expression logs [sensitive data (password)](1) as...
[ 54, 60, 61 ]
[ null, null, null ]
[ 25, 33, 11 ]
[ 55, 50, 12 ]
2024-11-18T21:51:03.919585+00:00
1,627,764,495,000
e7bd9478d516af634e55c1e86ea17dc9decaaa41
3
{ "blob_id": "e7bd9478d516af634e55c1e86ea17dc9decaaa41", "branch_name": "refs/heads/master", "committer_date": 1627764495000, "content_id": "3276f7f9d39130dc1c5b364c169dc9c55465dfef", "detected_licenses": [ "MIT" ], "directory_id": "7f7da4967f06d899879c1e4681812243ef567549", "extension": "py", "fi...
2.5625
stackv2
from PIL import Image, ImageFont, ImageDraw from jinja2 import Template import time class specimen: def __init__(self, text_config, image_config): self.text_config = text_config self.image_config = image_config def save_image(self, filename, image, readings): with open(filename, 'wb') ...
85
36.84
130
16
845
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_198c17cf1f88909e_2249e581", "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." ]
[ 60 ]
[ null ]
[ 20 ]
[ 43 ]
2024-11-18T21:51:08.852043+00:00
1,401,340,756,000
0480e02f2aceead6dfaac73b5ca57758f2f40dbd
3
{ "blob_id": "0480e02f2aceead6dfaac73b5ca57758f2f40dbd", "branch_name": "refs/heads/master", "committer_date": 1401340756000, "content_id": "b571a0c188bdbe7ed36e14a502a48849f003cb93", "detected_licenses": [ "MIT" ], "directory_id": "5e329463ae18c38be2e1cdd57057a800dfddacc6", "extension": "py", "fi...
2.5625
stackv2
#!/usr/bin/env python ############################################################################## ### NZBGET POST-PROCESSING SCRIPT ### # Notify a user's NotifyMyAndroid account of NZBGet events # # NOTE: This script requires Python to be installed on your system. ########...
119
34.06
123
18
953
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_240c457d070768a0_636a47e9", "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." ]
[ 111 ]
[ null ]
[ 9 ]
[ 95 ]
2024-11-18T21:51:31.621114+00:00
1,520,025,939,000
2d615a120cee1c7991e704b8b4032840fbea98da
3
{ "blob_id": "2d615a120cee1c7991e704b8b4032840fbea98da", "branch_name": "refs/heads/master", "committer_date": 1520025939000, "content_id": "8421dafdb12f3ffb3715a8123706312201b41f45", "detected_licenses": [ "BSD-2-Clause" ], "directory_id": "f68ca2e94f01e2d06ba88a0093fa35f9dae1267f", "extension": "p...
2.5625
stackv2
#!/usr/bin/env python35 """ slack_icinga_ack_translator ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This service utilizes Bottle and Requests to form a shim layer translating Slack slash command out-going webhooks into Icinga2 Problem Acknowledgement API calls. Primarily so that admins may acknowledge issues...
88
34.16
85
16
831
python
[{"finding_id": "codeql_py/request-without-cert-validation_2aa109278c521b11_56a51ae2", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
5
true
[ "CWE-295", "CWE-117", "CWE-117", "CWE-117", "CWE-117" ]
[ "py/request-without-cert-validation", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)...
[ 67, 59, 59, 63, 63 ]
[ 75, null, null, null, null ]
[ 9, 60, 66, 39, 45 ]
[ 6, 64, 70, 43, 49 ]
2024-11-18T21:51:32.161906+00:00
1,456,254,079,000
6f9c557d0fb0fcdbc7681990ab38c9f926627503
3
{ "blob_id": "6f9c557d0fb0fcdbc7681990ab38c9f926627503", "branch_name": "refs/heads/master", "committer_date": 1456254079000, "content_id": "d34f112fa867989f8500b493d323f52ed1eadf47", "detected_licenses": [ "MIT" ], "directory_id": "fd1e46835a29298e1bd8118569979f217ff738a3", "extension": "py", "fi...
2.75
stackv2
from jinja2 import Template from IPython.display import IFrame, HTML import os import json from abc import ABCMeta, abstractmethod class IPlotter(object): """Abstract IPlotter""" __metaclass__ = ABCMeta def __init__(self): super(IPlotter, self).__init__() self.iframe = '<iframe srcdoc="{...
154
32.86
119
19
1,210
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_68781eb13417e89a_9d8303f5", "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." ]
[ 67, 125 ]
[ null, null ]
[ 16, 16 ]
[ 46, 46 ]
2024-11-18T21:51:32.286007+00:00
1,390,564,966,000
9a4e00ec1e2d9a8e8a28d5f04ff9a7b1725e8515
3
{ "blob_id": "9a4e00ec1e2d9a8e8a28d5f04ff9a7b1725e8515", "branch_name": "refs/heads/master", "committer_date": 1390564966000, "content_id": "ec4d69c16c139aaf4a6e11e992d6bc7e577140c4", "detected_licenses": [ "MIT" ], "directory_id": "8abad59a98c1d3e49fda70bbd3d8daa89b14c13a", "extension": "py", "fi...
2.609375
stackv2
# -*- coding: utf-8 -*- import json from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse, HttpResponseBadRequest def allowed_action(func): """ All methods which shall be callable through a given Ajax 'action' must be decorated with @allowed_action. This is requir...
58
41.53
94
15
511
python
[{"finding_id": "codeql_py/stack-trace-exposure_4c27474bc2677c57_9544f893", "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." ]
[ 51 ]
[ null ]
[ 43 ]
[ 46 ]
2024-11-18T21:51:42.075487+00:00
1,682,931,940,000
faa3e55b0368978f390970c2d644141d38375ef1
2
{ "blob_id": "faa3e55b0368978f390970c2d644141d38375ef1", "branch_name": "refs/heads/master", "committer_date": 1682931940000, "content_id": "37b85e8d6ce847306a06c873ba31f2704650c37a", "detected_licenses": [ "MIT" ], "directory_id": "a37cf304500867f94e3989dc71382404f2bccb49", "extension": "py", "fi...
2.328125
stackv2
import sqlalchemy import google.auth import subprocess import time import csv from google.cloud import ( logging as glogging, secretmanager ) from googleapiclient import discovery from flask import Flask, request, Response from sqlalchemy.sql import text DB_SECRET_ID = 'defender_db_password' def get_secret_va...
144
32.83
128
17
1,147
python
[{"finding_id": "codeql_py/stack-trace-exposure_3ddbb149e18995b6_23b66b03", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
6
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-079", "CWE-079", "CWE-079" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/reflective-xss", "py/reflective-xss", "py/reflective-xss" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "Cross-site scripting vul...
[ 89, 116, 138, 82, 108, 130 ]
[ null, null, null, null, null, null ]
[ 34, 34, 34, 34, 34, 34 ]
[ 116, 116, 116, 115, 95, 98 ]
2024-11-18T21:52:08.416902+00:00
1,530,803,559,000
b13c13a903d8988fe21382121b160fff3afa6458
2
{ "blob_id": "b13c13a903d8988fe21382121b160fff3afa6458", "branch_name": "refs/heads/master", "committer_date": 1530803559000, "content_id": "9bbaefc13fb870fb4b5569015a79c537a2fe2b85", "detected_licenses": [ "MIT" ], "directory_id": "34f33f67f3c6212cac02cfd10d80a7a0c8f8c0c1", "extension": "py", "fi...
2.359375
stackv2
#!/usr/bin/env python """Command line utility to serve a Mapchete process.""" import logging import logging.config import os import pkgutil from rasterio.io import MemoryFile import six from flask import ( Flask, send_file, make_response, render_template_string, abort, jsonify) import mapchete from mapchete.tile ...
131
31.95
79
15
1,017
python
[{"finding_id": "codeql_py/flask-debug_8340e7b4cd6cc5ee_2666307d", "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-117", "CWE-117", "CWE-117", "CWE-117" ]
[ "py/flask-debug", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "HIGH", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry de...
[ 37, 87, 87, 87, 88 ]
[ 39, null, null, null, null ]
[ 9, 58, 64, 69, 13 ]
[ 46, 62, 67, 72, 20 ]
2024-11-18T22:16:38.163426+00:00
1,657,107,768,000
9588a5f67c6be3285391f07dea8a05d25f5fecc8
3
{ "blob_id": "9588a5f67c6be3285391f07dea8a05d25f5fecc8", "branch_name": "refs/heads/master", "committer_date": 1657107768000, "content_id": "d8b351ff8f4f99ee84c3a0ec874b6bf3fcf62f1c", "detected_licenses": [ "MIT" ], "directory_id": "7d5475b33dc23113b89b3d0615df2eba62e65975", "extension": "py", "fi...
2.609375
stackv2
"""This module contains client that wrap requests and response to Knoema API""" import json import urllib.parse import urllib.request import time import datetime import hmac import base64 import hashlib import random import string import io import os import knoema.api_definitions as definition import knoema.api_defini...
348
37.2
124
18
2,976
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_5f123c7b030c7765_0f6567d2", "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." ]
[ 72 ]
[ null ]
[ 32 ]
[ 56 ]
2024-11-18T22:27:53.589589+00:00
1,609,772,059,000
8978bf15650dd74c5ee6c3337fbef6b55a31e0c0
3
{ "blob_id": "8978bf15650dd74c5ee6c3337fbef6b55a31e0c0", "branch_name": "refs/heads/master", "committer_date": 1609772059000, "content_id": "83b4204961ca6ba99c7070637f5614feb90f7dd5", "detected_licenses": [ "MIT" ], "directory_id": "b00911e1a05c560fde2f47077dcf011dd0379f22", "extension": "py", "fi...
2.703125
stackv2
import re from LimeSoup.lime_soup import Soup, RuleIngredient from LimeSoup.parser.paragraphs import extract_paragraphs_recursive from LimeSoup.parser.parser_paper import ParserPaper __author__ = 'Zheren Wang' __maintainer__ = '' __email__ = 'zherenwang@berkeley.edu' __version__ = '0.1.0' class AIPRemoveTrash(RuleI...
188
30.82
102
19
1,397
python
[{"finding_id": "codeql_py/overly-large-range_fc459848c8ccc499_7d676b7d", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "remediation": "", "lo...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\]." ]
[ 171 ]
[ null ]
[ 47 ]
[ 50 ]
2024-11-18T22:44:04.661882+00:00
1,602,802,426,000
91fb433e9982e335dd79f42398a0ba9f5a103f01
3
{ "blob_id": "91fb433e9982e335dd79f42398a0ba9f5a103f01", "branch_name": "refs/heads/master", "committer_date": 1602802426000, "content_id": "bcdf4b976ec274bb95358d4114010cbc39cd3c1e", "detected_licenses": [ "MIT" ], "directory_id": "03a2bccd388cfb2e5d33dd167c119d0f735e433e", "extension": "py", "fi...
3.046875
stackv2
import re # Nested Form data deserializer utility class # -------------------------------------------- class UtilityMixin(object): _nested_re = re.compile(r'((.+)\[(.*)\]+)|(\[(.*)\]{2,})') _namespace_re = re.compile(r'^([\w]+)(?=\[)') _list_re = re.compile(r'\[([0-9]+)\]') _number_re = re.compile(r'...
187
27.42
77
18
1,084
python
[{"finding_id": "codeql_py/redos_480abb6bbf284742_641be0db", "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 repetiti...
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 '/'." ]
[ 12 ]
[ null ]
[ 45 ]
[ 52 ]
2024-11-18T22:44:15.456782+00:00
1,611,196,059,000
9722e31a45de36e0b110fc4730463aedb7a629bf
2
{ "blob_id": "9722e31a45de36e0b110fc4730463aedb7a629bf", "branch_name": "refs/heads/master", "committer_date": 1611196059000, "content_id": "271679b8b53bd942ed81deafe4ce66f81d0a47c7", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0a467ed7e2f5487b11b4d51534904729aca25532", "extension": "py"...
2.46875
stackv2
import shutil import os import json import glob import yaml import sys import urllib import ssl import csv import time import requests import json import csv def dwn(url, opath): if os.path.exists(opath): return dirname = os.path.dirname(opath) os.makedirs(dirname, exist_ok=True) try: ...
97
24.61
77
24
564
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_b0c2791e00590e80_d9b520b0", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [www.wikidata.org](1) may be at an arbitrary position i...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [www.wikidata.org](1) may be at an arbitrary position in the sanitized URL." ]
[ 92 ]
[ null ]
[ 32 ]
[ 64 ]
2024-11-18T22:44:21.595838+00:00
1,567,669,528,000
352d7dcd8f0c66572a514690b2f8bda2d0b94519
3
{ "blob_id": "352d7dcd8f0c66572a514690b2f8bda2d0b94519", "branch_name": "refs/heads/master", "committer_date": 1567669528000, "content_id": "72bc926f52af3344cde1197ecb8e3efbfc5c71f4", "detected_licenses": [ "MIT" ], "directory_id": "c39805bb3d540fda74de2732a57d14152263cf10", "extension": "py", "fi...
3.234375
stackv2
#!/usr/bin/env python3.6 from user import User from credentials import Credentials # import pyperclip import string import random from pyfiglet import Figlet # 1. function to create new user def create_user( user_name, email, password): ''' function to create new user ''' new_user = User(user_name, email, password...
224
25.21
177
20
1,373
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_915ca209cbb1f83c_73ce1b75", "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.", ...
3
true
[ "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.\nThis expression logs [sensitive data (password)](2) as clear text.\nThis expression logs [sensitive dat...
[ 158, 163, 173 ]
[ null, null, null ]
[ 12, 12, 11 ]
[ 20, 20, 160 ]
2024-11-18T22:44:41.908103+00:00
1,628,285,557,000
5c285f16e2216c6c792c0f7685a4a16c303fed41
3
{ "blob_id": "5c285f16e2216c6c792c0f7685a4a16c303fed41", "branch_name": "refs/heads/main", "committer_date": 1628285557000, "content_id": "21a69e160c206a304a21fcce651941e076f4599b", "detected_licenses": [ "Apache-2.0" ], "directory_id": "e363edb64e58e0bf904ecd9055fc81a14c15b11e", "extension": "py", ...
2.625
stackv2
#!/usr/bin/python3 import json import sys import http import re import hvac import getpass # Change this value to work with a different vault instance vaultURL="https://vault.iksdapww-test-us-south-1-2a0beb393d3242574412e5315d3d4662-0002.us-south.containers.appdomain.cloud" def loadVault(secret_path,remaining_object...
59
38.08
123
22
575
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_9ce9ace5cdc21c20_620c6bd6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text." ]
[ 41 ]
[ null ]
[ 18 ]
[ 29 ]
2024-11-18T22:44:43.697260+00:00
1,572,507,220,000
b9a1e8fb1e38d8cbaca64ad68eccaf8b0ba8255d
2
{ "blob_id": "b9a1e8fb1e38d8cbaca64ad68eccaf8b0ba8255d", "branch_name": "refs/heads/master", "committer_date": 1572507220000, "content_id": "506d9f53837abf9c2d60fb94991aa3e28a889a38", "detected_licenses": [ "MIT" ], "directory_id": "bcfc2e0cd3fb2697eecb54d9cf80fd53be6a72a8", "extension": "py", "fi...
2.328125
stackv2
from flask import Flask, flash, request, redirect, url_for, render_template, send_from_directory, send_file import requests import json import os app = Flask(__name__) OBS_TMP_OP_DIR = '//home/sairo/tmpmaster' app.config['OBS_TMP_OP_DIR'] = OBS_TMP_OP_DIR @app.route('/', methods=['GET', 'POST']) def index(): ...
97
31.2
118
18
774
python
[{"finding_id": "codeql_py/flask-debug_24829967a284375a_db59059c", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
3
true
[ "CWE-215", "CWE-022", "CWE-022" ]
[ "py/flask-debug", "py/path-injection", "py/path-injection" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 97, 38, 41 ]
[ null, null, null ]
[ 5, 19, 19 ]
[ 52, 71, 71 ]
2024-11-18T22:44:49.163804+00:00
1,603,653,184,000
59386cb580400f8762805bbb3153866dfa9f1498
3
{ "blob_id": "59386cb580400f8762805bbb3153866dfa9f1498", "branch_name": "refs/heads/master", "committer_date": 1603653184000, "content_id": "2a70c0b8ae11b1d327bb97a8fd42349b2d3b6e28", "detected_licenses": [ "MIT" ], "directory_id": "c8ef25d3db454158af06371bf484f8edbf0ae6c5", "extension": "py", "fi...
3.140625
stackv2
#!/usr/bin/env python from datetime import datetime from jinja2 import Template from slugify import slugify import os import sys import csv class Book(object): title = '' isbn10 = '' isbn13 = '' authors = '' publisher = '' published = '' tags = [] @property def tags_as_css_class(...
82
24.35
99
15
529
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_f00b7015db776f18_25de02e6", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 43 ]
[ null ]
[ 16 ]
[ 32 ]
2024-11-18T21:00:00.453919+00:00
1,602,569,611,000
9b27d9778a642854510117c33e3cecdb55212f68
3
{ "blob_id": "9b27d9778a642854510117c33e3cecdb55212f68", "branch_name": "refs/heads/master", "committer_date": 1602569611000, "content_id": "7048e3149bc523126b11dd9c7917528e295a7c2e", "detected_licenses": [ "Unlicense" ], "directory_id": "d6ad4281721bd9dace930b0c6608794f5e57ff9b", "extension": "py",...
2.765625
stackv2
from flask import Flask, request from flask import jsonify import requests # Instantiating Flask object app = Flask(__name__) @app.route('/') def index(): send = { "messages": [ {"text": "Hi there {{ first name }} "} ] } return jsonify(send) @app.route('/weather') def weathe...
75
23.32
152
21
481
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_494ec725eb37790e_d71996d3", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
3
true
[ "CWE-312", "CWE-312", "CWE-918" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/partial-ssrf" ]
[ "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 25, 26, 65 ]
[ null, null, null ]
[ 11, 11, 9 ]
[ 14, 14, 144 ]
2024-11-18T21:00:26.312223+00:00
1,591,375,597,000
fab8bd509b0d4774c66453d62af882200d726019
3
{ "blob_id": "fab8bd509b0d4774c66453d62af882200d726019", "branch_name": "refs/heads/master", "committer_date": 1591375597000, "content_id": "f627b41f074b3adaea64e1f7080926b2027dc84e", "detected_licenses": [ "MIT" ], "directory_id": "e44d9385b7102a8e8a575335b69b4727f7ab7316", "extension": "py", "fi...
3.234375
stackv2
# Cutoff expression # Because you want to be able to cut of moves only for one side, or only after x ply, or only after x ply # # Examples: # - basic: 50 => 50 centipawns # - one-sided: 50W => 50 centipawns only when it is white to play # - after x moves: 50a10 => 50 centipawns after 10th move # - before x moves: 50u...
87
37.03
109
22
891
python
[{"finding_id": "codeql_py/redos_8ce7905ab85fbaa8_e3b54834", "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 'B'.", "remediati...
4
true
[ "CWE-1333", "CWE-1333", "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos", "py/redos", "py/redos" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'B'.", "This part of the regular expression may cause exponential backtracking on strings starting with 'aW' and containing many repetitions of 'B'.", "This part of the regular expression may cause ...
[ 27, 27, 28, 28 ]
[ null, null, null, null ]
[ 39, 58, 39, 58 ]
[ 41, 60, 41, 60 ]
2024-11-18T21:00:44.500772+00:00
1,608,335,177,000
7fe3b664033746f8f3527a0790f3a1b5774e0e05
3
{ "blob_id": "7fe3b664033746f8f3527a0790f3a1b5774e0e05", "branch_name": "refs/heads/main", "committer_date": 1608335177000, "content_id": "d7320c5587fc61dc5bb23c8a0b3774f559e890dd", "detected_licenses": [ "MIT" ], "directory_id": "027b52454734b5a1d9650d6a39b44b0905c32501", "extension": "py", "file...
3.421875
stackv2
count = 0 def parse(rule): pos1 = (int(rule.split(" ")[0].split("-")[0]) -1); pos2 = (int(rule.split(" ")[0].split("-")[1]) -1) specialChar = rule.split(" ")[1].replace(':', " ").strip() password = str(rule.split(" ")[2]) dict = { "pos1": pos1, "pos2": pos2, "specialChar": speci...
66
29.56
124
17
649
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f0c1b194c8fd9919_eea07b42", "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." ]
[ 66 ]
[ null ]
[ 7 ]
[ 44 ]
2024-11-18T21:01:07.220072+00:00
1,435,180,317,000
7b7459c97bcdce4156b52386613e02cb05ee9390
3
{ "blob_id": "7b7459c97bcdce4156b52386613e02cb05ee9390", "branch_name": "refs/heads/master", "committer_date": 1435180317000, "content_id": "7cf1f1b02382cbf04688b3cb881a61c3720a1a78", "detected_licenses": [ "Artistic-2.0" ], "directory_id": "2b39780adcc48449a988f942d6131eced993cdef", "extension": "p...
2.78125
stackv2
#!/usr/bin/python # Author: Scott Reisinger # Date: 06062015 # Purpose: Automate config grab for JUNOS devices (Or any other vendor but Juniper is the best so..) # # You will need to install the SSH utilities from paramiko # If you are on a mac there is an easy tutorial here: # http://osxdaily.com/2012/07/10/how-to-in...
158
33.49
100
17
1,341
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_40992f1da87c11c2_3950c738", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 31 ]
[ null ]
[ null ]
[ 58 ]
2024-11-18T21:01:07.638085+00:00
1,589,998,875,000
4db58df718b6af23dc5664dfb12af2c42dfbdc0a
2
{ "blob_id": "4db58df718b6af23dc5664dfb12af2c42dfbdc0a", "branch_name": "refs/heads/master", "committer_date": 1589998875000, "content_id": "ccfe0f852b687e2b0bbf099148c3ec39bf213c11", "detected_licenses": [ "BSD-2-Clause", "BSD-3-Clause" ], "directory_id": "56d18cf003e17495f5f1cffe1b468539b72b5f37...
2.484375
stackv2
import os import sys from sqlalchemy.exc import SQLAlchemyError, DBAPIError, ProgrammingError from sqlalchemy import create_engine from DataParser.odmdata.base import create_database, create_tables import utilities as util from cv_service import CVService from edit_service import EditService from export_service impo...
237
36.69
119
18
1,861
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_6d0b20c777dc0c4d_314e8631", "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." ]
[ 231 ]
[ null ]
[ 21 ]
[ 119 ]
2024-11-18T21:01:08.593470+00:00
1,552,214,394,000
67f7d14c21cfa60e98c79e49e0f59649b67ec690
3
{ "blob_id": "67f7d14c21cfa60e98c79e49e0f59649b67ec690", "branch_name": "refs/heads/master", "committer_date": 1552214394000, "content_id": "7f5828daeab01b749a3a74d7b2873dd1b6b45b22", "detected_licenses": [ "Apache-2.0" ], "directory_id": "9c34bd340f40f29c611ecb5114ce7c82ca9f082c", "extension": "py"...
3.203125
stackv2
#!/usr/bin/env python import argparse import json import random import requests import time from urllib3.exceptions import InsecureRequestWarning # TODO: Make class for all api calls def change_lights_hue(api_url, light_numbers, new_hue): body = {"hue": new_hue} for light_number in light_numbers: r...
95
36.72
119
19
800
python
[{"finding_id": "codeql_py/request-without-cert-validation_9162df1d8fcf9c37_8e51ba9c", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
3
true
[ "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1)." ]
[ 17, 22, 37 ]
[ null, null, null ]
[ 9, 18, 9 ]
[ 110, 73, 110 ]
2024-11-18T21:01:13.027430+00:00
1,511,935,740,000
1a132ea95b213298150b422bd3cee27ff6a31ab4
2
{ "blob_id": "1a132ea95b213298150b422bd3cee27ff6a31ab4", "branch_name": "refs/heads/master", "committer_date": 1511935740000, "content_id": "9e2829518e41f97ea949e7d2ab95074b5f222a16", "detected_licenses": [ "MIT" ], "directory_id": "a1eb3b5a3aee142de6b3936af5c64464a6894fe8", "extension": "py", "fi...
2.3125
stackv2
import math import os from PIL import Image from PIL import ImageFile from config import * ImageFile.LOAD_TRUNCATED_IMAGES = True class Coord2RowCol(object): def __init__(self, level=16, maptype=1, grid="all"): self._tilesize = 256 self._originX = -180 self._originY = 90 self._map...
114
37.3
117
21
1,155
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_7f47991424098d7f_556312d4", "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." ]
[ 106, 108 ]
[ null, null ]
[ 22, 22 ]
[ 36, 35 ]
2024-11-18T21:01:19.442279+00:00
1,578,327,268,000
9e0f8838e8dd45effc0945fb0ffa2e90ec6c0911
2
{ "blob_id": "9e0f8838e8dd45effc0945fb0ffa2e90ec6c0911", "branch_name": "refs/heads/master", "committer_date": 1578327268000, "content_id": "aec0998a921f6a5647b12d0f0ca8fa610b10fa39", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "15922193566e815b79f3faf46a2cf1a027aadda8", "extension": "p...
2.375
stackv2
#!/usr/bin/env python """ BobSlide ======== :copyright: (c) 2014 by Kozea and contributors. :license: BSD, see LICENSE for more details. """ import os import shutil import tempfile from html.parser import HTMLParser from operator import itemgetter from flask import (Flask, Markup, abort, flash, redirect, render_te...
394
36.22
79
23
3,222
python
[{"finding_id": "codeql_py/path-injection_b18b8649e18f859b_28e53691", "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).\nThis path depends on a [user-provided value](2).", "remed...
33
true
[ "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE-022", "CWE...
[ "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injection", "py/path-injectio...
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH"...
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MED...
[ "This path depends on a [user-provided value](1).\nThis path depends on a [user-provided value](2).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)."...
[ 98, 152, 158, 160, 161, 163, 178, 188, 196, 203, 222, 223, 226, 255, 241, 240, 248, 307, 246, 308, 256, 259, 286, 344, 357, 360, 363, 367, 370, 373, 375, 381, 381 ]
[ null, null, null, null, null, null, 179, null, null, 204, null, null, null, null, 242, null, null, null, null, null, null, null, null, null, null, null, null, 368, 371, null, null, null, 382 ]
[ 15, 31, 18, 18, 19, 19, 27, 22, 9, 22, 27, 23, 15, 31, 25, 27, 21, 27, 31, 23, 29, 27, 27, 15, 15, 15, 15, 19, 19, 19, 19, 19, 38 ]
[ 59, 55, 42, 49, 64, 56, 72, 54, 67, 61, 60, 56, 67, 62, 55, 78, 52, 56, 62, 52, 60, 71, 71, 67, 67, 66, 57, 56, 55, 61, 63, 36, 72 ]
2024-11-18T21:01:26.485833+00:00
1,417,027,543,000
7494fc8edce6bf4c8eda427a744b6179624ece21
3
{ "blob_id": "7494fc8edce6bf4c8eda427a744b6179624ece21", "branch_name": "refs/heads/master", "committer_date": 1417027543000, "content_id": "fc86d3398b2e1d34359998a7e776f00b80ee2d52", "detected_licenses": [ "MIT" ], "directory_id": "39dec2cf19c1663bb9da210afbe06ca7db880cbf", "extension": "py", "fi...
2.59375
stackv2
#!/usr/bin/env python import os import sys import imp import click import yaml import tempfile import socket from glob import iglob # let dynamically-loaded modules find the current package sys.path.append(os.path.join(os.path.abspath(__file__), '..', '..')) # look up our currnet hostname hostname = socket.gethostna...
164
28.25
96
16
1,121
python
[{"finding_id": "codeql_py/overly-permissive-file_0d08aac4fa2cbefc_60e70172", "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." ]
[ 156 ]
[ null ]
[ 13 ]
[ 36 ]
2024-11-18T21:01:33.879789+00:00
1,588,181,102,000
865aefbcd98b0fed56b26b6cc7786058b0ff1ece
3
{ "blob_id": "865aefbcd98b0fed56b26b6cc7786058b0ff1ece", "branch_name": "refs/heads/master", "committer_date": 1588181102000, "content_id": "88e262ea69ee1af557264dc6ad813d8c47d3a2b1", "detected_licenses": [ "MIT" ], "directory_id": "bafe5b4dc96a15026cebed08dee2dba789876ced", "extension": "py", "fi...
2.609375
stackv2
import os import re import click from PyInquirer import prompt from termcolor import colored from boom.handlers.project_handler import ProjectHandler from boom.handlers.template_handler import TemplateHandler url_pattern = re.compile("^http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+$") ...
114
36.15
118
20
959
python
[{"finding_id": "codeql_py/overly-large-range_ad73113a359bf22e_1ce14a74", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", ...
2
true
[ "CWE-020", "CWE-1333" ]
[ "py/overly-large-range", "py/redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[$%&'()*+,\\-.\\/0-9:;<=>?@A-Z\\\\[\\\\\\\\]^_\\].", "This part of the regular expression may cause exponential backtracking on strings starting with 'http://' and containing many repetitions of '('." ]
[ 11, 11 ]
[ null, null ]
[ 58, 39 ]
[ 61, 104 ]
2024-11-18T21:25:34.813238+00:00
1,542,577,952,000
1545bb1971b0e2bc75d04d6a3c5ab53523976230
2
{ "blob_id": "1545bb1971b0e2bc75d04d6a3c5ab53523976230", "branch_name": "refs/heads/master", "committer_date": 1542577952000, "content_id": "a435b942757febe853453417666660b938c37239", "detected_licenses": [ "MIT" ], "directory_id": "10d62e4f42ef2178c39e27852414e53d42661b06", "extension": "py", "fi...
2.3125
stackv2
import uuid from flask import Flask, Markup, Response, redirect, render_template, request import markdown from config import set_app_config from utils import S3Interface, validate_form_data app = Flask(__name__) set_app_config(app) s3 = S3Interface(app) @app.route('/', defaults={'uuid': None}, methods=['GET']) @...
46
26.09
77
19
289
python
[{"finding_id": "codeql_py/stack-trace-exposure_da192abc9257aef0_ec1d27ad", "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." ]
[ 27 ]
[ null ]
[ 29 ]
[ 48 ]
2024-11-18T21:25:35.942198+00:00
1,607,087,578,000
86d5bf43b7af3fea47745432dbe2dbc7e279ed17
3
{ "blob_id": "86d5bf43b7af3fea47745432dbe2dbc7e279ed17", "branch_name": "refs/heads/master", "committer_date": 1607087578000, "content_id": "8cc1cc4f2fa81b3d5f1045b068b01ea02f40f933", "detected_licenses": [ "MIT" ], "directory_id": "82394203a70575e0d264038b65921e1341c78b1b", "extension": "py", "fi...
2.984375
stackv2
import itertools import random import time from typing import List, Tuple from qiskit import (Aer, ClassicalRegister, QuantumCircuit, QuantumRegister, execute) from qiskit.circuit import Gate random.seed(time.monotonic()) def simons_oracle(size: int, secret_input: List[int] = None) -> Tuple[Gate...
97
27.95
87
21
675
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_dd1231d1bea5a01e_8d09bda7", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.\nThi...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.\nThis expression logs [sensitive data (secret)](2) as clear text.\nThis expression logs [sensitive data (secret)](3) as clear text.\nThis expression logs [sensitive data (secret)](4) as clear text." ]
[ 71 ]
[ null ]
[ 11 ]
[ 75 ]
2024-11-18T21:51:19.658631+00:00
1,629,142,411,000
02710f14f78aa1a3abeab44cba64b1c489b47b48
2
{ "blob_id": "02710f14f78aa1a3abeab44cba64b1c489b47b48", "branch_name": "refs/heads/main", "committer_date": 1629142411000, "content_id": "e8994bfe1cd0072ed18987f176f462ce752cdca0", "detected_licenses": [ "Apache-2.0" ], "directory_id": "dafaa002f9f54e9113c2d5730b22bb6bf7b936f9", "extension": "py", ...
2.375
stackv2
import base64 import logging import os from typing import Dict, Optional from fastapi import APIRouter from monailabel.config import settings from monailabel.interfaces import MONAILabelApp from monailabel.utils.others.app_utils import app_instance from monailabel.utils.others.generic import file_checksum logger = l...
58
29.69
106
14
412
python
[{"finding_id": "codeql_py/log-injection_3845d9ea4985f408_c36a60aa", "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)." ]
[ 35 ]
[ null ]
[ 17 ]
[ 54 ]
2024-11-18T22:00:51.005370+00:00
1,657,124,348,000
ac08c074756266ac728ee88729c574da1c9d65c0
3
{ "blob_id": "ac08c074756266ac728ee88729c574da1c9d65c0", "branch_name": "refs/heads/main", "committer_date": 1657124348000, "content_id": "56b8f03c759c10370a08910d2a93882e0bf77ad9", "detected_licenses": [ "MIT" ], "directory_id": "838085372aae8a7e6d9fccff7203fbfb4751d56d", "extension": "py", "file...
3.015625
stackv2
#!/usr/bin/env python # coding: utf-8 # # Predict the effect of Genetic Variants # In[1]: from __future__ import print_function import os import re import tqdm import string import pandas as pd import numpy as np import keras # ## 1. Loading Data # In[2]: """ Read Data """ train_variant = pd.read_csv("../input...
306
22.76
139
16
1,959
python
[{"finding_id": "codeql_py/overly-large-range_1cc52adcfc717459_b590b243", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that overlaps with 0-9 in the same character class, and is equivalent to \\[+,\\-.\\/0-9:;<=\\]." ]
[ 69 ]
[ null ]
[ 39 ]
[ 42 ]
2024-11-18T22:15:01.928301+00:00
1,671,108,866,000
d9bb8df30278d068ecc080789b3235fac3e190c0
2
{ "blob_id": "d9bb8df30278d068ecc080789b3235fac3e190c0", "branch_name": "refs/heads/master", "committer_date": 1671108866000, "content_id": "7d194bc4f3cc2ff1807ecfac46e18b4c75c42b31", "detected_licenses": [ "Apache-2.0" ], "directory_id": "04d4cad402751c1d5299f23d1b01d75431343b0b", "extension": "py"...
2.3125
stackv2
from functools import wraps from flask import Flask, request, Response, abort import os import requests import json import logging import adal import uuid app = Flask(__name__) logger = None def datetime_format(dt): return '%04d' % dt.year + dt.strftime("-%m-%dT%H:%M:%SZ") def to_transit_datetime(dt_int): ...
206
31.85
125
19
1,487
python
[{"finding_id": "codeql_py/flask-debug_336fa4e0a50e2a12_874c2595", "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.", ...
12
true
[ "CWE-215", "CWE-918", "CWE-918", "CWE-117", "CWE-117", "CWE-117", "CWE-117", "CWE-117", "CWE-117", "CWE-117", "CWE-117", "CWE-117" ]
[ "py/flask-debug", "py/full-ssrf", "py/full-ssrf", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "HIGH", "HIGH", "HIGH", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "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.", "The full URL of this request depends on a [user-provided value](1).", "The full URL of this request depends on a [user-provided value](1).\nThe full URL of this request depends on a [user-prov...
[ 205, 48, 178, 79, 111, 128, 129, 139, 175, 181, 188, 161 ]
[ null, null, null, null, null, null, null, null, null, null, null, null ]
[ 5, 18, 26, 17, 17, 21, 22, 17, 34, 38, 33, 34 ]
[ 40, 76, 91, 50, 46, 82, 42, 46, 65, 112, 85, 85 ]
2024-11-18T22:25:58.607911+00:00
1,673,376,975,000
dee1138d964a1892902f6e84ea581d54cd0e178a
3
{ "blob_id": "dee1138d964a1892902f6e84ea581d54cd0e178a", "branch_name": "refs/heads/master", "committer_date": 1673376975000, "content_id": "ae0778962400e0989db7e388ac59e823ec23f19f", "detected_licenses": [ "MIT" ], "directory_id": "168ab10395227e9016c6c2c6e1f4f697314f6dce", "extension": "py", "fi...
2.765625
stackv2
# code under public domain """ simple JSON REST request abstraction layer """ # Historically, this comes from Last.fm and was used for the Last.fm # client module but it is generic to be used for whatever. import httplib import os import re import socket import ssl import sys import urllib import urlparse mydir = o...
331
36.31
117
26
2,682
python
[{"finding_id": "codeql_py/insecure-default-protocol_71345f51fae457e9_ed461fcf", "tool_name": "codeql", "rule_id": "py/insecure-default-protocol", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in...
1
true
[ "CWE-327" ]
[ "py/insecure-default-protocol" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Call to deprecated method ssl.wrap_socket does not specify a protocol, which may result in an insecure default being used." ]
[ 45 ]
[ null ]
[ 21 ]
[ 92 ]
2024-11-18T22:26:02.632882+00:00
1,602,593,165,000
e0b534a7b118e56a177ae5bb0d4839d5fc049917
3
{ "blob_id": "e0b534a7b118e56a177ae5bb0d4839d5fc049917", "branch_name": "refs/heads/master", "committer_date": 1602593165000, "content_id": "63293f1dc39207aa7b03f239527d1df11d63f35c", "detected_licenses": [ "MIT" ], "directory_id": "c08e05abfb5146057b6b65fa8299088fc5f0b732", "extension": "py", "fi...
2.796875
stackv2
"""Create Calliope link file.""" import jinja2 import pandas as pd import pycountry TEMPLATE = """ links: {% for row_id, row in ntcs.iterrows() %} {{ row.fromLocation }},{{ row.toLocation }}.techs: uni_directional_ac_transmission_A: constraints: energy_cap_equals: {{ row.cap...
78
35.83
93
18
765
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_03d9af8752d773ef_008450ee", "tool_name": "codeql", "rule_id": "py/jinja2/autoescape-false", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "Using jinja2 templates with autoescape=False can potentially allow XSS attacks.", "remediati...
1
true
[ "CWE-079" ]
[ "py/jinja2/autoescape-false" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 24 ]
[ null ]
[ 13 ]
[ 38 ]