added
stringlengths
32
32
created
int64
1,244B
1,694B
id
stringlengths
40
40
int_score
int64
2
5
metadata
dict
score
float64
2.31
5.25
source
stringclasses
1 value
text
stringlengths
324
20.1k
num_lines
int64
16
598
avg_line_length
float64
15.1
58.3
max_line_length
int64
33
179
ast_depth
int64
8
39
length
int64
101
3.8k
lang
stringclasses
1 value
sast_codeql_findings
stringlengths
1.1k
265k
sast_codeql_findings_count
int64
1
45
sast_codeql_success
bool
1 class
sast_codeql_error
stringclasses
1 value
cwe_ids
listlengths
1
45
rule_ids
listlengths
1
45
confidences
listlengths
1
45
severities
listlengths
1
45
messages
listlengths
1
45
line_starts
listlengths
1
45
line_ends
listlengths
1
45
column_starts
listlengths
1
45
column_ends
listlengths
1
45
2024-11-18T21:57:27.945842+00:00
1,623,171,028,000
eca5d1ef513904a0fc66c083492f710dff346bda
4
{ "blob_id": "eca5d1ef513904a0fc66c083492f710dff346bda", "branch_name": "refs/heads/master", "committer_date": 1623171028000, "content_id": "c40cd3614061f934c2f0ab4960108eaa9a965005", "detected_licenses": [ "MIT" ], "directory_id": "6ea8f4ad89cf9c7225f172f18bc253d7b013f909", "extension": "py", "fi...
4.5
stackv2
# 列表可以存储任意数据类型,但是一般情况下,我们都存储单一数据类型 names = ['zhangsan', 'lisi', 'wangwu'] scores = [100, 98, 97, 99] # 这个列表的每一个元素到底表示什么? # 列表只能存储值,但是无法对值进行描述 person = ['zhangsan', 18, 98, 97, 95] # 字典不仅可以保存值,还能对值进行描述 # 使用大括号来表示一个字典,不仅有值value,还有值的描述key # 字典里的世界都是以键值对key-value的形式保留的 # key和value之间使用冒号,来连接 # 多个键值对之间使用逗号,来分隔 person = {'n...
177
23.42
106
12
1,733
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_f096c009cbffe3a1_205d52d6", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 36 ]
[ null ]
[ 7 ]
[ 37 ]
2024-11-18T21:57:31.807351+00:00
1,600,431,026,000
dba650a3e905d9248e7c89277cf46d9068d42743
3
{ "blob_id": "dba650a3e905d9248e7c89277cf46d9068d42743", "branch_name": "refs/heads/master", "committer_date": 1600431026000, "content_id": "5d315bdad7d72ad678b966b7db1a5ead4b6d880a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5ef588aeda0c2e1a535f501e9696381404a40deb", "extension": "py"...
3.28125
stackv2
""" whatsapp_mass_messaging v1.1.0.py : A Python code to to automate sending mass whatsapp messages. The list of phone numbers is stored in moblie_no_list in list format. The phone numbers are imported from test_numbers.csv file. To automate web processes selenium is used. Make sure to install chrome web drivers to a...
143
25.71
96
13
914
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5be2b9108057fbde_16cc2d06", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 114 ]
[ null ]
[ 15 ]
[ 52 ]
2024-11-18T21:58:36.148885+00:00
1,692,828,071,000
ddffc425b0ae01766a666ad0d9e6e4135e868839
3
{ "blob_id": "ddffc425b0ae01766a666ad0d9e6e4135e868839", "branch_name": "refs/heads/main", "committer_date": 1692828071000, "content_id": "7e526d2f5cb1520977a09d05439e73403ff5f388", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "a3d6556180e74af7b555f8d47d3fea55b94bcbda", "extension": "py"...
2.53125
stackv2
# Copyright 2020 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import optparse import os import sys def embed_version(input_file, output_file, version, product_full_name): fin = open(input_file, 'r') fout = open(output_file, 'w') ...
58
28.97
77
14
368
python
[{"finding_id": "codeql_py/overly-permissive-file_ca27135bcb4f9936_eef61745", "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." ]
[ 27 ]
[ null ]
[ 5 ]
[ 33 ]
2024-11-18T21:58:38.961135+00:00
1,616,063,165,000
9b58ee719001ceb0beb6b7dc5e99cf038fcafd62
3
{ "blob_id": "9b58ee719001ceb0beb6b7dc5e99cf038fcafd62", "branch_name": "refs/heads/main", "committer_date": 1616063165000, "content_id": "3d1d7bf2b1645f4335677ddaded5133e5fee132e", "detected_licenses": [ "MIT" ], "directory_id": "9ce5552ddc1d450d97c13d07be51862bf7814040", "extension": "py", "file...
2.59375
stackv2
from tkinter import *; from tkinter import messagebox; import os; from sys import *; import time; import schedule; from MailSender import *; import schedule; from hashfile import *; import re; window=Tk(); window.title("AUTO FILE REMOVAL AND FILE SENDER"); window.geometry("1200x700+0+0"); #Accept Folder Name Fold...
122
25.89
151
20
901
python
[{"finding_id": "codeql_py/redos_4b42146a6792d589_36f40046", "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 'a'.", "remediati...
2
true
[ "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'.", "This part of the regular expression may cause exponential backtracking on strings containing many repetitions of 'a'." ]
[ 88, 88 ]
[ null, null ]
[ 20, 36 ]
[ 23, 39 ]
2024-11-18T21:58:40.204511+00:00
1,543,229,081,000
28785b4d269201ad8f444354fe9dac3231b02b3b
3
{ "blob_id": "28785b4d269201ad8f444354fe9dac3231b02b3b", "branch_name": "refs/heads/master", "committer_date": 1543229081000, "content_id": "ed0f282db00f3116de51834c95026f4d30a207fd", "detected_licenses": [], "directory_id": "5fd8fdd3c427ea4dc1408c0f756390dfad437e7d", "extension": "py", "filename": "reg...
2.8125
stackv2
r""" regex ===== Types based on regular expressions. """ import re from ..modules.classes import CustomType class pattern(CustomType): r"""Get inputs that fit a specific pattern. """ def __init__(self, pattern, flags=0, converter=None, **Config): self.exp = re.compile(pattern, flags) if not 'type_str'...
58
25.02
84
13
442
python
[{"finding_id": "codeql_py/overly-large-range_73b20123dcd54aaf_dc8d1dab", "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...
4
true
[ "CWE-020", "CWE-020", "CWE-020", "CWE-1333" ]
[ "py/overly-large-range", "py/overly-large-range", "py/overly-large-range", "py/redos" ]
[ "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "Suspicious character range that is equivalent to \\[A-Z\\\\[\\\\\\\\]^_`a-z\\].", "This part of the regular expression may cause exponential ba...
[ 48, 52, 54, 54 ]
[ null, null, null, null ]
[ 24, 29, 29, 28 ]
[ 27, 32, 32, 39 ]
2024-11-18T22:47:26.447537+00:00
1,604,296,836,000
036f266f78cd7fb0579ec0e1f3c9076c0e3f7e85
3
{ "blob_id": "036f266f78cd7fb0579ec0e1f3c9076c0e3f7e85", "branch_name": "refs/heads/master", "committer_date": 1604296836000, "content_id": "4bffed364c8583edd640f5faa29b86b1442991c0", "detected_licenses": [ "MIT" ], "directory_id": "b058a45ef6015120ced485b40fd3c676727ef059", "extension": "py", "fi...
3
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Sep 24 16:54:39 2019 @author: tynnie """ import requests import pandas as pd #column = ['地區', '姓名', '號次', '性別', '出生年次', '推薦政黨', '得票數', '得票率', '當選註記', '是否現任','選舉', '區域'] columnName = ['region', 'name', 'number', 'gender', 'birthYear', 'party', 'number...
48
27.06
169
14
534
python
[{"finding_id": "codeql_py/request-without-cert-validation_9fb5f5a251ba172f_1ff91d2c", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
1
true
[ "CWE-295" ]
[ "py/request-without-cert-validation" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1)." ]
[ 34 ]
[ null ]
[ 19 ]
[ 61 ]
2024-11-18T22:48:19.474227+00:00
1,523,066,030,000
b0ad2415fcb9e73ad807a10d28e850a60155d05b
3
{ "blob_id": "b0ad2415fcb9e73ad807a10d28e850a60155d05b", "branch_name": "refs/heads/master", "committer_date": 1523066030000, "content_id": "5929a66f9cb8893355906c4a52dd05a1dfe75ce4", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "0bc0277ddce78eaa1fc4076edb1503376db6d90d", "extension": "p...
2.703125
stackv2
import json import os from jinja2 import Environment, FileSystemLoader class Response: def __init__(self, emitter, app, db, namespace, template_location): """ Initialization of the Response object. :param emitter: :param app: :param db: :param namespace: ...
215
40.95
129
19
1,986
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_6546c21c5c084f7f_f7b63a47", "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." ]
[ 199, 210 ]
[ null, null ]
[ 20, 20 ]
[ 88, 88 ]
2024-11-18T22:48:20.000099+00:00
1,603,311,676,000
ef92e47f3fbb75f00bfad6e3c8b8d539fb3596c2
2
{ "blob_id": "ef92e47f3fbb75f00bfad6e3c8b8d539fb3596c2", "branch_name": "refs/heads/master", "committer_date": 1603311676000, "content_id": "c15a9e4d79fdc031b74474560e22ae40fd751a80", "detected_licenses": [ "MIT" ], "directory_id": "c996c9487745739b88722a38b65e772dee509398", "extension": "py", "fi...
2.484375
stackv2
import json import boto3 import tweepy from datetime import datetime import os def _get_env_params(): env = os.environ['Environment'] twitter_key = os.environ['TwitterKey'] twitter_secret_key = os.environ['TwitterSecretKey'] bucket_name = os.environ['InputBucketName'] root_folder = os.environ['Roo...
91
39.42
165
15
912
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_2d7c7813cd3ac119_f83eba0f", "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...
5
true
[ "CWE-312", "CWE-312", "CWE-312", "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive data (secret)](1) as clear text.", "This expression logs [sensitive dat...
[ 63, 63, 63, 63, 63 ]
[ null, null, null, null, null ]
[ 23, 47, 85, 123, 154 ]
[ 26, 58, 103, 134, 165 ]
2024-11-18T22:48:20.642731+00:00
1,603,231,630,000
f417436bdf93f9355678bf48ee304abffc7d226e
3
{ "blob_id": "f417436bdf93f9355678bf48ee304abffc7d226e", "branch_name": "refs/heads/main", "committer_date": 1603231630000, "content_id": "c552ff9160f2b6d3795e7c91dcb8065d7e5cd2f7", "detected_licenses": [ "MIT", "Python-2.0" ], "directory_id": "a4eebdcf3acc518336ac3a39d66b484f87827221", "extensi...
2.59375
stackv2
""" utilities.py Written by Tyler Sutterley (09/2020) Download and management utilities for syncing files UPDATE HISTORY: Updated 09/2020: generalize build opener function for different instances Written 09/2020 """ from __future__ import print_function import sys import os import re import io import ssl impo...
332
34.8
80
19
2,702
python
[{"finding_id": "codeql_py/overly-permissive-file_82fabe635a43bc24_5985859a", "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." ]
[ 326 ]
[ null ]
[ 13 ]
[ 33 ]
2024-11-18T22:48:57.069288+00:00
1,509,126,616,000
192eb709c30081ea9afa17f774ef9b1195a9545b
3
{ "blob_id": "192eb709c30081ea9afa17f774ef9b1195a9545b", "branch_name": "refs/heads/master", "committer_date": 1509126616000, "content_id": "ad8da61e973e2d661f6fc81ee9b0ef21b6359f88", "detected_licenses": [ "MIT" ], "directory_id": "39dbd6a8903b3cc16351db781ba5561471bd2020", "extension": "py", "fi...
3.0625
stackv2
""" Functions for making queries to the Sataako-service and getting message content. """ from json import JSONDecodeError import requests import logging import os import time logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', level=logging.INFO) logger = logging.get...
84
39.82
120
13
777
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4cd529f78c8d1131_fcccc1ed", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.\nTh...
2
true
[ "CWE-312", "CWE-312" ]
[ "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text.", "This expression logs [sensitive data (private)](1) as clear text.\nThis expression logs [sensitive data (private)](2) as clear text." ]
[ 23, 32 ]
[ null, null ]
[ 21, 21 ]
[ 68, 80 ]
2024-11-18T23:26:06.689115+00:00
1,577,130,418,000
0610f4b04e2fa654a948efa406c7b5dfcc0dac4c
4
{ "blob_id": "0610f4b04e2fa654a948efa406c7b5dfcc0dac4c", "branch_name": "refs/heads/master", "committer_date": 1577130418000, "content_id": "6e65cef4b7da06fe21bf1d46447bbd0fc2b45e37", "detected_licenses": [ "Apache-2.0" ], "directory_id": "45cc59f3d8fe7ffd0e922d079ca37573aafd2fda", "extension": "py"...
3.53125
stackv2
# https://jinja.palletsprojects.com/en/2.10.x/templates/#whitespace-control from jinja2 import Template t = Template( """Hello {{ name }} """ ) print(t.render(name="multiline")) print("without - before %:") print(Template( """{% for item in seq %} {{ item }} {% endfor %} """ ).render(seq=list(range(10)))) print("w...
22
18.68
75
12
120
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_8a17eb7751b1fb3b_fec24930", "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...
3
true
[ "CWE-079", "CWE-079", "CWE-079" ]
[ "py/jinja2/autoescape-false", "py/jinja2/autoescape-false", "py/jinja2/autoescape-false" ]
[ "MEDIUM", "MEDIUM", "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.", "Using jinja2 templates with autoescape=False can potentially allow XSS attacks." ]
[ 4, 10, 17 ]
[ 7, 15, 22 ]
[ 5, 7, 7 ]
[ 2, 2, 2 ]
2024-11-18T23:26:12.525972+00:00
1,571,393,103,000
bb19e67c1458564b8832ccfd0100bb7be7a08886
2
{ "blob_id": "bb19e67c1458564b8832ccfd0100bb7be7a08886", "branch_name": "refs/heads/master", "committer_date": 1571393103000, "content_id": "879aa9588bc40f277e7e93a1235b124b40777fdd", "detected_licenses": [ "MIT" ], "directory_id": "bf53931505601b3e11edc80fd436a51f8ecdbbe2", "extension": "py", "fi...
2.34375
stackv2
#!/usr/bin/env python3 import paramiko,os class RemoteVerifier: def __init__(self, ip, port,user,password): self.serv = (ip,port) self.user=user self.password = password self.client = paramiko.SSHClient() self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) ...
42
36.55
128
12
386
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_e47bf76f4adfe01d_2efb58ff", "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." ]
[ 11 ]
[ null ]
[ 9 ]
[ 74 ]
2024-11-18T23:26:14.336435+00:00
1,482,658,257,000
7116ab1cbd1813ec908aa02c8910b53d00eb92cb
3
{ "blob_id": "7116ab1cbd1813ec908aa02c8910b53d00eb92cb", "branch_name": "refs/heads/master", "committer_date": 1482658257000, "content_id": "728485769509185538e8b21c47b4402ee4f8e3e7", "detected_licenses": [ "MIT" ], "directory_id": "ec53402c3dd7377f7ab5dc2b535ba692d599b24c", "extension": "py", "fi...
2.5625
stackv2
import urllib from BeautifulSoup import * import ssl import re scontext = ssl.SSLContext(ssl.PROTOCOL_TLSv1) depth = 8 initial_url = 'https://pr4e.dr-chuck.com/tsugi/mod/python-data/data/known_by_Bethanie.html' def follow_url(url, depth): if depth > 0: get_name(url) soup = BeautifulSoup(urllib.url...
21
24.43
91
15
150
python
[{"finding_id": "codeql_py/insecure-protocol_fa93ea6c7d50a422_5f5b7aeb", "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)." ]
[ 6 ]
[ null ]
[ 12 ]
[ 46 ]
2024-11-18T22:48:15.942729+00:00
1,498,700,731,000
b57782217ac9e19c984f5c440a663a2a7260cc4d
3
{ "blob_id": "b57782217ac9e19c984f5c440a663a2a7260cc4d", "branch_name": "refs/heads/master", "committer_date": 1498700731000, "content_id": "b7e5dc0aeca6579e971a2e0297bcdbad924769f3", "detected_licenses": [ "MIT" ], "directory_id": "1d90e918009b790ef4861ad7de85697159174c66", "extension": "py", "fi...
2.78125
stackv2
#!/usr/bin/env python import time import datetime import serial import subprocess import re from pynmea import nmea def getNetworks(): networks = [] proc = subprocess.Popen('sudo iwlist wlan0 scan', stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) iwlist_result = proc.stdout.read() iw...
74
24.72
124
16
461
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_e1ae12eebf2767be_5309f8ee", "tool_name": "codeql", "rule_id": "py/clear-text-storage-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression stores [sensitive data (private)](1) as clear text.\n...
1
true
[ "CWE-312" ]
[ "py/clear-text-storage-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression stores [sensitive data (private)](1) as clear text.\nThis expression stores [sensitive data (private)](2) as clear text." ]
[ 63 ]
[ null ]
[ 24 ]
[ 34 ]
2024-11-18T22:48:20.805601+00:00
1,480,991,937,000
a1e42991fcd6f0dfba6e24e90523b33db8e1a1f5
3
{ "blob_id": "a1e42991fcd6f0dfba6e24e90523b33db8e1a1f5", "branch_name": "refs/heads/master", "committer_date": 1480991937000, "content_id": "66459961a12a75e12f0f49bd5911c7f6604e48ec", "detected_licenses": [ "ISC" ], "directory_id": "627c98acd896544b7f18eaed0051279fd91decb7", "extension": "py", "fi...
2.578125
stackv2
#!/usr/bin/env python import html import jinja2 import markdown import re import time import urllib from common import * HTML_TEMPLATE_PATH = BASE_DIR / 'index.html.tmpl' HTML_DIST_PATH = BASE_DIR / 'dist' / 'index.html' IMAGE_SPREAD = 6 def reading_to_markdown(item): if type(item) is dict: text = item...
104
28.53
96
18
813
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_c244b02370b21b45_d2550030", "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." ]
[ 96 ]
[ null ]
[ 9 ]
[ 34 ]
2024-11-18T22:27:25.593710+00:00
1,523,775,755,000
50bb04111ddac540314dc5e193c2acbe84f4c46f
3
{ "blob_id": "50bb04111ddac540314dc5e193c2acbe84f4c46f", "branch_name": "refs/heads/master", "committer_date": 1523775755000, "content_id": "f1e07e06f7dbe2cc4e15595ce651e407aac9e528", "detected_licenses": [ "MIT" ], "directory_id": "cfab087990e40fcad225feea8e7b7f49b55fe214", "extension": "py", "fi...
2.828125
stackv2
import paramiko import subprocess import sys # Define global variables SSH_IP = "192.168.1.114" # Set to your IPv4 Address SSH_USER = "" SSH_PASSWORD = "" def ssh_command(ip, user, passwd, command): client = paramiko.SSHClient() #client.load_host_keys('...') client.set_missing_host_key_policy(...
45
27.73
83
16
301
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_6d93c3c74d9903ad_91c9dc17", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
1
true
[ "CWE-295" ]
[ "py/paramiko-missing-host-key-validation" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 14 ]
[ null ]
[ 5 ]
[ 63 ]
2024-11-18T22:55:33.995488+00:00
1,487,650,212,000
55329af4907e8940c503ee262ca7e33524668d3f
3
{ "blob_id": "55329af4907e8940c503ee262ca7e33524668d3f", "branch_name": "refs/heads/master", "committer_date": 1487650212000, "content_id": "44cc65f9fd15535a100819d7ba2dd566ac2c0e15", "detected_licenses": [ "MIT" ], "directory_id": "39befab6bf197e82401d3f2bced384280722cda4", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python # coding=utf-8 import threading import requests import random import Queue import json import sys import re reload(sys) sys.setdefaultencoding('utf8') def MyThread(iplist): threads = [] queue = Queue.Queue() for host in iplist: queue.put(host) for x in xrange(0, int(s...
113
24.85
124
19
689
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_b2165e822bcfe140_d2df455f", "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." ]
[ 65 ]
[ null ]
[ 37 ]
[ 42 ]
2024-11-18T22:55:35.282354+00:00
1,432,878,032,000
a24a6d23cf23cb2d16009a8babc7e02ac3cded5f
2
{ "blob_id": "a24a6d23cf23cb2d16009a8babc7e02ac3cded5f", "branch_name": "refs/heads/master", "committer_date": 1432878032000, "content_id": "f3f33e3e58438498ad19d3fdaa1f0de181ef6907", "detected_licenses": [ "Apache-2.0" ], "directory_id": "80b702a50829534ebea9d3e68dbdfb9138936912", "extension": "py"...
2.375
stackv2
''' Copyright (c) 2005-2011, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. WSO2 Inc. licenses this file to you 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.a...
187
36.35
124
15
1,430
python
[{"finding_id": "codeql_py/request-without-cert-validation_1b3f8bbcd1ac8270_0bbd6bd2", "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)." ]
[ 86 ]
[ 87 ]
[ 20 ]
[ 62 ]
2024-11-18T22:55:40.630658+00:00
1,488,822,716,000
236415c60c2431fe9393bb55fb40236c6e6df5bd
2
{ "blob_id": "236415c60c2431fe9393bb55fb40236c6e6df5bd", "branch_name": "refs/heads/master", "committer_date": 1488822716000, "content_id": "aa103de0f8d4380a30c80a7f1145df082e16ae0f", "detected_licenses": [ "MIT" ], "directory_id": "de09d98bf96e134681277869f5ce8d71db6d72fe", "extension": "py", "fi...
2.3125
stackv2
# Imports import asyncio import tornado import tornado.web import tornado.platform.asyncio import googlehandler import yelphandler import bunyan import logging import os import sys import argparse import googlehandler import yelphandler _PRETTY_FORMAT = '%(asctime)s :: %(levelname)s :: %(name)s :: %(message)s' _logg...
77
21.84
92
13
395
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_d0a667b7c027f49e_afc877a1", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text." ]
[ 39 ]
[ null ]
[ 11 ]
[ 14 ]
2024-11-18T22:55:41.050218+00:00
1,624,257,452,000
742bf48e8536647e716441e0fb55ca4d710d356c
3
{ "blob_id": "742bf48e8536647e716441e0fb55ca4d710d356c", "branch_name": "refs/heads/main", "committer_date": 1624257452000, "content_id": "1267a19a24e0147d8e8158583101172022ad40bb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5bb5be654ab7476b60fd40a630d8b0184b322944", "extension": "py", ...
2.734375
stackv2
import io import base64 import cv2 import PIL import flask import numpy as np from PIL import Image from flask import request, jsonify from config import * from model import get_model_prediction app = flask.Flask(__name__) @app.route("/get_fuel_efficiency", methods=["GET"]) def main(): img_base64_string = requ...
116
30.03
119
16
1,125
python
[{"finding_id": "codeql_py/stack-trace-exposure_e8883703e62bf9d0_54cf3a07", "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." ]
[ 37 ]
[ null ]
[ 20 ]
[ 26 ]
2024-11-19T00:33:39.299542+00:00
1,554,530,405,000
cb4d964a7a941ddb898ac6a39970dcb056c8bcec
2
{ "blob_id": "cb4d964a7a941ddb898ac6a39970dcb056c8bcec", "branch_name": "refs/heads/master", "committer_date": 1554530405000, "content_id": "e38587940c94a11d63981fe2bf077fd86c49db35", "detected_licenses": [ "MIT" ], "directory_id": "f37d3c958b0bb767d285eadb809ae267fe2c2d3f", "extension": "py", "fi...
2.34375
stackv2
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ from typing import Optional, Awaitable __version__ = '0.0.1' import sys, time, logging, os, json, random import numpy as np np.set_printoptions(precision=20) logger = logging.getLogger("tornado.application") logger.setLevel(logging.DEBUG) handler = logging.Strea...
308
27.82
122
20
2,426
python
[{"finding_id": "codeql_py/log-injection_5ff2573c19cbb801_ddb42e90", "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)." ]
[ 265 ]
[ null ]
[ 21 ]
[ 25 ]
2024-11-19T00:34:36.086560+00:00
1,413,521,250,000
77a5ced6cf54042d0e6806c67c79dfb3dac8170c
3
{ "blob_id": "77a5ced6cf54042d0e6806c67c79dfb3dac8170c", "branch_name": "refs/heads/master", "committer_date": 1413521250000, "content_id": "9fc5f5afe4547c83a21754ed49ba5c572f8f5df5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ee08a8c1e5493ef767b3dbb124678c0806963b67", "extension": "py"...
2.84375
stackv2
#!/usr/bin/env python '''Flask server which provides an API to webboggle. Usage: GET /abcdefghijklmnop [ ['fie', '11 02 01'], ['fin', '11 02 13'], ['fink', '11 02 13 22'], ['fino', '11 02 13 23'], ['glop', '21 32 23 33'], ['ink', '02 13 22'], ['jin', '12 02 13'], ...
66
23.3
87
16
521
python
[{"finding_id": "codeql_py/command-line-injection_4ebc31cf0d79bf44_63e19355", "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-209", "CWE-215" ]
[ "py/command-line-injection", "py/stack-trace-exposure", "py/flask-debug" ]
[ "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This command line depends on a [user-provided value](1).", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger." ]
[ 50, 52, 66 ]
[ null, 54, null ]
[ 42, 24, 5 ]
[ 56, 10, 40 ]
2024-11-19T00:05:04.279186+00:00
1,587,656,973,000
f22630c23c295b098600edb20428aefbe1476152
3
{ "blob_id": "f22630c23c295b098600edb20428aefbe1476152", "branch_name": "refs/heads/master", "committer_date": 1587656973000, "content_id": "05cdcd951f6beb77533fb7d813d964db335c6bd6", "detected_licenses": [ "MIT" ], "directory_id": "f7174a466adbe9d6f27145e6c395a532fa4c869c", "extension": "py", "fi...
2.75
stackv2
import pandas as pd import numpy as np import matplotlib.pyplot as plt from sklearn.preprocessing import MinMaxScaler import re import urllib.request import os import jinja2 import sys import keras from keras.models import load_model def predict_torrmow(): model = load_model('model.h5') df = pd.read_csv('go...
139
28.89
120
18
1,106
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_6b2f37cd7822e273_e8f6c1af", "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." ]
[ 61 ]
[ 63 ]
[ 12 ]
[ 6 ]
2024-11-19T00:06:19.149540+00:00
1,588,237,668,000
79c0b4a2baa34dd7ef2c13a4c1e5fae619546c5d
2
{ "blob_id": "79c0b4a2baa34dd7ef2c13a4c1e5fae619546c5d", "branch_name": "refs/heads/master", "committer_date": 1588237668000, "content_id": "c6d8f7b079fefff24dcd3e01ada091b192ec7edb", "detected_licenses": [ "Apache-2.0" ], "directory_id": "8c0ffc1276bd5d6a4e61eeb64fa92a5f4e34db0a", "extension": "py"...
2.34375
stackv2
import contextlib import logging import sys from io import StringIO from fastapi import APIRouter from starlette.requests import Request router = APIRouter() @contextlib.contextmanager def stdout_io(stdout=None): old = sys.stdout if stdout is None: stdout = StringIO() sys.stdout = stdout yie...
46
20.72
68
14
237
python
[{"finding_id": "codeql_py/code-injection_ac4e34f2bc862f0f_cd8b54a3", "tool_name": "codeql", "rule_id": "py/code-injection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This code execution depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "...
1
true
[ "CWE-094" ]
[ "py/code-injection" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This code execution depends on a [user-provided value](1)." ]
[ 37 ]
[ null ]
[ 18 ]
[ 22 ]
2024-11-19T01:11:30.837635+00:00
1,610,851,555,000
ec4468065420d35df92777bc4ac8c502cba72a76
4
{ "blob_id": "ec4468065420d35df92777bc4ac8c502cba72a76", "branch_name": "refs/heads/main", "committer_date": 1610851555000, "content_id": "84b40e4db2d8dbff71b3152d07c07151a2b15a15", "detected_licenses": [ "MIT" ], "directory_id": "64ce57c5387225e11af1e06da0d709f74b3b2aff", "extension": "py", "file...
3.703125
stackv2
""" Solutions for https://adventofcode.com/2020/day/2 """ # import modules used below. from dataclasses import dataclass, field import re # Part 1: How many passwords in the provided data file are valid according to # their corresponding "policies"? # Compile regex for extracting "policy" rule components and passw...
60
37.5
78
13
545
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_fa15aa9c376d1430_21711867", "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." ]
[ 51, 60 ]
[ null, null ]
[ 7, 7 ]
[ 75, 75 ]
2024-11-19T01:11:33.577194+00:00
1,621,778,176,000
64266d47cbca236207393e9245e183c8fa9ece38
3
{ "blob_id": "64266d47cbca236207393e9245e183c8fa9ece38", "branch_name": "refs/heads/main", "committer_date": 1621778176000, "content_id": "0675322b7e1c550b37a2c9e2f659a18028bc9dc8", "detected_licenses": [ "CC0-1.0" ], "directory_id": "e3e28c2735f2026fe5000bed1ed3460d29648db1", "extension": "py", "...
2.609375
stackv2
import os import platform import cv2 import numpy as np keypoint_ids = [ (1, 2), (1, 5), (2, 3), (3, 4), (5, 6), (6, 7), (1, 8), (8, 9), (9, 10), (1, 11), (11, 12), (12, 13), (1, 0), (0, 14), (14, 16), (0, 15), (15, 17) ] def get_valid_keypoints(keyp...
81
34.81
119
14
739
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_48f2697ca216048a_45c76a2f", "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." ]
[ 79 ]
[ null ]
[ 11 ]
[ 70 ]
2024-11-18T23:48:06.593839+00:00
1,478,577,339,000
57199c5bfc1c3728c1f7af07d86e6c02d4867364
3
{ "blob_id": "57199c5bfc1c3728c1f7af07d86e6c02d4867364", "branch_name": "refs/heads/master", "committer_date": 1478577339000, "content_id": "187c139c20034be3b1ae9b6489d3ce2ba50fa6fa", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b893b90154219a222150e9a75824c0cbcb0cbbbc", "extension": "py"...
2.703125
stackv2
# -*- coding: utf-8 -*- # @Author: ZwEin # @Date: 2016-07-26 13:48:04 # @Last Modified by: ZwEin # @Last Modified time: 2016-10-02 15:05:12 """ Inspired by imranghory's urlextractor at https://github.com/imranghory/urlextractor """ import re # Regular expression accelerator # Modules used to accelerate executio...
116
30.33
111
20
836
python
[{"finding_id": "codeql_py/overly-large-range_8ab2bf844ee719c5_b8499733", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that is equivalent to \\[&'()*+,\\-.\\/0-9:;\\].", "remediation": "", "locati...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that is equivalent to \\[&'()*+,\\-.\\/0-9:;\\]." ]
[ 43 ]
[ null ]
[ 40 ]
[ 43 ]
2024-11-18T23:48:15.231566+00:00
1,633,625,540,000
b3d4c45624495769ef392dcebc85f4bb4fe70e16
2
{ "blob_id": "b3d4c45624495769ef392dcebc85f4bb4fe70e16", "branch_name": "refs/heads/master", "committer_date": 1633625540000, "content_id": "9b495e5979426138a514e3f5fa0cec1a07c5aaa2", "detected_licenses": [ "MIT" ], "directory_id": "6d5086c7c0b11fd6739f26399c8f38e7c44f133a", "extension": "py", "fi...
2.375
stackv2
try: from os import walk, getcwd from os.path import join, exists, getctime from time import time, ctime, strftime, localtime from datetime import datetime from tldextract import extract from requests import get as GET from bs4 import BeautifulSoup as BS from socket import socket, AF_INE...
286
36.79
148
19
2,642
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_55ea4940dd9c471e_8179a7e7", "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." ]
[ 236 ]
[ null ]
[ 15 ]
[ 119 ]
2024-11-18T23:48:25.182141+00:00
1,676,139,610,000
d597a468f6677a31a03277a4517473571936d3a9
3
{ "blob_id": "d597a468f6677a31a03277a4517473571936d3a9", "branch_name": "refs/heads/master", "committer_date": 1676139610000, "content_id": "9dde32538d8dfa189727a2205bdb47b3175543df", "detected_licenses": [ "MIT" ], "directory_id": "255e19ddc1bcde0d3d4fe70e01cec9bb724979c9", "extension": "py", "fi...
2.78125
stackv2
#!/usr/bin/env python3 import censys.certificates import censys.ipv4 from sys import argv UID = "**CHANGE**" SECRET = "**CHANGE**" def is_cloudflare(dn): if "cloudflaressl.com" in dn or "cloudflare.com" in dn: return True return False def find_certificates(target): print("Certificates:") cer...
48
28.19
120
17
363
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_a81bd03310e79392_2526915e", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [cloudflaressl.com](1) may be at an arbitrary position ...
2
true
[ "CWE-020", "CWE-020" ]
[ "py/incomplete-url-substring-sanitization", "py/incomplete-url-substring-sanitization" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "The string [cloudflaressl.com](1) may be at an arbitrary position in the sanitized URL.", "The string [cloudflare.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 11, 11 ]
[ null, null ]
[ 8, 37 ]
[ 33, 59 ]
2024-11-18T23:05:25.421849+00:00
1,693,477,536,000
00b6025fb2b5cb365ff1a7fd460ed76826640c7c
2
{ "blob_id": "00b6025fb2b5cb365ff1a7fd460ed76826640c7c", "branch_name": "refs/heads/master", "committer_date": 1693477536000, "content_id": "cd609fb917fd86423cbb812e2246f528f4d648df", "detected_licenses": [ "MIT" ], "directory_id": "c9500ad778b8521aaa85cb7fe3239989efaa4799", "extension": "py", "fi...
2.3125
stackv2
import insightconnect_plugin_runtime import base64 from insightconnect_plugin_runtime.exceptions import PluginException import pypandoc import re from .schema import PdfInput, PdfOutput class Pdf(insightconnect_plugin_runtime.Action): def __init__(self): super(self.__class__, self).__init__( ...
31
39
108
19
309
python
[{"finding_id": "codeql_py/redos_a55940c1be5021ed_e63c6000", "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 '<a a=\"' and containing many repe...
2
true
[ "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with '<a a=\"' and containing many repetitions of '\" a=\"'.", "This part of the regular expression may cause exponential backtracking on strings starting with '<a a='' and containing many repetitions of '' a=''." ]
[ 18, 18 ]
[ null, null ]
[ 54, 60 ]
[ 57, 63 ]
2024-11-18T23:05:32.436771+00:00
1,398,060,665,000
6f7e796c4c3abd8ea26bcdc3ca277c5dbe0a9ebf
3
{ "blob_id": "6f7e796c4c3abd8ea26bcdc3ca277c5dbe0a9ebf", "branch_name": "refs/heads/master", "committer_date": 1398060665000, "content_id": "d2242b1d6ec5897884d4237fcf3ac32cc0445bee", "detected_licenses": [ "MIT" ], "directory_id": "786f45289366fe09f86912fbd23a5c13c0902a55", "extension": "py", "fi...
3.09375
stackv2
import sys import re # look for external script and css etc tags and read in files and insert into output file # this will probably be fairly brittle (ie will most likely only work for this app) html=open(sys.argv[1]) js_re=re.compile(r'<script .*?src=[\'"]([^\'"]*?)[\'"].*?</script>') css_re=re.compile(r'<link .*?hr...
28
28.21
89
17
212
python
[{"finding_id": "codeql_py/bad-tag-filter_24c196e8fa3223d8_e706e53e", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match script end tags like </script >.", "remediation": "", "location": {"file_...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression does not match script end tags like </script >." ]
[ 8 ]
[ null ]
[ 20 ]
[ 67 ]
2024-11-18T23:05:33.096683+00:00
1,629,796,670,000
f56bcb7eb5e7be04e762acef89035e03ff51cd81
3
{ "blob_id": "f56bcb7eb5e7be04e762acef89035e03ff51cd81", "branch_name": "refs/heads/main", "committer_date": 1629796670000, "content_id": "4f1818823178c3a1a841cc3dd5ecc638491554e9", "detected_licenses": [ "MIT" ], "directory_id": "b0f65baa9a743e4d44d20aaad97aee981c01e0f3", "extension": "py", "file...
2.609375
stackv2
import requests import re import logging import datetime import trafilatura from bs4 import BeautifulSoup class Request(): def __init__(self, lang = 'en', country = 'US', timeout_sec = 60): self.lang = lang.lower() self.country = country.upper() self.http_header = self.set_http_header() self.cookies = sel...
261
33.22
165
27
2,267
python
[{"finding_id": "codeql_py/bad-tag-filter_af0e7ee397136650_887224f3", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression does not match upper case <SCRIPT> tags.", "remediation": "", "location": {"file_path": ...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression does not match upper case <SCRIPT> tags." ]
[ 83 ]
[ null ]
[ 30 ]
[ 49 ]
2024-11-19T01:21:43.169607+00:00
1,558,227,623,000
09869893aa0ebd17a9926f73d3e6ab0f6a00f06b
2
{ "blob_id": "09869893aa0ebd17a9926f73d3e6ab0f6a00f06b", "branch_name": "refs/heads/master", "committer_date": 1558227623000, "content_id": "e0fcc9021222305b3b2df260acb6fd4f393ad383", "detected_licenses": [ "MIT" ], "directory_id": "5b9a27f8ede82b4be848a07dbe0b959fef55e8d1", "extension": "py", "fi...
2.328125
stackv2
import logging from flask_restful import Resource from webargs import fields from webargs.flaskparser import use_kwargs logger = logging.getLogger(__name__) class Status(Resource): get_args = { "param": fields.String(required=False) } @use_kwargs(get_args) def get(self, param: str = None): ...
20
22.25
46
13
107
python
[{"finding_id": "codeql_py/log-injection_90f9d2b377e0338e_e1cd096b", "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)." ]
[ 19 ]
[ null ]
[ 21 ]
[ 26 ]
2024-11-19T00:11:33.070121+00:00
1,541,443,933,000
5e7c95c6f625d40361eb932a2229314cbe5358f6
3
{ "blob_id": "5e7c95c6f625d40361eb932a2229314cbe5358f6", "branch_name": "refs/heads/master", "committer_date": 1541443933000, "content_id": "eb3223f68efbf81f756df770ad3453f954f1cfb2", "detected_licenses": [ "MIT" ], "directory_id": "f2fbc90ed220701934dee9557318c78d8778ed26", "extension": "py", "fi...
3.21875
stackv2
import io import os import sys import shutil import requests import zipfile import tarfile def downloader(save_dir='', url=''): """ Function to download file from url to specified destination file. If file already exists, or the url is a path to a valid local file, then simply returns path t...
91
26
102
15
532
python
[{"finding_id": "codeql_py/tarslip_989fa725aada9887_b2faee7e", "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)." ]
[ 86 ]
[ null ]
[ 13 ]
[ 16 ]
2024-11-19T00:11:33.368628+00:00
1,583,791,347,000
f87d8cc84943025931d332d1f13c5bd7b72436f1
3
{ "blob_id": "f87d8cc84943025931d332d1f13c5bd7b72436f1", "branch_name": "refs/heads/master", "committer_date": 1583791347000, "content_id": "145c29c3ba31449369b9a1458199de080b80137f", "detected_licenses": [ "MIT" ], "directory_id": "c8414883eb98418829f7ed26b387c4a190116786", "extension": "py", "fi...
2.90625
stackv2
"""Dumping all the functions here for now """ import os import shutil import logging import feedparser import tarfile import requests _logger = logging.getLogger(__name__) def get_arxiv_ids(url: str = "http://arxiv.org/rss/cond-mat.str-el"): feed = feedparser.parse(url) return [entry["id"].rsplit("/", 1)[-...
57
21.89
72
12
332
python
[{"finding_id": "codeql_py/tarslip_0905616d6f8b1162_815c9b3f", "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)." ]
[ 43 ]
[ null ]
[ 5 ]
[ 8 ]
2024-11-19T00:11:50.010749+00:00
1,626,615,166,000
e4753edb5be889012179789aeb539bcb580ddd22
3
{ "blob_id": "e4753edb5be889012179789aeb539bcb580ddd22", "branch_name": "refs/heads/master", "committer_date": 1626615166000, "content_id": "6b6df31c11239f9651fc3f20f73c556ef39b42fc", "detected_licenses": [ "MIT" ], "directory_id": "06a079e1c93ec3d17cc7929bbaaf1945dfefa476", "extension": "py", "fi...
2.578125
stackv2
from Crypto.Cipher import AES from Crypto.Util.Padding import pad import pwn import json """ p0 = key c0 = e(p0, 0) ^ 0 c1 = e(p1, c0) ^ c0 c2 = e(p2, c1) ^ c1 c1 = e(p1, c0) ^ c0 c1' = e(p1', c0) ^ c0 """ host = "socket.cryptohack.org" port = 13388 def exploit(): pr = pwn.connect(host, port) try: ...
43
21.42
87
19
321
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_1871e1e784eae41e_83d814fa", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The block mode ECB](1) is broken or weak, and should not be used.", "remediation": ...
1
true
[ "CWE-327" ]
[ "py/weak-cryptographic-algorithm" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[The block mode ECB](1) is broken or weak, and should not be used." ]
[ 31 ]
[ null ]
[ 24 ]
[ 63 ]
2024-11-19T00:36:52.524352+00:00
1,499,304,566,000
cb438f3340d94ab66bba5d4482e8d9d05bac3df7
2
{ "blob_id": "cb438f3340d94ab66bba5d4482e8d9d05bac3df7", "branch_name": "refs/heads/master", "committer_date": 1499304566000, "content_id": "6e97879a9b89c6a8d44188bc06a9b4fedf0d5fd3", "detected_licenses": [ "MIT" ], "directory_id": "48e3b714d56300b08f4b054f602851f14c8ad085", "extension": "py", "fi...
2.46875
stackv2
#!/usr/bin/env python3 import os import sys import collections from jinja2 import Template import CppHeaderParser def walkdir(path): files = [] for (dirpath, dirnames, filenames) in os.walk(path): for filename in filenames: if filename.endswith('.hpp'): files.append(os.sep...
466
23.95
78
16
2,800
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_7748dfb0a65db495_abe84d42", "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." ]
[ 366 ]
[ 445 ]
[ 20 ]
[ 5 ]
2024-11-19T01:02:27.245435+00:00
1,492,635,411,000
63a7ff677e851d9fd258e6d46821c46409822787
3
{ "blob_id": "63a7ff677e851d9fd258e6d46821c46409822787", "branch_name": "refs/heads/master", "committer_date": 1492635411000, "content_id": "c581100d3c2cd3491da504608d25a004a74dbd43", "detected_licenses": [ "MIT" ], "directory_id": "70565b67cc7c4c38ec940a16ee487bf2b2df57eb", "extension": "py", "fi...
2.53125
stackv2
#!/usr/bin/env python from flask import Flask, render_template, jsonify import sys import os import gc from time import time, strftime, gmtime, timezone from msgpack import unpackb import datetime import redis sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ...
117
31.88
75
17
914
python
[{"finding_id": "codeql_py/stack-trace-exposure_b57cf68208fe7408_d71ad3c8", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
2
true
[ "CWE-209", "CWE-215" ]
[ "py/stack-trace-exposure", "py/flask-debug" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger." ]
[ 57, 116 ]
[ null, null ]
[ 24, 5 ]
[ 41, 76 ]
2024-11-18T23:48:42.933819+00:00
1,591,273,075,000
41f4208f99a2a178803a45a28ae072357792d9ca
3
{ "blob_id": "41f4208f99a2a178803a45a28ae072357792d9ca", "branch_name": "refs/heads/master", "committer_date": 1591273075000, "content_id": "a6054d9c27f56f55cc8d9bbf73b2b3f65f2aaf6a", "detected_licenses": [ "MIT" ], "directory_id": "073d8aef7099fb40eb8fc4d9b443fab6a4c71912", "extension": "py", "fi...
3.03125
stackv2
import tarfile, os, random, tqdm, collections, torch import torchtext.vocab as vocab from torch.utils.data import TensorDataset class ProcessACLData: def __init__(self): # 文件路径 self.file_name = 'aclImdb_v1.tar.gz' self.root_dir = '/home/team/xiaonan/data2/aclImdb/aclImdb/' self.fil...
120
27.87
99
22
994
python
[{"finding_id": "codeql_py/tarslip_9565361ed205a301_fb993c47", "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)." ]
[ 21 ]
[ null ]
[ 21 ]
[ 25 ]
2024-11-19T00:13:41.363307+00:00
1,555,253,827,000
17f950cc130651012ee56bbc64a901107293b51e
2
{ "blob_id": "17f950cc130651012ee56bbc64a901107293b51e", "branch_name": "refs/heads/master", "committer_date": 1555253827000, "content_id": "9690f3a6d9726153bf655dc6ff9bf460a10376f6", "detected_licenses": [ "MIT" ], "directory_id": "d5757e2e83a89216a8a96ab29bd2f2511c42999b", "extension": "py", "fi...
2.3125
stackv2
import json from tqdm import tqdm import os import csv import pandas as pd from ratelimit import limits, sleep_and_retry from reconcile import load_token import requests from requests.auth import HTTPBasicAuth from time import gmtime, strftime import base64 import hashlib @sleep_and_retry @limits(calls=600, period=600...
201
43.12
104
31
1,714
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_3679f1f8c8b8e1dd_dd44ffdc", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (private)](1) is used in a hashing algorithm (SHA1) that is insec...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (private)](1) is used in a hashing algorithm (SHA1) that is insecure." ]
[ 134 ]
[ 136 ]
[ 53 ]
[ 94 ]
2024-11-19T01:51:52.772780+00:00
1,539,788,818,000
f53bf2499aefea3033bbc4b49337890f5948b422
3
{ "blob_id": "f53bf2499aefea3033bbc4b49337890f5948b422", "branch_name": "refs/heads/master", "committer_date": 1539788818000, "content_id": "7683f2fecda3e0e37c65dc8369a5898cd79135f2", "detected_licenses": [ "MIT" ], "directory_id": "f42d921c88059a508a9aa6a98088402086689c14", "extension": "py", "fi...
2.65625
stackv2
'''Application error handlers.''' from flask import Blueprint, jsonify import traceback error_handler = Blueprint('errors', __name__) @error_handler.app_errorhandler(Exception) def handle_unexpected_error(error): stack = traceback.format_exc() status_code = 500 success = False response = { ...
24
20.79
45
13
109
python
[{"finding_id": "codeql_py/stack-trace-exposure_9723803eadf3f610_9baacb41", "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." ]
[ 24 ]
[ null ]
[ 20 ]
[ 28 ]
2024-11-19T01:51:53.419195+00:00
1,551,189,961,000
78cf705824a03cda806fe47b563d71a37d987eec
3
{ "blob_id": "78cf705824a03cda806fe47b563d71a37d987eec", "branch_name": "refs/heads/master", "committer_date": 1551189961000, "content_id": "df29fa1f759c16baa06332dfe93e0138aaccbcce", "detected_licenses": [ "MIT" ], "directory_id": "5ec1b17228ffee8d793a349c7fb1359d0fa57e87", "extension": "py", "fi...
3.015625
stackv2
import re from interpreter.util import error import itertools from interpreter.execute import execute from interpreter.expr import stripExpr def interpret(code): # strip & initialize defined functions code, functions = stripFunctions(code) # execute execute(code, functions) def stripFunctions(code): ########...
120
25.62
75
16
858
python
[{"finding_id": "codeql_py/redos_df6b7b55f6e2ab7a_3ea4f92e", "tool_name": "codeql", "rule_id": "py/redos", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This part of the regular expression may cause exponential backtracking on strings starting with '<' and containing many repetition...
2
true
[ "CWE-1333", "CWE-1333" ]
[ "py/redos", "py/redos" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This part of the regular expression may cause exponential backtracking on strings starting with '<' and containing many repetitions of '><'.", "This part of the regular expression may cause exponential backtracking on strings starting with '<' and containing many repetitions of '><'." ]
[ 85, 97 ]
[ null, null ]
[ 34, 26 ]
[ 37, 28 ]
2024-11-19T01:39:56.731684+00:00
1,478,114,623,000
8968c38ecd3398cb80c303ed07bed11843c902bb
3
{ "blob_id": "8968c38ecd3398cb80c303ed07bed11843c902bb", "branch_name": "refs/heads/master", "committer_date": 1478114623000, "content_id": "fc2d165cf1be0cc86d7d83638d0b468f0abdc4e6", "detected_licenses": [ "MIT" ], "directory_id": "dfc2657d8cd3c959635727a3c9f5e430b5274f04", "extension": "py", "fi...
2.828125
stackv2
import os, random, string from Crypto import Random from Crypto.Hash import MD5, SHA, SHA256, SHA512, HMAC from Crypto.Cipher import AES from Crypto.PublicKey import RSA def randkey(digits=32, charset=string.ascii_letters+string.digits): return ''.join(random.SystemRandom().choice(charset) for _ in range(int(digit...
86
33.35
103
15
728
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_43d651caf716c82b_65ad392b", "tool_name": "codeql", "rule_id": "py/weak-sensitive-data-hashing", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is in...
1
true
[ "CWE-327" ]
[ "py/weak-sensitive-data-hashing" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "[Sensitive data (password)](1) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally expensive hash function.\n[Sensitive data (password)](2) is used in a hashing algorithm (SHA256) that is insecure for password hashing, since it is not a computationally e...
[ 16 ]
[ null ]
[ 24 ]
[ 31 ]
2024-11-19T00:25:35.543354+00:00
1,678,293,138,000
c3874f7480ff68dc6e785eb65ac6bcaea85f7cff
3
{ "blob_id": "c3874f7480ff68dc6e785eb65ac6bcaea85f7cff", "branch_name": "refs/heads/master", "committer_date": 1678293138000, "content_id": "adc06821d159cec78ec4e85c55f2cb473e54243a", "detected_licenses": [ "MIT" ], "directory_id": "41da42202d009818a956f0078a9ea14745358c56", "extension": "py", "fi...
2.921875
stackv2
import os import tarfile from logging import getLogger from pathlib import Path import wget def download_tar(download_url, dir_path: Path, tarmode: str = "r:gz") -> None: logger = getLogger(__name__) logger.info(f"Starting download of {download_url}...") dir_path.mkdir(parents=True, exist_ok=True) dest = wge...
20
29.75
78
10
154
python
[{"finding_id": "codeql_py/tarslip_b69fb27ab9aea9eb_a4074729", "tool_name": "codeql", "rule_id": "py/tarslip", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "This file extraction depends on a [potentially untrusted source](1).", "remediation": "", "location": {"file_path": "un...
1
true
[ "CWE-022" ]
[ "py/tarslip" ]
[ "MEDIUM" ]
[ "MEDIUM" ]
[ "This file extraction depends on a [potentially untrusted source](1)." ]
[ 18 ]
[ null ]
[ 5 ]
[ 8 ]
2024-11-19T01:02:50.886226+00:00
1,654,077,355,000
e07ad6c065a4e382e0ef8bbde31023375e4ee35a
3
{ "blob_id": "e07ad6c065a4e382e0ef8bbde31023375e4ee35a", "branch_name": "refs/heads/master", "committer_date": 1654077355000, "content_id": "4b78460f3660a8346b3fad03a0afee339cb002f8", "detected_licenses": [ "Apache-2.0" ], "directory_id": "63b8189f308ceed1886bb3061990c63704c32fa4", "extension": "py"...
2.875
stackv2
import logging from functools import wraps from flask import request def log_request(request_func): """ Simple request logging decorator :param request_func: request to be processed :return: Response object """ @wraps(request_func) def logging_decorator(*args, **kwargs): logging.i...
18
25.83
104
13
101
python
[{"finding_id": "codeql_py/log-injection_3d433833b0b161a9_7a437f0c", "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)." ]
[ 15 ]
[ null ]
[ 22 ]
[ 104 ]
2024-11-19T00:15:56.323743+00:00
1,614,890,630,000
6f48111975585e3d9316b9a5dfcd44f06636e297
3
{ "blob_id": "6f48111975585e3d9316b9a5dfcd44f06636e297", "branch_name": "refs/heads/master", "committer_date": 1614890630000, "content_id": "40e06a53e5f7af7356c3259a5db2fd5ab0fd493d", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "bb4a82294331b5b555a76cc06aae26c2741cd838", "extension": "p...
2.515625
stackv2
import io import time import contextlib import paramiko @contextlib.contextmanager def make_client(host, user, private_key): with paramiko.SSHClient() as client: client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) client.connect(host, username=user, pkey=private_key) yield client...
41
29.8
76
13
325
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_d98f5645929027d8_06b3cb56", "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." ]
[ 11 ]
[ null ]
[ 9 ]
[ 69 ]
2024-11-19T00:28:23.130732+00:00
1,587,980,847,000
ee74b2f84f8aa77204fc5b6d16a28d1671b4a865
2
{ "blob_id": "ee74b2f84f8aa77204fc5b6d16a28d1671b4a865", "branch_name": "refs/heads/master", "committer_date": 1587980847000, "content_id": "2985b6b39994f3201766ad7cc19d198b02d15869", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b19dd2cfcae05ad02e0607eb46840b6ced8018e2", "extension": "py"...
2.484375
stackv2
#!/usr/bin/env python from __future__ import print_function import cgi import urlparse from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer from subprocess import Popen, PIPE import zipfile import urllib import json class S(BaseHTTPRequestHandler): def _set_headers(self): self.send_response(200) ...
98
33.56
105
20
763
python
[{"finding_id": "codeql_py/command-line-injection_73a6957cde413a12_7d3a5297", "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": {...
2
true
[ "CWE-078", "CWE-022" ]
[ "py/command-line-injection", "py/path-injection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "This command line depends on a [user-provided value](1).", "This path depends on a [user-provided value](1)." ]
[ 56, 40 ]
[ null, null ]
[ 27, 19 ]
[ 36, 51 ]
2024-11-19T00:28:32.109898+00:00
1,563,271,803,000
4d51767e1a34b77275a44618a9ccba61782dcd7a
2
{ "blob_id": "4d51767e1a34b77275a44618a9ccba61782dcd7a", "branch_name": "refs/heads/master", "committer_date": 1563271803000, "content_id": "f2bef53b9a6882a8668944fb925ae8eb4965965e", "detected_licenses": [ "MIT" ], "directory_id": "e343bcf3e1b7ef9b1faf11cde58712d4a7eef0cc", "extension": "py", "fi...
2.375
stackv2
import sublime import sublime_plugin import os from jinja2 import Template from .utilities import log, commands, snippets from .settings import BASE_DIR, SNIPPET_DIR def plugin_loaded(): log.info('Snippets are ready to use.') class RehqFontBoldCommand(commands.FontFormattingCommand): FORMATTING_CHARACTER ...
70
31.51
99
17
489
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_2de0ed3925d82e13_48d3d97a", "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." ]
[ 50 ]
[ null ]
[ 24 ]
[ 50 ]
2024-11-19T00:51:32.401128+00:00
1,587,410,334,000
2a1007140d89c178106561a21da760090b230924
4
{ "blob_id": "2a1007140d89c178106561a21da760090b230924", "branch_name": "refs/heads/master", "committer_date": 1587410334000, "content_id": "6f5ba3866d9787a52069ffd476c9ed302acfda51", "detected_licenses": [ "MIT" ], "directory_id": "0b0b92ce7c2d200352ee2c7b727d16b3852b4535", "extension": "py", "fi...
3.65625
stackv2
import time import random print("PYNG V1.0 2020 by Piffle\n") password = int(input("\nwhat is the passcode(currently only supports positive numbers greater than 0): ")) guess = 0 guessed = False timer = 0 while 1: guess = random.randrange(0, password+1) timer = timer + 1 print(timer, ": guesses ", guess...
21
21.43
109
10
136
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1ee4b5a4bce56a67_f6933c5b", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (password)](1) as clear text.", ...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text." ]
[ 20 ]
[ null ]
[ 32 ]
[ 40 ]
2024-11-19T01:55:00.003114+00:00
1,535,304,603,000
036c41da02ce654616c1427c729c7932582cd130
3
{ "blob_id": "036c41da02ce654616c1427c729c7932582cd130", "branch_name": "refs/heads/master", "committer_date": 1535304603000, "content_id": "c993d8a9e801d1afd4811fd933514dc4f4889c1e", "detected_licenses": [ "MIT" ], "directory_id": "626e199b9a333a767f5d378dff06ff75f3efa5b1", "extension": "py", "fi...
2.6875
stackv2
#!/bin/python import os, sys import paramiko import subprocess import socket from email.mime.text import MIMEText #declare default port port=22 #declare path to files path='/home/unixutils-admin/python_scripts/run-commands-remotely/' #ssh connection ssh=paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.A...
88
31.86
78
17
636
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_94954b80bd6575b2_39525a7d", "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." ]
[ 16 ]
[ null ]
[ null ]
[ 58 ]
2024-11-19T02:00:47.773728+00:00
1,399,721,801,000
4ea4746de288c3ce823b1d4c0d9aac8db6abf413
3
{ "blob_id": "4ea4746de288c3ce823b1d4c0d9aac8db6abf413", "branch_name": "refs/heads/master", "committer_date": 1399721801000, "content_id": "c961e97d2f18259d230fc8f2870f04e08bd513ee", "detected_licenses": [ "Apache-2.0" ], "directory_id": "f289f10fd4f155dd88ace8651261bb745619ca69", "extension": "py"...
2.546875
stackv2
import sublime import sublime_plugin import re import subprocess import os import threading import time class GLShaderError: """ Represents an error """ region = None message = '' def __init__(self, region, message): self.region = region self.message = message class GLIntermediateErr...
318
33.6
121
21
2,268
python
[{"finding_id": "codeql_py/overly-permissive-file_7f7b5f996501420d_6d833064", "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." ]
[ 51 ]
[ null ]
[ 13 ]
[ 122 ]
2024-11-19T02:01:01.536706+00:00
1,631,025,719,000
fbe2b5465794f4809d3a95a3cb84ed3606faa3fe
2
{ "blob_id": "fbe2b5465794f4809d3a95a3cb84ed3606faa3fe", "branch_name": "refs/heads/main", "committer_date": 1631025719000, "content_id": "34812e7be4d9588a6d6da6971027020edc5e065f", "detected_licenses": [ "MIT", "Apache-2.0" ], "directory_id": "6c097f1ae0012829a5f11c592350ad18f3dfe901", "extensi...
2.359375
stackv2
import logging from logging import FileHandler, Formatter from flask import Flask, jsonify, render_template, request from flask_cors import CORS from database import memgraph, setup_memgraph from models import Playlist, Track, to_cypher_value app = Flask(__name__) app.config.from_object("config") CORS(app, resource...
348
31.8
134
21
2,538
python
[{"finding_id": "codeql_py/stack-trace-exposure_f4446e744169b73f_bc3bb8e5", "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.", "...
10
true
[ "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209", "CWE-209" ]
[ "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure", "py/stack-trace-exposure" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information](1) flows to this location and may be exposed to an external user.", "[Stack trace information...
[ 28, 49, 71, 140, 160, 182, 202, 231, 278, 309 ]
[ null, null, null, null, null, null, null, null, null, null ]
[ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24 ]
[ 66, 66, 66, 71, 71, 71, 71, 71, 71, 71 ]
2024-11-19T02:01:08.549341+00:00
1,615,705,688,000
5718259a573e57075ef512025953176a403dc921
2
{ "blob_id": "5718259a573e57075ef512025953176a403dc921", "branch_name": "refs/heads/main", "committer_date": 1615705688000, "content_id": "d699234b263e47016084e83b75b516e24868e80f", "detected_licenses": [ "MIT" ], "directory_id": "262682b3a51a348df8296e1f8f1919ea2842af13", "extension": "py", "file...
2.5
stackv2
import requests import json import environ import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent env = environ.Env() env.read_env(os.path.join(BASE_DIR, '.env')) # APIキーの設定 API_KEY = env('API_KEY') # 主要な都市名で取得可能 # city_name = "Ichikawa" # "lon": 139.9247 # "lat": 35.7197 # api = "http://api.o...
28
24.93
136
9
246
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_989536d0d3adf18a_af4bd507", "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." ]
[ 28 ]
[ null ]
[ 7 ]
[ 15 ]
2024-11-19T02:01:09.937037+00:00
1,664,574,355,000
5f43ae46db91e9ff7c4c029203d161f9402d4a5a
2
{ "blob_id": "5f43ae46db91e9ff7c4c029203d161f9402d4a5a", "branch_name": "refs/heads/master", "committer_date": 1664574355000, "content_id": "51cf51a60f61324a4ea24b3f8548c024a971692d", "detected_licenses": [ "MIT" ], "directory_id": "411d57b3d9f0940b5017ac742597309703c1784d", "extension": "py", "fi...
2.40625
stackv2
from v1_0.user_roles import anonymous_user, authenticated_user, bumblebee_user import unittest class HarbourServiceTest(unittest.TestCase): def test_anonymous_user(self): r = anonymous_user.get('harbour/mirrors') self.assertEqual(r.status_code, 401) def check_harbour_service(self, user=authen...
21
29.95
78
12
152
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_91c8a28e1dbdff12_741dc4b3", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [adsabs.harvard.edu](1) may be at an arbitrary position...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [adsabs.harvard.edu](1) may be at an arbitrary position in the sanitized URL." ]
[ 12 ]
[ null ]
[ 25 ]
[ 57 ]
2024-11-19T00:04:25.428740+00:00
1,518,835,408,000
c86996faa5c5b7d6c88b127f5b4932551fc76732
3
{ "blob_id": "c86996faa5c5b7d6c88b127f5b4932551fc76732", "branch_name": "refs/heads/master", "committer_date": 1518835408000, "content_id": "a4472b3d988c29c0fb85d2a0e2a719c21bf10eeb", "detected_licenses": [ "MIT" ], "directory_id": "ed5a07fcd277baa73417e040fed1dfee2abbe6d4", "extension": "py", "fi...
2.609375
stackv2
#!/usr/bin/env python import sys import os from os import path import docopt import requests import json import pandas import jinja2 from pprint import pprint __version__ = '0.0.10' DOC = ''' {0} version {1} Usage: {0} config list {0} config get <key> {0} config set <key> <domain> <api_key> <from_addres...
212
24.99
90
15
1,299
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_8bad7ffe4a6681a0_a0fa5ff5", "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." ]
[ 160, 161 ]
[ null, null ]
[ 24, 21 ]
[ 48, 62 ]
2024-11-19T00:04:31.430085+00:00
1,471,362,155,000
e220901840f3bbc6b4565bdef69e98877f19ed69
2
{ "blob_id": "e220901840f3bbc6b4565bdef69e98877f19ed69", "branch_name": "refs/heads/master", "committer_date": 1471362155000, "content_id": "327001efc4fa0fefbd6d3f7c9b12a9116b441662", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "56de1e5956c94e3164f02757bd5ac5657df0ffc9", "extension": "p...
2.421875
stackv2
#!/usr/bin/env python """ Implementation of basic RSA-key digital signature. Description: - Client sends server an Auth message to establish an auth fid. - Server prepares reads client's public key and generates a random MD5 key for the signature encrypting it with the key. - Client decrypts the hash with its publ...
354
28.2
105
18
2,949
python
[{"finding_id": "codeql_py/weak-cryptographic-algorithm_325a49a1970ee7c6_fcda80d0", "tool_name": "codeql", "rule_id": "py/weak-cryptographic-algorithm", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "...
6
true
[ "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327", "CWE-327" ]
[ "py/weak-cryptographic-algorithm", "py/weak-cryptographic-algorithm", "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "[The cryptographic algorithm DES3](1) is broken or weak, and should not be used.", "[Sensitive data (password)](1) is used in a hashing algorithm (MD5) that is insecure for password hashing, since it is not a computationally ex...
[ 166, 204, 159, 160, 200, 201 ]
[ null, null, null, null, null, null ]
[ 20, 19, 26, 26, 26, 26 ]
[ 73, 71, 41, 46, 41, 46 ]
2024-11-19T00:04:34.450044+00:00
1,505,867,280,000
d5d446a5365a3a99193e4e6178e126e052ddc730
2
{ "blob_id": "d5d446a5365a3a99193e4e6178e126e052ddc730", "branch_name": "refs/heads/master", "committer_date": 1505867280000, "content_id": "808e939fdaaf1ae427a967c44f5b95779c17f729", "detected_licenses": [ "MIT" ], "directory_id": "3136a68b323caee95eace5426e2ed341ea9cc1a1", "extension": "py", "fi...
2.40625
stackv2
""" This pipeline populates fct_players_stats table, this is a daily process that grabs all the uploads that happened since the last run and aggregates on a daily, player, hero, map and gametype level. The metrics that are aggregated are coming from the generalstats table. """ from airflow import DAG from airflow.ope...
196
36.7
108
12
2,065
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_7e5ffdaaadee36e4_e95f94f1", "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." ]
[ 40, 74 ]
[ 65, 186 ]
[ 9, 9 ]
[ 9, 9 ]
2024-11-19T00:27:24.283890+00:00
1,585,330,955,000
a7060fec971ae560b163afa82b14f5c207054000
2
{ "blob_id": "a7060fec971ae560b163afa82b14f5c207054000", "branch_name": "refs/heads/master", "committer_date": 1585330955000, "content_id": "687a7b6a4f2dfe9fc9b524ed14bb862ed7920327", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b1a8936164d439560d9ef14501cf7bf5f3855ab8", "extension": "py"...
2.390625
stackv2
import base64 import json import logging import os from flask import Flask, request from google.appengine.api import app_identity from google.appengine.api import mail SENDER_EMAIL = 'where-in-py@{}.appspotmail.com'.format(os.environ['PROJECT_ID']) app = Flask(__name__) app.config['PUBSUB_VERIFICATION_TOKEN'] = o...
70
30.16
98
15
532
python
[{"finding_id": "codeql_py/flask-debug_39e33eb870d75f23_d06aa12b", "tool_name": "codeql", "rule_id": "py/flask-debug", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.", ...
4
true
[ "CWE-215", "CWE-117", "CWE-117", "CWE-117" ]
[ "py/flask-debug", "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "HIGH", "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)." ]
[ 70, 43, 48, 51 ]
[ null, null, null, null ]
[ 5, 23, 19, 19 ]
[ 53, 79, 48, 42 ]
2024-11-19T00:40:18.739802+00:00
1,557,569,532,000
2e1faa4a5275f1067071a682fd4074b3d9846128
2
{ "blob_id": "2e1faa4a5275f1067071a682fd4074b3d9846128", "branch_name": "refs/heads/master", "committer_date": 1557569532000, "content_id": "18fa08495a342a2aeac39e328fa88074033545b1", "detected_licenses": [ "MIT" ], "directory_id": "19b3bd88b8b8258e69efcb0e847b69cf047f0ecd", "extension": "py", "fi...
2.390625
stackv2
#!/usr/bin/python3 from pprint import pprint as pp import os, requests, time, json from influxdb import InfluxDBClient from config import * from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning) client = InfluxDBClient(host=inf_cfg['h...
104
29.65
119
16
773
python
[{"finding_id": "codeql_py/request-without-cert-validation_61669c3beac0e313_71d4a015", "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)." ]
[ 29 ]
[ null ]
[ 9 ]
[ 57 ]
2024-11-19T00:40:22.345974+00:00
1,630,095,263,000
ad2a13fbdcd67c73667559f40b2834505ee7932e
3
{ "blob_id": "ad2a13fbdcd67c73667559f40b2834505ee7932e", "branch_name": "refs/heads/master", "committer_date": 1630095263000, "content_id": "c34ca5736f7fe9ce53f2b1a75b6227dab96a2a99", "detected_licenses": [ "MIT" ], "directory_id": "9d016bdd53740393e6918d4d99b5ce8038efe4fd", "extension": "py", "fi...
3
stackv2
import typing as tp import logging from flask import Response, Request import flask from satella.time import measure logger = logging.getLogger(__name__) __version__ = '0.5' def FlaskRequestsLogging(app, default_level_mapping: tp.Optional[tp.Dict[int, int]] = None, log_template: tp.Callable...
102
49.28
99
15
994
python
[{"finding_id": "codeql_py/log-injection_85a2a4014a88c999_f5dc3fe4", "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...
6
true
[ "CWE-117", "CWE-117", "CWE-117", "CWE-117", "CWE-117", "CWE-117" ]
[ "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection", "py/log-injection" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1).", "This log entry depen...
[ 85, 85, 87, 100, 100, 102 ]
[ null, null, null, null, null, null ]
[ 31, 42, 31, 53, 76, 53 ]
[ 34, 48, 34, 56, 82, 56 ]
2024-11-19T01:06:10.684299+00:00
1,560,314,634,000
f0b8b8d8734a9dc4bdc72f1aa8c5c70898ba3ac4
3
{ "blob_id": "f0b8b8d8734a9dc4bdc72f1aa8c5c70898ba3ac4", "branch_name": "refs/heads/master", "committer_date": 1560314634000, "content_id": "74e9cdb5d1ec8b95417998ebf29287cb7e37ac91", "detected_licenses": [ "MIT" ], "directory_id": "1ec7543aaa7b920ccbaffa98584dd7f9483c1e78", "extension": "py", "fi...
2.5625
stackv2
import nexmo import base64 import uuid import pdfkit import boto3 import os import s3transfer import io import matplotlib.pyplot as plt from datetime import datetime from jinja2 import Template from collections import defaultdict class PDFEngine: def __init__(self, participants=[], text=""): self.particip...
129
36
112
17
1,124
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_fdf56550194f9ee3_d3c98c2a", "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." ]
[ 36 ]
[ null ]
[ 24 ]
[ 42 ]
2024-11-19T01:17:15.517410+00:00
1,583,022,451,000
0cd01af293d90711ba73880a1ab4a985e2180d88
5
{ "blob_id": "0cd01af293d90711ba73880a1ab4a985e2180d88", "branch_name": "refs/heads/master", "committer_date": 1583022451000, "content_id": "02f5e71f52a39708ac47bc5ab37a448707d78de0", "detected_licenses": [ "CC0-1.0" ], "directory_id": "fa81450cac3bddf68eb5ca940cce1bed24d4a8ed", "extension": "py", ...
4.5625
stackv2
""" Random Number Guessing Game """ import random def main(): print("Hï! I'm thinking of a random number between 1 and 100.") # Create a secret number secret_number = random.randrange(1, 101) # Initialize our attempt count, we start with attemp 1. user_attempt = 1 # Set user guess to so...
55
31.38
80
16
417
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_c7933c8493391f03_345ce29f", "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." ]
[ 31, 51 ]
[ null, 52 ]
[ 19, 15 ]
[ 67, 14 ]
2024-11-19T01:17:54.731487+00:00
1,481,224,887,000
fc971f8442614c3aeff0dbd99c58ecdf60f83b43
2
{ "blob_id": "fc971f8442614c3aeff0dbd99c58ecdf60f83b43", "branch_name": "refs/heads/master", "committer_date": 1481224887000, "content_id": "e0439f669d40c52409127c058a740dd809bedd84", "detected_licenses": [ "MIT" ], "directory_id": "763756549e97b6491c72a74350e92d70e6fbcc37", "extension": "py", "fi...
2.328125
stackv2
import requests from requests.packages.urllib3.exceptions import InsecureRequestWarning import urlparse import urllib import json import logging requests.packages.urllib3.disable_warnings(InsecureRequestWarning) log = logging.getLogger(__name__) log.setLevel(logging.DEBUG) sh = logging.StreamHandler() sh.setLevel(lo...
418
34.44
106
17
3,051
python
[{"finding_id": "codeql_py/request-without-cert-validation_ddd20c0f266ef98b_293746ed", "tool_name": "codeql", "rule_id": "py/request-without-cert-validation", "finding_type": "problem", "severity": "medium", "confidence": "medium", "message": "This request may run without certificate validation because [it is disabled]...
4
true
[ "CWE-295", "CWE-295", "CWE-295", "CWE-295" ]
[ "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation", "py/request-without-cert-validation" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation because [it is disabled](1).", "This request may run without certificate validation becau...
[ 390, 398, 406, 414 ]
[ null, null, null, null ]
[ 22, 22, 22, 22 ]
[ 72, 106, 105, 75 ]
2024-11-19T01:17:59.030277+00:00
1,597,634,232,000
51960b5fea6b17b635ab10e706b6bebab4d149d3
2
{ "blob_id": "51960b5fea6b17b635ab10e706b6bebab4d149d3", "branch_name": "refs/heads/master", "committer_date": 1597634232000, "content_id": "5e4f681526dbb8f323694e5dab09cb27ed96b4d4", "detected_licenses": [ "Apache-2.0" ], "directory_id": "77c49d2e42487152c0c8316ba23e541eade35c17", "extension": "py"...
2.484375
stackv2
import json import requests import re from tqdm import tqdm from hashlib import md5 import pandas as pd from collections import defaultdict as dic from datetime import datetime import os FILENAME = datetime.now().strftime("%m-%d-%Y") credentials = json.load(open('./credentials.json','r')) def getbitcoinabusedata(): ...
55
32.29
156
19
432
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_96e4410835865657_4011819a", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [www.youtube.com](1) may be at an arbitrary position in...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [www.youtube.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 43 ]
[ null ]
[ 20 ]
[ 42 ]
2024-11-19T01:18:08.366843+00:00
1,512,197,190,000
51124743aed8d9ef2982c1d29779236573a6dbf6
3
{ "blob_id": "51124743aed8d9ef2982c1d29779236573a6dbf6", "branch_name": "refs/heads/master", "committer_date": 1512197190000, "content_id": "1595feb00cad0444e50e8b28e2d28396aae280b1", "detected_licenses": [ "MIT" ], "directory_id": "1b0bea74d7c687733775c98203ea8faba42658d2", "extension": "py", "fi...
2.953125
stackv2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Dec 1 17:15:17 2017 @author: ali """ # import starndard libraries import argparse from http.server import HTTPServer from http.server import BaseHTTPRequestHandler import json import urllib.request # NOTE: not a good practice to have exposed in a pub...
184
32.49
98
20
1,410
python
[{"finding_id": "codeql_py/partial-ssrf_4dc0fe510da5e428_d7dec39e", "tool_name": "codeql", "rule_id": "py/partial-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "medium", "message": "Part of the URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"fil...
2
true
[ "CWE-918", "CWE-918" ]
[ "py/partial-ssrf", "py/partial-ssrf" ]
[ "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM" ]
[ "Part of the URL of this request depends on a [user-provided value](1).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 42, 76 ]
[ null, null ]
[ 20, 20 ]
[ 47, 47 ]
2024-11-19T01:14:58.695043+00:00
1,590,933,980,000
1e711bf17eb36bf9abe2995e7e6c1019469ea1c1
3
{ "blob_id": "1e711bf17eb36bf9abe2995e7e6c1019469ea1c1", "branch_name": "refs/heads/master", "committer_date": 1590933980000, "content_id": "90a913907679ee21afb2954aafd5d5775934a6e5", "detected_licenses": [ "MIT" ], "directory_id": "d433692df141136329fb5fad1deca8c5141694fe", "extension": "py", "fi...
2.8125
stackv2
import tarfile import logging import os import pandas as pd import shutil import torch import tqdm import urllib.request import numpy as np from pathlib import Path from sklearn.model_selection import train_test_split from torch.utils.data import Dataset, DataLoader from typing import List, Dict from collections.abc i...
360
38.93
128
19
3,063
python
[{"finding_id": "codeql_py/tarslip_c3097d4c6aab4d45_ed5539e4", "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)." ]
[ 356 ]
[ null ]
[ 9 ]
[ 17 ]
2024-11-19T01:32:21.000424+00:00
1,565,641,094,000
f73bdd5c277bf9319c544eb54cea72950c23fa7d
3
{ "blob_id": "f73bdd5c277bf9319c544eb54cea72950c23fa7d", "branch_name": "refs/heads/master", "committer_date": 1565641094000, "content_id": "836cd63c1295b111eebfcada4164a73343903f0b", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "692dfb0115b13f5bd577c43e3c2203408476abe2", "extension": "p...
2.578125
stackv2
try: from components import resistor from components import capacitor from components import voltage except: from bommerge.components import resistor from bommerge.components import capacitor from bommerge.components import voltage from decimal import * import sys import json import requests fro...
241
41.36
117
22
2,032
python
[{"finding_id": "codeql_py/request-without-cert-validation_e51b2bb324395563_8d6aa393", "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)." ]
[ 229 ]
[ 235 ]
[ 17 ]
[ 14 ]
2024-11-19T01:43:37.363532+00:00
1,393,024,113,000
297c467c1fc82959b2403d087674dc0394a34cd7
2
{ "blob_id": "297c467c1fc82959b2403d087674dc0394a34cd7", "branch_name": "refs/heads/master", "committer_date": 1393024113000, "content_id": "664a0a7f1f2a2fd49aa198a34b81e70fce9b2e92", "detected_licenses": [ "MIT" ], "directory_id": "e872808d056584be8a68f63032dcbf85a159a23d", "extension": "py", "fi...
2.3125
stackv2
#!env/bin/python # -*- coding: utf-8 -*- from flask import Blueprint, request, render_template, flash, redirect, url_for from models import User from forms import LoginForm, RegisterForm, ChangePassForm, EditUserForm from app import db, login_manager from werkzeug.security import generate_password_hash, check_password...
130
31.42
87
19
836
python
[{"finding_id": "codeql_py/url-redirection_6bf431ecef529381_7edd2095", "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)." ]
[ 29 ]
[ null ]
[ 29 ]
[ 33 ]
2024-11-19T01:43:48.635261+00:00
1,590,455,135,000
ae522c99996c38a096968e6ceeb9773aaaa5b0d3
3
{ "blob_id": "ae522c99996c38a096968e6ceeb9773aaaa5b0d3", "branch_name": "refs/heads/master", "committer_date": 1590455135000, "content_id": "0ab5175f10cf05dd4a0ccdd55d3ec0bab7be93d9", "detected_licenses": [ "Apache-2.0" ], "directory_id": "4dac39e0fbdecede3b2ab23ea80c62776301e4cf", "extension": "py"...
2.921875
stackv2
import os import sys import requests from loguru import logger import re from typing import Tuple, List, Dict, Callable from datetime import datetime from requests.packages import urllib3 import configparser from .udatetime import * urllib3.disable_warnings() state_abbrevs = { 'Alabama': 'AL', 'Alaska': 'AK...
218
25.2
92
14
1,535
python
[{"finding_id": "codeql_py/request-without-cert-validation_19d4d2a6decc42e7_2eb4a57f", "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)." ]
[ 78 ]
[ null ]
[ 16 ]
[ 60 ]
2024-11-19T01:43:49.124049+00:00
1,401,469,473,000
c43a00bb7365444ae332e22fdd451d434b0427da
2
{ "blob_id": "c43a00bb7365444ae332e22fdd451d434b0427da", "branch_name": "refs/heads/master", "committer_date": 1401469473000, "content_id": "59e6b4d3cf7a19a9b1c32e14b9d0cae8931a5f7e", "detected_licenses": [ "MIT" ], "directory_id": "6d60ac89ee9c14bfc62342f7b33da3932f4eb564", "extension": "py", "fi...
2.34375
stackv2
import jinja2, json from jinja2 import meta as jinja2_meta import re, os from _common import * def _get_template_path(repo_template): try: path_parts = tuple(repo_template.split('/')) template = path_parts[-1] repo = path_parts[0] if repo == REPOS_DIR: repo = path_parts[1] excep...
97
33.35
117
16
795
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_6c86fbd66d7719a6_ea166954", "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." ]
[ 25 ]
[ null ]
[ 11 ]
[ 59 ]
2024-11-19T02:20:09.255430+00:00
1,609,415,291,000
3f1fb2040432b239906ffd028fd706c4d802a305
2
{ "blob_id": "3f1fb2040432b239906ffd028fd706c4d802a305", "branch_name": "refs/heads/master", "committer_date": 1609415291000, "content_id": "0bc2648a9ce9059f7b754a5e55c440324c9a592a", "detected_licenses": [ "Apache-2.0" ], "directory_id": "bd6201cb3b1fc8973dae628998c9cf3b7b97c06b", "extension": "py"...
2.46875
stackv2
#!/usr/bin/env python3 """ create native Arista eAPI requests using http """ import requests import json from pprint import pprint from getpass import getpass from urllib3.exceptions import InsecureRequestWarning import ipdb # noqa requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning) if __n...
50
20.94
77
12
274
python
[{"finding_id": "codeql_py/request-without-cert-validation_0a33004e016d791d_e07fa8ca", "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)." ]
[ 38 ]
[ 44 ]
[ 16 ]
[ 6 ]
2024-11-19T02:20:10.928413+00:00
1,611,836,254,000
457d7ef97b1e72b472a0ab513d566f7b382edc98
2
{ "blob_id": "457d7ef97b1e72b472a0ab513d566f7b382edc98", "branch_name": "refs/heads/main", "committer_date": 1611836254000, "content_id": "add720276f32b82c57111ff5708daeceb7c0b58b", "detected_licenses": [ "MIT" ], "directory_id": "330f312055fee4df7d8440ef00a21a1dabb17321", "extension": "py", "file...
2.421875
stackv2
import logging from app import jwt from flask import Blueprint, jsonify, request, abort from app.db_queries import add_user import app.db_queries as db_query from flask_jwt_extended import (create_access_token, create_refresh_token, jwt_required, jwt_refresh_token_required, ...
93
28.51
79
15
613
python
[{"finding_id": "codeql_py/stack-trace-exposure_5a249ef65f1da502_e59b9407", "tool_name": "codeql", "rule_id": "py/stack-trace-exposure", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "[Stack trace information](1) flows to this location and may be exposed to an external user.", "...
4
true
[ "CWE-209", "CWE-312", "CWE-117", "CWE-117" ]
[ "py/stack-trace-exposure", "py/clear-text-logging-sensitive-data", "py/log-injection", "py/log-injection" ]
[ "HIGH", "HIGH", "MEDIUM", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "[Stack trace information](1) flows to this location and may be exposed to an external user.", "This expression logs [sensitive data (password)](1) as clear text.", "This log entry depends on a [user-provided value](1).", "This log entry depends on a [user-provided value](1)." ]
[ 91, 24, 24, 24 ]
[ null, null, null, null ]
[ 24, 56, 49, 56 ]
[ 26, 64, 54, 64 ]
2024-11-19T01:00:08.549589+00:00
1,599,366,696,000
00f7885de1b821a2f1be2372251b27a15c20d16e
3
{ "blob_id": "00f7885de1b821a2f1be2372251b27a15c20d16e", "branch_name": "refs/heads/master", "committer_date": 1599366696000, "content_id": "34ae95ea3af920e9719d0ae1cc303d12014e27fb", "detected_licenses": [ "MIT" ], "directory_id": "83f9d223f6a1fb9bd494395d4ac33a22cae2c8af", "extension": "py", "fi...
2.5625
stackv2
import requests from lxml import etree from bs4 import BeautifulSoup from Helper.BasicHelper import BasicProxy class ProxyHelper(BasicProxy): def __init__(self): super(ProxyHelper, self).__init__() def parse(self): response = requests.get("http://www.data5u.com/", ...
43
28.91
57
16
256
python
[{"finding_id": "codeql_py/request-without-cert-validation_15a8bd370ce6ac88_902eab89", "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)." ]
[ 13, 30 ]
[ 16, 34 ]
[ 20, 17 ]
[ 44, 44 ]
2024-11-19T01:11:45.828069+00:00
1,629,317,267,000
756c9e29d77e862d4b751c40e1fde2b69eba8546
3
{ "blob_id": "756c9e29d77e862d4b751c40e1fde2b69eba8546", "branch_name": "refs/heads/master", "committer_date": 1629317267000, "content_id": "5a5c7565de9b710e22d13eade1c3b82ea0569d68", "detected_licenses": [ "MIT" ], "directory_id": "b111d4e98b3fe3537f45507679aa9f902a751742", "extension": "py", "fi...
2.890625
stackv2
#!/usr/bin/env python # coding: utf-8 import paramiko import random import string import sys def generate_path(tempdir): output_string = ''.join(random.SystemRandom().choice(string.ascii_letters + string.digits) for _ in range(10)) path = "%s/%s" %(tempdir, output_string) return path def generate_contents...
65
33.72
114
12
529
python
[{"finding_id": "codeql_py/paramiko-missing-host-key-validation_4a28b563b73878bc_44550bb1", "tool_name": "codeql", "rule_id": "py/paramiko-missing-host-key-validation", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Setting missing host key policy to AutoAddPolicy may be unsafe.", "r...
2
true
[ "CWE-295", "CWE-295" ]
[ "py/paramiko-missing-host-key-validation", "py/paramiko-missing-host-key-validation" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Setting missing host key policy to AutoAddPolicy may be unsafe.", "Setting missing host key policy to AutoAddPolicy may be unsafe." ]
[ 20, 35 ]
[ null, null ]
[ 5, 5 ]
[ 62, 62 ]
2024-11-19T01:11:54.356359+00:00
1,661,763,545,000
c3a0a823bee7919157ad29fe644dcd8c8c8bd271
2
{ "blob_id": "c3a0a823bee7919157ad29fe644dcd8c8c8bd271", "branch_name": "refs/heads/master", "committer_date": 1661763545000, "content_id": "cf8e2b5df11cf52027aa1d419aceed48dead37df", "detected_licenses": [ "Apache-2.0" ], "directory_id": "6a7005ca7e418a18cbfeec296129873aef6446a4", "extension": "py"...
2.359375
stackv2
''' Function: 人人网客户端 Author: Charles 微信公众号: Charles的皮卡丘 更新日期: 2022-03-11 ''' import time import hashlib from .baseclient import BaseClient '''人人网客户端''' class RenRenClient(BaseClient): def __init__(self, reload_history=True, **kwargs): super(RenRenClient, self).__init__(website_name='renren...
49
33.04
143
17
498
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_083dc9421df898d4_99a89e0d", "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 (id)](2) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (id)](3) is used in a hashing algorithm (MD5) that is insecure.\n[Sensitive data (secret)](4) is used in a hashing algorithm (MD5) th...
[ 48 ]
[ null ]
[ 28 ]
[ 48 ]
2024-11-19T01:11:55.618887+00:00
1,572,989,434,000
17e892730e903673cdfe49bca8f85a5aee122ca9
4
{ "blob_id": "17e892730e903673cdfe49bca8f85a5aee122ca9", "branch_name": "refs/heads/master", "committer_date": 1572989434000, "content_id": "39307ce15cdc26f5734f5dcd25ab7a67e9aff85a", "detected_licenses": [ "MIT" ], "directory_id": "2a97136ff0d5c565200f2276c2d0ceda438e1d78", "extension": "py", "fi...
4.375
stackv2
#This is a guess the number game import random print('Hello, What is your name?') name = input() print('Well, ' + name + ', I am thinking of a number between 1 and 20') secretNumber = random.randint(1, 20) for guess in range(1, 7): print('Take a guess') nGuess = int(input()) if nGuess < secretNumber: print('you...
22
26.14
73
11
168
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_1df6cfd0a7bca2fe_f83056f8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text." ]
[ 22 ]
[ null ]
[ 8 ]
[ 68 ]
2024-11-19T01:12:01.871216+00:00
1,519,606,156,000
032228537f0b724f5068f5f729adf59fb24b81a9
3
{ "blob_id": "032228537f0b724f5068f5f729adf59fb24b81a9", "branch_name": "refs/heads/master", "committer_date": 1519606156000, "content_id": "7d2cb817168cb3aec714050ff1a16275cc9c3a5e", "detected_licenses": [ "MIT" ], "directory_id": "7a0a70e9c0950e669aa2a8274e58504f76aa4101", "extension": "py", "fi...
2.875
stackv2
#!/usr/bin/python3 import requests import argparse import sys import os __version__ = '0.0.1' def main(): parser = argparse.ArgumentParser() parser.add_argument('--api-key', type=str, # I have no idea whose API key this is... but I've used it for # a long time and it has not failed me ...
79
34.46
103
13
830
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_b510bab3167222da_6e314f01", "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.", ...
6
true
[ "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" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensi...
[ 69, 70, 71, 72, 74, 76 ]
[ null, null, null, null, null, null ]
[ 14, 14, 14, 14, 14, 18 ]
[ 103, 74, 86, 83, 58, 58 ]
2024-11-19T02:10:23.845226+00:00
1,577,144,287,000
f2f838b8e4365573dcfbfc8946769184050f8377
3
{ "blob_id": "f2f838b8e4365573dcfbfc8946769184050f8377", "branch_name": "refs/heads/master", "committer_date": 1577144287000, "content_id": "84dec3e45b8a3b4d79f1dcd2035cecf2a161e931", "detected_licenses": [ "Apache-2.0" ], "directory_id": "0c71b058e8d89a6dd6d32a86cb4be0963c391a71", "extension": "py"...
2.640625
stackv2
# -*- coding: utf-8 -*- from flask_restful import reqparse, abort, Resource from yaml import safe_load_all from flask import jsonify, request import json from datacube import Datacube from restcube.datacube.api import get_products, add_products from flask_cognito import cognito_auth_required #postargparser = reqparse...
83
37.31
130
23
630
python
[{"finding_id": "codeql_py/full-ssrf_95c03be1d162b7fb_f002f050", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
1
true
[ "CWE-918" ]
[ "py/full-ssrf" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1)." ]
[ 49 ]
[ null ]
[ 27 ]
[ 86 ]
2024-11-19T02:45:23.215661+00:00
1,514,989,778,000
7c5cd1c6811a6a21d31d572680a7dc377ccbcdc2
3
{ "blob_id": "7c5cd1c6811a6a21d31d572680a7dc377ccbcdc2", "branch_name": "refs/heads/master", "committer_date": 1514989778000, "content_id": "dc9dc83f61a65f2432439c98743287a22300dd32", "detected_licenses": [ "MIT" ], "directory_id": "1fbc5a5cdfc4ef00edf871cec45114f228c327bc", "extension": "py", "fi...
2.625
stackv2
from flask import Flask, render_template from .config import config app = Flask(__name__) @app.route("/") def hello(): with open(config['path'], 'rb') as fout: try: lines = fout.readlines() except Exception as e: lines = '' if lines is not None: lista =...
22
23.59
86
14
124
python
[{"finding_id": "codeql_py/stack-trace-exposure_57502ad3eaf259a8_2a7fc4a0", "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." ]
[ 22 ]
[ null ]
[ 16 ]
[ 32 ]
2024-11-19T02:45:33.371620+00:00
1,636,787,641,000
87b29598118e89696984d1c1453bf60f788e37b2
2
{ "blob_id": "87b29598118e89696984d1c1453bf60f788e37b2", "branch_name": "refs/heads/main", "committer_date": 1636787641000, "content_id": "98891c240b005029b406bb186d34921debec6583", "detected_licenses": [ "MIT" ], "directory_id": "4ac3ab651dc0803a8ebdd59a1e56ceeef780cd54", "extension": "py", "file...
2.484375
stackv2
import face_recognition import creds from flask import Flask, jsonify, request from flask_restful import Api, Resource from pymongo import MongoClient import bcrypt import requests from datetime import date import os app = Flask(__name__) api = Api(app) client = MongoClient("mongodb://db:27017") db = client.FaceRecog...
151
28.17
97
16
1,038
python
[{"finding_id": "codeql_py/full-ssrf_ea2d25b630cb51a1_2e0c80fe", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
4
true
[ "CWE-918", "CWE-022", "CWE-022", "CWE-918" ]
[ "py/full-ssrf", "py/path-injection", "py/path-injection", "py/partial-ssrf" ]
[ "HIGH", "HIGH", "HIGH", "MEDIUM" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "The full URL of this request 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).", "Part of the URL of this request depends on a [user-provided value](1)." ]
[ 124, 128, 132, 125 ]
[ null, null, null, null ]
[ 24, 19, 19, 24 ]
[ 41, 36, 36, 70 ]
2024-11-19T02:45:44.405274+00:00
1,524,064,194,000
58c27d114bf39b09a1c2e8f57e1a61eb37e63386
2
{ "blob_id": "58c27d114bf39b09a1c2e8f57e1a61eb37e63386", "branch_name": "refs/heads/master", "committer_date": 1524064194000, "content_id": "ae44e3c89327eac12af880bb10b8db2dacb9de08", "detected_licenses": [ "MIT" ], "directory_id": "a20b980771e1846489bb66eef830c51d51c812fb", "extension": "py", "fi...
2.5
stackv2
# -*- coding: utf-8 -*- """ """ import logging import cmdln from apiaccesstoken.tokenmanager import Manager class HelperCmds(cmdln.Cmdln): """Usage: tokenhelper SUBCOMMAND [ARGS...] tokenhelper help SUBCOMMAND ${command_list} ${help_list} """ def do_make_access_secret(self, su...
88
26.05
77
15
508
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_5e67ca08ce96e5b8_79b9b9b0", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (secret)](1) as clear text.", "r...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (secret)](1) as clear text." ]
[ 68 ]
[ 74 ]
[ 13 ]
[ 14 ]
2024-11-19T02:45:51.165094+00:00
1,645,808,224,000
96959a931a305519a89daeb0fbcdd83610089710
2
{ "blob_id": "96959a931a305519a89daeb0fbcdd83610089710", "branch_name": "refs/heads/master", "committer_date": 1645808224000, "content_id": "d6fb8c51cdd7c76f90cf566cacac8bc7ba992756", "detected_licenses": [ "MIT" ], "directory_id": "19956da216c9d97ac6cf944818822959542ff725", "extension": "py", "fi...
2.3125
stackv2
import os import uuid import requests from whitenoise import WhiteNoise from flask import (Flask, flash, redirect, render_template, request, send_from_directory, url_for) from src import sample UPLOAD_FOLDER = './static/images/' ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg']) YANDEX_API_KEY = 'Y...
97
32.74
88
18
753
python
[{"finding_id": "codeql_py/url-redirection_93db22928703e3db_744903f0", "tool_name": "codeql", "rule_id": "py/url-redirection", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "Untrusted URL redirection depends on a [user-provided value](1).", "remediation": "", "location": {"file_...
2
true
[ "CWE-601", "CWE-601" ]
[ "py/url-redirection", "py/url-redirection" ]
[ "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM" ]
[ "Untrusted URL redirection depends on a [user-provided value](1).", "Untrusted URL redirection depends on a [user-provided value](1)." ]
[ 51, 62 ]
[ null, null ]
[ 29, 33 ]
[ 40, 44 ]
2024-11-19T02:45:53.537158+00:00
1,628,066,930,000
133d81951c0a25c9212c9d8c5bc5ea1d3ef6bc49
2
{ "blob_id": "133d81951c0a25c9212c9d8c5bc5ea1d3ef6bc49", "branch_name": "refs/heads/main", "committer_date": 1628066930000, "content_id": "6331794cc113e6d3b88d3aa3a93c548d590295e3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "675f754a173c44e1a30a49227692755e2e75ae24", "extension": "py", ...
2.4375
stackv2
import requests, hmac, hashlib, base64, time, random, os, json, shutil from MultiBot.api_tokens import TCT_APPID, TCT_SECRET_ID, TCT_SECRET_KEY from MultiBot.sessions.argument import Argument, ArgSession from MultiBot.sessions.general import Session from MultiBot.responses import ResponseMsg from MultiBot.utils import ...
329
30.95
117
15
2,578
python
[{"finding_id": "codeql_py/weak-sensitive-data-hashing_dcd984d8e53cd585_102c243d", "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.\n[Sensitive data (secret)](2) is used in a hashing algorithm (SHA1) that is insecure.\n[Sensitive data (secret)](3) is used in a hashing algorithm (SHA1) that is insecure." ]
[ 233 ]
[ null ]
[ 28 ]
[ 51 ]
2024-11-19T02:45:58.221356+00:00
1,567,528,274,000
cf8746c8332a158918ce4a88b2503b55c1e3ece1
3
{ "blob_id": "cf8746c8332a158918ce4a88b2503b55c1e3ece1", "branch_name": "refs/heads/master", "committer_date": 1567528274000, "content_id": "b045a7850630ec49ef8e0e66f955fa4f4992cac8", "detected_licenses": [ "MIT" ], "directory_id": "d882ae0beb5bd4f3864554c5ed842750ab1eeab1", "extension": "py", "fi...
2.546875
stackv2
import os import re import io import sys import json import pickle import shutil import zipfile import tarfile import hashlib import importlib import urllib.request # General methods def hash_id(what, severity=8): return hashlib.sha1(str(what).encode()).hexdigest()[:severity] def dump(json_object): return ...
307
24.69
100
20
1,761
python
[{"finding_id": "codeql_py/tarslip_c7078b2733f77c9a_70ed6a8e", "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)." ]
[ 82 ]
[ null ]
[ 5 ]
[ 12 ]
2024-11-19T02:57:16.235058+00:00
1,606,836,501,000
7dfa4eb1f526526c2065208c08e9c70bb0a6552b
2
{ "blob_id": "7dfa4eb1f526526c2065208c08e9c70bb0a6552b", "branch_name": "refs/heads/main", "committer_date": 1606836501000, "content_id": "ceeabfabb88d4f8675177ea106da1b976d83b796", "detected_licenses": [ "MIT" ], "directory_id": "988061b0e6ecd4313e9aa4e4a50d2b84420c72bf", "extension": "py", "file...
2.46875
stackv2
from os import error import requests from urllib.parse import urlparse import streamlit as st from transformers import pipeline import pandas as pd import altair as alt ''' # Warcraft Forum Shitshow Detector 🔎 The World of Warcraft is a magical one, full of brave and noble knights. 🧙‍♂️🧝‍♀️ That the players them...
142
29.64
103
20
1,162
python
[{"finding_id": "codeql_py/full-ssrf_47a1ac70ed19cea2_2fee24d7", "tool_name": "codeql", "rule_id": "py/full-ssrf", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "The full URL of this request depends on a [user-provided value](1).", "remediation": "", "location": {"file_path": "u...
1
true
[ "CWE-918" ]
[ "py/full-ssrf" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The full URL of this request depends on a [user-provided value](1)." ]
[ 85 ]
[ null ]
[ 12 ]
[ 29 ]
2024-11-19T02:57:19.538537+00:00
1,429,300,804,000
2f5f0bd2533ffc63d395a247bd3abf834cf82487
2
{ "blob_id": "2f5f0bd2533ffc63d395a247bd3abf834cf82487", "branch_name": "refs/heads/master", "committer_date": 1429300804000, "content_id": "18c2f7d1be033c8fed1e20f3e2d4a48a520790b5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "30e56ba86271373689e710406749636944367e3e", "extension": "py"...
2.484375
stackv2
#This agent creates a server, waits for incoming HTTP requests and channels them to the proper agent. In this #case the values received are the value of the light sensed through the photoresistor in the Arduino and a command #from the user stating the activity he wants to perform. import time, httplib, urllib, os, s...
190
29.94
115
19
1,657
python
[{"finding_id": "codeql_py/path-injection_4ae1a7c29c68b968_b99d1329", "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)." ]
[ 146 ]
[ null ]
[ 14 ]
[ 33 ]
2024-11-19T03:12:13.437942+00:00
1,689,005,260,000
0d6582f7145506c50225718088128a870e96edde
3
{ "blob_id": "0d6582f7145506c50225718088128a870e96edde", "branch_name": "refs/heads/master", "committer_date": 1689005260000, "content_id": "9b9b2ed1fc74231347207a00084df8daa5a8857c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "3c42a12cc71c3c701c3b4328f30d6bfa460d81c0", "extension": "py"...
2.859375
stackv2
import boto3 import jinja2 import json import yaml from flask import request, current_app from flask.views import MethodView from dataservice.api.common.schemas import ( response_generator, paginated_generator, error_response_generator ) from dataservice.extensions import db class CRUDView(MethodView): ...
243
31.68
79
20
1,647
python
[{"finding_id": "codeql_py/jinja2/autoescape-false_b0d1897a54882c42_1b6989f3", "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." ]
[ 31 ]
[ 33 ]
[ 16 ]
[ 6 ]
2024-11-19T01:57:20.111771+00:00
1,629,070,069,000
44d269ec7e134f48e3c9861c4908c1c70f17182c
3
{ "blob_id": "44d269ec7e134f48e3c9861c4908c1c70f17182c", "branch_name": "refs/heads/master", "committer_date": 1629070069000, "content_id": "5dffebdae24a22f364b81aca465c16d846ba0c72", "detected_licenses": [ "Apache-2.0" ], "directory_id": "16c3d340e2112ee82d8f6ee97fa8ec105dbdab44", "extension": "py"...
3.125
stackv2
#!/usr/bin/python # Red Hat Satellite - API Guide - 4.2.1. Creating Objects Using Python # Link: https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/6.1/html-single/API_Guide/index.html#idm4983248 # # The following script connects to the Red Hat Satellite 6 API and creates a new organization, then creates ...
123
30.46
127
17
907
python
[{"finding_id": "codeql_py/request-without-cert-validation_ffe7ec8e29672d33_c9c6ed14", "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) by [this value](2).", "This request may run without certificate validation because [it is disabled](1) by [this value](2)." ]
[ 50, 60 ]
[ null, 65 ]
[ 9, 14 ]
[ 77, 30 ]
2024-11-19T01:57:20.622804+00:00
1,488,841,893,000
fe0c2710ac2fc85953bd48a184025603a6ded84b
2
{ "blob_id": "fe0c2710ac2fc85953bd48a184025603a6ded84b", "branch_name": "refs/heads/master", "committer_date": 1488841893000, "content_id": "85d2e95d84a0a36b4d4a789b7920b3e03ee46679", "detected_licenses": [ "MIT" ], "directory_id": "0a87b342e79bcd86e6ed75a41938d6f7308976ae", "extension": "py", "fi...
2.34375
stackv2
"""checkdb - check the database and generate a new htpasswd file""" import os import string import whrandom import crypt import sys import time import rfc822 import grinsdb import grpasswd # Keys on which we want to index KEYS=['email'] class Error(Exception): pass def main(): if len(sys.argv) > 1: ...
123
26.99
70
15
836
python
[{"finding_id": "codeql_py/clear-text-storage-sensitive-data_9666aa84026fcdde_c89ac1ea", "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." ]
[ 121 ]
[ null ]
[ 14 ]
[ 38 ]
2024-11-19T02:10:48.672605+00:00
1,625,313,119,000
6f3acc44153f61402c717cd1b9e571023886b6b9
3
{ "blob_id": "6f3acc44153f61402c717cd1b9e571023886b6b9", "branch_name": "refs/heads/main", "committer_date": 1625313119000, "content_id": "b7a399f25d50cd1f40b921195282191be6dd6a0f", "detected_licenses": [ "Unlicense" ], "directory_id": "b52384d3b432893fc6f7d7e94a9632f7dff9a97a", "extension": "py", ...
3.078125
stackv2
# coding=utf-8 # Libraries import pyinputplus as pyin from user import User from base import Session, engine, Base, create_session from sqlalchemy.orm.exc import NoResultFound import pprint # Functions def query_user(): # Call create_session() func to local object session = create_session() # Query the ...
78
27.24
85
14
466
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_a062a75feba1cef9_f714cf45", "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." ]
[ 37 ]
[ null ]
[ 11 ]
[ 28 ]
2024-11-19T02:10:55.736696+00:00
1,532,869,064,000
a55d4156a59d8636e3328a9f329f2b38335a6fa8
2
{ "blob_id": "a55d4156a59d8636e3328a9f329f2b38335a6fa8", "branch_name": "refs/heads/master", "committer_date": 1532869064000, "content_id": "6d61020c4e02e3fa7c53a54f19456a6665a1cf49", "detected_licenses": [ "MIT" ], "directory_id": "b019e649967b9fc74fa603ebaec6230071db9bc1", "extension": "py", "fi...
2.484375
stackv2
# coding:utf-8 import jieba import jieba.analyse from gensim.models import word2vec import os import re from bs4 import BeautifulSoup from input_dispose import * __author__ = 'XJX' __date__ = '2018.06.14' """ description: 从文件中找到匹配度最高的句子 """ logger = logging.getLogger(__name__) model = word2vec.Word2Vec.load(".....
93
28.75
138
14
729
python
[{"finding_id": "codeql_py/bad-tag-filter_ba9779ddc6798995_e9662109", "tool_name": "codeql", "rule_id": "py/bad-tag-filter", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "This regular expression only parses --> and not --!> as a HTML comment end tag.", "remediation": "", "location":...
1
true
[ "CWE-116" ]
[ "py/bad-tag-filter" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This regular expression only parses --> and not --!> as a HTML comment end tag." ]
[ 37 ]
[ null ]
[ 24 ]
[ 27 ]
2024-11-19T02:11:00.927565+00:00
1,530,397,034,000
398bf17ff757a6ac4db4fa562cfbdc4019a28f46
3
{ "blob_id": "398bf17ff757a6ac4db4fa562cfbdc4019a28f46", "branch_name": "refs/heads/master", "committer_date": 1530397034000, "content_id": "50f8064ed7695fa37a2d56b05d1894eb81038f4c", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ba14dedcc99297ac424580d52c276cc2862bcaeb", "extension": "py"...
2.9375
stackv2
import statistics from xlrd import open_workbook, xldate_as_datetime from p01_kennenlernen.meinebibliothek import alter book = open_workbook('O:/___Python/personen.xlsx') sheet = book.sheet_by_index(0) nrows = sheet.nrows ncols = sheet.ncols for i in range(1, nrows): row_slice = sheet.row_slice(i, 0, ncols) ...
24
23.58
104
11
174
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_8a60b85be5610643_41f874d8", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 19 ]
[ null ]
[ 7 ]
[ 17 ]
2024-11-19T02:11:06.849917+00:00
1,618,204,436,000
785a6062b0badf8a7d2f3d6918b0bc8ed5685457
2
{ "blob_id": "785a6062b0badf8a7d2f3d6918b0bc8ed5685457", "branch_name": "refs/heads/master", "committer_date": 1618204436000, "content_id": "e39c70abff62ad52c2d3858bb60c4c00f94d5f7a", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "678dd7c17cc8d32a9b0672f53636b2572a581763", "extension": "p...
2.40625
stackv2
from django.shortcuts import render import hashlib from user.models import LoginUser from django.http import HttpResponseRedirect,HttpResponse,JsonResponse import json # Create your views here. def hello(request): return HttpResponse('hello world') def setPassword(password): ''' 加密密码 ''' md5 = has...
140
31.16
116
21
915
python
[{"finding_id": "codeql_py/insecure-cookie_104f68c923e5bd2b_306c1c5d", "tool_name": "codeql", "rule_id": "py/insecure-cookie", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Cookie is added to response without the 'secure' flag being set.", "remediation": "", "location": {"file_path"...
8
true
[ "CWE-614", "CWE-614", "CWE-312", "CWE-312", "CWE-312", "CWE-1004", "CWE-1004", "CWE-327" ]
[ "py/insecure-cookie", "py/insecure-cookie", "py/clear-text-storage-sensitive-data", "py/clear-text-logging-sensitive-data", "py/clear-text-logging-sensitive-data", "py/client-exposed-cookie", "py/client-exposed-cookie", "py/weak-sensitive-data-hashing" ]
[ "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH", "HIGH" ]
[ "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM", "MEDIUM" ]
[ "Cookie is added to response without the 'secure' flag being set.", "Cookie is added to response without the 'secure' flag being set.", "This expression stores [sensitive data (password)](1) as clear text.", "This expression logs [sensitive data (password)](1) as clear text.", "This expression logs [sensiti...
[ 114, 115, 115, 59, 95, 114, 115, 16 ]
[ null, null, null, null, null, null, null, null ]
[ 29, 29, 61, 25, 25, 29, 29, 16 ]
[ 70, 70, 69, 33, 33, 70, 70, 33 ]
2024-11-19T02:11:11.214825+00:00
1,591,362,559,000
2492898639de5803dfb5177a7a63b269b12cb60c
3
{ "blob_id": "2492898639de5803dfb5177a7a63b269b12cb60c", "branch_name": "refs/heads/master", "committer_date": 1591362559000, "content_id": "b2e20f5f26afae97e363b0f59e591eee44c115f5", "detected_licenses": [ "Apache-2.0" ], "directory_id": "609a1dee8c5be41e0fb18865fc153464bfc24a20", "extension": "py"...
3.453125
stackv2
import re import nltk import pandas as pd from nltk.corpus import stopwords from sklearn.utils import resample # Performs basic tokenizing and character replacements def pre_process_text(frame): frame.dropna(inplace=True) stop_words = set(stopwords.words('english')) for index, sentence in enumerate(frame)...
50
36.24
115
13
449
python
[{"finding_id": "codeql_py/overly-large-range_6f6d294c098ff79f_553ef813", "tool_name": "codeql", "rule_id": "py/overly-large-range", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "Suspicious character range that overlaps with |-| in the same character class.", "remediation": "", "loc...
1
true
[ "CWE-020" ]
[ "py/overly-large-range" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "Suspicious character range that overlaps with |-| in the same character class." ]
[ 14 ]
[ null ]
[ 52 ]
[ 55 ]
2024-11-19T02:11:28.859529+00:00
1,594,349,290,000
12074207e67a15f854a0552ec9ecc03a7f8317a6
3
{ "blob_id": "12074207e67a15f854a0552ec9ecc03a7f8317a6", "branch_name": "refs/heads/master", "committer_date": 1594349290000, "content_id": "b9dd4ed598ac42cce3795c43fbdf24159b64ef92", "detected_licenses": [ "MIT" ], "directory_id": "1eba7c5c7962a03cc6e8d3fa3861edfa11d2fd6d", "extension": "py", "fi...
2.84375
stackv2
import time import os import re from IPython import embed class Device: def __init__(self, sn=None, wireless=False): # serial number or other identifier of connected device self.sn = None devices = self.get_device_identifier() if not devices: raise EnvironmentError( ...
164
35.42
131
23
1,717
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_21207d18588df78d_2b621bc7", "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." ]
[ 129 ]
[ null ]
[ 19 ]
[ 66 ]
2024-11-19T02:32:42.470537+00:00
1,513,701,527,000
e440da1a4b485a677e834aced594bc02467e8749
3
{ "blob_id": "e440da1a4b485a677e834aced594bc02467e8749", "branch_name": "refs/heads/master", "committer_date": 1513701694000, "content_id": "1dfc791951dfc59acf5109f42f689d84b1e60d08", "detected_licenses": [ "Apache-2.0" ], "directory_id": "b1b9df6de34f4458401752f1ff1fd2fdfcadb561", "extension": "py"...
2.71875
stackv2
# These are all the modules we'll be using later. Make sure you can import them # before proceeding further. #This is getting data for image recognition used in assignment 2 from __future__ import print_function import matplotlib.pyplot as plt import numpy as np import os import sys import tarfile #was commented out b...
327
40.05
143
18
3,271
python
[{"finding_id": "codeql_py/tarslip_a712e87559d837fc_284a7a01", "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)." ]
[ 82 ]
[ null ]
[ 5 ]
[ 8 ]
2024-11-19T02:33:03.860544+00:00
1,612,809,364,000
43a58be9973a4bd0893accf9b92c9dccd08a3e92
2
{ "blob_id": "43a58be9973a4bd0893accf9b92c9dccd08a3e92", "branch_name": "refs/heads/main", "committer_date": 1612809364000, "content_id": "90189d231d19bef942d50012c063547f10da8bbd", "detected_licenses": [ "MIT" ], "directory_id": "1518e8f9a366e973208129f57d91e3c3a0982536", "extension": "py", "file...
2.484375
stackv2
import functools from loguru import logger from msu_quiz.models.models import Question, Quiz, User from msu_quiz import db, login_manager from flask import Blueprint, redirect, render_template, session, request, url_for, flash from flask_login import login_required, logout_user, current_user, login_user from msu_quiz.u...
78
31.73
88
16
519
python
[{"finding_id": "codeql_py/url-redirection_d9e64663e989cca1_0a35b5b3", "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)." ]
[ 60 ]
[ null ]
[ 29 ]
[ 63 ]
2024-11-19T02:33:05.198513+00:00
1,632,709,047,000
96c6677361425469f87c4554d53d77f524492831
3
{ "blob_id": "96c6677361425469f87c4554d53d77f524492831", "branch_name": "refs/heads/master", "committer_date": 1632709047000, "content_id": "81101a3d13f70e08a5ebaedc79d1f10460868463", "detected_licenses": [ "Apache-2.0" ], "directory_id": "ee1a5e24be68962d3163f6c18571769afc291053", "extension": "py"...
2.515625
stackv2
# copyright (c) 2021 PaddlePaddle Authors. All Rights Reserve. # # 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 applica...
180
33.05
109
12
2,103
python
[{"finding_id": "codeql_py/clear-text-logging-sensitive-data_4c001cbc97c95f48_b5e92855", "tool_name": "codeql", "rule_id": "py/clear-text-logging-sensitive-data", "finding_type": "path-problem", "severity": "medium", "confidence": "high", "message": "This expression logs [sensitive data (private)](1) as clear text.", "...
1
true
[ "CWE-312" ]
[ "py/clear-text-logging-sensitive-data" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "This expression logs [sensitive data (private)](1) as clear text." ]
[ 71 ]
[ null ]
[ 20 ]
[ 35 ]
2024-11-19T02:33:36.900979+00:00
1,285,773,096,000
13d61446b7bf20ba4f91885a23a715e6cfae6405
2
{ "blob_id": "13d61446b7bf20ba4f91885a23a715e6cfae6405", "branch_name": "refs/heads/master", "committer_date": 1285773096000, "content_id": "245a66f2a22e5931910abf76bb3fbe698c0439cc", "detected_licenses": [ "BSD-3-Clause" ], "directory_id": "54dae7144451668945a28bde270fee7593279152", "extension": "p...
2.359375
stackv2
# -*- coding: utf-8 -*- """ Shot-O-matic ~~~~~~ A simple screenshot upload/showcase website, using the Flask microframework (http://flask.pocoo.org). :copyright: (c) 2010 by Aljoscha Krettek. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import os impo...
303
33.49
80
20
2,214
python
[{"finding_id": "codeql_py/url-redirection_405cb0d5d9f66528_c9e0aae8", "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)." ]
[ 290 ]
[ null ]
[ 33 ]
[ 53 ]
2024-11-19T02:59:14.273658+00:00
1,572,983,431,000
2f9d629f23b6ca9ddfb2d95f19283bad2a243260
2
{ "blob_id": "2f9d629f23b6ca9ddfb2d95f19283bad2a243260", "branch_name": "refs/heads/master", "committer_date": 1572983431000, "content_id": "ea3a31d76a040a23c8317a74a2dbb3d52c8a2ef3", "detected_licenses": [ "Apache-2.0" ], "directory_id": "5292997e425ca1b9bf2b54fcd21a05961c0a81e6", "extension": "py"...
2.3125
stackv2
# Copyright 2019, University of Illinois at Chicago and Oregon Health & Science University # This file is part of the deduplicator project. # See the ReadMe.txt file for licensing information. def add_database_identifier(list_of_dicts): """ ID is source database: unique identifier for that database/accession number ...
68
32.21
95
22
698
python
[{"finding_id": "codeql_py/incomplete-url-substring-sanitization_4e8aa984ad06463c_de4e4074", "tool_name": "codeql", "rule_id": "py/incomplete-url-substring-sanitization", "finding_type": "problem", "severity": "medium", "confidence": "high", "message": "The string [search.ebscohost.com](1) may be at an arbitrary positi...
1
true
[ "CWE-020" ]
[ "py/incomplete-url-substring-sanitization" ]
[ "HIGH" ]
[ "MEDIUM" ]
[ "The string [search.ebscohost.com](1) may be at an arbitrary position in the sanitized URL." ]
[ 30 ]
[ null ]
[ 7 ]
[ 54 ]